/** * Create a new instance of a schema aware Attribute, without ID nor value. * * @param attributeType the attributeType for the empty attribute added into the entry */ public DefaultAttribute( AttributeType attributeType ) { if ( attributeType != null ) { try { apply( attributeType ); } catch ( LdapInvalidAttributeValueException liave ) { // Do nothing, it can't happen, there is no value } } }
/** * Create a new instance of a schema aware Attribute, without ID nor value. * * @param attributeType the attributeType for the empty attribute added into the entry */ public DefaultAttribute( AttributeType attributeType ) { if ( attributeType != null ) { try { apply( attributeType ); } catch ( LdapInvalidAttributeValueException liave ) { // Do nothing, it can't happen, there is no value } } }
/** * Create a new instance of a schema aware Attribute, without ID nor value. * * @param attributeType the attributeType for the empty attribute added into the entry */ public DefaultAttribute( AttributeType attributeType ) { if ( attributeType != null ) { try { apply( attributeType ); } catch ( LdapInvalidAttributeValueException liave ) { // Do nothing, it can't happen, there is no value } } }
/** * Create a new instance of a schema aware Attribute, without value. * * @param upId the ID for the added attributeType * @param attributeType the added AttributeType */ public DefaultAttribute( String upId, AttributeType attributeType ) { if ( attributeType == null ) { String message = I18n.err( I18n.ERR_13203_ATTRIBUTE_TYPE_NULL_NOT_ALLOWED ); LOG.error( message ); throw new IllegalArgumentException( message ); } try { apply( attributeType ); } catch ( LdapInvalidAttributeValueException liave ) { // Do nothing, it can't happen, there is no value } setUpId( upId, attributeType ); }
/** * Create a new instance of a schema aware Attribute, without value. * * @param upId the ID for the added attributeType * @param attributeType the added AttributeType */ public DefaultAttribute( String upId, AttributeType attributeType ) { if ( attributeType == null ) { String message = I18n.err( I18n.ERR_13203_ATTRIBUTE_TYPE_NULL_NOT_ALLOWED ); LOG.error( message ); throw new IllegalArgumentException( message ); } try { apply( attributeType ); } catch ( LdapInvalidAttributeValueException liave ) { // Do nothing, it can't happen, there is no value } setUpId( upId, attributeType ); }
/** * Create a new instance of a schema aware Attribute, without value. * * @param upId the ID for the added attributeType * @param attributeType the added AttributeType */ public DefaultAttribute( String upId, AttributeType attributeType ) { if ( attributeType == null ) { String message = I18n.err( I18n.ERR_13203_ATTRIBUTE_TYPE_NULL_NOT_ALLOWED ); LOG.error( message ); throw new IllegalArgumentException( message ); } try { apply( attributeType ); } catch ( LdapInvalidAttributeValueException liave ) { // Do nothing, it can't happen, there is no value } setUpId( upId, attributeType ); }
/** * Create a new instance of a schema aware Attribute, with some values, and a user provided ID. * * @param upId the ID for the created attribute * @param attributeType The attributeType added on creation * @param vals the added values for this attribute * @throws LdapInvalidAttributeValueException If any of the * added values is not valid */ public DefaultAttribute( String upId, AttributeType attributeType, String... vals ) throws LdapInvalidAttributeValueException { if ( attributeType == null ) { String message = I18n.err( I18n.ERR_13203_ATTRIBUTE_TYPE_NULL_NOT_ALLOWED ); LOG.error( message ); throw new IllegalArgumentException( message ); } apply( attributeType ); if ( ( vals != null ) && ( vals.length > 0 ) ) { add( vals ); } setUpId( upId, attributeType ); }
/** * Create a new instance of a schema aware Attribute, with some byte[] values, and * a user provided ID. * * @param upId the ID for the added attribute * @param attributeType the AttributeType to be added * @param vals the binary values for the added attribute * @throws LdapInvalidAttributeValueException If any of the * added values is not valid */ public DefaultAttribute( String upId, AttributeType attributeType, byte[]... vals ) throws LdapInvalidAttributeValueException { if ( attributeType == null ) { throw new IllegalArgumentException( I18n.err( I18n.ERR_13203_ATTRIBUTE_TYPE_NULL_NOT_ALLOWED ) ); } apply( attributeType ); add( vals ); setUpId( upId, attributeType ); }
/** * Create a new instance of a schema aware Attribute, with some values, and a user provided ID. * * @param upId the ID for the created attribute * @param attributeType The attributeType added on creation * @param vals the added values for this attribute * @throws LdapInvalidAttributeValueException If any of the * added values is not valid */ public DefaultAttribute( String upId, AttributeType attributeType, String... vals ) throws LdapInvalidAttributeValueException { if ( attributeType == null ) { String message = I18n.err( I18n.ERR_13203_ATTRIBUTE_TYPE_NULL_NOT_ALLOWED ); LOG.error( message ); throw new IllegalArgumentException( message ); } apply( attributeType ); if ( ( vals != null ) && ( vals.length > 0 ) ) { add( vals ); } setUpId( upId, attributeType ); }
/** * Create a new instance of a schema aware Attribute, with some byte[] values, and * a user provided ID. * * @param upId the ID for the added attribute * @param attributeType the AttributeType to be added * @param vals the binary values for the added attribute * @throws LdapInvalidAttributeValueException If any of the * added values is not valid */ public DefaultAttribute( String upId, AttributeType attributeType, byte[]... vals ) throws LdapInvalidAttributeValueException { if ( attributeType == null ) { throw new IllegalArgumentException( I18n.err( I18n.ERR_13203_ATTRIBUTE_TYPE_NULL_NOT_ALLOWED ) ); } apply( attributeType ); add( vals ); setUpId( upId, attributeType ); }
/** * Create a new instance of a schema aware Attribute, with some values, and a user provided ID.<br> * If the value does not correspond to the same attributeType, then it's * wrapped value is copied into a new Value which uses the specified * attributeType. * <p> * Otherwise, the value is stored, but as a reference. It's not a copy. * </p> * @param upId the ID of the created attribute * @param attributeType the attribute type according to the schema * @param vals an initial set of values for this attribute * @throws LdapInvalidAttributeValueException If any of the * added values is not valid */ public DefaultAttribute( String upId, AttributeType attributeType, Value... vals ) throws LdapInvalidAttributeValueException { if ( attributeType == null ) { String message = I18n.err( I18n.ERR_13203_ATTRIBUTE_TYPE_NULL_NOT_ALLOWED ); LOG.error( message ); throw new IllegalArgumentException( message ); } apply( attributeType ); setUpId( upId, attributeType ); add( vals ); }
/** * Create a new instance of a schema aware Attribute, with some values, and a user provided ID. * * @param upId the ID for the created attribute * @param attributeType The attributeType added on creation * @param vals the added values for this attribute * @throws LdapInvalidAttributeValueException If any of the * added values is not valid */ public DefaultAttribute( String upId, AttributeType attributeType, String... vals ) throws LdapInvalidAttributeValueException { if ( attributeType == null ) { String message = I18n.err( I18n.ERR_13203_ATTRIBUTE_TYPE_NULL_NOT_ALLOWED ); LOG.error( message ); throw new IllegalArgumentException( message ); } apply( attributeType ); if ( ( vals != null ) && ( vals.length > 0 ) ) { add( vals ); } setUpId( upId, attributeType ); }
/** * Create a new instance of a schema aware Attribute, with some values, and a user provided ID.<br> * If the value does not correspond to the same attributeType, then it's * wrapped value is copied into a new Value which uses the specified * attributeType. * <p> * Otherwise, the value is stored, but as a reference. It's not a copy. * </p> * @param upId the ID of the created attribute * @param attributeType the attribute type according to the schema * @param vals an initial set of values for this attribute * @throws LdapInvalidAttributeValueException If any of the * added values is not valid */ public DefaultAttribute( String upId, AttributeType attributeType, Value... vals ) throws LdapInvalidAttributeValueException { if ( attributeType == null ) { String message = I18n.err( I18n.ERR_13203_ATTRIBUTE_TYPE_NULL_NOT_ALLOWED ); LOG.error( message ); throw new IllegalArgumentException( message ); } apply( attributeType ); setUpId( upId, attributeType ); add( vals ); }
/** * Create a new instance of a schema aware Attribute, with some values, and a user provided ID.<br> * If the value does not correspond to the same attributeType, then it's * wrapped value is copied into a new Value which uses the specified * attributeType. * <p> * Otherwise, the value is stored, but as a reference. It's not a copy. * </p> * @param upId the ID of the created attribute * @param attributeType the attribute type according to the schema * @param vals an initial set of values for this attribute * @throws LdapInvalidAttributeValueException If any of the * added values is not valid */ public DefaultAttribute( String upId, AttributeType attributeType, Value... vals ) throws LdapInvalidAttributeValueException { if ( attributeType == null ) { String message = I18n.err( I18n.ERR_13203_ATTRIBUTE_TYPE_NULL_NOT_ALLOWED ); LOG.error( message ); throw new IllegalArgumentException( message ); } apply( attributeType ); setUpId( upId, attributeType ); add( vals ); }
/** * Create a new instance of a schema aware Attribute, with some byte[] values, and * a user provided ID. * * @param upId the ID for the added attribute * @param attributeType the AttributeType to be added * @param vals the binary values for the added attribute * @throws LdapInvalidAttributeValueException If any of the * added values is not valid */ public DefaultAttribute( String upId, AttributeType attributeType, byte[]... vals ) throws LdapInvalidAttributeValueException { if ( attributeType == null ) { throw new IllegalArgumentException( I18n.err( I18n.ERR_13203_ATTRIBUTE_TYPE_NULL_NOT_ALLOWED ) ); } apply( attributeType ); add( vals ); setUpId( upId, attributeType ); }
apply( attribute.getAttributeType() );
apply( attribute.getAttributeType() );
apply( attribute.getAttributeType() );