public class ImmutableSyntaxCheckerRegistry extends Object implements SyntaxCheckerRegistry
Constructor and Description |
---|
ImmutableSyntaxCheckerRegistry(SyntaxCheckerRegistry syntaxCheckerRegistry)
Creates a new instance of ImmutableSyntaxCheckerRegistry.
|
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.
|
ImmutableSyntaxCheckerRegistry |
copy()
Copy the SyntaxCheckerRegistry
|
SyntaxChecker |
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<SyntaxChecker> |
iterator()
Gets an iterator over the registered schema objects in the registry.
|
SyntaxChecker |
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(SyntaxChecker syntaxChecker)
Registers a new SyntaxChecker with this registry.
|
void |
renameSchema(String originalSchemaName,
String newSchemaName)
Modify all the SchemaObject using a schemaName when this name changes.
|
int |
size() |
SyntaxChecker |
unregister(String numericOid)
Removes the SyntaxChecker registered with this registry, using its
numeric OID.
|
SyntaxChecker |
unregister(SyntaxChecker schemaObject)
Removes the SchemaObject registered with this registry.
|
void |
unregisterSchemaElements(String schemaName)
Unregisters all SyntaxCheckers defined for a specific schema from
this registry.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public ImmutableSyntaxCheckerRegistry(SyntaxCheckerRegistry syntaxCheckerRegistry)
syntaxCheckerRegistry
- The wrapped SyntaxChecker registrypublic void register(SyntaxChecker syntaxChecker) throws LdapException
register
in interface SchemaObjectRegistry<SyntaxChecker>
register
in interface SyntaxCheckerRegistry
syntaxChecker
- the SyntaxChecker to registerLdapException
- if the SyntaxChecker is already registered or
the registration operation is not supportedpublic SyntaxChecker unregister(String numericOid) throws LdapException
unregister
in interface SchemaObjectRegistry<SyntaxChecker>
unregister
in interface SyntaxCheckerRegistry
numericOid
- the numeric identifierLdapException
- if the numeric identifier is invalidpublic void unregisterSchemaElements(String schemaName) throws LdapException
unregisterSchemaElements
in interface SchemaObjectRegistry<SyntaxChecker>
unregisterSchemaElements
in interface SyntaxCheckerRegistry
schemaName
- the name of the schema whose SyntaxCheckers will be removed fromLdapException
- If we had a problem while unregistering the schemapublic ImmutableSyntaxCheckerRegistry copy()
copy
in interface SchemaObjectRegistry<SyntaxChecker>
copy
in interface SyntaxCheckerRegistry
public int size()
size
in interface SchemaObjectRegistry<SyntaxChecker>
public boolean contains(String oid)
contains
in interface SchemaObjectRegistry<SyntaxChecker>
oid
- the object identifier or name of the SchemaObjectpublic String getOidByName(String name) throws LdapException
getOidByName
in interface SchemaObjectRegistry<SyntaxChecker>
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<SyntaxChecker>
oid
- the object identifier or the nameLdapException
- if the schema object does not existpublic SchemaObjectType getType()
getType
in interface SchemaObjectRegistry<SyntaxChecker>
public Iterator<SyntaxChecker> iterator()
iterator
in interface Iterable<SyntaxChecker>
iterator
in interface SchemaObjectRegistry<SyntaxChecker>
public SyntaxChecker lookup(String oid) throws LdapException
lookup
in interface SchemaObjectRegistry<SyntaxChecker>
oid
- the object identifier or nameLdapException
- if the SchemaObject does not existpublic Iterator<String> oidsIterator()
oidsIterator
in interface SchemaObjectRegistry<SyntaxChecker>
public void renameSchema(String originalSchemaName, String newSchemaName) throws LdapException
renameSchema
in interface SchemaObjectRegistry<SyntaxChecker>
originalSchemaName
- The original Schema namenewSchemaName
- The new Schema nameLdapException
- if the schema object does not existpublic SyntaxChecker get(String oid)
get
in interface SchemaObjectRegistry<SyntaxChecker>
oid
- The SchemaObject's OID we are looking forpublic void clear() throws LdapException
clear
in interface SchemaObjectRegistry<SyntaxChecker>
LdapException
- If we had a failure while clearing the registrypublic SyntaxChecker unregister(SyntaxChecker schemaObject) throws LdapException
unregister
in interface SchemaObjectRegistry<SyntaxChecker>
schemaObject
- the schemaObject to unregisterLdapException
- if the schemaObject can't be unregistered is invalidCopyright © 2003–2018 The Apache Software Foundation. All rights reserved.