Class DesktopResponse

  • All Implemented Interfaces:
    Serializable, org.mozilla.javascript.ConstProperties, org.mozilla.javascript.debug.DebuggableObject, org.mozilla.javascript.Scriptable, org.mozilla.javascript.SymbolScriptable

    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.

    Author:
    gkspencer
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.mozilla.javascript.ScriptableObject

        org.mozilla.javascript.ScriptableObject.KeyComparator
    • 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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addResponseValue​(Object respObj)
      Add a response value
      String getClassName()
      Return the class name
      List<Object> getResponseValues()
      Get the response value list
      int getStatus()
      Return the status code
      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, String msg)
      Javascript constructor
      void jsSet_message​(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, String msg)
      Set the status code and message
      String toString()
      Return the desktop response as a string
      • Methods inherited from class org.mozilla.javascript.ScriptableObject

        applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureSymbolScriptable, equivalentValues, get, get, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getSlot, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, has, hasInstance, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, put, putConst, putConstProperty, putProperty, putProperty, putProperty, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setAttributes, setExternalArrayData, setGetterOrSetter, setParentScope, setPrototype, size
    • Constructor Detail

      • DesktopResponse

        public DesktopResponse​(int sts)
        Class constructor
        Parameters:
        sts - int
      • DesktopResponse

        public DesktopResponse​(int sts,
                               String msg)
        Class constructor
        Parameters:
        sts - int
        msg - String
    • Method Detail

      • jsConstructor

        public void jsConstructor​(int sts,
                                  String msg)
        Javascript constructor
        Parameters:
        sts - int
        msg - String
      • getClassName

        public 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 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 List<Object> getResponseValues()
        Get the response value list
      • addResponseValue

        public final void addResponseValue​(Object respObj)
        Add a response value
        Parameters:
        respObj - Object
      • setStatus

        public final void setStatus​(int sts,
                                    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​(String msg)
        Set the status message property
        Parameters:
        msg - String
      • toString

        public String toString()
        Return the desktop response as a string
        Overrides:
        toString in class Object
        Returns:
        String