jreceiver.common.callback.rec
Class DsettingRec

java.lang.Object
  |
  +--jreceiver.common.rec.BaseRec
        |
        +--jreceiver.common.callback.rec.DsettingRec
All Implemented Interfaces:
Dsetting, Hashable
Direct Known Subclasses:
DsettingBoolRec, DsettingIntRec, DsettingListRec, DsettingStrRec, DsettingUrlRec

public abstract class DsettingRec
extends BaseRec
implements Dsetting

Base functionality for all player/driver setting items

Version:
$Revision: 1.3 $ $Date: 2002/07/20 01:40:43 $
Author:
Reed Esau

Field Summary
protected  java.lang.Object def_value
          the default value
protected  java.lang.String desc
          the description of the setting item, for the locale
protected  java.lang.String id
          an identifier to refer to a specific setting
protected  boolean is_required
          is the user required to provide a value?
protected  java.util.Locale locale
          the locale of the name and description of the setting item
protected  java.lang.String name
          the title of the setting item
protected  int set_type
          the type of the setting item (int, bool, etc)
protected  java.lang.Object value
          the value
 
Fields inherited from interface jreceiver.common.callback.rec.Dsetting
DSETTING_TYPE_BOOL, DSETTING_TYPE_INT, DSETTING_TYPE_LIST, DSETTING_TYPE_STR, DSETTING_TYPE_URL, HKEY_DSETTING_DESC, HKEY_DSETTING_ID, HKEY_DSETTING_IS_REQUIRED, HKEY_DSETTING_LOCALE_COUNTRY, HKEY_DSETTING_LOCALE_LANG, HKEY_DSETTING_NAME, HKEY_DSETTING_TYPE, OPTIONAL, REQUIRED
 
Constructor Summary
DsettingRec(java.util.Hashtable hash)
          ctor - construct from a hashtable, usually retrieved via XML-RPC
DsettingRec(java.lang.String id, int set_type, boolean is_required, java.lang.String name, java.lang.String desc, java.util.Locale locale)
           
 
Method Summary
static DsettingRec createInstance(java.util.Hashtable hash)
          Create a basic SettingRec object of the specified type.
 java.lang.Object getDefaultValue()
          default value get
 java.lang.String getDesc()
           
 java.lang.String getId()
           
 boolean getIsBoolSetting()
           
 boolean getIsIntSetting()
           
 boolean getIsListSetting()
           
 boolean getIsRequired()
           
 boolean getIsStrSetting()
           
 boolean getIsUrlSetting()
           
 java.util.Locale getLocale()
           
 java.lang.String getName()
           
 int getType()
           
 java.lang.Object getValue()
          value get
static java.util.Vector reconstitute(java.util.Vector vector)
          Reconstitute each DsettingRec object that appears as a hash in the list.
static java.util.Hashtable reconstituteMap(java.util.Hashtable map)
          Reconstitute each DsettingRec object that appears as a hash in the map.
 void setDefaultValue(java.lang.Object def_value)
          default value set
 void setValue(java.lang.Object value)
          value set
 java.util.Hashtable toHash()
          Store the object as a hash suitable for transport over an XML-RPC connection or similar.
 java.lang.String toString()
          Returns a string representation of the object.
 
Methods inherited from class jreceiver.common.rec.BaseRec
dissolve, dissolveMap, find, find, find, find
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

value

protected java.lang.Object value
the value

def_value

protected java.lang.Object def_value
the default value

id

protected java.lang.String id
an identifier to refer to a specific setting

set_type

protected int set_type
the type of the setting item (int, bool, etc)

is_required

protected boolean is_required
is the user required to provide a value?

name

protected java.lang.String name
the title of the setting item

desc

protected java.lang.String desc
the description of the setting item, for the locale

locale

protected java.util.Locale locale
the locale of the name and description of the setting item
Constructor Detail

DsettingRec

public DsettingRec(java.lang.String id,
                   int set_type,
                   boolean is_required,
                   java.lang.String name,
                   java.lang.String desc,
                   java.util.Locale locale)

DsettingRec

public DsettingRec(java.util.Hashtable hash)
ctor - construct from a hashtable, usually retrieved via XML-RPC
Parameters:
hash -  
Method Detail

getId

public java.lang.String getId()
Specified by:
getId in interface Dsetting

getType

public int getType()
Specified by:
getType in interface Dsetting

getIsRequired

public boolean getIsRequired()
Specified by:
getIsRequired in interface Dsetting

getName

public java.lang.String getName()
Specified by:
getName in interface Dsetting

getDesc

public java.lang.String getDesc()
Specified by:
getDesc in interface Dsetting

getLocale

public java.util.Locale getLocale()
Specified by:
getLocale in interface Dsetting

getValue

public java.lang.Object getValue()
value get
Specified by:
getValue in interface Dsetting

setValue

public void setValue(java.lang.Object value)
value set
Specified by:
setValue in interface Dsetting

getDefaultValue

public java.lang.Object getDefaultValue()
default value get
Specified by:
getDefaultValue in interface Dsetting

setDefaultValue

public void setDefaultValue(java.lang.Object def_value)
default value set
Specified by:
setDefaultValue in interface Dsetting

toString

public java.lang.String toString()
Returns a string representation of the object.
Specified by:
toString in interface Hashable
Overrides:
toString in class java.lang.Object
Returns:
a string representation of the object.

getIsBoolSetting

public boolean getIsBoolSetting()
Specified by:
getIsBoolSetting in interface Dsetting

getIsIntSetting

public boolean getIsIntSetting()
Specified by:
getIsIntSetting in interface Dsetting

getIsStrSetting

public boolean getIsStrSetting()
Specified by:
getIsStrSetting in interface Dsetting

getIsUrlSetting

public boolean getIsUrlSetting()
Specified by:
getIsUrlSetting in interface Dsetting

getIsListSetting

public boolean getIsListSetting()
Specified by:
getIsListSetting in interface Dsetting

toHash

public java.util.Hashtable toHash()
Store the object as a hash suitable for transport over an XML-RPC connection or similar.

Use DsettingRec(Hashtable) to transform the data back into an object of this type.

Specified by:
toHash in interface Hashable
Returns:
 

createInstance

public static DsettingRec createInstance(java.util.Hashtable hash)
                                  throws RecException
Create a basic SettingRec object of the specified type.

Parameters:
pl_type -  
Returns:
 

reconstitute

public static java.util.Vector reconstitute(java.util.Vector vector)
                                     throws RecException
Reconstitute each DsettingRec object that appears as a hash in the list.

reconstituteMap

public static java.util.Hashtable reconstituteMap(java.util.Hashtable map)
                                           throws RecException
Reconstitute each DsettingRec object that appears as a hash in the map.


Copyright © 2001-2002 Reed Esau, All Rights Reserved.