org.apache.ldap.server.subtree
Class SubentryService

java.lang.Object
  extended by org.apache.ldap.server.interceptor.BaseInterceptor
      extended by org.apache.ldap.server.subtree.SubentryService
All Implemented Interfaces:
Interceptor

public class SubentryService
extends BaseInterceptor

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

Version:
$Rev$
Author:
Apache Directory Project

Field Summary
static java.lang.String AC_AREA
           
static java.lang.String AC_INNERAREA
           
static java.lang.String AC_SUBENTRY
           
static java.lang.String AUTONOUMOUS_AREA
           
static java.lang.String AUTONOUMOUS_AREA_SUBENTRY
           
static java.lang.String COLLECTIVE_AREA
           
static java.lang.String COLLECTIVE_ATTRIBUTE_SUBENTRIES
           
static java.lang.String COLLECTIVE_INNERAREA
           
static java.lang.String SCHEMA_AREA
           
static java.lang.String SCHEMA_AREA_SUBENTRY
           
static java.lang.String[] SUBENTRY_OPATTRS
           
 
Constructor Summary
SubentryService()
           
 
Method Summary
 void add(NextInterceptor next, java.lang.String upName, javax.naming.Name normName, javax.naming.directory.Attributes entry)
          Filters DirectoryPartition.add(String, Name, Attributes) call.
 void delete(NextInterceptor next, javax.naming.Name name)
          Filters DirectoryPartition.delete(Name) call.
 javax.naming.directory.ModificationItem[] getOperationalModsForAdd(javax.naming.directory.Attributes entry, javax.naming.directory.Attributes operational)
          Calculates the subentry operational attributes to add or replace from a candidate entry selected by a subtree specification.
 javax.naming.directory.Attributes getSubentryAttributes(javax.naming.Name dn, javax.naming.directory.Attributes 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(DirectoryServiceConfiguration factoryCfg, InterceptorConfiguration cfg)
          This method does nothing by default.
 javax.naming.NamingEnumeration list(NextInterceptor nextInterceptor, javax.naming.Name base)
          Filters DirectoryPartition.list(Name) call.
 void modify(NextInterceptor next, javax.naming.Name name, int modOp, javax.naming.directory.Attributes mods)
          Filters DirectoryPartition.modify(Name, int, Attributes) call.
 void modify(NextInterceptor next, javax.naming.Name name, javax.naming.directory.ModificationItem[] mods)
          Filters DirectoryPartition.modify(Name, ModificationItem[]) call.
 void modifyRn(NextInterceptor next, javax.naming.Name name, java.lang.String newRn, boolean deleteOldRn)
          Filters DirectoryPartition.modifyRn(Name, String, boolean) call.
 void move(NextInterceptor next, javax.naming.Name oriChildName, javax.naming.Name newParentName)
          Filters DirectoryPartition.move(Name, Name) call.
 void move(NextInterceptor next, javax.naming.Name oriChildName, javax.naming.Name newParentName, java.lang.String newRn, boolean deleteOldRn)
          Filters DirectoryPartition.move(Name, Name, String, boolean) call.
 javax.naming.NamingEnumeration search(NextInterceptor nextInterceptor, javax.naming.Name base, java.util.Map env, org.apache.ldap.common.filter.ExprNode filter, javax.naming.directory.SearchControls searchCtls)
          Filters DirectoryPartition.search(Name, Map, ExprNode, SearchControls) call.
 
Methods inherited from class org.apache.ldap.server.interceptor.BaseInterceptor
addContextPartition, compare, destroy, getContext, getMatchedName, getPrincipal, getRootDSE, getSuffix, hasEntry, isSuffix, listSuffixes, lookup, lookup, removeContextPartition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AUTONOUMOUS_AREA

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

AUTONOUMOUS_AREA_SUBENTRY

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

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

AC_SUBENTRY

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

SCHEMA_AREA

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

SCHEMA_AREA_SUBENTRY

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

COLLECTIVE_AREA

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

COLLECTIVE_ATTRIBUTE_SUBENTRIES

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

COLLECTIVE_INNERAREA

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

SUBENTRY_OPATTRS

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

SubentryService

public SubentryService()
Method Detail

init

public void init(DirectoryServiceConfiguration factoryCfg,
                 InterceptorConfiguration cfg)
          throws javax.naming.NamingException
Description copied from class: BaseInterceptor
This method does nothing by default.

Specified by:
init in interface Interceptor
Overrides:
init in class BaseInterceptor
Throws:
javax.naming.NamingException

list

public javax.naming.NamingEnumeration list(NextInterceptor nextInterceptor,
                                           javax.naming.Name base)
                                    throws javax.naming.NamingException
Description copied from interface: Interceptor
Filters DirectoryPartition.list(Name) call.

Specified by:
list in interface Interceptor
Overrides:
list in class BaseInterceptor
Throws:
javax.naming.NamingException

search

public javax.naming.NamingEnumeration search(NextInterceptor nextInterceptor,
                                             javax.naming.Name base,
                                             java.util.Map env,
                                             org.apache.ldap.common.filter.ExprNode filter,
                                             javax.naming.directory.SearchControls searchCtls)
                                      throws javax.naming.NamingException
Description copied from interface: Interceptor
Filters DirectoryPartition.search(Name, Map, ExprNode, SearchControls) call.

Specified by:
search in interface Interceptor
Overrides:
search in class BaseInterceptor
Throws:
javax.naming.NamingException

getSubentryAttributes

public javax.naming.directory.Attributes getSubentryAttributes(javax.naming.Name dn,
                                                               javax.naming.directory.Attributes entryAttrs)
                                                        throws javax.naming.NamingException
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:
javax.naming.NamingException - if there are problems accessing entry information

add

public void add(NextInterceptor next,
                java.lang.String upName,
                javax.naming.Name normName,
                javax.naming.directory.Attributes entry)
         throws javax.naming.NamingException
Description copied from interface: Interceptor
Filters DirectoryPartition.add(String, Name, Attributes) call.

Specified by:
add in interface Interceptor
Overrides:
add in class BaseInterceptor
Throws:
javax.naming.NamingException

delete

public void delete(NextInterceptor next,
                   javax.naming.Name name)
            throws javax.naming.NamingException
Description copied from interface: Interceptor
Filters DirectoryPartition.delete(Name) call.

Specified by:
delete in interface Interceptor
Overrides:
delete in class BaseInterceptor
Throws:
javax.naming.NamingException

modifyRn

public void modifyRn(NextInterceptor next,
                     javax.naming.Name name,
                     java.lang.String newRn,
                     boolean deleteOldRn)
              throws javax.naming.NamingException
Description copied from interface: Interceptor
Filters DirectoryPartition.modifyRn(Name, String, boolean) call.

Specified by:
modifyRn in interface Interceptor
Overrides:
modifyRn in class BaseInterceptor
Throws:
javax.naming.NamingException

move

public void move(NextInterceptor next,
                 javax.naming.Name oriChildName,
                 javax.naming.Name newParentName,
                 java.lang.String newRn,
                 boolean deleteOldRn)
          throws javax.naming.NamingException
Description copied from interface: Interceptor
Filters DirectoryPartition.move(Name, Name, String, boolean) call.

Specified by:
move in interface Interceptor
Overrides:
move in class BaseInterceptor
Throws:
javax.naming.NamingException

move

public void move(NextInterceptor next,
                 javax.naming.Name oriChildName,
                 javax.naming.Name newParentName)
          throws javax.naming.NamingException
Description copied from interface: Interceptor
Filters DirectoryPartition.move(Name, Name) call.

Specified by:
move in interface Interceptor
Overrides:
move in class BaseInterceptor
Throws:
javax.naming.NamingException

modify

public void modify(NextInterceptor next,
                   javax.naming.Name name,
                   int modOp,
                   javax.naming.directory.Attributes mods)
            throws javax.naming.NamingException
Description copied from interface: Interceptor
Filters DirectoryPartition.modify(Name, int, Attributes) call.

Specified by:
modify in interface Interceptor
Overrides:
modify in class BaseInterceptor
Throws:
javax.naming.NamingException

modify

public void modify(NextInterceptor next,
                   javax.naming.Name name,
                   javax.naming.directory.ModificationItem[] mods)
            throws javax.naming.NamingException
Description copied from interface: Interceptor
Filters DirectoryPartition.modify(Name, ModificationItem[]) call.

Specified by:
modify in interface Interceptor
Overrides:
modify in class BaseInterceptor
Throws:
javax.naming.NamingException

getOperationalModsForAdd

public javax.naming.directory.ModificationItem[] getOperationalModsForAdd(javax.naming.directory.Attributes entry,
                                                                          javax.naming.directory.Attributes operational)
                                                                   throws javax.naming.NamingException
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:
javax.naming.NamingException


Copyright © 2002-2005 . All Rights Reserved.