public class FilePipelineItemHistoryDao extends Object implements PipelineItemHistoryDao
| Constructor and Description |
|---|
FilePipelineItemHistoryDao(File historyRootDir) |
| Modifier and Type | Method and Description |
|---|---|
void |
changeHistoryLocation(org.jenkinsci.plugins.workflow.job.WorkflowJob workflowJob,
String oldFullName,
String newFullName)
Change the history of this WorkflowJob, if present.
|
void |
createHistory(org.jenkinsci.plugins.workflow.job.WorkflowJob workflowJob,
int buildNumber)
Creates the history entry of this WorkflowJob.
|
void |
deleteHistory(org.jenkinsci.plugins.workflow.job.WorkflowJob workflowJob)
Deletes the history of this WorkflowJob, if present.
|
File |
getHistoryRootDirectory(org.jenkinsci.plugins.workflow.job.WorkflowJob workflowJob) |
File |
getMostRecentRevision(org.jenkinsci.plugins.workflow.job.WorkflowJob workflowJob) |
int |
getOriginalBuildNumberFromReplay(PipelineHistoryDescription pipelineHistoryDescription) |
File |
getRevision(PipelineHistoryDescription pipelineHistoryDescription) |
File |
getRevision(org.jenkinsci.plugins.workflow.job.WorkflowJob workflowJob,
String identifier)
Returns an old revision.
|
SortedMap<String,PipelineHistoryDescription> |
getRevisions(org.jenkinsci.plugins.workflow.job.WorkflowJob workflowJob)
For a given Pipeline Job, return all revisions.
|
File |
getRootDirectory() |
boolean |
isBuiltfromReplay(PipelineHistoryDescription pipelineHistoryDescription) |
boolean |
isHistoryPresent(org.jenkinsci.plugins.workflow.job.WorkflowJob workflowJob)
Determines whether there are history entries present or not.
|
void |
updateHistory(org.jenkinsci.plugins.workflow.job.WorkflowJob workflowJob,
int buildNumber)
Updates the history entry of this WorkflowJob.
|
public FilePipelineItemHistoryDao(File historyRootDir)
public void createHistory(org.jenkinsci.plugins.workflow.job.WorkflowJob workflowJob,
int buildNumber)
throws IOException
PipelineItemHistoryDaocreateHistory in interface PipelineItemHistoryDaoworkflowJob - the Pipeline Job.buildNumber - the build number to be associated to the history entry.IOException - if creating a history entry fails on IO level.public File getRootDirectory()
public void updateHistory(org.jenkinsci.plugins.workflow.job.WorkflowJob workflowJob,
int buildNumber)
throws IOException
PipelineItemHistoryDaoupdateHistory in interface PipelineItemHistoryDaoworkflowJob - the Pipeline Job.buildNumber - the build number to be associated to the history entry.IOException - if updating the history fails on IO level.public void deleteHistory(org.jenkinsci.plugins.workflow.job.WorkflowJob workflowJob)
throws IOException
PipelineItemHistoryDaodeleteHistory in interface PipelineItemHistoryDaoworkflowJob - the Pipeline Job.IOException - if deleting the history fails on IO level.public void changeHistoryLocation(org.jenkinsci.plugins.workflow.job.WorkflowJob workflowJob,
String oldFullName,
String newFullName)
PipelineItemHistoryDaochangeHistoryLocation in interface PipelineItemHistoryDaoworkflowJob - the Pipeline Job.oldFullName - the old full name (its folder-including tree path)newFullName - the new full namepublic File getMostRecentRevision(org.jenkinsci.plugins.workflow.job.WorkflowJob workflowJob)
getMostRecentRevision in interface PipelineItemHistoryDaopublic File getRevision(org.jenkinsci.plugins.workflow.job.WorkflowJob workflowJob, String identifier) throws FileNotFoundException
PipelineItemHistoryDaogetRevision in interface PipelineItemHistoryDaoworkflowJob - the workflowJobidentifier - the identifierFileNotFoundException - if the revision id'd by the identifier can't be found.public File getRevision(PipelineHistoryDescription pipelineHistoryDescription) throws FileNotFoundException
getRevision in interface PipelineItemHistoryDaoFileNotFoundExceptionpublic boolean isBuiltfromReplay(PipelineHistoryDescription pipelineHistoryDescription) throws IOException
isBuiltfromReplay in interface PipelineItemHistoryDaoIOExceptionpublic int getOriginalBuildNumberFromReplay(PipelineHistoryDescription pipelineHistoryDescription) throws IOException, SAXException, ParserConfigurationException
getOriginalBuildNumberFromReplay in interface PipelineItemHistoryDaoIOExceptionSAXExceptionParserConfigurationExceptionpublic SortedMap<String,PipelineHistoryDescription> getRevisions(org.jenkinsci.plugins.workflow.job.WorkflowJob workflowJob) throws IOException
PipelineItemHistoryDaogetRevisions in interface PipelineItemHistoryDaoworkflowJob - the pipeline jobIOException - if retrieving the history revisions fails on IO level.public boolean isHistoryPresent(org.jenkinsci.plugins.workflow.job.WorkflowJob workflowJob)
PipelineItemHistoryDaoisHistoryPresent in interface PipelineItemHistoryDaoworkflowJob - the Pipeline Job.public final File getHistoryRootDirectory(org.jenkinsci.plugins.workflow.job.WorkflowJob workflowJob)
Copyright © 2016–2019. All rights reserved.