/** * Check the constraints for the Usage field. */ private void checkUsage( List<Throwable> errors, Registries registries ) { // Check that the AT usage is the same that its superior if ( ( superior != null ) && ( usage != superior.getUsage() ) ) { // This is an error String msg = I18n.err( I18n.ERR_04314, getName() ); Throwable error = new LdapProtocolErrorException( msg ); errors.add( error ); LOG.info( msg ); return; } // Now, check that the AttributeType's USAGE does not conflict if ( !isUserModifiable() && ( usage == UsageEnum.USER_APPLICATIONS ) ) { // Cannot have a not user modifiable AT which is not an operational AT String msg = I18n.err( I18n.ERR_04315, getName() ); Throwable error = new LdapProtocolErrorException( msg ); errors.add( error ); LOG.info( msg ); } }
if ( !attributeType.isUserModifiable() )
if ( at0.isUserModifiable() != at1.isUserModifiable() )
entry.put( MetaSchemaConstants.M_SYNTAX_AT, attributeType.getSyntaxOid() ); entry.put( MetaSchemaConstants.M_COLLECTIVE_AT, getBoolean( attributeType.isCollective() ) ); entry.put( MetaSchemaConstants.M_NO_USER_MODIFICATION_AT, getBoolean( ! attributeType.isUserModifiable() ) ); entry.put( MetaSchemaConstants.M_SINGLE_VALUE_AT, getBoolean( attributeType.isSingleValued() ) ); entry.put( MetaSchemaConstants.M_USAGE_AT, attributeType.getUsage().toString() );
if ( !attributeType.isUserModifiable() && ( attributeType.getUsage() == UsageEnum.USER_APPLICATIONS ) )