Package org.sakaiproject.util
Class BasicConfigHistory
- java.lang.Object
-
- org.sakaiproject.util.BasicConfigHistory
-
- All Implemented Interfaces:
ServerConfigurationService.ConfigHistory
public class BasicConfigHistory extends Object implements ServerConfigurationService.ConfigHistory
This is a basic version of the Config history to make it easy for people to create items to place in the config history- Author:
- Aaron Zeckoski (azeckoski @ unicon.net) (azeckoski @ vt.edu)
-
-
Field Summary
Fields Modifier and Type Field Description protected booleansecuredprotected Stringsourceprotected longtimestampThis is the time when the config was changedprotected ObjectvalueThis is the previous value of the config (the value from before the timestamp)protected intversion
-
Constructor Summary
Constructors Modifier Constructor Description protectedBasicConfigHistory(int version, long timestamp, String source, Object value)BasicConfigHistory(int version, String source, Object value)Make a basic history config to store in the history of a config item
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)StringgetSource()longgetTimestamp()ObjectgetValue()intgetVersion()inthashCode()booleanisSecured()voidsetSecured(boolean secured)StringtoString()
-
-
-
Constructor Detail
-
BasicConfigHistory
public BasicConfigHistory(int version, String source, Object value)Make a basic history config to store in the history of a config item- Parameters:
version- the version (always > 0)source- the source name (default to UNKNOWN)value- the previous config value
-
-
Method Detail
-
getVersion
public int getVersion()
- Specified by:
getVersionin interfaceServerConfigurationService.ConfigHistory- Returns:
- the version of the config item this history refers to (a newly created item is version 1)
-
getTimestamp
public long getTimestamp()
- Specified by:
getTimestampin interfaceServerConfigurationService.ConfigHistory- Returns:
- the time at which this historical version of the config item became irrelevant (this is when this version was replaced)
-
getSource
public String getSource()
- Specified by:
getSourcein interfaceServerConfigurationService.ConfigHistory- Returns:
- the source name for this version of the config item
-
getValue
public Object getValue()
- Specified by:
getValuein interfaceServerConfigurationService.ConfigHistory- Returns:
- the value of the config item in this version of it
-
setSecured
public void setSecured(boolean secured)
-
isSecured
public boolean isSecured()
-
-