Class DescriptorRegistry
java.lang.Object
com.xebialabs.deployit.plugin.api.reflect.DescriptorRegistry
A registry for the
ConfigurationItems the
XL Deploy system should know about. Every CI registry must extend this class, and it can be added to the collection
of known registries, which is kept in this class.
One special descriptor registry is the LocalDescriptorRegistry, which is usually the default one. Another descriptor registry is the RemoteDescriptorRegistry.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidadd(IDescriptorRegistry registry) Registers a DescriptorRegistry to a global map.static booleanstatic DescriptorgetDescriptor(Type type) static DescriptorgetDescriptor(String prefixedName) static DescriptorgetDescriptor(String prefix, String name) static IDescriptorRegistryGets a DescriptorRegistry by id.static Collection<Descriptor>static Collection<Descriptor>getDescriptors(DescriptorRegistryId registryId) protected static IDescriptorRegistrystatic Collection<Type>getSubtypes(Type supertype) static voidUnregisters the descriptor registry with the specified id.static voidreplaceRegistry(IDescriptorRegistry registry) static <T> TwithWriteLock(Callable<T> callable)
-
Method Details
-
getInstance
-
withWriteLock
-
add
Registers a DescriptorRegistry to a global map. -
remove
Unregisters the descriptor registry with the specified id. -
replaceRegistry
-
getDescriptorRegistry
Gets a DescriptorRegistry by id. -
getDescriptor
- Parameters:
type- The type of a CI.- Returns:
- The descriptor of the specified CI type.
-
getDescriptor
- Parameters:
prefixedName- The prefixed type name of a CI.- Returns:
- The descriptor of the specified CI type.
-
getDescriptor
- Parameters:
prefix- The prefix of a CI.name- The simple name of a CI.- Returns:
- The descriptor of the specified CI type.
-
getDescriptors
- Returns:
- A collection of all the registered type descriptors.
-
getDescriptors
-
exists
- Parameters:
type- The type of a CI.- Returns:
- Whether the given type can be found in the registry.
-
getSubtypes
- Parameters:
supertype- The super type to search against.- Returns:
- A collection of subtypes of the given super type.
-