com.ragic.s3.service.workflow
Class ScriptResponse

java.lang.Object
  extended by com.ragic.s3.service.workflow.ScriptResponse

public class ScriptResponse
extends java.lang.Object

ScriptResponse is a class employed in Ragic Workflow that allows the application to send message to browser. Before registering the content of the message to be sent, what should be done is setStatus.

User: liberation
Date: 2010/12/1
Time: 10:51:15 pm


Field Summary
static java.lang.String CONFIRM
          Used when asking confirmation in pre-workflow.
static java.lang.String DEBUG
          Used for debugging during development.
static java.lang.String ERROR
          Means that the program will fail to run.
static java.lang.String INVALID
           
static java.lang.String SUCCESS
          The default status meaning message will be sent successfully.
static java.lang.String WARN
          Means that the program will run with certain warnings.
 
Constructor Summary
ScriptResponse()
           
 
Method Summary
 ScriptAccount getAccountHandle()
          For internal use only.
 ScriptLogger getLogger()
          For internal use only.
 java.lang.String getMessage()
          Returns message as a String appended by all messages having registered.
 java.util.List<java.lang.String> getMessages()
          Returns message as a list of all messages having been registered.
 int getRootNodeId()
          Returns current root node ID
 java.lang.String getRootValue()
          Returns value of current root node .
 java.lang.String getStatus()
          Returns current status.
 boolean ifConfirm()
          Returns whether status equals CONFIRM or not.
 boolean ifExec()
          Checks current status and returns true when it is SUCCESS, DEBUG, WARN, or CONFIRM, while one additional condition is that confirmed should be true when status is CONFIRMED.
 boolean ifReinit()
          Returns true if status is either DEBUG or ERROR.
 boolean isConfirmed()
          Returns value of confirmed.
 void setAccountHandle(ScriptAccount accountHandle)
          For internal use only.
 void setConfirmed(boolean confirmed)
          Registers new value to class variable confirmed.
 void setLogger(ScriptLogger logger)
          For internal use only.
 void setMessage(java.lang.String message)
          Registers the content of message.
 void setRootNodeId(int rootNodeId)
          Registers a new rootNodeId of the form
 void setRootValue(java.lang.String rootValue)
          Registers a new Value of root node.
 void setStatus(java.lang.String status)
          Registers new status.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SUCCESS

public static final java.lang.String SUCCESS
The default status meaning message will be sent successfully.

See Also:
Constant Field Values

DEBUG

public static final java.lang.String DEBUG
Used for debugging during development.

See Also:
Constant Field Values

WARN

public static final java.lang.String WARN
Means that the program will run with certain warnings.

See Also:
Constant Field Values

CONFIRM

public static final java.lang.String CONFIRM
Used when asking confirmation in pre-workflow.

See Also:
Constant Field Values

INVALID

public static final java.lang.String INVALID
See Also:
Constant Field Values

ERROR

public static final java.lang.String ERROR
Means that the program will fail to run.

See Also:
Constant Field Values
Constructor Detail

ScriptResponse

public ScriptResponse()
Method Detail

getStatus

public java.lang.String getStatus()
Returns current status. The default status is SUCCESS.

Returns:
current status.
See Also:
ScriptResponse

setStatus

public void setStatus(java.lang.String status)
Registers new status. The default status is SUCCESS.

Parameters:
status - new status to be set.

ifExec

public boolean ifExec()
Checks current status and returns true when it is SUCCESS, DEBUG, WARN, or CONFIRM, while one additional condition is that confirmed should be true when status is CONFIRMED.

Returns:
true when current status is SUCCESS, DEBUG, WARN, or CONFIRM, while one additional condition is that confirmed should be true when status is CONFIRMED. false otherwise.

setConfirmed

public void setConfirmed(boolean confirmed)
Registers new value to class variable confirmed. The default value is false.

Parameters:
confirmed - a boolean value to be set

ifConfirm

public boolean ifConfirm()
Returns whether status equals CONFIRM or not.

Returns:
true if current status is CONFIRM
false otherwise.

isConfirmed

public boolean isConfirmed()
Returns value of confirmed. The default value of confirmed is false.

Returns:
value of confirmed

ifReinit

public boolean ifReinit()
Returns true if status is either DEBUG or ERROR.

Returns:
true when status is either DEBUG or ERROR.
false otherwise.

getMessages

public java.util.List<java.lang.String> getMessages()
Returns message as a list of all messages having been registered.

Returns:
a list of all messages having been registered

getMessage

public java.lang.String getMessage()
Returns message as a String appended by all messages having registered. This function returns nothing when the class variable message has no item.

Returns:
message as a String appended by all messages having registered.

setMessage

public void setMessage(java.lang.String message)
Registers the content of message. This function can be called several times and all messages have been set will show at the same time.

Parameters:
message - the content of message to be showed

getRootValue

public java.lang.String getRootValue()
Returns value of current root node .

Returns:
value of root node.

setRootValue

public void setRootValue(java.lang.String rootValue)
Registers a new Value of root node.

Parameters:
rootValue - a new value to be set as value of root node.

getRootNodeId

public int getRootNodeId()
Returns current root node ID

Returns:
current root node ID

setRootNodeId

public void setRootNodeId(int rootNodeId)
Registers a new rootNodeId of the form

Parameters:
rootNodeId - a new value to be registered as root node ID

getLogger

public ScriptLogger getLogger()
For internal use only.


setLogger

public void setLogger(ScriptLogger logger)
For internal use only.


setAccountHandle

public void setAccountHandle(ScriptAccount accountHandle)
For internal use only.


getAccountHandle

public ScriptAccount getAccountHandle()
For internal use only.



Copyright © 2009,2010,2011,2012 Ragic Corp. All Rights Reserved.