public abstract class AbstractRegistrySynchronizer extends Object implements RegistrySynchronizer
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.directory.shared.ldap.schema.loader.ldif.SchemaEntityFactory |
factory
The Schema objetc factory
|
protected org.apache.directory.shared.ldap.schema.AttributeType |
m_oidAT
The m-oid AttributeType
|
protected org.apache.directory.shared.ldap.schema.SchemaManager |
schemaManager
The global SchemaManager
|
SCHEMA_MODIFIED, SCHEMA_UNCHANGED| Modifier | Constructor and Description |
|---|---|
protected |
AbstractRegistrySynchronizer(org.apache.directory.shared.ldap.schema.SchemaManager schemaManager) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addToSchema(org.apache.directory.shared.ldap.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.shared.ldap.schema.SchemaObject |
checkOidExists(org.apache.directory.shared.ldap.entry.ServerEntry entry)
Check that a SchemaObject exists in the global OidRegsitry, and if so,
return it.
|
protected void |
checkOidIsUnique(org.apache.directory.shared.ldap.schema.SchemaObject schemaObject) |
protected void |
checkOidIsUnique(org.apache.directory.shared.ldap.entry.ServerEntry entry) |
protected void |
checkOidIsUnique(String oid) |
protected void |
checkParent(org.apache.directory.shared.ldap.name.DN newParent,
org.apache.directory.shared.ldap.schema.SchemaManager schemaManager,
String objectType)
Checks that the parent DN is a valid DN
|
protected void |
deleteFromSchema(org.apache.directory.shared.ldap.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.shared.ldap.entry.ServerEntry entry) |
protected Set<String> |
getOids(Set<org.apache.directory.shared.ldap.entry.ServerEntry> results) |
protected String |
getReferenced(org.apache.directory.shared.ldap.schema.SchemaObject schemaObject)
Get a String containing the SchemaObjects referencing the
given ShcemaObject
|
protected String |
getSchemaName(org.apache.directory.shared.ldap.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.shared.ldap.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 opContext,
org.apache.directory.shared.ldap.entry.ServerEntry targetEntry,
boolean cascade)
Applies a set of modification to an entry
|
protected void |
registerOids(org.apache.directory.shared.ldap.schema.SchemaObject obj)
Register a SchemaObject's OID in the associated oidRegistry
|
protected void |
unregisterOids(org.apache.directory.shared.ldap.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.shared.ldap.schema.SchemaManager schemaManager
protected final org.apache.directory.shared.ldap.schema.AttributeType m_oidAT
protected final org.apache.directory.shared.ldap.schema.loader.ldif.SchemaEntityFactory factory
protected boolean isSchemaLoaded(org.apache.directory.shared.ldap.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.shared.ldap.name.DN dn) throws NamingException
ou=schema, cn=MySchema, ...Here, the schemaName is MySchema
dn - The DN we want to get the schema name fromNamingException - If we got an errorprotected void checkOidIsUnique(org.apache.directory.shared.ldap.entry.ServerEntry entry)
throws Exception
Exceptionprotected org.apache.directory.shared.ldap.schema.SchemaObject checkOidExists(org.apache.directory.shared.ldap.entry.ServerEntry entry)
throws Exception
Exceptionprotected void checkParent(org.apache.directory.shared.ldap.name.DN newParent,
org.apache.directory.shared.ldap.schema.SchemaManager schemaManager,
String objectType)
throws org.apache.directory.shared.ldap.exception.LdapException
org.apache.directory.shared.ldap.exception.LdapExceptionprotected void checkOidIsUnique(org.apache.directory.shared.ldap.schema.SchemaObject schemaObject)
throws Exception
Exceptionprotected void addToSchema(org.apache.directory.shared.ldap.schema.SchemaObject schemaObject,
String schemaName)
throws Exception
Exceptionprotected void deleteFromSchema(org.apache.directory.shared.ldap.schema.SchemaObject schemaObject,
String schemaName)
throws Exception
Exceptionpublic abstract boolean modify(ModifyOperationContext opContext, org.apache.directory.shared.ldap.entry.ServerEntry targetEntry, boolean cascade) throws Exception
modify in interface RegistrySynchronizeropContext - The OperationContext, which contains the entry and the modifications to applytargetEntry - The modified entrycascade - UnusedException - If the modification failedprotected Set<String> getOids(Set<org.apache.directory.shared.ldap.entry.ServerEntry> results) throws Exception
Exceptionprotected String getOid(org.apache.directory.shared.ldap.entry.ServerEntry entry) throws Exception
Exceptionprotected void unregisterOids(org.apache.directory.shared.ldap.schema.SchemaObject obj)
throws Exception
obj - The SchemaObject to unregisterException - If the unregistering failedprotected void registerOids(org.apache.directory.shared.ldap.schema.SchemaObject obj)
throws Exception
obj - The SchemaObject to registerException - If the registering failedprotected String getReferenced(org.apache.directory.shared.ldap.schema.SchemaObject schemaObject)
schemaObject - The SchemaObject we want the referencing SchemaObjects forCopyright © 2003-2012 Apache Software Foundation. All Rights Reserved.