org.eclipse.jst.jsf.facesconfig.util
Class FacesConfigArtifactEdit

java.lang.Object
  extended by ArtifactEdit
      extended by org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit

public final class FacesConfigArtifactEdit
extends ArtifactEdit

The artifact edit for the JSF Application Configuration (faces-config) model - may be used but not extended by clients. This class maybe refactored to a different package in the future.


Constructor Summary
FacesConfigArtifactEdit(IProject aProject, boolean toAccessAsReadOnly)
           
 
Method Summary
 Resource getDeploymentDescriptorResource()
           
 EObject getDeploymentDescriptorRoot()
           
 FacesConfigType getFacesConfig()
           
static FacesConfigArtifactEdit getFacesConfigArtifactEditForRead(IProject aProject)
          Deprecated. Use getFacesConfigArtifactEditForRead(IProject, String) instead. This method is dangerous because the caller is assuming that the "default" model exists and knows nothing about where it is coming from.
static FacesConfigArtifactEdit getFacesConfigArtifactEditForRead(IProject aProject, java.lang.String sConfigFile)
           
static FacesConfigArtifactEdit getFacesConfigArtifactEditForWrite(IProject aProject)
          Deprecated. Use getFacesConfigArtifactEditForWrite(IProject, String) instead. This method is dangerous because the caller is assuming that the "default" model exists and knows nothing about where it is coming from.
static FacesConfigArtifactEdit getFacesConfigArtifactEditForWrite(IProject aProject, java.lang.String sConfigFile)
           
 URI getFacesConfigURI()
           
 IFile getFile()
           
 IDOMModel getIDOMModel()
           
 boolean isDisposed()
           
 void setFilename(java.lang.String filename)
          Sets an instance's filename, used to create a URI and load a model.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FacesConfigArtifactEdit

public FacesConfigArtifactEdit(IProject aProject,
                               boolean toAccessAsReadOnly)
                        throws java.lang.IllegalArgumentException
Parameters:
aProject -
toAccessAsReadOnly -
Throws:
java.lang.IllegalArgumentException
Method Detail

getFacesConfigArtifactEditForRead

public static FacesConfigArtifactEdit getFacesConfigArtifactEditForRead(IProject aProject,
                                                                        java.lang.String sConfigFile)
Parameters:
aProject -
sConfigFile -
Returns:
the faces config artifact for the file config file sConfig in project aProject. Opened only for read access (no write)

getFacesConfigArtifactEditForRead

public static FacesConfigArtifactEdit getFacesConfigArtifactEditForRead(IProject aProject)
Deprecated. Use getFacesConfigArtifactEditForRead(IProject, String) instead. This method is dangerous because the caller is assuming that the "default" model exists and knows nothing about where it is coming from.

Parameters:
aProject -
Returns:
the default artifact edit

getFacesConfigArtifactEditForWrite

public static FacesConfigArtifactEdit getFacesConfigArtifactEditForWrite(IProject aProject,
                                                                         java.lang.String sConfigFile)
Parameters:
aProject -
sConfigFile -
Returns:
the faces config artifact for the file config file sConfig in project aProject. Opened for both write and read access

getFacesConfigArtifactEditForWrite

public static FacesConfigArtifactEdit getFacesConfigArtifactEditForWrite(IProject aProject)
Deprecated. Use getFacesConfigArtifactEditForWrite(IProject, String) instead. This method is dangerous because the caller is assuming that the "default" model exists and knows nothing about where it is coming from.

Parameters:
aProject -
Returns:
the default artifact edit for read

getFacesConfig

public FacesConfigType getFacesConfig()
Returns:
the root model object for this artifact edit model

getFacesConfigURI

public URI getFacesConfigURI()
Returns:
the uri pointing to the source of this faces config artifact

getDeploymentDescriptorRoot

public EObject getDeploymentDescriptorRoot()
Returns:
the model root

getDeploymentDescriptorResource

public Resource getDeploymentDescriptorResource()
Returns:
the EMF resource retrieved for this artifact's uri

setFilename

public void setFilename(java.lang.String filename)
Sets an instance's filename, used to create a URI and load a model.

Parameters:
filename - This instance's filename.

getIDOMModel

public IDOMModel getIDOMModel()
Returns:
the DOM model for the Struts config. file.

getFile

public IFile getFile()
Returns:
the IFile used to load the model or null if none.

isDisposed

public boolean isDisposed()
Returns:
true if the underlying model has been disposed