T
- the type of the contained objectspublic abstract class AbstractRegistry<T> extends Object implements Registry<T>
Registry
base class holding a map of all objects of the defined type.Registry.InvalidDefinitionException, Registry.NoSuchDefinitionException
Constructor and Description |
---|
AbstractRegistry()
Deprecated.
since 5.4.6, use
#AbstractRegistry(info.magnolia.module.ModuleRegistry . |
AbstractRegistry(info.magnolia.module.ModuleRegistry moduleRegistry) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
newMetadataBuilder, type
@Deprecated public AbstractRegistry()
#AbstractRegistry(info.magnolia.module.ModuleRegistry
.public AbstractRegistry(info.magnolia.module.ModuleRegistry moduleRegistry)
public void start()
Registry
protected RegistryMap<T> getRegistryMap()
public void register(DefinitionProvider<T> provider)
public Set<DefinitionMetadata> unregisterAndRegister(Collection<DefinitionMetadata> registeredIds, Collection<DefinitionProvider<T>> providers)
unregisterAndRegister
in interface Registry<T>
protected DefinitionProvider<T> onRegister(DefinitionProvider<T> provider)
public DefinitionProvider<T> getProvider(DefinitionMetadata id)
Registry
getProvider
in interface Registry<T>
public DefinitionProvider<T> getProvider(String referenceId)
Registry
DefinitionMetadata.getReferenceId()
would return.getProvider
in interface Registry<T>
DefinitionMetadata.getReferenceId()
protected final DefinitionProvider<T> getDecoratedDefinitionProvider(DefinitionProvider<T> provider)
public Collection<DefinitionProvider<T>> getAllProviders()
getAllProviders
in interface Registry<T>
public Collection<DefinitionMetadata> getAllMetadata()
getAllMetadata
in interface Registry<T>
public Collection<T> getAllDefinitions()
Registry
getAllDefinitions
in interface Registry<T>
@Deprecated public DefinitionQuery<T> query()
Registry
public void addDecorator(DefinitionDecorator<T> definitionDecorator)
addDecorator
in interface Registry<T>
public void removeDecorator(DefinitionDecorator<T> definitionDecorator)
removeDecorator
in interface Registry<T>
public String getReferenceId(DefinitionReference definitionReference)
getReferenceId
in interface DefinitionReferenceIdResolver
public void addValidator(DefinitionValidator<T> validator)
protected DefinitionProvider<T> validate(DefinitionProvider<T> provider)
Copyright © 2003–2018 Magnolia International Ltd.. All rights reserved.