Class DefinitionSpaceWritable
java.lang.Object
io.vertigo.core.node.definition.loader.DefinitionSpaceWritable
- All Implemented Interfaces:
DefinitionSpace
The space to access and register all the definitions.
The registration is only accessible during the boot phase.
Consequently, the registration is not threadSafe. (The boot phase occuring on a single thread)
- Author:
- pchretien
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears all known definitionsbooleanChecks if this container contains a definition with the specified name.<C extends Definition>
Set<C> Gets an ordered set of all objects for a specified definition type.Set<Class<? extends Definition>> Gets a list of all types of definitions managed within this space.voidregisterDefinition(Definition definition) Registers a new definition.<D extends Definition>
DResolves a definition from its name and class type.
-
Constructor Details
-
DefinitionSpaceWritable
public DefinitionSpaceWritable()
-
-
Method Details
-
registerDefinition
Registers a new definition. The definition must not be already registered.- Parameters:
definition- the definition
-
contains
Checks if this container contains a definition with the specified name.- Specified by:
containsin interfaceDefinitionSpace- Parameters:
name- the name of the definition to check- Returns:
- true if the definition is already registered, false otherwise
-
resolve
Resolves a definition from its name and class type.- Specified by:
resolvein interfaceDefinitionSpace- Type Parameters:
D- Type of the definition- Parameters:
name- the name of the definition to resolveclazz- the class type of the definition- Returns:
- the resolved definition
-
getAllTypes
Gets a list of all types of definitions managed within this space.- Specified by:
getAllTypesin interfaceDefinitionSpace- Returns:
- a set of classes representing the types of definitions
-
getAll
Gets an ordered set of all objects for a specified definition type.- Specified by:
getAllin interfaceDefinitionSpace- Type Parameters:
C- Type of the definition- Parameters:
clazz- the class type of the definition- Returns:
- an ordered set of all objects for the specified definition type
-
clear
public void clear()Clears all known definitions
-