Java Code Examples for org.apache.directory.api.ldap.model.name.Rdn#isSchemaAware()

The following examples show how to use org.apache.directory.api.ldap.model.name.Rdn#isSchemaAware() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: NormalizationInterceptor.java    From syncope with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
public void moveAndRename( MoveAndRenameOperationContext moveAndRenameContext ) throws LdapException
{
    Rdn newRdn = moveAndRenameContext.getNewRdn();
    
    if ( !newRdn.isSchemaAware() )
    {
        moveAndRenameContext.setNewRdn( new Rdn( schemaManager, newRdn ) );
    }
    
    Dn dn = moveAndRenameContext.getDn();
    
    if ( !dn.isSchemaAware() )
    {
        moveAndRenameContext.setDn( new Dn( schemaManager, dn ) );
    }
    
    Dn newDn = moveAndRenameContext.getNewDn();
    
    if ( !newDn.isSchemaAware() )
    {
        moveAndRenameContext.setNewDn( new Dn( schemaManager, newDn ) );
    }
    
    Dn newSuperiorDn = moveAndRenameContext.getNewSuperiorDn();
    
    if ( !newSuperiorDn.isSchemaAware() )
    {
        moveAndRenameContext.setNewSuperiorDn( new Dn( schemaManager, newSuperiorDn ) );
    }

    next( moveAndRenameContext );
}
 
Example 2
Source File: NormalizationInterceptor.java    From syncope with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
public void rename( RenameOperationContext renameContext ) throws LdapException
{
    // Normalize the new Rdn and the Dn if needed
    Dn dn = renameContext.getDn();
    
    if ( !dn.isSchemaAware() )
    {
        renameContext.setDn( new Dn( schemaManager, dn ) );
    }
    
    Rdn newRdn = renameContext.getNewRdn();
    
    if ( !newRdn.isSchemaAware() )
    {
        renameContext.setNewRdn( new Rdn( schemaManager, newRdn ) );
    }
    
    Dn newDn = renameContext.getNewDn();
    
    if ( !newDn.isSchemaAware() )
    {
        renameContext.setNewDn( new Dn( schemaManager, newDn ) );
    }

    // Push to the next interceptor
    next( renameContext );
}
 
Example 3
Source File: NormalizationInterceptor.java    From syncope with Apache License 2.0 4 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
public void move( MoveOperationContext moveContext ) throws LdapException
{
    Dn moveDn = moveContext.getDn();
    
    if ( !moveDn.isSchemaAware() )
    {
        moveContext.setDn( new Dn( schemaManager, moveDn ) );
    }

    Dn oldSuperiorDn = moveContext.getOldSuperior();
    
    if ( !oldSuperiorDn.isSchemaAware() )
    {
        moveContext.setOldSuperior( new Dn( schemaManager, oldSuperiorDn ) );
    }

    Dn newSuperiorDn = moveContext.getNewSuperior();
    
    if ( !newSuperiorDn.isSchemaAware() )
    {
        moveContext.setNewSuperior( new Dn( schemaManager, newSuperiorDn ) );
    }
    
    Dn newDn = moveContext.getNewDn();
    
    if ( !newDn.isSchemaAware() )
    {
        moveContext.setNewDn( new Dn( schemaManager, newDn ) );
    }

    Rdn rdn = moveContext.getRdn();
    
    if ( !rdn.isSchemaAware() )
    {
        moveContext.setRdn( new Rdn( schemaManager, rdn ) );
    }

    next( moveContext );
}