net.sf.asterisk.manager.action
Class SetVarAction

java.lang.Object
  extended by net.sf.asterisk.manager.action.AbstractManagerAction
      extended by net.sf.asterisk.manager.action.SetVarAction
All Implemented Interfaces:
java.io.Serializable, ManagerAction

public class SetVarAction
extends AbstractManagerAction

The SetVarAction sets the value of a global or local channel variable.
Setting global variables is supported since Asterisk 1.2.

Version:
$Id: SetVarAction.java,v 1.4 2005/11/08 11:37:22 srt Exp $
Author:
Asteria Solutions Group, Inc. , srt
See Also:
Serialized Form

Field Summary
 java.lang.String channel
          The channel on which to set the variable.
 java.lang.String value
          The value to store.
 java.lang.String variable
          The name of the variable to set.
 
Constructor Summary
SetVarAction()
          Creates a new empty SetVarAction.
SetVarAction(java.lang.String variable, java.lang.String value)
          Creates a new SetVarAction that sets the given global variable to a new value.
SetVarAction(java.lang.String channel, java.lang.String variable, java.lang.String value)
          Creates a new SetVarAction that sets the given channel variable of the given channel to a new value.
 
Method Summary
 java.lang.String getAction()
          Returns the name of this action, i.e.
 java.lang.String getChannel()
          Returns the name of the channel.
 java.lang.String getValue()
          Returns the value to store.
 java.lang.String getVariable()
          Returns the name of the variable to set.
 void setChannel(java.lang.String channel)
          Sets the name of the channel.
 void setValue(java.lang.String value)
          Sets the value to store.
 void setVariable(java.lang.String variable)
          Sets the name of the variable to set.
 
Methods inherited from class net.sf.asterisk.manager.action.AbstractManagerAction
getActionId, setActionId, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

channel

public java.lang.String channel
The channel on which to set the variable.


variable

public java.lang.String variable
The name of the variable to set.


value

public java.lang.String value
The value to store.

Constructor Detail

SetVarAction

public SetVarAction()
Creates a new empty SetVarAction.


SetVarAction

public SetVarAction(java.lang.String variable,
                    java.lang.String value)
Creates a new SetVarAction that sets the given global variable to a new value.

Parameters:
variable - the name of the global variable to set
value - the new value
Since:
0.2

SetVarAction

public SetVarAction(java.lang.String channel,
                    java.lang.String variable,
                    java.lang.String value)
Creates a new SetVarAction that sets the given channel variable of the given channel to a new value.

Parameters:
channel - the name of the channel to set the variable on
variable - the name of the channel variable
value - the new value
Since:
0.2
Method Detail

getAction

public java.lang.String getAction()
Returns the name of this action, i.e. "SetVar".

Specified by:
getAction in interface ManagerAction
Specified by:
getAction in class AbstractManagerAction
Returns:
the name of this action

getChannel

public java.lang.String getChannel()
Returns the name of the channel.

Returns:
the name of channel.

setChannel

public void setChannel(java.lang.String channel)
Sets the name of the channel.

Parameters:
channel - the name of the channel to set.

getVariable

public java.lang.String getVariable()
Returns the name of the variable to set.

Returns:
the name of the variable to set.

setVariable

public void setVariable(java.lang.String variable)
Sets the name of the variable to set.

Parameters:
variable - the name of the variable to set.

getValue

public java.lang.String getValue()
Returns the value to store.

Returns:
the value to store.

setValue

public void setValue(java.lang.String value)
Sets the value to store.

Parameters:
value - the value to set.


Copyright © 2004-2005 Stefan Reuter. All Rights Reserved.