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 15:25:10 +0200 (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()
           
 void init(DirectoryService directoryService)
           
 EntryFilteringCursor list(NextInterceptor nextInterceptor, ListOperationContext opContext)
           
 ClonedServerEntry lookup(NextInterceptor nextInterceptor, LookupOperationContext opContext)
           
 void modify(NextInterceptor nextInterceptor, ModifyOperationContext opContext)
           
 void move(NextInterceptor nextInterceptor, MoveOperationContext opContext)
           
 void moveAndRename(NextInterceptor nextInterceptor, MoveAndRenameOperationContext opContext)
           
 void rename(NextInterceptor nextInterceptor, RenameOperationContext opContext)
           
 EntryFilteringCursor search(NextInterceptor nextInterceptor, SearchOperationContext opContext)
           
 
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
Specified by:
init in interface Interceptor
Overrides:
init in class BaseInterceptor
Throws:
java.lang.Exception

destroy

public void destroy()
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
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
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
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
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
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
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
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-2010 The Apache Software Foundation. All Rights Reserved.