T - The type of SchemaObjectpublic class OidRegistry<T extends SchemaObject> extends Object implements Iterable<T>
| Modifier and Type | Field and Description |
|---|---|
private Map<String,T> |
byOid
Maps OID to a type of SchemaObject
|
private SchemaErrorHandler |
errorHandler |
private boolean |
isRelaxed
A flag indicating that the Registry is relaxed or not
|
private static org.slf4j.Logger |
LOG
static class logger
|
| Constructor and Description |
|---|
OidRegistry() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Empty the byOid map
|
boolean |
contains(String oid)
Tells if the given OID is present on this registry
|
OidRegistry<T> |
copy()
Copy the OidRegistry, without the contained values
|
SchemaErrorHandler |
getErrorHandler() |
List<String> |
getNameSet(String oid)
Gets the names associated with an OID.
|
String |
getPrimaryName(String oid)
Gets the primary name associated with an OID.
|
T |
getSchemaObject(String oid)
Gets the SchemaObject associated with an OID.
|
boolean |
isRelaxed()
Tells if the Registry is permissive or if it must be checked
against inconsistencies.
|
boolean |
isStrict()
Tells if the Registry is strict.
|
Iterator<T> |
iterator()
Lists all the SchemaObjects within the registry.
|
Iterator<String> |
iteratorOids()
Lists all the OIDs within the registry.
|
(package private) void |
put(T schemaObject)
Store the given SchemaObject into the OidRegistry.
|
void |
register(T schemaObject)
Adds an OID name pair to the registry.
|
void |
setErrorHandler(SchemaErrorHandler errorHandler) |
void |
setRelaxed()
Change the Registry to a relaxed mode, where invalid SchemaObjects
can be registered.
|
void |
setStrict()
Change the Registry to a strict mode, where invalid SchemaObjects
cannot be registered.
|
int |
size() |
String |
toString() |
void |
unregister(String oid)
Removes an oid from this registry.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorprivate static final org.slf4j.Logger LOG
private Map<String,T extends SchemaObject> byOid
private boolean isRelaxed
private SchemaErrorHandler errorHandler
public boolean contains(String oid)
oid - The OID to lookuppublic String getPrimaryName(String oid) throws LdapException
oid - the object identifierLdapException - if oid does not existpublic T getSchemaObject(String oid) throws LdapException
oid - the object identifierLdapException - if oid does not existpublic List<String> getNameSet(String oid) throws LdapException
oid - the OID for which we return the set of common namesLdapException - if oid does not existpublic Iterator<String> iteratorOids()
public Iterator<T> iterator()
iterator in interface Iterable<T extends SchemaObject>public boolean isRelaxed()
public boolean isStrict()
public void setRelaxed()
public void setStrict()
public SchemaErrorHandler getErrorHandler()
public void setErrorHandler(SchemaErrorHandler errorHandler)
public void register(T schemaObject) throws LdapException
schemaObject - The SchemaObject the oid belongs toLdapException - If something went wrongvoid put(T schemaObject)
schemaObject - The SchemaObject to inject into the OidRegistrypublic void unregister(String oid) throws LdapException
oid - the numeric identifier for the objectLdapException - if the identifier is not numericpublic OidRegistry<T> copy()
public int size()
public void clear()
public String toString()
toString in class ObjectObject.toString()Copyright © 2003–2022 The Apache Software Foundation. All rights reserved.