com.ibm.wbiserver.brules.mgmt
Interface OperationSelectionRecordList
- public interface OperationSelectionRecordList
- extends BusinessRuleValidateable, BusinessRuleChangeDetector, java.io.Serializable, java.lang.Iterable<OperationSelectionRecord>
OperationSelectionRecord
in the list, use
an iterator obtained using the iterator
method to get the object to be changed
and then simply use set methods to change the object.
Field Summary
Modifier and Type | Field and Description |
---|---|
|
COPYRIGHT
|
Method Summary
Modifier and Type | Method and Description |
---|---|
|
addOperationSelectionRecord(OperationSelectionRecord newSelectionRecord)
Add the specified operation selection record to the list.
|
get(int index)
Get the
OperationSelectionRecord at the specified index in the list.
|
|
|
isEmpty()
Determine whether or not this list is empty.
|
|
iterator()
Get an iterator over this list.
|
newOperationSelectionRecord()
Create a new
OperationSelectionRecord object that is associated with the
operation containing this operation selection record list.
|
|
newOperationSelectionRecord(java.util.Date startDate,java.util.Date endDate,BusinessRule businessRuleTarget)
Create a new
OperationSelectionRecord object that is associated with the
operation containing this operation selection record list.
|
|
|
removeOperationSelectionRecord(OperationSelectionRecord selectionRecord)
Remove the specified operation selection record from the list.
|
|
size()
Get the number of operation selection records in this list.
|
Methods inherited from interface com.ibm.wbiserver.brules.mgmt.BusinessRuleValidateable |
---|
validate |
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<OperationSelectionRecord> iterator( )
iterator
in interface java.lang.Iterable<OperationSelectionRecord>
get
- OperationSelectionRecord get(int index)
OperationSelectionRecord
at the specified index in the list. The
index is 0-based so the first element in the list has index 0.
index
- The index of the OperationSelectionRecord
to return. OperationSelectionRecord
at the specified index. java.lang.IndexOutOfBoundsException
- if the index is out of range (index <0 ||index>= size()). addOperationSelectionRecord
- void addOperationSelectionRecord( OperationSelectionRecord newSelectionRecord)
- throws ValidationException
Note that this method does not check to see if the date range in the new selection
record overlaps with any date ranges in the existing selection records. This is because
it is assumed that, in general, many changes are being made to the list of selection
records and any overlapping ranges could just be temporary and will go away as other
changes are made. Overlapping ranges are detected when the validate
method is called on the OperationSelectionRecordList
or when the changes
are finally published.
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.
newSelectionRecord
- The OperationSelectionRecord
object to be added to
the list. Must not be null. java.lang.IllegalArgumentException
- if the specified parameter is null. ValidationException
- if one of the following validation errors is detected:
- the operation associated with the specified selection record is not the same as the operation containing this operation selection record list
- the start or end date is not set
- the start date is after the end date
- the target business rule is not set
ChangesNotAllowedException
- if changes to this object are temporarily
disallowed while other changes are being published. removeOperationSelectionRecord
- boolean removeOperationSelectionRecord( OperationSelectionRecord selectionRecord)
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.
selectionRecord
- The OperationSelectionRecord
to be removed. Must not
be null. OperationSelectionRecordList
contained the specified
OperationSelectionRecord
. Otherwise false. java.lang.IllegalArgumentException
- if the passed in parameter is null. ChangesNotAllowedException
- if changes to this object are temporarily
disallowed while other changes are being published. newOperationSelectionRecord
- OperationSelectionRecord newOperationSelectionRecord( )
OperationSelectionRecord
object that is associated with the
operation containing this operation selection record list. This method can be used
when you want to add a new date/time range to an existing operation. This method creates
an empty operation selection record. The set methods should then be used to set the
start date, end date, and business rule target. Alternatively, you can use the
newOperationSelectionRecord(Date,Date,BusinessRule)
method to pass all the required data on one method call.
ChangesNotAllowedException
- if changes to this object are temporarily
disallowed while other changes are being published. newOperationSelectionRecord
- OperationSelectionRecord newOperationSelectionRecord( java.util.Date startDate,
- java.util.Date endDate,
- BusinessRule businessRuleTarget)
- throws ValidationException
OperationSelectionRecord
object that is associated with the
operation containing this operation selection record list. This method can be used
when you want to add a new date/time range to an existing operation.
startDate
- The start date for the operation selection record. endDate
- The end date for the operation selection record. businessRuleTarget
- The business rule target for the operation selection record. java.lang.IllegalArgumentException
- if the businessRuleTarget
parameter is null. ValidationException
- if any of the following is true:
- If the start date is after the end date.
- If the specified business rule target is not in the list of available targets for the operation with which this operation selection record is associated.
ChangesNotAllowedException
- if changes to this object are temporarily
disallowed while other changes are being published. 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
addOperationSelectionRecord
orremoveOperationSelectionRecord
methods should be used. These two methods synchronize on thisOperationSelectionRecordList
object. If the client code is multi-threaded, then the client should synchronize on theOperationSelectionRecordList
object while using the iterator.