com.ibm.wbiserver.brules.mgmt
Interface PropertyList
- public interface PropertyList
- extends BusinessRuleChangeDetector, java.io.Serializable, java.lang.Iterable<Property>
Property
in the list, obtain the Property
that you want to change using either an
iterator or the get
method and then simply use set methods to change the
object. Note that only UserDefinedProperty
objects are changeable so you
must check the subclass of the Property
object before you can change it.
This class also has methods to create a new UserDefinedProperty
object.
Field Summary
Modifier and Type | Field and Description |
---|---|
|
COPYRIGHT
|
Method Summary
Modifier and Type | Method and Description |
---|---|
|
addProperty(UserDefinedProperty newProperty)
Add the specified property to the list.
|
get(int index)
Get the property at the specified index in the list.
|
|
getByName(java.lang.String propertyName)
Get the property with the specified name from the list.
|
|
|
isEmpty()
Determine whether or not this list is empty.
|
|
iterator()
Get an iterator over this list.
|
newUserDefinedProperty(java.lang.String name,java.lang.String value)
Create a new
UserDefinedProperty object with the specified name and
value.
|
|
|
removeProperty(UserDefinedProperty property)
Remove the specified user-defined property from the list.
|
removePropertyByName(java.lang.String propertyName)
Remove the user-defined property with the specified name from the list.
|
|
|
setPropertyValue(java.lang.String name,java.lang.String value)
Set the value of the property with the specified name to the specified value.
|
|
size()
Get the number of properties in this list.
|
Methods inherited from interface com.ibm.wbiserver.brules.mgmt.BusinessRuleChangeDetector |
---|
hasChanges |
Field Detail
COPYRIGHT
- static final java.lang.String COPYRIGHT
Method Detail
iterator
- java.util.Iterator<Property> iterator( )
iterator
in interface java.lang.Iterable<Property>
get
- Property get(int index)
index
- The index of the property to be returned. The first element in the
list is at index 0. Property
object at the specified index. java.lang.IndexOutOfBoundsException
- if the index is out of range. getByName
- Property getByName(java.lang.String propertyName)
propertyName
- The name of the property to retrieve. Must not be null. Property
object from this list with the specified name.
null if no such Property
exists. java.lang.IllegalArgumentException
- if the propertyName
argument is null. newUserDefinedProperty
- UserDefinedProperty newUserDefinedProperty( java.lang.String name,
- java.lang.String value)
UserDefinedProperty
object with the specified name and
value. No validation is performed on either the name or the value. The name will
be validated when the user-defined property is added to a PropertyList
to ensure that it is unique in that list. The value is completely defined by the
user and hence is never validated by the API.
name
- The name of the new user-defined property. Must not be null and must
contain at least one non-whitespace character. value
- The value for the new user-defined property. Must not be null. UserDefinedProperty
object with the specified name and
value. java.lang.IllegalArgumentException
- if name
is null or does not contain at
least one non-whitespace character, or if value
is null. addProperty
- void addProperty(UserDefinedProperty newProperty)
- throws ValidationException
Note: this method is not intended to change the value of an existing
property. To change the value of an existing property, simply get the
Property
object that you want to change and use its
set methods.
newProperty
- The Property
object to be added to the
list. A new UserDefinedProperty
object can
be created using the
newUserDefinedProperty
method on this interface. ValidationException
- if there is already a property with the specified name in
this list. java.lang.IllegalArgumentException
- if newProperty
is null
. removeProperty
- boolean removeProperty(UserDefinedProperty property)
This method synchronizes on the object on which it is called. Clients using an iterator to iterate over the list should also synchronize on this object to ensure thread-safety.
property
- The UserDefinedProperty
to be removed. Must not be null. PropertyList
contained the specified property.
Otherwise false. removePropertyByName
- UserDefinedProperty removePropertyByName( java.lang.String propertyName)
This method synchronizes on the object on which it is called. Clients using an iterator to iterate over the list should also synchronize on this object to ensure thread-safety.
propertyName
- The name of the user-defined property to be removed. Must not
be null. UserDefinedProperty
object that was removed from the list.
If no UserDefinedProperty
was found with the specified name, then
null is return. setPropertyValue
- void setPropertyValue(java.lang.String name,
- java.lang.String value)
SystemPropertyNotChangeableException
is thrown.
This method synchronizes on the object on which it is called. Clients using an iterator to iterate over the list should also synchronize on this object to ensure thread-safety.
name
- The name of the property whose value is to be set. Must not be null
or the zero-length string. value
- The value that the property should be set to. May be null. java.lang.IllegalArgumentException
- if the name parameter is null or is the zero-length
string. SystemPropertyNotChangeableException
- if a property with the specified name already
exists and it is system-defined. size
- int size()
isEmpty
- boolean isEmpty()
remove
method of theIterator
interface. If that method is called, anUnsupportedOperationException
is thrown.In order to add or remove elements from the list, the
addProperty
orremoveProperty
methods should be used. These two methods synchronize on thisPropertyList
object. If the client code is multi-threaded, then the client should synchronize on thePropertyList
object while using the iterator.