|
FileNet Content Services Java Connector v3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Not Implemented in CS Java Connector v3.0.
ABatchResultItem
object represents an individual result from
an operation performed as part of a batch execution. A BatchResultItem
object returned from a BatchResultItems
collection will never be null
, but its contained result may be.
In fact, a null
contained result is usual for an
operation with a void
return type or when the user has requested
that results be discarded for the item in question.
Using methods on this interface, you can obtain the item's label and the value of its result.
Method Summary | |
java.lang.String |
getLabel()
Not Implemented in CS Java Connector v3.0. |
java.lang.Object |
getResult()
Not Implemented in CS Java Connector v3.0. |
boolean |
isException()
Not Implemented in CS Java Connector v3.0. |
Method Detail |
public java.lang.String getLabel()
Not Implemented in CS Java Connector v3.0.
Returns the label for thisBatchResultItem
object. The label is
a name assigned to each item in a batch. By default, each item's label is
internally generated and begins with the character "b".
However, you may specify your own label by calling
setBatchItemLabel
.
Labels are useful for displaying the batch item in a user interface, for example, to
display items that completed successfully or those that failed. You can also
use the label as input to the getItemByLabel
method, which retrieves the specific batch result item that corresponds to
the label.
String
that represents the label of this object.public java.lang.Object getResult()
Not Implemented in CS Java Connector v3.0.
Returns the result value for thisBatchResultItem
object.
Although it is returned as an Object
, the actual result will
be of some more specific type corresponding to the declared return type
of the method that generated the result. Among the actual types that
could be returned are various classes of exceptions, collection
subclasses of BaseObjects
,
and individual Java Connector interface types. In the case of methods
that return Java objects, the return value of the getResult
method can be safely cast to the declared return type of the Content Services Java Connector
method in question. You can test the returned result item for
exception status by calling isException()
.
Object
that represents the result value for this
BatchResultItem
object.public boolean isException()
Not Implemented in CS Java Connector v3.0.
Indicates whether or not the givenBatchResultItem
object
represents an exception. This convenience method is useful for determining
if the Object
returned by the getResult()
method is an exception or not. For example, if this method
returns true
, you could take some action such as displaying an
error message that includes the result item's label, or flagging list items
with an icon that indicates which items encountered errors.
The discardResults
parameter, whose default is set in the
Session.startBatch
method or is set specifically for a particular batch item using the
Session.setBatchItemDiscardResults
method, does not apply if the result is an
exception. Exceptions are propagated back even if the caller has chosen
to discard results. The exception is not thrown; it is merely available
for inspection by the calling application, which may then elect to throw it.
true
if this BatchResultItem
object is an exception;
otherwise, returns false
.
|
FileNet Content Services Java Connector v3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |