public class ImmutableDITContentRuleRegistry extends Object implements DITContentRuleRegistry
Constructor and Description |
---|
ImmutableDITContentRuleRegistry(DITContentRuleRegistry ditContentRuleRegistry)
Creates a new instance of ImmutableDITContentRuleRegistry.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear the registry from all its content
|
boolean |
contains(String oid)
Checks to see if an SchemaObject exists in the registry, by its
OID or name.
|
ImmutableDITContentRuleRegistry |
copy()
Copy the DITContentRuleRegistry
|
DITContentRule |
get(String oid)
Gets the SchemaObject associated with a given OID.
|
String |
getOidByName(String name)
Gets the numericOid for a name/alias if one is associated.
|
String |
getSchemaName(String oid)
Gets the name of the schema this schema object is associated with.
|
SchemaObjectType |
getType() |
Iterator<DITContentRule> |
iterator()
Gets an iterator over the registered schema objects in the registry.
|
DITContentRule |
lookup(String oid)
Looks up a SchemaObject by its unique Object Identifier or by name.
|
Iterator<String> |
oidsIterator()
Gets an iterator over the registered schema objects'OID in the registry.
|
void |
register(DITContentRule schemaObject)
Registers a new SchemaObject with this registry.
|
void |
renameSchema(String originalSchemaName,
String newSchemaName)
Modify all the SchemaObject using a schemaName when this name changes.
|
int |
size() |
DITContentRule |
unregister(DITContentRule schemaObject)
Removes the SchemaObject registered with this registry.
|
DITContentRule |
unregister(String numericOid)
Removes the SchemaObject registered with this registry, using its
numeric OID.
|
void |
unregisterSchemaElements(String schemaName)
Unregisters all SchemaObjects defined for a specific schema from
this registry.
|
public ImmutableDITContentRuleRegistry(DITContentRuleRegistry ditContentRuleRegistry)
ditContentRuleRegistry
- The wrapped DITContentRule registrypublic ImmutableDITContentRuleRegistry copy()
copy
in interface DITContentRuleRegistry
copy
in interface SchemaObjectRegistry<DITContentRule>
public int size()
size
in interface SchemaObjectRegistry<DITContentRule>
public boolean contains(String oid)
contains
in interface SchemaObjectRegistry<DITContentRule>
oid
- the object identifier or name of the SchemaObjectpublic String getOidByName(String name) throws LdapException
getOidByName
in interface SchemaObjectRegistry<DITContentRule>
name
- The name we are looking the oid forLdapException
- If the OID can't be foundpublic String getSchemaName(String oid) throws LdapException
getSchemaName
in interface SchemaObjectRegistry<DITContentRule>
oid
- the object identifier or the nameLdapException
- if the schema object does not existpublic SchemaObjectType getType()
getType
in interface SchemaObjectRegistry<DITContentRule>
public Iterator<DITContentRule> iterator()
iterator
in interface Iterable<DITContentRule>
iterator
in interface SchemaObjectRegistry<DITContentRule>
public DITContentRule lookup(String oid) throws LdapException
lookup
in interface SchemaObjectRegistry<DITContentRule>
oid
- the object identifier or nameLdapException
- if the SchemaObject does not existpublic Iterator<String> oidsIterator()
oidsIterator
in interface SchemaObjectRegistry<DITContentRule>
public void register(DITContentRule schemaObject) throws LdapException
register
in interface SchemaObjectRegistry<DITContentRule>
schemaObject
- the SchemaObject to registerLdapException
- if the SchemaObject is already registered or
the registration operation is not supportedpublic void renameSchema(String originalSchemaName, String newSchemaName) throws LdapException
renameSchema
in interface SchemaObjectRegistry<DITContentRule>
originalSchemaName
- The original Schema namenewSchemaName
- The new Schema nameLdapException
- if the schema object does not existpublic DITContentRule unregister(String numericOid) throws LdapException
unregister
in interface SchemaObjectRegistry<DITContentRule>
numericOid
- the numeric identifierLdapException
- if the numeric identifier is invalidpublic void unregisterSchemaElements(String schemaName) throws LdapException
unregisterSchemaElements
in interface SchemaObjectRegistry<DITContentRule>
schemaName
- the name of the schema whose SchemaObjects will be removed fromLdapException
public DITContentRule get(String oid)
get
in interface SchemaObjectRegistry<DITContentRule>
oid
- The SchemaObject's OID we are looking forpublic void clear() throws LdapException
clear
in interface SchemaObjectRegistry<DITContentRule>
LdapException
public DITContentRule unregister(DITContentRule schemaObject) throws LdapException
unregister
in interface SchemaObjectRegistry<DITContentRule>
schemaObject
- the schemaObject to unregisterLdapException
- if the schemaObject can't be unregistered is invalidCopyright © 2003-2014 The Apache Software Foundation. All Rights Reserved.