Subentry subentry = subentryCache.getSubentry( subentryDnStr );
SubtreeSpecification ss = subentry.getSubtreeSpecification();
if ( evaluator.evaluate( ss, apDn, dn, entryAttrs ) )
{
EntryAttribute operational;
if ( subentry.isAccessControlSubentry() )
{
operational = subentryAttrs.get( SchemaConstants.ACCESS_CONTROL_SUBENTRIES_AT );
if ( operational == null )
{
operational = new DefaultServerAttribute( SchemaConstants.ACCESS_CONTROL_SUBENTRIES_AT,
schemaManager.lookupAttributeTypeRegistry( SchemaConstants.ACCESS_CONTROL_SUBENTRIES_AT ) );
subentryAttrs.put( operational );
}
operational.add( subentryDn.getNormName() );
}
if ( subentry.isSchemaSubentry() )
{
operational = subentryAttrs.get( SchemaConstants.SUBSCHEMA_SUBENTRY_AT );
if ( operational == null )
{
operational = new DefaultServerAttribute( SchemaConstants.SUBSCHEMA_SUBENTRY_AT, schemaManager
.lookupAttributeTypeRegistry( SchemaConstants.SUBSCHEMA_SUBENTRY_AT ) );
subentryAttrs.put( operational );
}
operational.add( subentryDn.getNormName() );
}
if ( subentry.isCollectiveSubentry() )
{
operational = subentryAttrs.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT );
if ( operational == null )
{
operational = new DefaultServerAttribute( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT,
schemaManager.lookupAttributeTypeRegistry( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) );
subentryAttrs.put( operational );
}
operational.add( subentryDn.getNormName() );
}
if ( subentry.isTriggerSubentry() )
{
operational = subentryAttrs.get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT );
if ( operational == null )
{
operational = new DefaultServerAttribute( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT,
schemaManager.lookupAttributeTypeRegistry( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ) );
subentryAttrs.put( operational );
}
operational.add( subentryDn.getNormName() );
}
}
}
return subentryAttrs;