public class ClientSideElementDependenciesManager extends Object
Modifier and Type | Field and Description |
---|---|
private Map<String,List<String>> |
_dependencies |
protected Logger |
_logger
Logger
|
private ServiceManager |
_manager |
Constructor and Description |
---|
ClientSideElementDependenciesManager(ServiceManager manager)
Default constructor for the dependencies manager.
|
Modifier and Type | Method and Description |
---|---|
Map<String,List<ClientSideElement>> |
computeDependencies()
Compute the chain of dependencies
|
private void |
computeDependencies(Map<String,List<ClientSideElement>> computedDependencies,
Map<String,List<String>> dependenciesToProcess,
List<ClientSideElement> knownElements)
Recursively Compute the chain of dependency.
|
void |
register(ClientSideElement element)
Register a new dependency to a client side element
|
void |
register(String extensionPoint,
String extensionId)
Register a new dependency
|
private Map<String,List<String>> _dependencies
private ServiceManager _manager
public ClientSideElementDependenciesManager(ServiceManager manager)
manager
- The service manager, used to resolve dependencies.public void register(String extensionPoint, String extensionId)
extensionPoint
- The dependency extension pointextensionId
- The dependency extensionpublic void register(ClientSideElement element)
element
- The client side elementpublic Map<String,List<ClientSideElement>> computeDependencies() throws ServiceException
ServiceException
- If an error occurs with the list of ExtensionPointsprivate void computeDependencies(Map<String,List<ClientSideElement>> computedDependencies, Map<String,List<String>> dependenciesToProcess, List<ClientSideElement> knownElements) throws ServiceException
computedDependencies
- The list of dependencies that have already been computed from the chain. This map is filled with the full dependencies chain.dependenciesToProcess
- The list of extensions to parse, mapped by extension points, that can have additional dependencies.knownElements
- The list of elements that were already handled (to avoid infinite loop)ServiceException
- If an error occurs