|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Base interface for all MultiValueList attributes.
By default no operations on the ManagedEntityValue object are defined for the addition or removal of individual values to multi-valued attributes. If this functionality is required then the multi-valued attribute should be modeled as a MultiValueList object.
Some value objects may require the addition or removal of individual values to multi-valued attributes. For example a Trouble Ticket may contains a large set of Alarms. In oder to minimize the amount of data required to add or remove a single attribute value from a multi-valued attribute associated with a Managed Entity it is recommended to use the following MultiValuedList template:
public interface <AttributeType>List extends MultiValueList { public void add(AttributeType[] attributes) throws java.lang.IllegalStateException, java.lang.IllegalArgumentException; public void remove(AttributeType[] attributes) throws java.lang.IllegalStateException, java.lang.IllegalArgumentException; public void set(AttributeType[] attributes) throws java.lang.IllegalStateException, java.lang.IllegalArgumentException; public <AttributeType>[] get() throws java.lang.IllegalStateException; //return an exception if modifier is NONE public <AttributeType>[] make(int number ) throws java.lang.IllegalArgumentException; //The list is a factory for its elements }The MultiValueList object itself supports the addition, removal and replacement of individual values.
The list can have at most one operation (add, remove,replace) pending.
The reset()
operation undo any add()
, remove()
or set()
that was done previously and set the modifier value to NONE.
The semantics of the operations are as follows:
add()
is used to append values at the end of an existing attribute array.
remove()
is used to remove values from an existing list. I.e., each element of
the existing list matching (where AttributeType.equals(AttributeType))
an
element of the provided list is removed.
set()
is used to replace all the elements of the existing attribute array with
the provided elements. I.e., replace all attributes with the provided ones.
get()
must return an empty array.
Using null in the set()
operation is prohibited and the IllegalArgumentException should be
raised.
Field Summary | |
static int |
ADD
A value of ADD indicates that this object is used to append values at the end of an existing attribute array. |
static int |
NONE
No modifer is attached to this object. |
static int |
REMOVE
A value of REMOVE indicates that this object is used to remove values from an existing list. |
static int |
SET
A value of SET indicates that this object will be used to replace all the elements of the back-end existing attribute array with the provided elements. |
Method Summary | |
java.lang.Object |
clone()
Returns a deep copy of this object. |
int |
getModifier()
Get the value of the current modifier. |
void |
reset()
Reset the whole object. |
Field Detail |
public static final int NONE
public static final int SET
public static final int ADD
public static final int REMOVE
Method Detail |
public java.lang.Object clone()
public int getModifier()
public void reset()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |