| java.lang.Object org.netbeans.modules.web.jsf.api.ConfigurationUtils
ConfigurationUtils | public class ConfigurationUtils (Code) | | author: Petr Pisl author: Po-Ting Wu |
Method Summary | |
public static FileObject | findFacesConfigForManagedBean(WebModule webModule, String name) Helper method which finds the faces configuration file, where is the managed bean
defined.
Parameters: webModule - the web module, wher the managed bean is defined. Parameters: name - Name of the managed bean. | public static synchronized JSFConfigModel | getConfigModel(FileObject confFile, boolean editable) This methods returns the model source for the faces config file.
Parameters: confFile - - the faces config file Parameters: editable - - if the source will be editable. | public static FileObject[] | getFacesConfigFiles(WebModule webModule) The method returns all faces configuration files in the web module.
If there is faces-config.xml file in the web project, then it's returned
as the first one. | public static Servlet | getFacesServlet(WebModule webModule) The methods finds the definition of the Faces Servlet in the deployment descriptor
of the given web module.
Parameters: webModule - the given web module, where the Faces Servlet is. | public static String | getFacesServletMapping(WebModule webModule) Returns the mapping for the Faces Servlet.
Parameters: webModule - web module, where the JSF framework should be defined The maping for the faces servlet. | public static String | translateURI(String mapping, String uri) Translates an URI to be executed with faces serlvet with the given mapping.
For example, the servlet has mapping *.jsf then uri hello.jsp will be
translated to hello.jsf. |
findFacesConfigForManagedBean | public static FileObject findFacesConfigForManagedBean(WebModule webModule, String name)(Code) | | Helper method which finds the faces configuration file, where is the managed bean
defined.
Parameters: webModule - the web module, wher the managed bean is defined. Parameters: name - Name of the managed bean. faces configuration file, where the managed bean is defined. Null, if a beanwith the given name is not defined in the web module. |
getConfigModel | public static synchronized JSFConfigModel getConfigModel(FileObject confFile, boolean editable)(Code) | | This methods returns the model source for the faces config file.
Parameters: confFile - - the faces config file Parameters: editable - - if the source will be editable. Clients should use true. The ModelSource for the configuration file. If the file is not faces config fileor a version which is not handled, then returns null. |
getFacesConfigFiles | public static FileObject[] getFacesConfigFiles(WebModule webModule)(Code) | | The method returns all faces configuration files in the web module.
If there is faces-config.xml file in the web project, then it's returned
as the first one. Other configuration files are in the same order as are
listed in the javax.faces.CONFIG_FILES attribute in the web.xml file.
Parameters: webModule - - the web module, where you want to find the facesconfiguration files array of all faces configuration files. If there are not any configuration file, then empty array is returned. |
getFacesServlet | public static Servlet getFacesServlet(WebModule webModule)(Code) | | The methods finds the definition of the Faces Servlet in the deployment descriptor
of the given web module.
Parameters: webModule - the given web module, where the Faces Servlet is. Faces Servlet definition or null if the Faces Servlet definition is not found in the given web module. |
getFacesServletMapping | public static String getFacesServletMapping(WebModule webModule)(Code) | | Returns the mapping for the Faces Servlet.
Parameters: webModule - web module, where the JSF framework should be defined The maping for the faces servlet. Null if the web module doesn'tcontains definition of faces servlet. |
translateURI | public static String translateURI(String mapping, String uri)(Code) | | Translates an URI to be executed with faces serlvet with the given mapping.
For example, the servlet has mapping *.jsf then uri hello.jsp will be
translated to hello.jsf. In the case where the mapping is /faces/*
will be translated to faces/hello.jsp.
Parameters: mapping - The servlet mapping Parameters: uri - The original URI The translated URI |
|
|