Class ToolRegistry
- java.lang.Object
-
- org.silverpeas.core.admin.component.ToolRegistry
-
- All Implemented Interfaces:
Initialization
@Service @Singleton public class ToolRegistry extends Object implements Initialization
A registry of tools available in Silverpeas. TheTool
available in Silverpeas are defined by a simple property file.- Author:
- silveryocha
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ToolRegistry
get()
Gets an instance of this ToolRegistry registry.Map<String,Tool>
getAllTools()
Gets all the registered Tool instances indexed by their id.Optional<Tool>
getTool(String toolId)
Gets the Tool instance registered under the specified id.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 ToolRegistry get()
Gets an instance of this ToolRegistry registry.- Returns:
- a ToolRegistry 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.
-
getTool
public Optional<Tool> getTool(String toolId)
Gets the Tool instance registered under the specified id.- Parameters:
toolId
- the id (or the id) of the tool.- Returns:
- an optional Tool instance if such instance exists under the given id.
-
-