byucc.jhdl.platforms.util
Class PlatformCommandStatus

java.lang.Object
  extended bybyucc.jhdl.platforms.util.PlatformCommandStatus

public class PlatformCommandStatus
extends java.lang.Object

This class is used to return the status of a platform command.


Field Summary
static PlatformCommandStatus SUCCESS
          Successful status.
 
Constructor Summary
PlatformCommandStatus(boolean isSuccessful)
          Creates a new PlatformCommandStatus with the specified success state.
PlatformCommandStatus(boolean isSuccessful, java.lang.String message)
          Creates a new PlatformCommandStatus with the specified success state and message.
 
Method Summary
 java.lang.Object getCustomField(java.lang.String field)
          Gets a custom field.
 java.lang.String getMessage()
          Returns the message.
 boolean isSuccessful()
          Returns the success state of the object.
 void setCustomField(java.lang.String field, java.lang.Object value)
          Sets a custom field.
 void setMessage(java.lang.String message)
          Sets the message for the object.
 void setSuccessful(boolean state)
          Set the success state of the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SUCCESS

public static final PlatformCommandStatus SUCCESS
Successful status.

Constructor Detail

PlatformCommandStatus

public PlatformCommandStatus(boolean isSuccessful)
Creates a new PlatformCommandStatus with the specified success state.

Parameters:
isSuccessful - Should be set to true if the command was successful and to false otherwise.

PlatformCommandStatus

public PlatformCommandStatus(boolean isSuccessful,
                             java.lang.String message)
Creates a new PlatformCommandStatus with the specified success state and message.

Parameters:
isSuccessful - Should be set to true if the command was successful and to false otherwise.
message - Optional message field.
Method Detail

setSuccessful

public void setSuccessful(boolean state)
Set the success state of the object.

Parameters:
state - True if successful, false otherwise.

isSuccessful

public boolean isSuccessful()
Returns the success state of the object.

Returns:
True if successful, false otherwise.

setMessage

public void setMessage(java.lang.String message)
Sets the message for the object.

Parameters:
message - Message to be set.

getMessage

public java.lang.String getMessage()
Returns the message.

Returns:
Message for this object.

setCustomField

public void setCustomField(java.lang.String field,
                           java.lang.Object value)
Sets a custom field. If this is used by a command, the field name, as well as the type of value should be documented in order for it to be used.

Parameters:
field - Name of the field.
value - Value of the field.

getCustomField

public java.lang.Object getCustomField(java.lang.String field)
Gets a custom field.

Parameters:
field - Field to get value of.
Returns:
Value of the field asked for or null if field does not exist.


Copyright ? 2006 Brigham Young University, Configurable Computing Laboratory. All Rights Reserved.