|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.rhq.core.pluginapi.operation.OperationResult
public class OperationResult
An object that encapsulates the results of a single operation invocation. Since this class contains a
Configuration object
, it can be used to store complex results. However, if an operation
needs to only return a single string result, use the convienence constructor
OperationResult(String)
or the method setSimpleResult(String)
to pass in that simple
string value without the need to use the more complex Configuration
API.
Configuration
,
OperationFacet
Field Summary | |
---|---|
static String |
SIMPLE_OPERATION_RESULT_NAME
|
Constructor Summary | |
---|---|
OperationResult()
Constructor that builds an empty result. |
|
OperationResult(String simpleResult)
Convienence constructor that builds a result that contains a single, simple result string. |
Method Summary | |
---|---|
Configuration |
getComplexResults()
Returns the Configuration object that is used to contain all the complex data that resulted from an
operation invocation. |
String |
getSimpleResult()
Gets the simple string result that was stored in this object. |
void |
setSimpleResult(String simpleResult)
Use this method if an operation returned a simple string result. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String SIMPLE_OPERATION_RESULT_NAME
Constructor Detail |
---|
public OperationResult()
getComplexResults()
to obtain the
Configuration
object in order to populate it with complex results returned by the operation. You are also
free to store a simple result by using setSimpleResult(String)
. Typically, you will normally want to
store either a simple result or a complex result, but not both (although technically you are not prohibited from
using both).
getComplexResults()
public OperationResult(String simpleResult)
getComplexResults()
to obtain the Configuration
object in order to populate it with
additional, complex results returned by the operation but, typically, callers that use this constructor only need
to store a single result string in the results.
simpleResult
- the single, simple result string to store in the results objectgetSimpleResult()
Method Detail |
---|
public String getSimpleResult()
OperationResult(String)
,
setSimpleResult(String)
public void setSimpleResult(String simpleResult)
getComplexResults()
object under the name
SIMPLE_OPERATION_RESULT_NAME
.
simpleResult
- a simple string resultpublic Configuration getComplexResults()
Configuration
object that is used to contain all the complex data that resulted from an
operation invocation. The returned object is not a copy, so you can use this object to populate the complex
results.
Note that this is the same object that will be populated by the convienence method
setSimpleResult(String)
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |