/** * Process the FQCN attribute * @throws LdapInvalidAttributeValueException */ private String getFqcn( Entry entry, String objectType ) throws LdapInvalidAttributeValueException { // The FQCN Attribute mFqcn = entry.get( MetaSchemaConstants.M_FQCN_AT ); if ( mFqcn == null ) { String msg = I18n.err( I18n.ERR_10028, objectType, MetaSchemaConstants.M_FQCN_AT ); LOG.warn( msg ); throw new IllegalArgumentException( msg ); } return mFqcn.getString(); }
/** * Get an OID from an entry. Handles the bad cases (null OID, * not a valid OID, ...) */ private String getOid( Entry entry, String objectType ) throws LdapInvalidAttributeValueException { // The OID Attribute mOid = entry.get( MetaSchemaConstants.M_OID_AT ); if ( mOid == null ) { String msg = I18n.err( I18n.ERR_10005, objectType, MetaSchemaConstants.M_OID_AT ); LOG.warn( msg ); throw new IllegalArgumentException( msg ); } String oid = mOid.getString(); if ( !Oid.isOid( oid ) ) { String msg = I18n.err( I18n.ERR_10006, oid ); LOG.warn( msg ); throw new LdapInvalidAttributeValueException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, msg ); } return oid; }
attributeType.setSyntaxOid( mSyntax.getString() ); attributeType.setSyntaxLength( Integer.parseInt( mSyntaxLength.getString() ) ); attributeType.setEqualityOid( mEquality.getString() ); attributeType.setOrderingOid( mOrdering.getString() ); attributeType.setSubstringOid( mSubstr.getString() ); attributeType.setSuperiorOid( mSupAttributeType.getString() ); String val = mCollective.getString(); attributeType.setCollective( val.equalsIgnoreCase( "TRUE" ) ); String val = mSingleValued.getString(); attributeType.setSingleValued( val.equalsIgnoreCase( "TRUE" ) ); String val = mNoUserModification.getString(); attributeType.setUserModifiable( !val.equalsIgnoreCase( "TRUE" ) ); attributeType.setUsage( UsageEnum.getUsage( mUsage.getString() ) );
String val = mObsolete.getString(); schemaObject.setObsolete( val.equalsIgnoreCase( "TRUE" ) ); String val = mDisabled.getString(); schemaObject.setEnabled( !val.equalsIgnoreCase( "TRUE" ) ); String schemaName = xSchema.getString(); String value = xNotHumanReadable.getString(); String value = xReadOnly.getString(); String value = xEnabled.getString();
matchingRule.setSyntaxOid( mSyntax.getString() );
String type = mTypeObjectClass.getString(); oc.setType( ObjectClassTypeEnum.getClassType( type ) );