net.sf.asterisk.fastagi.command
Class DatabasePutCommand

java.lang.Object
  extended by net.sf.asterisk.fastagi.command.AGICommand
      extended by net.sf.asterisk.fastagi.command.DatabasePutCommand
All Implemented Interfaces:
java.io.Serializable

public class DatabasePutCommand
extends AGICommand

Adds or updates an entry in the Asterisk database for a given family, key, and value.
Returns 1 if successful, 0 otherwise.

Version:
$Id: DatabasePutCommand.java,v 1.2 2005/03/08 16:48:34 srt Exp $
Author:
srt
See Also:
Serialized Form

Constructor Summary
DatabasePutCommand(java.lang.String family, java.lang.String key, java.lang.String value)
          Creates a new DatabasePutCommand.
 
Method Summary
 java.lang.String buildCommand()
          Returns a string suitable to be sent to asterisk.
 java.lang.String getFamily()
          Returns the family of the key to set.
 java.lang.String getKey()
          Returns the the key to set.
 java.lang.String getValue()
          Returns the value to set.
 void setFamily(java.lang.String family)
          Sets the family of the key to set.
 void setKey(java.lang.String key)
          Sets the key to set.
 void setValue(java.lang.String value)
          Sets the value to set.
 
Methods inherited from class net.sf.asterisk.fastagi.command.AGICommand
escapeAndQuote, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DatabasePutCommand

public DatabasePutCommand(java.lang.String family,
                          java.lang.String key,
                          java.lang.String value)
Creates a new DatabasePutCommand.

Parameters:
family - the family of the key to set.
key - the key to set.
value - the value to set.
Method Detail

getFamily

public java.lang.String getFamily()
Returns the family of the key to set.

Returns:
the family of the key to set.

setFamily

public void setFamily(java.lang.String family)
Sets the family of the key to set.

Parameters:
family - the family of the key to set.

getKey

public java.lang.String getKey()
Returns the the key to set.

Returns:
the key to set.

setKey

public void setKey(java.lang.String key)
Sets the key to set.

Parameters:
key - the key to set.

getValue

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

Returns:
the value to set.

setValue

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

Parameters:
value - the value to set.

buildCommand

public java.lang.String buildCommand()
Description copied from class: AGICommand
Returns a string suitable to be sent to asterisk.

Specified by:
buildCommand in class AGICommand
Returns:
a string suitable to be sent to asterisk.


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