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

java.lang.Object
  extended by org.apache.directory.server.core.interceptor.BaseInterceptor
      extended by org.apache.directory.server.core.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: 507250 $
Author:
Apache Directory Project

Nested Class Summary
 class SubentryService.HideEntriesFilter
          SearchResultFilter used to filter out normal entries but shows subentries based on objectClass values.
 class SubentryService.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 AC_SUBENTRIES
           
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_SUBENTRY
           
static java.lang.String[] SUBENTRY_OPATTRS
           
 
Constructor Summary
SubentryService()
           
 
Method Summary
 void add(NextInterceptor next, org.apache.directory.shared.ldap.name.LdapDN normName, javax.naming.directory.Attributes entry)
          Filters Partition.add(org.apache.directory.shared.ldap.name.LdapDN,javax.naming.directory.Attributes) call.
 void delete(NextInterceptor next, org.apache.directory.shared.ldap.name.LdapDN name)
          Filters Partition.delete(org.apache.directory.shared.ldap.name.LdapDN) call.
 org.apache.directory.shared.ldap.message.ModificationItemImpl[] 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, org.apache.directory.shared.ldap.name.LdapDN base)
          Filters Partition.list(org.apache.directory.shared.ldap.name.LdapDN) call.
 void modify(NextInterceptor next, org.apache.directory.shared.ldap.name.LdapDN name, int modOp, javax.naming.directory.Attributes mods)
          Filters Partition.modify(org.apache.directory.shared.ldap.name.LdapDN,int,javax.naming.directory.Attributes) call.
 void modify(NextInterceptor next, org.apache.directory.shared.ldap.name.LdapDN name, org.apache.directory.shared.ldap.message.ModificationItemImpl[] mods)
          Filters Partition#modify(org.apache.directory.shared.ldap.name.LdapDN,javax.naming.directory.ModificationItem[]) call.
 void modifyRn(NextInterceptor next, org.apache.directory.shared.ldap.name.LdapDN name, java.lang.String newRn, boolean deleteOldRn)
          Filters Partition.modifyRn(org.apache.directory.shared.ldap.name.LdapDN,String,boolean) call.
 void move(NextInterceptor next, org.apache.directory.shared.ldap.name.LdapDN oriChildName, org.apache.directory.shared.ldap.name.LdapDN newParentName)
          Filters Partition.move(org.apache.directory.shared.ldap.name.LdapDN,org.apache.directory.shared.ldap.name.LdapDN) call.
 void move(NextInterceptor next, org.apache.directory.shared.ldap.name.LdapDN oriChildName, org.apache.directory.shared.ldap.name.LdapDN newParentName, java.lang.String newRn, boolean deleteOldRn)
          Filters Partition.move(org.apache.directory.shared.ldap.name.LdapDN,org.apache.directory.shared.ldap.name.LdapDN,String,boolean) call.
 javax.naming.NamingEnumeration search(NextInterceptor nextInterceptor, org.apache.directory.shared.ldap.name.LdapDN base, java.util.Map env, org.apache.directory.shared.ldap.filter.ExprNode filter, javax.naming.directory.SearchControls searchCtls)
          Filters Partition.search(org.apache.directory.shared.ldap.name.LdapDN,java.util.Map,org.apache.directory.shared.ldap.filter.ExprNode,javax.naming.directory.SearchControls) call.
 
Methods inherited from class org.apache.directory.server.core.interceptor.BaseInterceptor
addContextPartition, bind, compare, destroy, getContext, getMatchedName, getPrincipal, getRootDSE, getSuffix, hasEntry, isSuffix, listSuffixes, lookup, 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

AC_SUBENTRIES

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

SCHEMA_AREA

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

SCHEMA_SUBENTRY

public static final java.lang.String SCHEMA_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,
                                           org.apache.directory.shared.ldap.name.LdapDN base)
                                    throws javax.naming.NamingException
Description copied from interface: Interceptor
Filters Partition.list(org.apache.directory.shared.ldap.name.LdapDN) call.

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

search

public javax.naming.NamingEnumeration search(NextInterceptor nextInterceptor,
                                             org.apache.directory.shared.ldap.name.LdapDN base,
                                             java.util.Map env,
                                             org.apache.directory.shared.ldap.filter.ExprNode filter,
                                             javax.naming.directory.SearchControls searchCtls)
                                      throws javax.naming.NamingException
Description copied from interface: Interceptor
Filters Partition.search(org.apache.directory.shared.ldap.name.LdapDN,java.util.Map,org.apache.directory.shared.ldap.filter.ExprNode,javax.naming.directory.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,
                org.apache.directory.shared.ldap.name.LdapDN normName,
                javax.naming.directory.Attributes entry)
         throws javax.naming.NamingException
Description copied from interface: Interceptor
Filters Partition.add(org.apache.directory.shared.ldap.name.LdapDN,javax.naming.directory.Attributes) call.

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

delete

public void delete(NextInterceptor next,
                   org.apache.directory.shared.ldap.name.LdapDN name)
            throws javax.naming.NamingException
Description copied from interface: Interceptor
Filters Partition.delete(org.apache.directory.shared.ldap.name.LdapDN) call.

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

modifyRn

public void modifyRn(NextInterceptor next,
                     org.apache.directory.shared.ldap.name.LdapDN name,
                     java.lang.String newRn,
                     boolean deleteOldRn)
              throws javax.naming.NamingException
Description copied from interface: Interceptor
Filters Partition.modifyRn(org.apache.directory.shared.ldap.name.LdapDN,String,boolean) call.

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

move

public void move(NextInterceptor next,
                 org.apache.directory.shared.ldap.name.LdapDN oriChildName,
                 org.apache.directory.shared.ldap.name.LdapDN newParentName,
                 java.lang.String newRn,
                 boolean deleteOldRn)
          throws javax.naming.NamingException
Description copied from interface: Interceptor
Filters Partition.move(org.apache.directory.shared.ldap.name.LdapDN,org.apache.directory.shared.ldap.name.LdapDN,String,boolean) call.

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

move

public void move(NextInterceptor next,
                 org.apache.directory.shared.ldap.name.LdapDN oriChildName,
                 org.apache.directory.shared.ldap.name.LdapDN newParentName)
          throws javax.naming.NamingException
Description copied from interface: Interceptor
Filters Partition.move(org.apache.directory.shared.ldap.name.LdapDN,org.apache.directory.shared.ldap.name.LdapDN) call.

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

modify

public void modify(NextInterceptor next,
                   org.apache.directory.shared.ldap.name.LdapDN name,
                   int modOp,
                   javax.naming.directory.Attributes mods)
            throws javax.naming.NamingException
Description copied from interface: Interceptor
Filters Partition.modify(org.apache.directory.shared.ldap.name.LdapDN,int,javax.naming.directory.Attributes) call.

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

modify

public void modify(NextInterceptor next,
                   org.apache.directory.shared.ldap.name.LdapDN name,
                   org.apache.directory.shared.ldap.message.ModificationItemImpl[] mods)
            throws javax.naming.NamingException
Description copied from interface: Interceptor
Filters Partition#modify(org.apache.directory.shared.ldap.name.LdapDN,javax.naming.directory.ModificationItem[]) call.

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

getOperationalModsForAdd

public org.apache.directory.shared.ldap.message.ModificationItemImpl[] 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 © 2003-2012 Apache Software Foundation. All Rights Reserved.