Class PersonalComponentRegistry

  • All Implemented Interfaces:
    Initialization

    @Service
    @Singleton
    public class PersonalComponentRegistry
    extends Object
    implements Initialization
    A registry of Web Application Personal Components available in Silverpeas.

    The PersonalComponent available in Silverpeas are defined by an XML descriptor located in the SILVERPEAS_HOME/xmlcomponents directory. The descriptors that must satisfy the XSD component.xsd. The PersonalComponent instances are then constructed from their XML descriptor by the registry at initialization time so that they are available by the core component management service.
    Author:
    mmoquillon
    • Method Detail

      • get

        public static PersonalComponentRegistry get()
        Gets an instance of this PersonalComponentRegistry registry.
        Returns:
        a PersonalComponentRegistry instance.
      • init

        public void init()
                  throws Exception
        Initializes some resources required by the services or performs some initialization processes at Silverpeas startup.
        Specified by:
        init in interface Initialization
        Throws:
        Exception - if an error occurs during the initialization process. In this case the Silverpeas startup fails.
      • getPersonalComponent

        public Optional<PersonalComponent> getPersonalComponent​(String componentName)
        Gets the PersonalComponent instance registered under the specified name.
        Parameters:
        componentName - the name of the Silverpeas personal component.
        Returns:
        an optional PersonalComponent instance if such instance exists under the given name.
      • getAllPersonalComponents

        public Map<String,​PersonalComponent> getAllPersonalComponents()
        Gets all the registered PersonalComponent instances indexed by their name.
        Returns:
        a dictionary of the available PersonalComponent instances indexed by their name.