|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.flexive.shared.configuration.parameters.ParameterImpl<T>
T - value type of the parameterpublic abstract class ParameterImpl<T>
Generic parameter implementation.
| Constructor Summary | |
|---|---|
protected |
ParameterImpl(ParameterData<T> parameter,
boolean registerParameter)
Create a new parameter with the given data |
| Method Summary | |
|---|---|
Parameter<T> |
freeze()
Freeze the parameter configuration. |
ParameterData<T> |
getData()
Returns the data object containing path and key for the parameter. |
java.lang.String |
getDatabaseValue(T value)
Convert the given value to a string that will be stored in the configuration. |
T |
getDefaultValue()
Return the parameter's default value or null if it is not set. |
java.lang.String |
getKey()
Return the parameter's key. |
ParameterPath |
getPath()
Return the parameter's path (including its scope). |
ParameterScope |
getScope()
Return the parameter's scope. |
boolean |
isCached()
Should this parameter be cached once it has been retrieved? By default all parameters are cached, but you can disable this for individual parameters that are seldom used or very large. |
boolean |
isValid(T value)
Returns true if the given value is a valid configuration value (e.g. |
Parameter<T> |
setData(ParameterData<T> parameterData)
Sets the data for this parameter. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.flexive.shared.configuration.Parameter |
|---|
copy, getValue |
| Constructor Detail |
|---|
protected ParameterImpl(ParameterData<T> parameter,
boolean registerParameter)
parameter - parameter dataregisterParameter - if the parameter should be registered in the static parameter table
(don't do this for non-static parameter declarations)| Method Detail |
|---|
public ParameterData<T> getData()
getData in interface Parameter<T>public T getDefaultValue()
getDefaultValue in interface Parameter<T>public java.lang.String getKey()
getKey in interface Parameter<T>public ParameterPath getPath()
getPath in interface Parameter<T>public ParameterScope getScope()
getScope in interface Parameter<T>public boolean isCached()
isCached in interface Parameter<T>public boolean isValid(T value)
isValid in interface Parameter<T>value - the value to be checked
public java.lang.String getDatabaseValue(T value)
getDatabaseValue in interface Parameter<T>value - the parameter value to be stored
Parameter.getValue(Object)public Parameter<T> setData(ParameterData<T> parameterData)
ParameterParameter.freeze()).
setData in interface Parameter<T>parameterData - the parameter data beans
public Parameter<T> freeze()
Parameter
freeze in interface Parameter<T>public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||