Class JKFacesConfigurations

java.lang.Object
com.jk.web.faces.config.JKFacesConfigurations

public class JKFacesConfigurations extends Object
This class represents configuration settings.
Version:
1.0
Author:
Dr. Jalal H. Kiswani
  • Constructor Details

    • JKFacesConfigurations

      public JKFacesConfigurations()
  • Method Details

    • getInstance

      public static JKFacesConfigurations getInstance()
      This method gets the singleton instance of JKFacesConfigurations class.
      Returns:
      the singleton instance of JKFacesConfigurations class.
    • main

      public static void main(String[] args)
      This main method is used for testing the functionality of JKFacesConfigurations class.
      Parameters:
      args - the command-line arguments.
    • findTagMapping

      public JKTagMapping findTagMapping(JKTagWrapper wrapper)
      This method searches for a mapping that matches the tag name and attribute values of the wrapper.
      Parameters:
      wrapper - Specifies the JKTagWrapper to find a mapping for.
      Returns:
      the matching JKTagMapping, or null if no mapping is found.
    • findTagMapping

      public JKTagMapping findTagMapping(String tagName)
      This method retrieves a JKTagMapping 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

      public JKNamespace getNamespaceByLetter(String namespaceLetter)
      This method retrieves a JKNamespace 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

      public JKNamespace getNameSpaceByUrl(String url, boolean create)
      This method retrieves a JKNamespace 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 new JKNamespace 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

      public List<JKNamespace> getNamespaces()
      This method gets the list of the JKNamespace objects.
      Returns:
      the list of the JKNamespace objects.
    • getTagMapping

      public List<JKTagMapping> getTagMapping()
      This method gets the list of the JKTagMapping 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

      public void setNamespaces(List<JKNamespace> namespaces)
      This method sets the list of JKNamespace objects to the provided list.
      Parameters:
      namespaces - Specifies the new list of JKNamespace objects.
    • setTagMapping

      public void setTagMapping(List<JKTagMapping> tagMapping)
      This method sets the list of JKTagMapping objects to the provided list.
      Parameters:
      tagMapping - Specifies the new list of JKTagMapping 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.