org.apache.directory.server.core.operational
Class OperationalAttributeInterceptor

java.lang.Object
  extended by org.apache.directory.server.core.interceptor.BaseInterceptor
      extended by org.apache.directory.server.core.operational.OperationalAttributeInterceptor
All Implemented Interfaces:
Interceptor

public class OperationalAttributeInterceptor
extends BaseInterceptor

An Interceptor that adds or modifies the default attributes of entries. There are four default attributes for now; 'creatorsName', 'createTimestamp', 'modifiersName', and 'modifyTimestamp'.

Version:
$Rev: 927839 $, $Date: 2010-03-26 14:25:10 +0100 (Fri, 26 Mar 2010) $
Author:
Apache Directory Project
XBean

Constructor Summary
OperationalAttributeInterceptor()
          Creates the operational attribute management service interceptor.
 
Method Summary
 void add(NextInterceptor nextInterceptor, AddOperationContext opContext)
          Adds extra operational attributes to the entry before it is added.
 void denormalizeEntryOpAttrs(org.apache.directory.shared.ldap.entry.ServerEntry entry)
           
 org.apache.directory.shared.ldap.name.DN denormalizeTypes(org.apache.directory.shared.ldap.name.DN dn)
          Does not create a new DN but alters existing DN by using the first short name for an attributeType definition.
 void destroy()
          This method does nothing by default.
 void init(DirectoryService directoryService)
          This method does nothing by default.
 EntryFilteringCursor list(NextInterceptor nextInterceptor, ListOperationContext opContext)
          Filters Partition.list( ListOperationContext ) call.
 ClonedServerEntry lookup(NextInterceptor nextInterceptor, LookupOperationContext opContext)
          Filters Partition.lookup( LookupOperationContext ) call.
 void modify(NextInterceptor nextInterceptor, ModifyOperationContext opContext)
          Filters Partition.modify( ModifyOperationContext ) call.
 void move(NextInterceptor nextInterceptor, MoveOperationContext opContext)
          Filters Partition.move( MoveOperationContext ) call.
 void moveAndRename(NextInterceptor nextInterceptor, MoveAndRenameOperationContext opContext)
          Filters Partition.moveAndRename( MoveAndRenameOperationContext) call.
 void rename(NextInterceptor nextInterceptor, RenameOperationContext opContext)
          Filters Partition.rename( RenameOperationContext ) call.
 EntryFilteringCursor search(NextInterceptor nextInterceptor, SearchOperationContext opContext)
          Filters Partition.search( SearchOperationContext ) call.
 
Methods inherited from class org.apache.directory.server.core.interceptor.BaseInterceptor
addContextPartition, bind, compare, delete, getContext, getMatchedName, getName, getPrincipal, getRootDSE, getSuffix, hasEntry, listSuffixes, removeContextPartition, unbind
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OperationalAttributeInterceptor

public OperationalAttributeInterceptor()
Creates the operational attribute management service interceptor.

Method Detail

init

public void init(DirectoryService directoryService)
          throws java.lang.Exception
Description copied from class: BaseInterceptor
This method does nothing by default.

Specified by:
init in interface Interceptor
Overrides:
init in class BaseInterceptor
Throws:
java.lang.Exception

destroy

public void destroy()
Description copied from class: BaseInterceptor
This method does nothing by default.

Specified by:
destroy in interface Interceptor
Overrides:
destroy in class BaseInterceptor

add

public void add(NextInterceptor nextInterceptor,
                AddOperationContext opContext)
         throws java.lang.Exception
Adds extra operational attributes to the entry before it is added. We add those attributes : - creatorsName - createTimestamp - entryCSN - entryUUID

Specified by:
add in interface Interceptor
Overrides:
add in class BaseInterceptor
Throws:
java.lang.Exception

modify

public void modify(NextInterceptor nextInterceptor,
                   ModifyOperationContext opContext)
            throws java.lang.Exception
Description copied from interface: Interceptor
Filters Partition.modify( ModifyOperationContext ) call.

Specified by:
modify in interface Interceptor
Overrides:
modify in class BaseInterceptor
Throws:
java.lang.Exception

rename

public void rename(NextInterceptor nextInterceptor,
                   RenameOperationContext opContext)
            throws java.lang.Exception
Description copied from interface: Interceptor
Filters Partition.rename( RenameOperationContext ) call.

Specified by:
rename in interface Interceptor
Overrides:
rename in class BaseInterceptor
Throws:
java.lang.Exception

move

public void move(NextInterceptor nextInterceptor,
                 MoveOperationContext opContext)
          throws java.lang.Exception
Description copied from interface: Interceptor
Filters Partition.move( MoveOperationContext ) call.

Specified by:
move in interface Interceptor
Overrides:
move in class BaseInterceptor
Throws:
java.lang.Exception

moveAndRename

public void moveAndRename(NextInterceptor nextInterceptor,
                          MoveAndRenameOperationContext opContext)
                   throws java.lang.Exception
Description copied from interface: Interceptor
Filters Partition.moveAndRename( MoveAndRenameOperationContext) call.

Specified by:
moveAndRename in interface Interceptor
Overrides:
moveAndRename in class BaseInterceptor
Throws:
java.lang.Exception

lookup

public ClonedServerEntry lookup(NextInterceptor nextInterceptor,
                                LookupOperationContext opContext)
                         throws java.lang.Exception
Description copied from interface: Interceptor
Filters Partition.lookup( LookupOperationContext ) call.

Specified by:
lookup in interface Interceptor
Overrides:
lookup in class BaseInterceptor
Throws:
java.lang.Exception

list

public EntryFilteringCursor list(NextInterceptor nextInterceptor,
                                 ListOperationContext opContext)
                          throws java.lang.Exception
Description copied from interface: Interceptor
Filters Partition.list( ListOperationContext ) call.

Specified by:
list in interface Interceptor
Overrides:
list in class BaseInterceptor
Throws:
java.lang.Exception

search

public EntryFilteringCursor search(NextInterceptor nextInterceptor,
                                   SearchOperationContext opContext)
                            throws java.lang.Exception
Description copied from interface: Interceptor
Filters Partition.search( SearchOperationContext ) call.

Specified by:
search in interface Interceptor
Overrides:
search in class BaseInterceptor
Throws:
java.lang.Exception

denormalizeEntryOpAttrs

public void denormalizeEntryOpAttrs(org.apache.directory.shared.ldap.entry.ServerEntry entry)
                             throws java.lang.Exception
Throws:
java.lang.Exception

denormalizeTypes

public org.apache.directory.shared.ldap.name.DN denormalizeTypes(org.apache.directory.shared.ldap.name.DN dn)
                                                          throws java.lang.Exception
Does not create a new DN but alters existing DN by using the first short name for an attributeType definition.

Parameters:
dn - the normalized distinguished name
Returns:
the distinuished name denormalized
Throws:
java.lang.Exception - if there are problems denormalizing


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.