public class FileBasedPersister extends Object implements Persister
It uses a decorator chain of BuildPersisterDecorators to handle caching, and actually saving.
| Modifier and Type | Field and Description |
|---|---|
static String |
ADMIN_CONFIG_FILE |
static String |
DEFAULT_BUILD_DIRECTORY |
static String |
DEFAULT_CONFIG_DIRECTORY |
| Constructor and Description |
|---|
FileBasedPersister(BootstrapManager bootstrapManager,
XStreamFactory xStreamFactory) |
FileBasedPersister(XStreamFactory xStreamFactory) |
| Modifier and Type | Method and Description |
|---|---|
void |
addBuildResults(PlanKey planKey,
BuildResults buildResults)
Associate the given buildResults with the given build.
|
void |
clear()
Clears all interal caches the persister may have
|
void |
deleteBuildResults(PlanKey planKey,
long buildNumber)
Remove a specific build result MXL
|
AdministrationConfiguration |
getAdministrationConfiguration()
Reload the persisted admin configuration data
|
AdministrationConfiguration |
getAdministrationConfiguration(FeatureManager featureManager)
Reload the persisted admin configuration data
|
BuildResults |
getBuildResults(Key planKey,
int buildNumber)
Get the Nth build for a given build.
|
String |
getConfigurationDirectory()
Provide the UI with the current configuration directory
|
File |
getConfigurationDirectoryFile()
Return the directory containing the administration.xml file.
|
String |
getDataDirectory()
Provide the UI with the current build data directory
|
File |
getDataDirectoryFile() |
String |
getName()
What's the name of plugin - used to identify the plugin in the bamboo.xml configuration file.
|
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 configuration data directory
|
void |
setConfigurationDirectory(String configurationDataDirectory)
Set by the configuration loader from the value in the bamboo.xml data file.
|
void |
setDataDirectory(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
|
public static final String ADMIN_CONFIG_FILE
public static final String DEFAULT_BUILD_DIRECTORY
public static final String DEFAULT_CONFIG_DIRECTORY
public FileBasedPersister(XStreamFactory xStreamFactory)
public FileBasedPersister(@Nullable
BootstrapManager bootstrapManager,
@NotNull
XStreamFactory xStreamFactory)
public void setPersisterOptions(PersisterOptions persisterOptions)
PersistersetPersisterOptions in interface Persisterpublic String getName()
public String getUrl()
public void setDataDirectory(String buildDataDirectory)
buildDataDirectory - The build data directorypublic String getDataDirectory()
public File getDataDirectoryFile()
getDataDirectoryFile in interface Persisterpublic void setConfigurationDirectory(String configurationDataDirectory)
configurationDataDirectory - The server configuration data directorypublic String getConfigurationDirectory()
public File getConfigurationDirectoryFile()
PersistergetConfigurationDirectoryFile in interface Persisterpublic void start()
throws Exception
public void stop()
throws Exception
Startablepublic boolean isActive()
StartableIndicates whether this is currently active.
public void reload()
public void clear()
Persisterpublic boolean isInitialised()
isInitialised in interface Persisterpublic void reloadAdministrationConfiguration()
PersisterreloadAdministrationConfiguration in interface Persisterpublic AdministrationConfiguration getAdministrationConfiguration()
PersistergetAdministrationConfiguration in interface Persisterpublic AdministrationConfiguration getAdministrationConfiguration(@Nullable FeatureManager featureManager)
PersistergetAdministrationConfiguration in interface Persisterpublic void saveAdministrationConfiguration(AdministrationConfiguration administrationConfiguration)
saveAdministrationConfiguration in interface PersisteradministrationConfiguration - The object to savepublic void deleteBuildResults(PlanKey planKey, long buildNumber)
PersisterdeleteBuildResults in interface PersisterbuildNumber - The build to removepublic void addBuildResults(PlanKey planKey, BuildResults buildResults)
PersisteraddBuildResults in interface PersisterbuildResults - The build results we are adding@Nullable public BuildResults getBuildResults(Key planKey, int buildNumber)
PersistergetBuildResults in interface PersisterbuildNumber - The build's build numberCopyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.