org.apache.directory.server.core.subtree
Class SubentryInterceptor

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

public class SubentryInterceptor
extends BaseInterceptor

The Subentry interceptor service which is responsible for filtering out subentries on search operations and injecting operational attributes

Version:
$Rev: 676207 $
Author:
Apache Directory Project
'XBean'

Nested Class Summary
 class SubentryInterceptor.HideEntriesFilter
          SearchResultFilter used to filter out normal entries but shows subentries based on objectClass values.
 class SubentryInterceptor.HideSubentriesFilter
          SearchResultFilter used to filter out subentries based on objectClass values.
 
Field Summary
static java.lang.String AC_AREA
           
static java.lang.String AC_INNERAREA
           
static java.lang.String COLLECTIVE_AREA
           
static java.lang.String COLLECTIVE_INNERAREA
           
static java.lang.String SCHEMA_AREA
           
static java.lang.String[] SUBENTRY_OPATTRS
           
static java.lang.String TRIGGER_AREA
           
static java.lang.String TRIGGER_INNERAREA
           
 
Constructor Summary
SubentryInterceptor()
           
 
Method Summary
 void add(NextInterceptor next, AddOperationContext addContext)
          Filters Partition.add( AddOperationContext ) call.
 void delete(NextInterceptor next, DeleteOperationContext opContext)
          Filters Partition.delete( DeleteOperationContext ) call.
 java.util.List<org.apache.directory.shared.ldap.entry.Modification> getOperationalModsForAdd(ServerEntry entry, ServerEntry operational)
          Calculates the subentry operational attributes to add or replace from a candidate entry selected by a subtree specification.
 ServerEntry getSubentryAttributes(org.apache.directory.shared.ldap.name.LdapDN dn, ServerEntry entryAttrs)
          Evaluates the set of subentry subtrees upon an entry and returns the operational subentry attributes that will be added to the entry if added at the dn specified.
 void init(DirectoryService directoryService)
          This method does nothing by default.
 EntryFilteringCursor list(NextInterceptor nextInterceptor, ListOperationContext opContext)
          Filters Partition.list( ListOperationContext ) call.
 void modify(NextInterceptor next, ModifyOperationContext opContext)
          Filters Partition.modify( ModifyOperationContext ) call.
 void move(NextInterceptor next, MoveOperationContext opContext)
          Filters Partition.move( MoveOperationContext ) call.
 void moveAndRename(NextInterceptor next, MoveAndRenameOperationContext opContext)
          Filters Partition.moveAndRename( MoveAndRenameOperationContext) call.
 void rename(NextInterceptor next, 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, destroy, getContext, getMatchedName, getName, getPrincipal, getRootDSE, getSuffix, hasEntry, listSuffixes, lookup, removeContextPartition, unbind
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AC_AREA

public static final java.lang.String AC_AREA
See Also:
Constant Field Values

AC_INNERAREA

public static final java.lang.String AC_INNERAREA
See Also:
Constant Field Values

SCHEMA_AREA

public static final java.lang.String SCHEMA_AREA
See Also:
Constant Field Values

COLLECTIVE_AREA

public static final java.lang.String COLLECTIVE_AREA
See Also:
Constant Field Values

COLLECTIVE_INNERAREA

public static final java.lang.String COLLECTIVE_INNERAREA
See Also:
Constant Field Values

TRIGGER_AREA

public static final java.lang.String TRIGGER_AREA
See Also:
Constant Field Values

TRIGGER_INNERAREA

public static final java.lang.String TRIGGER_INNERAREA
See Also:
Constant Field Values

SUBENTRY_OPATTRS

public static final java.lang.String[] SUBENTRY_OPATTRS
Constructor Detail

SubentryInterceptor

public SubentryInterceptor()
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

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

getSubentryAttributes

public ServerEntry getSubentryAttributes(org.apache.directory.shared.ldap.name.LdapDN dn,
                                         ServerEntry entryAttrs)
                                  throws java.lang.Exception
Evaluates the set of subentry subtrees upon an entry and returns the operational subentry attributes that will be added to the entry if added at the dn specified.

Parameters:
dn - the normalized distinguished name of the entry
entryAttrs - the entry attributes are generated for
Returns:
the set of subentry op attrs for an entry
Throws:
java.lang.Exception - if there are problems accessing entry information

add

public void add(NextInterceptor next,
                AddOperationContext addContext)
         throws java.lang.Exception
Description copied from interface: Interceptor
Filters Partition.add( AddOperationContext ) call.

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

delete

public void delete(NextInterceptor next,
                   DeleteOperationContext opContext)
            throws java.lang.Exception
Description copied from interface: Interceptor
Filters Partition.delete( DeleteOperationContext ) call.

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

rename

public void rename(NextInterceptor next,
                   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

moveAndRename

public void moveAndRename(NextInterceptor next,
                          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

move

public void move(NextInterceptor next,
                 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

modify

public void modify(NextInterceptor next,
                   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

getOperationalModsForAdd

public java.util.List<org.apache.directory.shared.ldap.entry.Modification> getOperationalModsForAdd(ServerEntry entry,
                                                                                                    ServerEntry operational)
                                                                                             throws java.lang.Exception
Calculates the subentry operational attributes to add or replace from a candidate entry selected by a subtree specification. When a subentry is added or it's specification is modified some entries must have new operational attributes added to it to point back to the associated subentry. To do so a modify operation must be performed on entries selected by the subtree specification. This method calculates the modify operation to be performed on the entry.

Parameters:
entry - the entry being modified
operational - the set of operational attributes supported by the AP of the subentry
Returns:
the set of modifications needed to update the entry
Throws:
java.lang.Exception - if there are probelms accessing modification items


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