* @return the set of subentry op attrs for an entry
* @throws Exception if there are problems accessing entry information
*/
public Entry getSubentryAttributes( Dn dn, Entry entryAttrs ) throws LdapException
{
Entry subentryAttrs = new DefaultEntry( schemaManager, dn );
for ( Dn subentryDn : subentryCache )
{
Dn apDn = subentryDn.getParent();
Subentry subentry = subentryCache.getSubentry( subentryDn );
SubtreeSpecification ss = subentry.getSubtreeSpecification();
if ( evaluator.evaluate( ss, apDn, dn, entryAttrs ) )
{
Attribute operational;
if ( subentry.isAccessControlAdminRole() )
{
operational = subentryAttrs.get( ACCESS_CONTROL_SUBENTRIES_AT );
if ( operational == null )
{
operational = new DefaultAttribute( ACCESS_CONTROL_SUBENTRIES_AT );
subentryAttrs.put( operational );
}
operational.add( subentryDn.getNormName() );
}
if ( subentry.isSchemaAdminRole() )
{
operational = subentryAttrs.get( SUBSCHEMA_SUBENTRY_AT );
if ( operational == null )
{
operational = new DefaultAttribute( SUBSCHEMA_SUBENTRY_AT );
subentryAttrs.put( operational );
}
operational.add( subentryDn.getNormName() );
}
if ( subentry.isCollectiveAdminRole() )
{
operational = subentryAttrs.get( COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT );
if ( operational == null )
{
operational = new DefaultAttribute( COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT );
subentryAttrs.put( operational );
}
operational.add( subentryDn.getNormName() );
}
if ( subentry.isTriggersAdminRole() )
{
operational = subentryAttrs.get( TRIGGER_EXECUTION_SUBENTRIES_AT );
if ( operational == null )
{
operational = new DefaultAttribute( TRIGGER_EXECUTION_SUBENTRIES_AT );
subentryAttrs.put( operational );
}
operational.add( subentryDn.getNormName() );
}
}