T
- The type of SchemaObjectpublic class OidRegistry<T extends SchemaObject> extends Object implements Iterable<T>
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
|
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.
|
void |
register(T schemaObject)
Adds an OID name pair to the registry.
|
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.
|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public OidRegistry()
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 void register(T schemaObject) throws LdapException
schemaObject
- The SchemaObject the oid belongs toLdapException
- If something went wrongpublic 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 Object
Object.toString()
Copyright © 2003–2018 The Apache Software Foundation. All rights reserved.