public abstract class AbstractRegistrySynchronizer extends Object implements RegistrySynchronizer
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.directory.api.ldap.schema.loader.SchemaEntityFactory |
factory
The Schema objetc factory
|
protected org.apache.directory.api.ldap.model.schema.AttributeType |
moidAT
The m-oid AttributeType
|
protected org.apache.directory.api.ldap.model.schema.SchemaManager |
schemaManager
The global SchemaManager
|
SCHEMA_MODIFIED, SCHEMA_UNCHANGED| Modifier | Constructor and Description |
|---|---|
protected |
AbstractRegistrySynchronizer(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addToSchema(org.apache.directory.api.ldap.model.schema.SchemaObject schemaObject,
String schemaName)
Add a new SchemaObject to the schema content, assuming that
it has an associated schema and that this schema is loaded
|
protected org.apache.directory.api.ldap.model.schema.SchemaObject |
checkOidExists(org.apache.directory.api.ldap.model.entry.Entry entry)
Check that a SchemaObject exists in the global OidRegsitry, and if so,
return it.
|
protected void |
checkOidIsUnique(org.apache.directory.api.ldap.model.entry.Entry entry) |
protected void |
checkOidIsUnique(org.apache.directory.api.ldap.model.schema.SchemaObject schemaObject) |
protected void |
checkOidIsUnique(String oid) |
protected void |
checkParent(org.apache.directory.api.ldap.model.name.Dn newParent,
org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager,
String objectType)
Checks that the parent Dn is a valid Dn
|
protected void |
deleteFromSchema(org.apache.directory.api.ldap.model.schema.SchemaObject schemaObject,
String schemaName)
Delete a SchemaObject from the schema registry, assuming that
it has an associated schema and that this schema is loaded
|
protected String |
getOid(org.apache.directory.api.ldap.model.entry.Entry entry) |
protected Set<String> |
getOids(Set<org.apache.directory.api.ldap.model.entry.Entry> results) |
protected String |
getReferenced(org.apache.directory.api.ldap.model.schema.SchemaObject schemaObject)
Get a String containing the SchemaObjects referencing the
given ShcemaObject
|
protected String |
getSchemaName(org.apache.directory.api.ldap.model.name.Dn dn)
Exctract the schema name from the Dn.
|
protected boolean |
isSchemaEnabled(String schemaName)
Tells if a schema is loaded and enabled
|
protected boolean |
isSchemaLoaded(org.apache.directory.api.ldap.model.name.Dn dn)
Tells if the schema the Dn references is loaded or not
|
protected boolean |
isSchemaLoaded(String schemaName)
Tells if the schemaName is loaded or not
|
abstract boolean |
modify(ModifyOperationContext modifyContext,
org.apache.directory.api.ldap.model.entry.Entry targetEntry,
boolean cascade)
Applies a set of modification to an entry
|
protected void |
registerOids(org.apache.directory.api.ldap.model.schema.SchemaObject obj)
Register a SchemaObject's OID in the associated oidRegistry
|
protected void |
unregisterOids(org.apache.directory.api.ldap.model.schema.SchemaObject obj)
Unregister a SchemaObject's OID from the associated oidRegistry
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitadd, delete, move, moveAndRename, renameprotected final org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager
protected final org.apache.directory.api.ldap.model.schema.AttributeType moidAT
protected final org.apache.directory.api.ldap.schema.loader.SchemaEntityFactory factory
protected boolean isSchemaLoaded(org.apache.directory.api.ldap.model.name.Dn dn)
throws Exception
dn - The SchemaObject's DnException - If The Dn is not a SchemaObject Dnprotected boolean isSchemaLoaded(String schemaName)
schemaName - The schema we want to checkprotected boolean isSchemaEnabled(String schemaName)
schemaName - The schema we want to checkprotected String getSchemaName(org.apache.directory.api.ldap.model.name.Dn dn) throws org.apache.directory.api.ldap.model.exception.LdapException
ou=schema, cn=MySchema, ...Here, the schemaName is MySchema
dn - The Dn we want to get the schema name fromNamingException - If we got an errororg.apache.directory.api.ldap.model.exception.LdapExceptionprotected void checkOidIsUnique(org.apache.directory.api.ldap.model.entry.Entry entry)
throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapExceptionprotected org.apache.directory.api.ldap.model.schema.SchemaObject checkOidExists(org.apache.directory.api.ldap.model.entry.Entry entry)
throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapExceptionprotected void checkParent(org.apache.directory.api.ldap.model.name.Dn newParent,
org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager,
String objectType)
throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapExceptionprotected void checkOidIsUnique(org.apache.directory.api.ldap.model.schema.SchemaObject schemaObject)
throws Exception
Exceptionprotected void checkOidIsUnique(String oid) throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapExceptionprotected void addToSchema(org.apache.directory.api.ldap.model.schema.SchemaObject schemaObject,
String schemaName)
throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapExceptionprotected void deleteFromSchema(org.apache.directory.api.ldap.model.schema.SchemaObject schemaObject,
String schemaName)
throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapExceptionpublic abstract boolean modify(ModifyOperationContext modifyContext, org.apache.directory.api.ldap.model.entry.Entry targetEntry, boolean cascade) throws org.apache.directory.api.ldap.model.exception.LdapException
modify in interface RegistrySynchronizermodifyContext - The OperationContext, which contains the entry and the modifications to applytargetEntry - The modified entrycascade - Unusedorg.apache.directory.api.ldap.model.exception.LdapExceptionprotected Set<String> getOids(Set<org.apache.directory.api.ldap.model.entry.Entry> results) throws Exception
Exceptionprotected String getOid(org.apache.directory.api.ldap.model.entry.Entry entry) throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapExceptionprotected void unregisterOids(org.apache.directory.api.ldap.model.schema.SchemaObject obj)
throws org.apache.directory.api.ldap.model.exception.LdapException
obj - The SchemaObject to unregisterException - If the unregistering failedorg.apache.directory.api.ldap.model.exception.LdapExceptionprotected void registerOids(org.apache.directory.api.ldap.model.schema.SchemaObject obj)
throws org.apache.directory.api.ldap.model.exception.LdapException
obj - The SchemaObject to registerException - If the registering failedorg.apache.directory.api.ldap.model.exception.LdapExceptionprotected String getReferenced(org.apache.directory.api.ldap.model.schema.SchemaObject schemaObject)
schemaObject - The SchemaObject we want the referencing SchemaObjects forCopyright © 2021. All rights reserved.