org.alfresco.filesys.alfresco
Class DesktopResponse

java.lang.Object
  extended by org.mozilla.javascript.ScriptableObject
      extended by org.alfresco.filesys.alfresco.DesktopResponse
All Implemented Interfaces:
java.io.Serializable, org.mozilla.javascript.ConstProperties, org.mozilla.javascript.debug.DebuggableObject, org.mozilla.javascript.Scriptable

public class DesktopResponse
extends org.mozilla.javascript.ScriptableObject

Desktop Response Class

Holds the status code, optional status message and optional values returned by a desktop action.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.mozilla.javascript.ScriptableObject
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST
 
Fields inherited from interface org.mozilla.javascript.Scriptable
NOT_FOUND
 
Constructor Summary
DesktopResponse(int sts)
          Class constructor
DesktopResponse(int sts, java.lang.String msg)
          Class constructor
 
Method Summary
 void addResponseValue(java.lang.Object respObj)
          Add a response value
 java.lang.String getClassName()
          Return the class name
 java.util.List getResponseValues()
          Get the response value list
 int getStatus()
          Return the status code
 java.lang.String getStatusMessage()
          Return the status message
 boolean hasResponseValues()
          Determine if there are optional response values
 boolean hasStatusMessage()
          Determine if there is an optional status message
 void jsConstructor(int sts, java.lang.String msg)
          Javascript constructor
 void jsSet_message(java.lang.String msg)
          Set the status message property
 void jsSet_status(int sts)
          Set the status property
 int numberOfResponseValues()
          Return the count of response values
 void setStatus(int sts, java.lang.String msg)
          Set the status code and message
 java.lang.String toString()
          Return the desktop response as a string
 
Methods inherited from class org.mozilla.javascript.ScriptableObject
associateValue, callMethod, callMethod, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, equivalentValues, get, get, getAllIds, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, has, has, hasInstance, hasProperty, hasProperty, isConst, isSealed, put, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setParentScope, setPrototype
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DesktopResponse

public DesktopResponse(int sts)
Class constructor

Parameters:
sts - int

DesktopResponse

public DesktopResponse(int sts,
                       java.lang.String msg)
Class constructor

Parameters:
sts - int
msg - String
Method Detail

jsConstructor

public void jsConstructor(int sts,
                          java.lang.String msg)
Javascript constructor

Parameters:
sts - int
msg - String

getClassName

public java.lang.String getClassName()
Return the class name

Specified by:
getClassName in interface org.mozilla.javascript.Scriptable
Specified by:
getClassName in class org.mozilla.javascript.ScriptableObject
Returns:
String

getStatus

public final int getStatus()
Return the status code

Returns:
int

hasStatusMessage

public final boolean hasStatusMessage()
Determine if there is an optional status message

Returns:
boolean

getStatusMessage

public final java.lang.String getStatusMessage()
Return the status message

Returns:
String

hasResponseValues

public final boolean hasResponseValues()
Determine if there are optional response values

Returns:
boolean

numberOfResponseValues

public final int numberOfResponseValues()
Return the count of response values

Returns:
int

getResponseValues

public final java.util.List getResponseValues()
Get the response value list

Returns:
List

addResponseValue

public final void addResponseValue(java.lang.Object respObj)
Add a response value

Parameters:
respObj - Object

setStatus

public final void setStatus(int sts,
                            java.lang.String msg)
Set the status code and message

Parameters:
sts - int
msg - String

jsSet_status

public void jsSet_status(int sts)
Set the status property

Parameters:
sts - int

jsSet_message

public void jsSet_message(java.lang.String msg)
Set the status message property

Parameters:
msg - String

toString

public java.lang.String toString()
Return the desktop response as a string

Overrides:
toString in class java.lang.Object
Returns:
String


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.