net.sf.asterisk.fastagi.command
Class DatabaseGetCommand

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

public class DatabaseGetCommand
extends AGICommand

Retrieves an entry in the Asterisk database for a given family and key.
Returns 0 if is not set. Returns 1 if the variable is set and returns the value in parenthesis.
Example return code: 200 result=1 (testvariable)

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

Constructor Summary
DatabaseGetCommand(java.lang.String family, java.lang.String key)
          Creates a new DatabaseGetCommand.
 
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 retrieve.
 java.lang.String getKey()
          Returns the the key to retrieve.
 void setFamily(java.lang.String family)
          Sets the family of the key to retrieve.
 void setKey(java.lang.String key)
          Sets the key to retrieve.
 
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

DatabaseGetCommand

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

Parameters:
family - the family of the key to retrieve.
key - the key to retrieve.
Method Detail

getFamily

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

Returns:
the family of the key to retrieve.

setFamily

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

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

getKey

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

Returns:
the key to retrieve.

setKey

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

Parameters:
key - the key to retrieve.

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.