public class AttributeRegistryImpl extends Object implements AttributeRegistry
Constructor and Description |
---|
AttributeRegistryImpl() |
Modifier and Type | Method and Description |
---|---|
void |
deregister(AttributeDescriptor attributeDescriptor)
Removes an attribute from the registry.
|
void |
deregisterMetacardType(MetacardType metacardType) |
Optional<AttributeDescriptor> |
lookup(String name)
Gets the
AttributeDescriptor for the attribute with the given name. |
void |
register(AttributeDescriptor attributeDescriptor)
Registers a new attribute.
|
void |
registerMetacardType(MetacardType metacardType) |
public void register(AttributeDescriptor attributeDescriptor)
AttributeRegistry
register
in interface AttributeRegistry
attributeDescriptor
- the AttributeDescriptor
describing the attributepublic void deregister(AttributeDescriptor attributeDescriptor)
AttributeRegistry
Does nothing if the attributeDescriptor does not exist in the registry.
deregister
in interface AttributeRegistry
attributeDescriptor
- an attributeDescriptor for the attributepublic Optional<AttributeDescriptor> lookup(String name)
AttributeRegistry
AttributeDescriptor
for the attribute with the given name.
Returns an empty Optional
if no attribute by the name name
exists in the
registry.
lookup
in interface AttributeRegistry
name
- the name of the attributeOptional
containing the registered AttributeDescriptor
public void registerMetacardType(MetacardType metacardType)
public void deregisterMetacardType(MetacardType metacardType)
This work is licensed under a Creative Commons Attribution 4.0 International License.