/** * Defines the Administration point and administrative role for the TriggerExecution specific point * @param apCtx The administrative point context * @throws NamingException If the operation failed */ public static void defineTriggerExecutionSpecificPoint( LdapContext apCtx ) throws NamingException { Attributes ap = apCtx.getAttributes( "", new String[] { SchemaConstants.ADMINISTRATIVE_ROLE_AT } ); Attribute administrativeRole = ap.get( SchemaConstants.ADMINISTRATIVE_ROLE_AT ); if ( administrativeRole == null || !AttributeUtils.containsValueCaseIgnore( administrativeRole, SchemaConstants.TRIGGER_EXECUTION_SPECIFIC_AREA ) ) { Attributes changes = new BasicAttributes( SchemaConstants.ADMINISTRATIVE_ROLE_AT, SchemaConstants.TRIGGER_EXECUTION_SPECIFIC_AREA, true ); apCtx.modifyAttributes( "", DirContext.ADD_ATTRIBUTE, changes ); } }
/** * Defines the Administration point and administrative role for the TriggerExecution specific point * @param apCtx The administrative point context * @throws NamingException If the operation failed */ public static void defineTriggerExecutionSpecificPoint( LdapContext apCtx ) throws NamingException { Attributes ap = apCtx.getAttributes( "", new String[] { SchemaConstants.ADMINISTRATIVE_ROLE_AT } ); Attribute administrativeRole = ap.get( SchemaConstants.ADMINISTRATIVE_ROLE_AT ); if ( administrativeRole == null || !AttributeUtils.containsValueCaseIgnore( administrativeRole, SchemaConstants.TRIGGER_EXECUTION_SPECIFIC_AREA ) ) { Attributes changes = new BasicAttributes( SchemaConstants.ADMINISTRATIVE_ROLE_AT, SchemaConstants.TRIGGER_EXECUTION_SPECIFIC_AREA, true ); apCtx.modifyAttributes( "", DirContext.ADD_ATTRIBUTE, changes ); } }