|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.bamboo.persister.file.FileBasedPersister
public class FileBasedPersister
This class persists all data as xml data files on the file system.
It uses a decorator chain ofBuildPersisterDecorator
s to handle caching, and actually saving.
Field Summary | |
---|---|
static java.lang.String |
ADMIN_CONFIG_FILE
|
static java.lang.String |
DEFALT_BUILD_DIRECTORY
|
static java.lang.String |
DEFALT_CONFIG_DIRECTORY
|
Constructor Summary | |
---|---|
FileBasedPersister()
|
|
FileBasedPersister(BootstrapManager bootstrapManager)
|
Method Summary | |
---|---|
void |
addBuildResults(Build build,
BuildResults buildResults)
Associate the given buildResults with the given build. |
void |
clear()
Clears all interal caches the persister may have |
void |
deleteBuildResults(Build build,
long buildNumber)
Remove a specific build result MXL |
AdministrationConfiguration |
getAdministrationConfiguration()
Reload the persisted admin configuration data |
protected BuildPersisterDecorator |
getBuildDecorator()
Lets us override the default behaviour when testing |
BuildResults |
getBuildResults(java.lang.String planKey,
java.lang.Integer buildNumber)
Get the Nth build for a given build. |
java.lang.String |
getConfigurationDirectory()
Provide the UI with the current configuration directory |
java.io.File |
getConfigurationDirectoryFile()
Return the directory containing the administration.xml file. |
java.lang.String |
getDataDirectory()
Provide the UI with the current build data directory |
java.io.File |
getDataDirectoryFile()
|
java.lang.String |
getName()
What's the name of plugin - used to identify the plugin in the bamboo.xml configuration file. |
java.lang.String |
getUrl()
Who implemented this plugin? |
boolean |
isActive()
Indicates whether this is currently active. |
boolean |
isInitialised()
Does the persister reference valid admin configuration data? |
void |
reload()
Restart with the latest configurations... |
void |
reloadAdministrationConfiguration()
Reloads the administration configuration from the xml. |
void |
saveAdministrationConfiguration(AdministrationConfiguration administrationConfiguration)
Save the given administrationConfiguration in the persister's configiuration data directory |
void |
setConfigurationDirectory(java.lang.String configurationDataDirectory)
Set by the configuration loader from the value in the bamboo.xml data file. |
void |
setDataDirectory(java.lang.String buildDataDirectory)
Set by the configuration loader from the value in the bamboo.xml data file. |
void |
setPersisterOptions(PersisterOptions persisterOptions)
Let the UI update the persister |
void |
start()
Make the persister available for use. |
void |
stop()
Stop the component and clean up any resources |
void |
updateBuildResults(Build build,
BuildResults buildResults)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ADMIN_CONFIG_FILE
public static final java.lang.String DEFALT_BUILD_DIRECTORY
public static final java.lang.String DEFALT_CONFIG_DIRECTORY
Constructor Detail |
---|
public FileBasedPersister()
public FileBasedPersister(BootstrapManager bootstrapManager)
Method Detail |
---|
public void setPersisterOptions(PersisterOptions persisterOptions)
Persister
setPersisterOptions
in interface Persister
public java.lang.String getName()
public java.lang.String getUrl()
public void setDataDirectory(java.lang.String buildDataDirectory)
buildDataDirectory
- The build data directorypublic java.lang.String getDataDirectory()
public java.io.File getDataDirectoryFile()
getDataDirectoryFile
in interface Persister
public void setConfigurationDirectory(java.lang.String configurationDataDirectory)
configurationDataDirectory
- The server configuration data directorypublic java.lang.String getConfigurationDirectory()
public java.io.File getConfigurationDirectoryFile()
Persister
getConfigurationDirectoryFile
in interface Persister
public void start() throws java.lang.Exception
start
in interface Startable
java.lang.Exception
- A generic exceptionpublic void stop() throws java.lang.Exception
Startable
stop
in interface Startable
java.lang.Exception
- A generic failurepublic boolean isActive()
Startable
Indicates whether this is currently active.
isActive
in interface Startable
true
if this is active, false
otherwise.public void reload()
reload
in interface Persister
public void clear()
Persister
clear
in interface Persister
protected BuildPersisterDecorator getBuildDecorator()
public boolean isInitialised()
isInitialised
in interface Persister
public void reloadAdministrationConfiguration()
Persister
reloadAdministrationConfiguration
in interface Persister
public AdministrationConfiguration getAdministrationConfiguration()
Persister
getAdministrationConfiguration
in interface Persister
public void saveAdministrationConfiguration(AdministrationConfiguration administrationConfiguration)
saveAdministrationConfiguration
in interface Persister
administrationConfiguration
- The object to savepublic void deleteBuildResults(Build build, long buildNumber)
Persister
deleteBuildResults
in interface Persister
build
- The build it's being removed frombuildNumber
- The build to removepublic void addBuildResults(Build build, BuildResults buildResults)
Persister
addBuildResults
in interface Persister
build
- The build we are adding the new build result tobuildResults
- The build results we are addingpublic void updateBuildResults(Build build, BuildResults buildResults)
updateBuildResults
in interface Persister
public BuildResults getBuildResults(java.lang.String planKey, java.lang.Integer buildNumber)
Persister
getBuildResults
in interface Persister
buildNumber
- The build's build number
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |