|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.directory.server.core.schema.registries.synchronizers.AbstractRegistrySynchronizer
public abstract class AbstractRegistrySynchronizer
An abstract registry synchronizer with some reused functionality.
Field Summary | |
---|---|
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 |
Fields inherited from interface org.apache.directory.server.core.schema.registries.synchronizers.RegistrySynchronizer |
---|
SCHEMA_MODIFIED, SCHEMA_UNCHANGED |
Constructor Summary | |
---|---|
protected |
AbstractRegistrySynchronizer(org.apache.directory.shared.ldap.schema.SchemaManager schemaManager)
|
Method Summary | |
---|---|
protected void |
addToSchema(org.apache.directory.shared.ldap.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.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(java.lang.String oid)
|
protected void |
checkParent(org.apache.directory.shared.ldap.name.DN newParent,
org.apache.directory.shared.ldap.schema.SchemaManager schemaManager,
java.lang.String objectType)
Checks that the parent DN is a valid DN |
protected void |
deleteFromSchema(org.apache.directory.shared.ldap.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.shared.ldap.entry.ServerEntry entry)
|
protected java.util.Set<java.lang.String> |
getOids(java.util.Set<org.apache.directory.shared.ldap.entry.ServerEntry> results)
|
protected java.lang.String |
getReferenced(org.apache.directory.shared.ldap.schema.SchemaObject schemaObject)
Get a String containing the SchemaObjects referencing the given ShcemaObject |
protected java.lang.String |
getSchemaName(org.apache.directory.shared.ldap.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.shared.ldap.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 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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.directory.server.core.schema.registries.synchronizers.RegistrySynchronizer |
---|
add, delete, move, moveAndRename, rename |
Field Detail |
---|
protected 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
Constructor Detail |
---|
protected AbstractRegistrySynchronizer(org.apache.directory.shared.ldap.schema.SchemaManager schemaManager) throws java.lang.Exception
java.lang.Exception
Method Detail |
---|
protected boolean isSchemaLoaded(org.apache.directory.shared.ldap.name.DN dn) throws java.lang.Exception
dn
- The SchemaObject's DN
java.lang.Exception
- If The DN is not a SchemaObject DNprotected boolean isSchemaLoaded(java.lang.String schemaName)
schemaName
- The schema we want to check
protected boolean isSchemaEnabled(java.lang.String schemaName)
schemaName
- The schema we want to check
protected java.lang.String getSchemaName(org.apache.directory.shared.ldap.name.DN dn) throws javax.naming.NamingException
ou=schema, cn=MySchema, ...Here, the schemaName is MySchema
dn
- The DN we want to get the schema name from
javax.naming.NamingException
- If we got an errorprotected void checkOidIsUnique(org.apache.directory.shared.ldap.entry.ServerEntry entry) throws java.lang.Exception
java.lang.Exception
protected org.apache.directory.shared.ldap.schema.SchemaObject checkOidExists(org.apache.directory.shared.ldap.entry.ServerEntry entry) throws java.lang.Exception
java.lang.Exception
protected void checkParent(org.apache.directory.shared.ldap.name.DN newParent, org.apache.directory.shared.ldap.schema.SchemaManager schemaManager, java.lang.String objectType) throws org.apache.directory.shared.ldap.exception.LdapException
org.apache.directory.shared.ldap.exception.LdapException
protected void checkOidIsUnique(org.apache.directory.shared.ldap.schema.SchemaObject schemaObject) throws java.lang.Exception
java.lang.Exception
protected void checkOidIsUnique(java.lang.String oid) throws java.lang.Exception
java.lang.Exception
protected void addToSchema(org.apache.directory.shared.ldap.schema.SchemaObject schemaObject, java.lang.String schemaName) throws java.lang.Exception
java.lang.Exception
protected void deleteFromSchema(org.apache.directory.shared.ldap.schema.SchemaObject schemaObject, java.lang.String schemaName) throws java.lang.Exception
java.lang.Exception
public abstract boolean modify(ModifyOperationContext opContext, org.apache.directory.shared.ldap.entry.ServerEntry targetEntry, boolean cascade) throws java.lang.Exception
modify
in interface RegistrySynchronizer
opContext
- The OperationContext, which contains the entry and the modifications to applytargetEntry
- The modified entrycascade
- Unused
java.lang.Exception
- If the modification failedprotected java.util.Set<java.lang.String> getOids(java.util.Set<org.apache.directory.shared.ldap.entry.ServerEntry> results) throws java.lang.Exception
java.lang.Exception
protected java.lang.String getOid(org.apache.directory.shared.ldap.entry.ServerEntry entry) throws java.lang.Exception
java.lang.Exception
protected void unregisterOids(org.apache.directory.shared.ldap.schema.SchemaObject obj) throws java.lang.Exception
obj
- The SchemaObject to unregister
java.lang.Exception
- If the unregistering failedprotected void registerOids(org.apache.directory.shared.ldap.schema.SchemaObject obj) throws java.lang.Exception
obj
- The SchemaObject to register
java.lang.Exception
- If the registering failedprotected java.lang.String getReferenced(org.apache.directory.shared.ldap.schema.SchemaObject schemaObject)
schemaObject
- The SchemaObject we want the referencing SchemaObjects for
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |