public abstract class AbstractRegistrySynchronizer extends java.lang.Object implements RegistrySynchronizer
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.directory.api.ldap.schema.loader.SchemaEntityFactory |
factory
The Schema objetc factory
|
private static org.slf4j.Logger |
LOG
A logger for this class
|
protected org.apache.directory.api.ldap.model.schema.AttributeType |
moidAT
The m-oid AttributeType
|
private static java.util.Map<java.lang.String,java.lang.String> |
OBJECT_TYPE_TO_PATH
A map associating a SchemaObject type with its path on the partition
|
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,
java.lang.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(java.lang.String oid) |
protected void |
checkParent(org.apache.directory.api.ldap.model.name.Dn newParent,
org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager,
java.lang.String objectType)
Checks that the parent Dn is a valid Dn
|
protected void |
deleteFromSchema(org.apache.directory.api.ldap.model.schema.SchemaObject schemaObject,
java.lang.String schemaName)
Delete a SchemaObject from the schema registry, assuming that
it has an associated schema and that this schema is loaded
|
protected java.lang.String |
getOid(org.apache.directory.api.ldap.model.entry.Entry entry) |
protected java.util.Set<java.lang.String> |
getOids(java.util.Set<org.apache.directory.api.ldap.model.entry.Entry> results) |
protected java.lang.String |
getReferenced(org.apache.directory.api.ldap.model.schema.SchemaObject schemaObject)
Get a String containing the SchemaObjects referencing the
given ShcemaObject
|
protected java.lang.String |
getSchemaName(org.apache.directory.api.ldap.model.name.Dn dn)
Exctract the schema name from the Dn.
|
protected boolean |
isSchemaEnabled(java.lang.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(java.lang.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, renameprivate static final org.slf4j.Logger LOG
protected 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
private static final java.util.Map<java.lang.String,java.lang.String> OBJECT_TYPE_TO_PATH
protected AbstractRegistrySynchronizer(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager)
throws java.lang.Exception
java.lang.Exceptionprotected boolean isSchemaLoaded(org.apache.directory.api.ldap.model.name.Dn dn)
throws java.lang.Exception
dn - The SchemaObject's Dnjava.lang.Exception - If The Dn is not a SchemaObject Dnprotected boolean isSchemaLoaded(java.lang.String schemaName)
schemaName - The schema we want to checkprotected boolean isSchemaEnabled(java.lang.String schemaName)
schemaName - The schema we want to checkprotected java.lang.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,
java.lang.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 java.lang.Exception
java.lang.Exceptionprotected void checkOidIsUnique(java.lang.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,
java.lang.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,
java.lang.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 java.util.Set<java.lang.String> getOids(java.util.Set<org.apache.directory.api.ldap.model.entry.Entry> results)
throws java.lang.Exception
java.lang.Exceptionprotected java.lang.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 unregisterjava.lang.Exception - 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 registerjava.lang.Exception - If the registering failedorg.apache.directory.api.ldap.model.exception.LdapExceptionprotected java.lang.String getReferenced(org.apache.directory.api.ldap.model.schema.SchemaObject schemaObject)
schemaObject - The SchemaObject we want the referencing SchemaObjects for