com.adventnet.cli.messageset
Class CmdParams

java.lang.Object
  |
  +--com.adventnet.cli.messageset.CmdParams

public class CmdParams
extends java.lang.Object
implements java.io.Serializable

This class contains the Command Parameters for a particular command or object within a command.

See Also:
Serialized Form

Field Summary
static byte CHAR
          Constant for Character Option type.
static byte FLOAT
          Constant for Float Option type.
static byte INTEGER
          Constant for Integer Option type.
static byte STRING
          Constant for String Option type.
 
Constructor Summary
CmdParams()
          Default constructor to create a new instance of CmdParams.
 
Method Summary
 java.lang.String getParamDescription()
          Gets the description of this parameter.
 java.lang.String getParamName()
          Gets the parameter name.
 java.lang.String getParamValue()
          Gets the parameter value.
 byte getParamValueType()
          Gets the parameter value type.
 boolean isOptional()
          Indicates whether sending the parameter is optional or mandatory.
 boolean isSendParam()
          Indicates whether the parameter name should be sent in the command.
 void setOptionalFlag(boolean optFlag)
          Sets the optional flag.
 void setParamDescription(java.lang.String description)
          Sets the description of this parameter.
 void setParamName(java.lang.String paramName)
          Sets the parameter name.
 void setParamValue(java.lang.String paramValue)
          Sets the parameter value.
 void setParamValueType(byte type)
          Sets the parameter value type.
 void setSendParam(boolean sendParam)
          Sets the sendParam value.
 java.lang.String toString()
          Method to get the String representation of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INTEGER

public static final byte INTEGER
Constant for Integer Option type.

CHAR

public static final byte CHAR
Constant for Character Option type.

FLOAT

public static final byte FLOAT
Constant for Float Option type.

STRING

public static final byte STRING
Constant for String Option type.
Constructor Detail

CmdParams

public CmdParams()
Default constructor to create a new instance of CmdParams.
Method Detail

setParamName

public void setParamName(java.lang.String paramName)
Sets the parameter name.
Parameters:
paramName - the parameter name.

getParamName

public java.lang.String getParamName()
Gets the parameter name.
Returns:
the parameter name String.

setParamValueType

public void setParamValueType(byte type)
Sets the parameter value type. Could be one of INTEGER, CHAR, FLOAT or STRING. These constants are defined in this class.
Parameters:
type - the parameter vale type as a byte value.

getParamValueType

public byte getParamValueType()
Gets the parameter value type.
Returns:
the parameter value type as a byte.

setParamValue

public void setParamValue(java.lang.String paramValue)
Sets the parameter value. The value for the parameter. This will be used only for the DataSet.
Parameters:
paramValue - the parameter value.

getParamValue

public java.lang.String getParamValue()
Gets the parameter value. This should be used only for the DataSet.
Returns:
the parameter value.

setSendParam

public void setSendParam(boolean sendParam)
Sets the sendParam value. If true will enable sending of the parameter name in the command.
Parameters:
sendParam - boolean to enable/disable the sending of parameter name.

isSendParam

public boolean isSendParam()
Indicates whether the parameter name should be sent in the command.
Returns:
boolean which indicates whether the sending of parameter name is enabled (true) or disabled (false).

setOptionalFlag

public void setOptionalFlag(boolean optFlag)
Sets the optional flag. If true, sending of the parameter is optional.
Parameters:
optFlag - boolean to indicate if the parameter is optional or mandatory.

isOptional

public boolean isOptional()
Indicates whether sending the parameter is optional or mandatory.
Returns:
boolean which indicates whether sending the parameter is optional( true ) or mandatory (false).

getParamDescription

public java.lang.String getParamDescription()
Gets the description of this parameter. The description could be like the meaning of the parameter, its default value, etc.
Returns:
description of the parameter as a String.

setParamDescription

public void setParamDescription(java.lang.String description)
Sets the description of this parameter. The description could be like the meaning of the parameter, its default value, etc.
Parameters:
description - the description as a String.

toString

public java.lang.String toString()
Method to get the String representation of this object. Returns the parameter name.
Overrides:
toString in class java.lang.Object
Returns:
returns the parameter name.


Copyright (c)2010 ZOHO Corp., All Rights Reserved.