|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecterland.util.ParameterStorageParameterString
public class ParameterStorageParameterString
Get, set or delete parameters stored in a parameter string
Constructor Summary | |
---|---|
ParameterStorageParameterString(StorageInterface primaryStorage,
StorageInterface secondaryStorage,
char parameterDelimiter)
Createa a storage object |
|
ParameterStorageParameterString(StorageInterface primaryStorage,
StorageInterface secondaryStorage,
char parameterDelimiter,
String primaryStorageParameters,
String secondaryStorageParameters)
Createa a storage object |
Method Summary | |
---|---|
void |
delParameter(String name)
Delete a parameter |
protected void |
delSpecialParameterInData(StringBuffer data,
String name)
Delets a parameter in the StringBuffer specified, this method is only called if isSpecialHandled(String) returns true |
String |
getParameter(String name)
Get a parameter value |
StorageInterface |
getParameterAsStorage(String name)
Retreives the parameter as a StorageInterface object instead of a value Observe that this is a new StorageInterface object and will not be related to any of your other StorageInterface objects |
protected StorageInterface |
getSpecialParameterAsStorageInData(StringBuffer data,
String name)
Gets a storage object for a parameter from the StringBuffer specified, this method is only called if isSpecialHandled(String) returns true |
protected String |
getSpecialParameterInData(StringBuffer data,
String name)
Gets the parameter value for a parameter from the StringBuffer specified, this method is only called if isSpecialHandled(String) returns true |
protected void |
init(StorageInterface primaryStorage,
StorageInterface secondaryStorage,
char parameterDelimiter,
String primaryStorageParameters,
String secondaryStorageParameters)
Initialize this object |
protected boolean |
isSpecialHandled(String name)
Check if this parameter should be special handled, will be autmatically called when a parameter is accessed. |
void |
setParameter(String name,
String value)
Set a parameter value |
void |
setParameterAsStorage(String name,
StorageInterface value)
Sets the parameter as a StorageInterface object instead of a value Observe that this is a new StorageInterface object must have been retreived with the ParameterValueStorageExInterface.getParameterAsStorage(String) method |
protected void |
setSpecialParameterAsStorageInData(StringBuffer data,
String name,
StorageInterface value)
Sets the parameter value for a parameter in the StringBuffer specified, this method is only called if isSpecialHandled(String) returns true
The value is specified as a StorageInterface object |
protected void |
setSpecialParameterInData(StringBuffer data,
String name,
String value)
Sets the parameter value for a parameter in the StringBuffer specified, this method is only called if isSpecialHandled(String) returns true |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ParameterStorageParameterString(StorageInterface primaryStorage, StorageInterface secondaryStorage, char parameterDelimiter)
primaryStorage
- The storage object which the parameters should be read/write from/tosecondaryStorage
- The storage object which the parameters should be read from if they don't exist in the primaryStorageparameterDelimiter
- The character that separates two parameterspublic ParameterStorageParameterString(StorageInterface primaryStorage, StorageInterface secondaryStorage, char parameterDelimiter, String primaryStorageParameters, String secondaryStorageParameters)
primaryStorage
- The storage object which the parameters should be read/write from/tosecondaryStorage
- The storage object which the parameters should be read from if they don't exist in the primaryStorageparameterDelimiter
- The character that separates two parametersprimaryStorageParameters
- A comma separated list with parameters allowed in primaryStorage, null means that all parameters are allowedsecondaryStorageParameters
- comma separated list with parameters allowed in secondaryStorage, null means that all parameters are allowedMethod Detail |
---|
protected void init(StorageInterface primaryStorage, StorageInterface secondaryStorage, char parameterDelimiter, String primaryStorageParameters, String secondaryStorageParameters)
primaryStorage
- The storage object which the parameters should be read/write from/tosecondaryStorage
- The storage object which the parameters should be read from if they don't exist in the primaryStorageparameterDelimiter
- The character that separates two parametersprimaryStorageParameters
- A comma separated list with parameters allowed in primaryStorage, null means that all parameters are allowedsecondaryStorageParameters
- comma separated list with parameters allowed in secondaryStorage, null means that all parameters are allowedprotected boolean isSpecialHandled(String name)
name
- The parameter name
true - This parameter should be special handled,then one ofgetSpecialParameterInData(StringBuffer,String)
,setSpecialParameterInData(StringBuffer,String,String)
,delSpecialParameterInData(StringBuffer,String)
, will be called to access the parameter
false - This parameter is handled in the normal way, one ofgetParameter(String)
,setParameter(String,String)
,delParameter(String)
, will be called to access the parameter
protected String getSpecialParameterInData(StringBuffer data, String name)
isSpecialHandled(String)
returns true
data
- The StringBuffer to search for the parameter inname
- The parameter name of the parameter
protected StorageInterface getSpecialParameterAsStorageInData(StringBuffer data, String name)
isSpecialHandled(String)
returns true
data
- The StringBuffer to search for the parameter inname
- The parameter name of the parameter
public String getParameter(String name)
ParameterValueStorageInterface
getParameter
in interface ParameterValueStorageInterface
name
- The name of the parameter
protected void setSpecialParameterInData(StringBuffer data, String name, String value)
isSpecialHandled(String)
returns true
data
- The StringBuffer to set the parameter inname
- The parameter name of the parametervalue
- The parameter value of the parameterprotected void setSpecialParameterAsStorageInData(StringBuffer data, String name, StorageInterface value)
isSpecialHandled(String)
returns true
The value is specified as a StorageInterface object
data
- The StringBuffer to set the parameter inname
- The parameter name of the parametervalue
- The parameter value of the parameterpublic void setParameter(String name, String value)
ParameterValueStorageInterface
setParameter
in interface ParameterValueStorageInterface
name
- The name of the parametervalue
- The value of the parameterprotected void delSpecialParameterInData(StringBuffer data, String name)
isSpecialHandled(String)
returns true
data
- The StringBuffer to set the parameter inname
- The parameter name of the parameterpublic void delParameter(String name)
ParameterValueStorageInterface
delParameter
in interface ParameterValueStorageInterface
name
- The name of the parameterpublic String toString()
toString
in class Object
public StorageInterface getParameterAsStorage(String name)
ParameterValueStorageExInterface
getParameterAsStorage
in interface ParameterValueStorageExInterface
name
- The name of the parameter to retreive
public void setParameterAsStorage(String name, StorageInterface value)
ParameterValueStorageExInterface
ParameterValueStorageExInterface.getParameterAsStorage(String)
method
setParameterAsStorage
in interface ParameterValueStorageExInterface
name
- The name of the parameter to setvalue
- The value as a StorageInterface object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |