/** * Create a new instance of a EntryAttribute, without value. * * @param upId the ID for the added attributeType * @param attributeType the added AttributeType */ public DefaultServerAttribute( String upId, AttributeType attributeType ) { if ( attributeType == null ) { String message = I18n.err( I18n.ERR_04442 ); LOG.error( message ); throw new IllegalArgumentException( message ); } setAttributeType( attributeType ); setUpId( upId, attributeType ); }
/** * Create a new instance of a EntryAttribute, with some byte[] values. * * @param upId the ID for the added attribute * @param attributeType the AttributeType to be added * @param vals the values for the added attribute */ public DefaultServerAttribute( String upId, AttributeType attributeType, byte[]... vals ) { if ( attributeType == null ) { throw new IllegalArgumentException( I18n.err( I18n.ERR_04442 ) ); } setAttributeType( attributeType ); add( vals ); setUpId( upId, attributeType ); }
/** * Create a new instance of a EntryAttribute. * * @param upId the ID for the added attribute * @param attributeType The attributeType added on creation * @param vals the added values for this attribute */ public DefaultServerAttribute( String upId, AttributeType attributeType, String... vals ) { if ( attributeType == null ) { throw new IllegalArgumentException( I18n.err( I18n.ERR_04442 ) ); } setAttributeType( attributeType ); add( vals ); setUpId( upId, attributeType ); }
/** * Doc me more! * * 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. * * Otherwise, the value is stored, but as a reference. It's not a copy. * * @param upId the ID of the added attribute * @param attributeType the attribute type according to the schema * @param vals an initial set of values for this attribute */ public DefaultServerAttribute( String upId, AttributeType attributeType, Value<?>... vals ) { if ( attributeType == null ) { throw new IllegalArgumentException( I18n.err( I18n.ERR_04442 ) ); } setAttributeType( attributeType ); setUpId( upId, attributeType ); add( vals ); }