Class PersonalComponentRegistry
- java.lang.Object
-
- org.silverpeas.core.admin.component.PersonalComponentRegistry
-
- All Implemented Interfaces:
Initialization
@Service @Singleton public class PersonalComponentRegistry extends Object implements Initialization
A registry of Web Application Personal Components available in Silverpeas. ThePersonalComponent
available in Silverpeas are defined by an XML descriptor located in theSILVERPEAS_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 Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PersonalComponentRegistry
get()
Gets an instance of this PersonalComponentRegistry registry.Map<String,PersonalComponent>
getAllPersonalComponents()
Gets all the registered PersonalComponent instances indexed by their name.Optional<PersonalComponent>
getPersonalComponent(String componentName)
Gets the PersonalComponent instance registered under the specified name.void
init()
Initializes some resources required by the services or performs some initialization processes at Silverpeas startup.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.silverpeas.core.initialization.Initialization
getPriority, release
-
-
-
-
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 interfaceInitialization
- 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.
-
-