Class ComponentRepository

java.lang.Object
org.eclnt.jsfserver.elements.ComponentRepository
All Implemented Interfaces:
ICCComponentProperties, CLogConstants

public class ComponentRepository extends Object implements CLogConstants, ICCComponentProperties
Central class for keeping meta data for each component. The meta data is used within the generic processing of BaseComponent and BaseComponentTag.

For each tag library definition with corresponding prefix there is one instance which can be reached using the getInstance() method, passing the prefix of the tag library as parameter.
  • Method Details

    • registerLibrary

      public static void registerLibrary(ComponentRepository.TLDInfo info)
      Registration of libraries that are used within the CaptainCasa component processing.
      Parameters:
      prefix - Prefix of the library, e.g. "t".
    • registerDesignTimeLibrary

      public static void registerDesignTimeLibrary(ProjectInfo.DesignTimeTLDInfo info)
    • unregisterAllDesignTimeLibraries

      public static void unregisterAllDesignTimeLibraries()
      Unregisters all extended libraries - this function is used within the editor environment.
    • getTLDInfo

      public static ComponentRepository.TLDInfo getTLDInfo(String prefix)
      Get basic information about a registered tag library.
    • getRunTimeTLDInfos

      public static ComponentRepository.TLDInfo[] getRunTimeTLDInfos()
    • getDesignTimeTLDInfos

      public static ComponentRepository.TLDInfo[] getDesignTimeTLDInfos()
    • getRunTimeTLDInfo

      public static ComponentRepository.TLDInfo getRunTimeTLDInfo(String prefix)
      Read TLD info for prefix.
    • getRunTimeTLDInfosTFIRST

      public static ComponentRepository.TLDInfo[] getRunTimeTLDInfosTFIRST()
      Read all libraries, return the default t: library as the first one
    • getDesignTimeTLDInfosTFIRST

      public static ComponentRepository.TLDInfo[] getDesignTimeTLDInfosTFIRST()
      Read all libraries, return the default t: library as the first one
    • registerServerOnlyAttribute

      public static void registerServerOnlyAttribute(String attribute)
      Register attribute which is never send to the client processing. Pay attention: all attributes are valid for all component libraries which are registered!
    • readCCControllibrariesFromClassLoader

      public static List<ComponentRepository.TLDInfo> readCCControllibrariesFromClassLoader()
    • readCCControllibrariesFromClassLoader

      public static List<ComponentRepository.TLDInfo> readCCControllibrariesFromClassLoader(ClassLoader cl)
    • parseTLDInfoForCCControlLibraryXml

      public static ComponentRepository.TLDInfo parseTLDInfoForCCControlLibraryXml(String xml)
    • createComponentRepository_junit

      public static ComponentRepository createComponentRepository_junit(String prefix, String xml)
      Only used for testing purposes.
    • getInstance

      public static ComponentRepository getInstance(String prefix)
      Factory for repositories. Per tag library there is one repository instance.
    • getDesignTimeInstance

      public static ComponentRepository getDesignTimeInstance(String prefix)
    • checkIfControlLibraryIsRegistered

      public static boolean checkIfControlLibraryIsRegistered(String prefix)
    • getComponentInfo

      public ComponentRepository.ComponentInfo getComponentInfo(String tag)
    • getComponentInfos

      public Collection<ComponentRepository.ComponentInfo> getComponentInfos()
      Get information on all components that are part of the control library.
    • getTagNameForComponentClass

      public static String[] getTagNameForComponentClass(Class componentClass)
      Returns:
      String[0] ==> prefix String[1] ==> tagName
    • getTagNameForComponentTagClass

      public static String[] getTagNameForComponentTagClass(Class componentTagClass)
      Returns:
      String[0] ==> prefix String[1] ==> tagName
    • getTagPrefixForComponentClass

      public static String getTagPrefixForComponentClass(Class componentClass)
    • getTagPrefixForComponentTagClass

      public static String getTagPrefixForComponentTagClass(Class componentTagClass)
    • checkIfKeyIsAnAction

      public static boolean checkIfKeyIsAnAction(String key)
    • checkIfAttributeNameIsServerOnly

      public static boolean checkIfAttributeNameIsServerOnly(String attrName)
      Certain attributes of a tag are never transferred to the client, because they are for server side use only. You can update the attibutes not transferred to the server by using the method registerServerOnlyAttribute().
    • checkIfAttributeIsAReference

      public static boolean checkIfAttributeIsAReference(String attrName)
      Certain attributes represent a link to a file that is kept inside the web application. Example: references to images. These need to be identified in order to update relative references when working with page includes (ROWINCLUDE component).
    • checkIfAttributeIsCCDefault

      public static boolean checkIfAttributeIsCCDefault(String attrName)
      Certain attributes are general CaptainCasa attributes that are applied to most of the components - without any rendering aspect.
    • createComponentInstanceForComponentTagClass

      public static BaseComponent createComponentInstanceForComponentTagClass(Class componentTagClass)
    • createComponentTagInstsanceForComponentClass

      public static BaseComponentTag createComponentTagInstsanceForComponentClass(Class componentClass)
    • createComponentTagClass

      public static Class createComponentTagClass(String tagPrefix, String tagName)
    • findCSSResourcePathForControlLibary

      public static String findCSSResourcePathForControlLibary(ComponentRepository.TLDInfo library)
    • findJSResourcePathForControlLibary

      public static String findJSResourcePathForControlLibary(ComponentRepository.TLDInfo library)