|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sakaiproject.util.BasicConfigItem
public class BasicConfigItem
Provides an easy for someone to create a ServerConfigurationService.ConfigItem which is valid without having to build their own implementation
Use the static methods to easily generate the ServerConfigurationService.ConfigItem for use with the methods in the ServerConfigurationService
| Field Summary | |
|---|---|
protected Object |
defaultValue
the default value for this config (null indicates it is not set) |
protected String |
name
the name/key for this configuration value |
protected String |
source
the name of the most recent source for this config value (e.g. |
protected Object |
value
the actual stored value for this config (null indicates it is not set) |
| Constructor Summary | |
|---|---|
protected |
BasicConfigItem()
Do NOT use this - INTERNAL ONLY |
|
BasicConfigItem(String name,
Object value,
Object defaultValue,
String source)
Constructor for when you know the source, leave defaultValue null if you do not know have one OR if this is a registration for a defaultValue then fill in the defaultValue and leave the value null (either value OR defaultValue MUST be set) |
| Method Summary | |
|---|---|
int |
changed(Object value,
String source)
Called whenever this config item is changed |
ServerConfigurationService.ConfigItem |
copy()
Duplicate this config item This is mostly used to ensure we do not send the internal objects out where they could be changed |
int |
getChanged()
|
Object |
getDefaultValue()
|
ServerConfigurationService.ConfigHistory[] |
getHistory()
|
String |
getName()
|
int |
getRequested()
|
String |
getSource()
|
String |
getType()
|
Object |
getValue()
|
int |
getVersion()
|
boolean |
isDefaulted()
|
boolean |
isRegistered()
|
boolean |
isSecured()
|
static ServerConfigurationService.ConfigItem |
makeConfigItem(String name,
Object value,
String source)
Create a config item which stores a default value but does not have an actual value |
static ServerConfigurationService.ConfigItem |
makeDefaultedConfigItem(String name,
Object defaultValue,
String source)
Create a config item which stores a default value but does not have an actual value |
int |
requested()
Called whenever this config item is requested |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected String name
protected Object value
protected Object defaultValue
protected String source
| Constructor Detail |
|---|
protected BasicConfigItem()
public BasicConfigItem(String name,
Object value,
Object defaultValue,
String source)
name - the config name key (the ID of this configuration setting)value - [OPTIONAL] the config value (this IS the configurations setting)defaultValue - [OPTIONAL] the default value for this configsource - [OPTIONAL] the name of the origin for this config setting (defaults to UNKNOWN)| Method Detail |
|---|
public int requested()
ServerConfigurationService.ConfigItem
requested in interface ServerConfigurationService.ConfigItem
public int changed(Object value,
String source)
ServerConfigurationService.ConfigItem
changed in interface ServerConfigurationService.ConfigItemvalue - the new valuesource - the source which is making the change
public ServerConfigurationService.ConfigItem copy()
ServerConfigurationService.ConfigItem
copy in interface ServerConfigurationService.ConfigItempublic String getName()
getName in interface ServerConfigurationService.ConfigItempublic Object getValue()
getValue in interface ServerConfigurationService.ConfigItempublic String getType()
getType in interface ServerConfigurationService.ConfigItempublic String getSource()
getSource in interface ServerConfigurationService.ConfigItempublic Object getDefaultValue()
getDefaultValue in interface ServerConfigurationService.ConfigItempublic int getRequested()
getRequested in interface ServerConfigurationService.ConfigItempublic int getChanged()
getChanged in interface ServerConfigurationService.ConfigItempublic int getVersion()
getVersion in interface ServerConfigurationService.ConfigItempublic ServerConfigurationService.ConfigHistory[] getHistory()
getHistory in interface ServerConfigurationService.ConfigItempublic boolean isRegistered()
isRegistered in interface ServerConfigurationService.ConfigItempublic boolean isDefaulted()
isDefaulted in interface ServerConfigurationService.ConfigItempublic boolean isSecured()
isSecured in interface ServerConfigurationService.ConfigItem
public static ServerConfigurationService.ConfigItem makeDefaultedConfigItem(String name,
Object defaultValue,
String source)
name - the config name keydefaultValue - the default value for this configsource - the origin of this config setting
ServerConfigurationService.ConfigItem which can be registered with the ServerConfigurationService
public static ServerConfigurationService.ConfigItem makeConfigItem(String name,
Object value,
String source)
name - the config name keydefaultValue - the default value for this configsource - the origin of this config setting
ServerConfigurationService.ConfigItem which can be registered with the ServerConfigurationService
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||