com.sapportals.wcm.rfadapter
Class ResultList
java.lang.Object
com.sapportals.wcm.rfadapter.ResultList
public final class ResultList
- extends Object
a simple container that only allows to add, not to remove instances of
the Result class. It holds a global list containing all
instances as well as seperate lists only holding instances of a ceratin
Status category. See class Status for available
categories. This container should be used, when operations of the
rfadapter package are used for a list of IResources in a
single transaction (e.g. the user selected a list of resources for a copy
operation). The loop calling the rfadpter-operations can add all returned
Result instances to this container.
|
Constructor Summary |
ResultList()
simple standard public constructor |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ResultList
public ResultList()
- simple standard public constructor
add
public void add(Result result)
- adds the given instance to the list of all results. Depending on the
Status of the result, it is also added to the according list
that only contains results of this status-category. As the Result
class will never return null for its status, each
result will be placed in one of the categories available. So the addition of
the entries in each of the sublists will yield the same number of elements
as the total list of elements.
- Parameters:
result - the instance to add. If the parameter is null,
it will not be added
getStatus
public Status getStatus()
- Returns:
- the "worst" status of any result that has been added. The
Status.NONE is not considered here. If the list of a
status contains at least one element, this status determines the
status of this ResultList instance. If the list of this status does
not hold any elements the next status will be considered. The order
of asking the lists is determined by the severity of the status.
get
public Result get(int index)
- Parameters:
index - the position of the Result instance to retrieve
- Returns:
- the
Result at the given position
size
public int size()
- Returns:
- the number of the
Result instances stored in this container
sublist
public ResultList sublist(Status status)
- Parameters:
status - the status to retrieve the Results of. Must not be null
- Returns:
- a new
ResultList instance that only holds Result
instances of the given status category. If the current instance does not hold
any instances of the Result class with this severity, the returned
list will also hold no instances. The number of elements in the total list of the
returned ResultList will naturally match the number of elements in
its sublist of the given status category
This class can be accessed from:
|
SC
|
DC
|
Public Part
|
ACH
|
[sap.com] KMC-WPC
|
[sap.com] tc/kmc/wpc/wpcfacade
|
api
|
EP-PIN-WPC-WCM
|
[sap.com] KMC-CM
|
[sap.com] tc/km/frwk
|
api
|
EP-KM-CM
|
Copyright 2012 SAP AG Complete Copyright Notice