org.cybergarage.upnp

## Class StateVariable

- java.lang.Object
- - org.cybergarage.upnp.xml.NodeData
  - - org.cybergarage.upnp.StateVariable

-     public class StateVariable
      extends NodeData

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `ELEM_NAME`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `StateVariable()` Creates a new StateVariable with default initialization.
    `StateVariable(Node serviceNode, Node stateVarNode)` Creates a StateVariable with specified service and state variable nodes.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `AllowedValueList` | `getAllowedValueList()`
    `AllowedValueRange` | `getAllowedValueRange()`
    `String` | `getDataType()`
    `String` | `getDefaultValue()` Get the value of DefaultValue of this StateVariable
    `String` | `getName()` Gets the name of this state variable.
    `QueryListener` | `getQueryListener()`
    `QueryResponse` | `getQueryResponse()`
    `UPnPStatus` | `getQueryStatus()`
    `Service` | `getService()`
    `Node` | `getServiceNode()` Gets the service node this state variable belongs to.
    `StateVariableData` | `getStateVariableData()`
    `Node` | `getStateVariableNode()` Gets the state variable node containing variable definition.
    `UPnPStatus` | `getStatus()`
    `Object` | `getUserData()`
    `String` | `getValue()`
    `boolean` | `hasAllowedValueList()`
    `boolean` | `hasAllowedValueRange()`
    `boolean` | `isSendEvents()`
    `static boolean` | `isStateVariableNode(Node node)`
    `boolean` | `performQueryListener(QueryRequest queryReq)`
    `boolean` | `postQuerylAction()`
    `void` | `set(StateVariable stateVar)`
    `void` | `setAllowedValueList(AllowedValueList avl)` This method ovverride the value of the AllowedValueList Node of this object.
    `void` | `setAllowedValueRange(AllowedValueRange avr)` This method ovverride the value of the AllowedValueRange Node of this object.
    `void` | `setDataType(String value)`
    `void` | `setDefaultValue(String value)` This method ovverride the value of the DefaultValue of this object.
    `void` | `setName(String value)` Sets name of this state variable.
    `void` | `setQueryListener(QueryListener listener)`
    `void` | `setSendEvents(boolean state)`
    `(package private) void` | `setServiceNode(Node n)` Sets service node this state variable belongs to.
    `void` | `setStatus(int code)`
    `void` | `setStatus(int code, String descr)`
    `void` | `setUserData(Object data)`
    `void` | `setValue(int value)`
    `void` | `setValue(long value)`
    `void` | `setValue(String value)`

    - ### Methods inherited from class org.cybergarage.upnp.xml.NodeData

      `getNode, setNode`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### ELEM_NAME

          public static final String ELEM_NAME

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### StateVariable

          public StateVariable()

      Creates a new StateVariable with default initialization.

    - #### StateVariable

          public StateVariable(Node serviceNode,
                               Node stateVarNode)

      Creates a StateVariable with specified service and state variable nodes.
      Parameters:
        `serviceNode` - service node this variable belongs to
        `stateVarNode` - state variable node containing definition

  - ### Method Detail

    - #### getAllowedValueList

          public AllowedValueList getAllowedValueList()

    - #### getAllowedValueRange

          public AllowedValueRange getAllowedValueRange()

    - #### getDataType

          public String getDataType()

    - #### getDefaultValue

          public String getDefaultValue()

      Get the value of DefaultValue of this StateVariable

    - #### getName

          public String getName()

      Gets the name of this state variable.
      Returns:
        state variable name

    - #### getQueryListener

          public QueryListener getQueryListener()

    - #### getQueryResponse

          public QueryResponse getQueryResponse()

    - #### getQueryStatus

          public UPnPStatus getQueryStatus()

    - #### getService

          public Service getService()

    - #### getServiceNode

          public Node getServiceNode()

      Gets the service node this state variable belongs to.
      Returns:
        service node

    - #### getStateVariableData

          public StateVariableData getStateVariableData()

    - #### getStateVariableNode

          public Node getStateVariableNode()

      Gets the state variable node containing variable definition.
      Returns:
        state variable node

    - #### getStatus

          public UPnPStatus getStatus()

    - #### getUserData

          public Object getUserData()

    - #### getValue

          public String getValue()

    - #### hasAllowedValueList

          public boolean hasAllowedValueList()

    - #### hasAllowedValueRange

          public boolean hasAllowedValueRange()

    - #### isSendEvents

          public boolean isSendEvents()

    - #### isStateVariableNode

          public static boolean isStateVariableNode(Node node)

    - #### performQueryListener

          public boolean performQueryListener(QueryRequest queryReq)

    - #### postQuerylAction

          public boolean postQuerylAction()

    - #### set

          public void set(StateVariable stateVar)

    - #### setAllowedValueList

          public void setAllowedValueList(AllowedValueList avl)

      This method ovverride the value of the AllowedValueList Node
      of this object.
      Note: This method should be used to create a dynamic
      Device withtout writing any XML that describe the device
      .
      Note2: The enforce the constraint of the SCPD rule the
      AllowedValueList and AllowedValueRange are mutal exclusive
      the last set will be the only present
      Parameters:
        `avl` - The new AllowedValueList

    - #### setAllowedValueRange

          public void setAllowedValueRange(AllowedValueRange avr)

      This method ovverride the value of the AllowedValueRange Node
      of this object.
      Note: This method should be used to create a dynamic
      Device withtout writing any XML that describe the device
      .
      Note2: The enforce the constraint of the SCPD rule the
      AllowedValueList and AllowedValueRange are mutal exclusive
      the last set will be the only present
      Parameters:
        `avr` - The new AllowedValueRange

    - #### setDataType

          public void setDataType(String value)

    - #### setDefaultValue

          public void setDefaultValue(String value)

      This method ovverride the value of the DefaultValue of this object.
      Note: This method should be used to create a dynamic
      Device withtout writing any XML that describe the device
      .
      Parameters:
        `value` - The new String value

    - #### setName

          public void setName(String value)

      Sets name of this state variable.
      Parameters:
        `value` - name to set

    - #### setQueryListener

          public void setQueryListener(QueryListener listener)

    - #### setSendEvents

          public void setSendEvents(boolean state)

    - #### setServiceNode

          void setServiceNode(Node n)

      Sets service node this state variable belongs to.
      Parameters:
        `n` - service node

    - #### setStatus

          public void setStatus(int code)

    - #### setStatus

          public void setStatus(int code,
                                String descr)

    - #### setUserData

          public void setUserData(Object data)

    - #### setValue

          public void setValue(int value)

    - #### setValue

          public void setValue(long value)

    - #### setValue

          public void setValue(String value)