Java Code Examples for org.apache.directory.server.core.api.interceptor.context.AddOperationContext#setLogChange()

The following examples show how to use org.apache.directory.server.core.api.interceptor.context.AddOperationContext#setLogChange() . 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: DefaultCoreSession.java    From MyVirtualDirectory with Apache License 2.0 6 votes vote down vote up
/**
 * {@inheritDoc}
 */
public void add( AddRequest addRequest, LogChange log ) throws LdapException
{
    AddOperationContext addContext = new AddOperationContext( this, addRequest );

    addContext.setLogChange( log );

    OperationManager operationManager = directoryService.getOperationManager();
    try
    {
        operationManager.add( addContext );
    }
    catch ( LdapException e )
    {
        addRequest.getResultResponse().addAllControls( addContext.getResponseControls() );
        throw e;
    }
    addRequest.getResultResponse().addAllControls( addContext.getResponseControls() );
}
 
Example 2
Source File: DefaultCoreSession.java    From MyVirtualDirectory with Apache License 2.0 6 votes vote down vote up
/**
 * {@inheritDoc}
 */
public void add( AddRequest addRequest, LogChange log ) throws LdapException
{
    AddOperationContext addContext = new AddOperationContext( this, addRequest );

    addContext.setLogChange( log );

    OperationManager operationManager = directoryService.getOperationManager();
    try
    {
        operationManager.add( addContext );
    }
    catch ( LdapException e )
    {
        addRequest.getResultResponse().addAllControls( addContext.getResponseControls() );
        throw e;
    }
    addRequest.getResultResponse().addAllControls( addContext.getResponseControls() );
}
 
Example 3
Source File: DefaultCoreSession.java    From MyVirtualDirectory with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
public void add( Entry entry, LogChange log ) throws LdapException
{
    AddOperationContext addContext = new AddOperationContext( this, entry );

    addContext.setLogChange( log );

    OperationManager operationManager = directoryService.getOperationManager();
    operationManager.add( addContext );
}
 
Example 4
Source File: DefaultCoreSession.java    From MyVirtualDirectory with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
public void add( Entry entry, boolean ignoreReferral, LogChange log ) throws LdapException
{
    AddOperationContext addContext = new AddOperationContext( this, entry );

    addContext.setLogChange( log );
    setReferralHandling( addContext, ignoreReferral );

    OperationManager operationManager = directoryService.getOperationManager();
    operationManager.add( addContext );
}
 
Example 5
Source File: DefaultCoreSession.java    From MyVirtualDirectory with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
public void add( Entry entry, LogChange log ) throws LdapException
{
    AddOperationContext addContext = new AddOperationContext( this, entry );

    addContext.setLogChange( log );

    OperationManager operationManager = directoryService.getOperationManager();
    operationManager.add( addContext );
}
 
Example 6
Source File: DefaultCoreSession.java    From MyVirtualDirectory with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
public void add( Entry entry, boolean ignoreReferral, LogChange log ) throws LdapException
{
    AddOperationContext addContext = new AddOperationContext( this, entry );

    addContext.setLogChange( log );
    setReferralHandling( addContext, ignoreReferral );

    OperationManager operationManager = directoryService.getOperationManager();
    operationManager.add( addContext );
}