Package com.jk.web.faces.config
Class JKFacesConfigurations
java.lang.Object
com.jk.web.faces.config.JKFacesConfigurations
This class represents configuration settings.
- Version:
 - 1.0
 - Author:
 - Dr. Jalal H. Kiswani
 
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionfindTagMapping(JKTagWrapper wrapper) This method searches for a mapping that matches the tag name and attribute values of the wrapper.findTagMapping(String tagName) This method retrieves aJKTagMappingfor a given tag name.static JKFacesConfigurationsThis method gets the singleton instance ofJKFacesConfigurationsclass.getNamespaceByLetter(String namespaceLetter) This method retrieves aJKNamespaceobject based on its name space letter.getNameSpaceByUrl(String url, boolean create) This method retrieves aJKNamespaceobject based on its URL or creates one if it doesn't exist.This method gets the list of theJKNamespaceobjects.This method gets the list of theJKTagMappingobjects.static booleanThis method checks if decoration is enabled globally.booleanThis method checks if decoration of fix links is enabled.booleanThis method checks if decoration of tag mappings is enabled.protected voidThis method loads name spaces from the JSF container and adds them to the configurations.static voidThis main method is used for testing the functionality ofJKFacesConfigurationsclass.voidsetNamespaces(List<JKNamespace> namespaces) This method sets the list ofJKNamespaceobjects to the provided list.voidsetTagMapping(List<JKTagMapping> tagMapping) This method sets the list ofJKTagMappingobjects to the provided list. 
- 
Constructor Details
- 
JKFacesConfigurations
public JKFacesConfigurations() 
 - 
 - 
Method Details
- 
getInstance
This method gets the singleton instance ofJKFacesConfigurationsclass.- Returns:
 - the singleton instance of 
JKFacesConfigurationsclass. 
 - 
main
This main method is used for testing the functionality ofJKFacesConfigurationsclass.- Parameters:
 args- the command-line arguments.
 - 
findTagMapping
This method searches for a mapping that matches the tag name and attribute values of the wrapper.- Parameters:
 wrapper- Specifies theJKTagWrapperto find a mapping for.- Returns:
 - the matching 
JKTagMapping, or null if no mapping is found. 
 - 
findTagMapping
This method retrieves aJKTagMappingfor a given tag name.- Parameters:
 tagName- Specifies the name of the tag to find a mapping for.- Returns:
 - the matching 
JKTagMapping, or null if no mapping is found. 
 - 
getNamespaceByLetter
This method retrieves aJKNamespaceobject based on its name space letter.- Parameters:
 namespaceLetter- Specifies the letter associated with the name space.- Returns:
 - the 
JKNamespaceobject matching the provided name space letter, or null if not found. 
 - 
getNameSpaceByUrl
This method retrieves aJKNamespaceobject based on its URL or creates one if it doesn't exist.- Parameters:
 url- Specifies the URL associated with the name space.create- Indicates whether to create a newJKNamespaceif not found.- Returns:
 - the 
JKNamespaceobject matching the provided URL, or a newly created one if 'create' is true and not found. Returns null if 'create' is false and the name space is not found. 
 - 
getNamespaces
This method gets the list of theJKNamespaceobjects.- Returns:
 - the list of the 
JKNamespaceobjects. 
 - 
getTagMapping
This method gets the list of theJKTagMappingobjects.- Returns:
 - the list of the 
JKTagMappingobjects. 
 - 
loadAllNamesSpacesFromJsfContainer
protected void loadAllNamesSpacesFromJsfContainer()This method loads name spaces from the JSF container and adds them to the configurations. - 
setNamespaces
This method sets the list ofJKNamespaceobjects to the provided list.- Parameters:
 namespaces- Specifies the new list ofJKNamespaceobjects.
 - 
setTagMapping
This method sets the list ofJKTagMappingobjects to the provided list.- Parameters:
 tagMapping- Specifies the new list ofJKTagMappingobjects.
 - 
isDecorate
public static boolean isDecorate()This method checks if decoration is enabled globally.- Returns:
 - true, if decoration is enabled, false otherwise.
 
 - 
isDecorateMapping
public boolean isDecorateMapping()This method checks if decoration of tag mappings is enabled.- Returns:
 - true, if decoration of tag mappings is enabled, faLse otherwise.
 
 - 
isDecorateFixLinks
public boolean isDecorateFixLinks()This method checks if decoration of fix links is enabled.- Returns:
 - true, if decoration of fix links is enabled, false otherwise.
 
 
 -