public class SchemaSynchronizer extends Object implements RegistrySynchronizer
SCHEMA_MODIFIED, SCHEMA_UNCHANGED
Constructor and Description |
---|
SchemaSynchronizer(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager)
Creates and initializes a new instance of Schema synchronizer
|
Modifier and Type | Method and Description |
---|---|
void |
add(org.apache.directory.api.ldap.model.entry.Entry entry)
Handles the addition of a metaSchema object to the schema partition.
|
void |
delete(org.apache.directory.api.ldap.model.entry.Entry entry,
boolean cascade)
Called to react to the deletion of a metaSchema object.
|
boolean |
modify(ModifyOperationContext modifyContext,
org.apache.directory.api.ldap.model.entry.Entry 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.api.ldap.model.name.Dn oriChildName,
org.apache.directory.api.ldap.model.name.Dn newParentName,
org.apache.directory.api.ldap.model.entry.Entry entry,
boolean cascade)
Moves are not allowed for metaSchema objects so this always throws an
UNWILLING_TO_PERFORM LdapException.
|
void |
moveAndRename(org.apache.directory.api.ldap.model.name.Dn oriChildName,
org.apache.directory.api.ldap.model.name.Dn newParentName,
org.apache.directory.api.ldap.model.name.Rdn newRn,
boolean deleteOldRn,
org.apache.directory.api.ldap.model.entry.Entry entry,
boolean cascaded) |
void |
moveAndRename(org.apache.directory.api.ldap.model.name.Dn oriChildName,
org.apache.directory.api.ldap.model.name.Dn newParentName,
String newRdn,
boolean deleteOldRdn,
org.apache.directory.api.ldap.model.entry.Entry entry,
boolean cascade)
Moves are not allowed for metaSchema objects so this always throws an
UNWILLING_TO_PERFORM LdapException.
|
void |
rename(org.apache.directory.api.ldap.model.entry.Entry entry,
org.apache.directory.api.ldap.model.name.Rdn newRdn,
boolean cascade)
Responds to the rdn (commonName) of the metaSchema object being
changed.
|
public SchemaSynchronizer(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager) throws Exception
schemaManager
- The server schemaManagerException
- If something went wrongpublic 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 RegistrySynchronizer
modifyContext
- The OperationContext, which contains the entry and the modifications to applytargetEntry
- The modified entrycascade
- Unusedorg.apache.directory.api.ldap.model.exception.LdapException
- If the modification failedpublic void moveAndRename(org.apache.directory.api.ldap.model.name.Dn oriChildName, org.apache.directory.api.ldap.model.name.Dn newParentName, org.apache.directory.api.ldap.model.name.Rdn newRn, boolean deleteOldRn, org.apache.directory.api.ldap.model.entry.Entry entry, boolean cascaded) throws org.apache.directory.api.ldap.model.exception.LdapException
moveAndRename
in interface RegistrySynchronizer
org.apache.directory.api.ldap.model.exception.LdapException
public void add(org.apache.directory.api.ldap.model.entry.Entry entry) throws org.apache.directory.api.ldap.model.exception.LdapException
add
in interface RegistrySynchronizer
entry
- the attributes of the new metaSchema objectorg.apache.directory.api.ldap.model.exception.LdapException
- If the add failedpublic void delete(org.apache.directory.api.ldap.model.entry.Entry entry, boolean cascade) throws org.apache.directory.api.ldap.model.exception.LdapException
delete
in interface RegistrySynchronizer
entry
- the attributes of the metaSchema objectcascade
- If we have to process recursivelyorg.apache.directory.api.ldap.model.exception.LdapException
- If the delete failedpublic void rename(org.apache.directory.api.ldap.model.entry.Entry entry, org.apache.directory.api.ldap.model.name.Rdn newRdn, boolean cascade) throws org.apache.directory.api.ldap.model.exception.LdapException
rename
in interface RegistrySynchronizer
entry
- the entry of the metaSchema object before the renamenewRdn
- the new commonName of the metaSchema objectcascade
- If we have to process recursivelyorg.apache.directory.api.ldap.model.exception.LdapException
- If the rename failedpublic void moveAndRename(org.apache.directory.api.ldap.model.name.Dn oriChildName, org.apache.directory.api.ldap.model.name.Dn newParentName, String newRdn, boolean deleteOldRdn, org.apache.directory.api.ldap.model.entry.Entry entry, boolean cascade) throws org.apache.directory.api.ldap.model.exception.LdapUnwillingToPerformException
oriChildName
- The original child namenewParentName
- The new parent namenewRdn
- the new commonName of the metaSchema objectdeleteOldRdn
- If we need to delete the old Rdnentry
- the entry of the metaSchema object before the renamecascade
- If we have to process recursivelyorg.apache.directory.api.ldap.model.exception.LdapUnwillingToPerformException
- If the rename failedpublic void move(org.apache.directory.api.ldap.model.name.Dn oriChildName, org.apache.directory.api.ldap.model.name.Dn newParentName, org.apache.directory.api.ldap.model.entry.Entry entry, boolean cascade) throws org.apache.directory.api.ldap.model.exception.LdapUnwillingToPerformException
move
in interface RegistrySynchronizer
org.apache.directory.api.ldap.model.exception.LdapUnwillingToPerformException
Copyright © 2003–2020 The Apache Software Foundation. All rights reserved.