| | |
| | | */ |
| | | public class OperationOutput { |
| | | |
| | | private int returnCode = -1; |
| | | |
| | | private Exception exception = null; |
| | | |
| | | private List<String> outputMessages = new ArrayList<String>(); |
| | | private List<String> errorMessages = new ArrayList<String>(); |
| | | private List<String> debugMessages = new ArrayList<String>(); |
| | | private List<String> accessMessages = new ArrayList<String>(); |
| | |
| | | } |
| | | |
| | | /** |
| | | * Gets a list of strings representing output messages obtained |
| | | * by invoking the operation. |
| | | * @return List of Strings representing errorMessages |
| | | */ |
| | | public List<String> getOutputMessages() { |
| | | return Collections.unmodifiableList(outputMessages); |
| | | } |
| | | |
| | | /** |
| | | * Gets a list of strings representing error messages obtained |
| | | * by invoking the operation. |
| | | * @return List of Strings representing errorMessages |
| | |
| | | } |
| | | |
| | | /** |
| | | * Gets the return code produced by the operation if any. |
| | | * @return int representing any return code returned by the |
| | | * operation. -1 indicates no return code was set. |
| | | */ |
| | | public int getReturnCode() { |
| | | return this.returnCode; |
| | | } |
| | | |
| | | /** |
| | | * Sets the exception that occurred during execution. Can be null to |
| | | * indicate no exception was encountered. |
| | | * @param exception Exception that occurred during invocation of the operation |
| | |
| | | } |
| | | |
| | | /** |
| | | * Adds an output message. |
| | | * @param outputMessage an error message |
| | | */ |
| | | void addOutputMessage(String outputMessage) { |
| | | this.outputMessages.add(outputMessage); |
| | | } |
| | | |
| | | /** |
| | | * Adds an access message. |
| | | * @param accessMessage an error message |
| | | */ |
| | |
| | | this.debugMessages = debugMessages; |
| | | } |
| | | |
| | | /** |
| | | * Sets the return code of the operation. |
| | | * @param i int representing the return code |
| | | */ |
| | | void setReturnCode(int i) { |
| | | this.returnCode = i; |
| | | } |
| | | } |