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 aJKTagMapping
for a given tag name.static JKFacesConfigurations
This method gets the singleton instance ofJKFacesConfigurations
class.getNamespaceByLetter
(String namespaceLetter) This method retrieves aJKNamespace
object based on its name space letter.getNameSpaceByUrl
(String url, boolean create) This method retrieves aJKNamespace
object based on its URL or creates one if it doesn't exist.This method gets the list of theJKNamespace
objects.This method gets the list of theJKTagMapping
objects.static boolean
This method checks if decoration is enabled globally.boolean
This method checks if decoration of fix links is enabled.boolean
This method checks if decoration of tag mappings is enabled.protected void
This method loads name spaces from the JSF container and adds them to the configurations.static void
This main method is used for testing the functionality ofJKFacesConfigurations
class.void
setNamespaces
(List<JKNamespace> namespaces) This method sets the list ofJKNamespace
objects to the provided list.void
setTagMapping
(List<JKTagMapping> tagMapping) This method sets the list ofJKTagMapping
objects to the provided list.
-
Constructor Details
-
JKFacesConfigurations
public JKFacesConfigurations()
-
-
Method Details
-
getInstance
This method gets the singleton instance ofJKFacesConfigurations
class.- Returns:
- the singleton instance of
JKFacesConfigurations
class.
-
main
This main method is used for testing the functionality ofJKFacesConfigurations
class.- 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 theJKTagWrapper
to find a mapping for.- Returns:
- the matching
JKTagMapping
, or null if no mapping is found.
-
findTagMapping
This method retrieves aJKTagMapping
for 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 aJKNamespace
object based on its name space letter.- Parameters:
namespaceLetter
- Specifies the letter associated with the name space.- Returns:
- the
JKNamespace
object matching the provided name space letter, or null if not found.
-
getNameSpaceByUrl
This method retrieves aJKNamespace
object 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 newJKNamespace
if not found.- Returns:
- the
JKNamespace
object 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 theJKNamespace
objects.- Returns:
- the list of the
JKNamespace
objects.
-
getTagMapping
This method gets the list of theJKTagMapping
objects.- Returns:
- the list of the
JKTagMapping
objects.
-
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 ofJKNamespace
objects to the provided list.- Parameters:
namespaces
- Specifies the new list ofJKNamespace
objects.
-
setTagMapping
This method sets the list ofJKTagMapping
objects to the provided list.- Parameters:
tagMapping
- Specifies the new list ofJKTagMapping
objects.
-
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.
-