public class SchemaSynchronizer extends Object implements RegistrySynchronizer
SCHEMA_MODIFIED, SCHEMA_UNCHANGED
Constructor and Description |
---|
SchemaSynchronizer(org.apache.directory.shared.ldap.schema.SchemaManager schemaManager)
Creates and initializes a new instance of Schema synchronizer
|
Modifier and Type | Method and Description |
---|---|
void |
add(org.apache.directory.shared.ldap.entry.ServerEntry entry)
Handles the addition of a metaSchema object to the schema partition.
|
void |
delete(org.apache.directory.shared.ldap.entry.ServerEntry entry,
boolean cascade)
Called to react to the deletion of a metaSchema object.
|
boolean |
modify(ModifyOperationContext opContext,
org.apache.directory.shared.ldap.entry.ServerEntry targetEntry,
boolean cascade)
The only modification done on a schema element is on the m-disabled
attributeType
Depending in the existence of this attribute in the previous entry, we will
have to update the entry or not.
|
void |
move(org.apache.directory.shared.ldap.name.DN oriChildName,
org.apache.directory.shared.ldap.name.DN newParentName,
org.apache.directory.shared.ldap.entry.ServerEntry entry,
boolean cascade)
Moves are not allowed for metaSchema objects so this always throws an
UNWILLING_TO_PERFORM LdapException.
|
void |
moveAndRename(org.apache.directory.shared.ldap.name.DN oriChildName,
org.apache.directory.shared.ldap.name.DN newParentName,
org.apache.directory.shared.ldap.name.RDN newRn,
boolean deleteOldRn,
org.apache.directory.shared.ldap.entry.ServerEntry entry,
boolean cascaded) |
void |
moveAndRename(org.apache.directory.shared.ldap.name.DN oriChildName,
org.apache.directory.shared.ldap.name.DN newParentName,
String newRn,
boolean deleteOldRn,
org.apache.directory.shared.ldap.entry.ServerEntry entry,
boolean cascade)
Moves are not allowed for metaSchema objects so this always throws an
UNWILLING_TO_PERFORM LdapException.
|
void |
rename(org.apache.directory.shared.ldap.entry.ServerEntry entry,
org.apache.directory.shared.ldap.name.RDN newRdn,
boolean cascade)
Responds to the rdn (commonName) of the metaSchema object being
changed.
|
public SchemaSynchronizer(org.apache.directory.shared.ldap.schema.SchemaManager schemaManager) throws Exception
registries
- The Registriesloader
- The schema loaderException
- If something went wrongpublic boolean modify(ModifyOperationContext opContext, org.apache.directory.shared.ldap.entry.ServerEntry targetEntry, boolean cascade) throws Exception
modify
in interface RegistrySynchronizer
opContext
- The OperationContext, which contains the entry and the modifications to applytargetEntry
- The modified entrycascade
- UnusedException
- If the modification failedpublic void moveAndRename(org.apache.directory.shared.ldap.name.DN oriChildName, org.apache.directory.shared.ldap.name.DN newParentName, org.apache.directory.shared.ldap.name.RDN newRn, boolean deleteOldRn, org.apache.directory.shared.ldap.entry.ServerEntry entry, boolean cascaded) throws org.apache.directory.shared.ldap.exception.LdapException
moveAndRename
in interface RegistrySynchronizer
org.apache.directory.shared.ldap.exception.LdapException
public void add(org.apache.directory.shared.ldap.entry.ServerEntry entry) throws Exception
add
in interface RegistrySynchronizer
name
- the dn of the new metaSchema objectentry
- the attributes of the new metaSchema objectException
- If the addition failedpublic void delete(org.apache.directory.shared.ldap.entry.ServerEntry entry, boolean cascade) throws Exception
delete
in interface RegistrySynchronizer
name
- the dn of the metaSchema object being deletedentry
- the attributes of the metaSchema objectException
- If the deletion failedpublic void rename(org.apache.directory.shared.ldap.entry.ServerEntry entry, org.apache.directory.shared.ldap.name.RDN newRdn, boolean cascade) throws Exception
rename
in interface RegistrySynchronizer
name
- the dn of the metaSchema object renamedentry
- the entry of the metaSchema object before the renamenewRdn
- the new commonName of the metaSchema objectException
- If the rename failedpublic void moveAndRename(org.apache.directory.shared.ldap.name.DN oriChildName, org.apache.directory.shared.ldap.name.DN newParentName, String newRn, boolean deleteOldRn, org.apache.directory.shared.ldap.entry.ServerEntry entry, boolean cascade) throws org.apache.directory.shared.ldap.exception.LdapUnwillingToPerformException
org.apache.directory.shared.ldap.exception.LdapUnwillingToPerformException
public void move(org.apache.directory.shared.ldap.name.DN oriChildName, org.apache.directory.shared.ldap.name.DN newParentName, org.apache.directory.shared.ldap.entry.ServerEntry entry, boolean cascade) throws org.apache.directory.shared.ldap.exception.LdapUnwillingToPerformException
move
in interface RegistrySynchronizer
org.apache.directory.shared.ldap.exception.LdapUnwillingToPerformException
Copyright © 2003–2014 The Apache Software Foundation. All rights reserved.