Class FileBasedPersister
java.lang.Object
com.atlassian.bamboo.persister.file.FileBasedPersister
This class persists all data as xml data files on the file system.
It uses a decorator chain of BuildPersisterDecorator
s to handle caching, and actually saving.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionFileBasedPersister
(@Nullable BootstrapManager bootstrapManager, @NotNull XStreamFactory xStreamFactory) FileBasedPersister
(XStreamFactory xStreamFactory) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addBuildResults
(PlanKey planKey, BuildResults buildResults) Associate the given buildResults with the given build.void
clear()
Clears all interal caches the persister may havevoid
deleteBuildResults
(PlanKey planKey, long buildNumber) Remove a specific build result MXLReload the persisted admin configuration datagetAdministrationConfiguration
(@Nullable FeatureManager featureManager) Reload the persisted admin configuration data@Nullable BuildResults
getBuildResults
(Key planKey, int buildNumber) Get the Nth build for a given build.Provide the UI with the current configuration directoryReturn the directory containing the administration.xml file.Provide the UI with the current build data directorygetName()
What's the name of plugin - used to identify the plugin in the bamboo.xml configuration file.getUrl()
Who implemented this plugin?boolean
isActive()
Indicates whether this is currently active.boolean
Does the persister reference valid admin configuration data?void
reload()
Restart with the latest configurations...void
Reloads the administration configuration from the xml.void
saveAdministrationConfiguration
(AdministrationConfiguration administrationConfiguration) Save the given administrationConfiguration in the persister's configuration data directoryvoid
saveAdministrationConfigurationNoXsrfCheck
(AdministrationConfiguration administrationConfiguration) 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 persistervoid
start()
Make the persister available for use.void
stop()
Stop the component and clean up any resources
-
Field Details
-
ADMIN_CONFIG_FILE
- See Also:
-
DEFAULT_BUILD_DIRECTORY
- See Also:
-
DEFAULT_CONFIG_DIRECTORY
- See Also:
-
-
Constructor Details
-
FileBasedPersister
-
FileBasedPersister
public FileBasedPersister(@Nullable @Nullable BootstrapManager bootstrapManager, @NotNull @NotNull XStreamFactory xStreamFactory)
-
-
Method Details
-
setPersisterOptions
Description copied from interface:Persister
Let the UI update the persister- Specified by:
setPersisterOptions
in interfacePersister
-
getName
What's the name of plugin - used to identify the plugin in the bamboo.xml configuration file.- Returns:
- the name
-
getUrl
Who implemented this plugin? -
setDataDirectory
Set by the configuration loader from the value in the bamboo.xml data file.- Parameters:
buildDataDirectory
- The build data directory
-
getDataDirectory
Provide the UI with the current build data directory- Returns:
- The directory
-
getDataDirectoryFile
- Specified by:
getDataDirectoryFile
in interfacePersister
-
setConfigurationDirectory
Set by the configuration loader from the value in the bamboo.xml data file.- Parameters:
configurationDataDirectory
- The server configuration data directory
-
getConfigurationDirectory
Provide the UI with the current configuration directory- Returns:
- The directory
-
getConfigurationDirectoryFile
Description copied from interface:Persister
Return the directory containing the administration.xml file.- Specified by:
getConfigurationDirectoryFile
in interfacePersister
- Returns:
-
start
Make the persister available for use. -
stop
Description copied from interface:Startable
Stop the component and clean up any resources -
isActive
public boolean isActive()Description copied from interface:Startable
Indicates whether this is currently active.
-
reload
public void reload()Restart with the latest configurations... -
clear
public void clear()Description copied from interface:Persister
Clears all interal caches the persister may have -
isInitialised
public boolean isInitialised()Does the persister reference valid admin configuration data?- Specified by:
isInitialised
in interfacePersister
- Returns:
- true if the persister can load the admin configuration file
-
reloadAdministrationConfiguration
public void reloadAdministrationConfiguration()Description copied from interface:Persister
Reloads the administration configuration from the xml.- Specified by:
reloadAdministrationConfiguration
in interfacePersister
-
getAdministrationConfiguration
Description copied from interface:Persister
Reload the persisted admin configuration data- Specified by:
getAdministrationConfiguration
in interfacePersister
- Returns:
- The data
-
getAdministrationConfiguration
public AdministrationConfiguration getAdministrationConfiguration(@Nullable @Nullable FeatureManager featureManager) Description copied from interface:Persister
Reload the persisted admin configuration data- Specified by:
getAdministrationConfiguration
in interfacePersister
- Returns:
- The data
-
saveAdministrationConfiguration
public void saveAdministrationConfiguration(AdministrationConfiguration administrationConfiguration) Save the given administrationConfiguration in the persister's configuration data directory- Specified by:
saveAdministrationConfiguration
in interfacePersister
- Parameters:
administrationConfiguration
- The object to save
-
saveAdministrationConfigurationNoXsrfCheck
public void saveAdministrationConfigurationNoXsrfCheck(AdministrationConfiguration administrationConfiguration) -
deleteBuildResults
Description copied from interface:Persister
Remove a specific build result MXL- Specified by:
deleteBuildResults
in interfacePersister
buildNumber
- The build to remove
-
addBuildResults
Description copied from interface:Persister
Associate the given buildResults with the given build.- Specified by:
addBuildResults
in interfacePersister
buildResults
- The build results we are adding
-
getBuildResults
Description copied from interface:Persister
Get the Nth build for a given build.- Specified by:
getBuildResults
in interfacePersister
buildNumber
- The build's build number- Returns:
- The build result
-