Package hudson.plugins.jobConfigHistory
Interface HistoryDao
- All Known Implementing Classes:
FileHistoryDao
,JobConfigHistoryStrategy
public interface HistoryDao
Operations for historization of config files.
- Author:
- Mirko Friedenhagen
-
Method Summary
Modifier and TypeMethodDescriptionvoid
deleteRevision
(AbstractItem item, String identifier) Permanently delete the given revision.void
deleteRevision
(Node node, String identifier) void
deleteRevision
(File historyDir, String identifier) getOldRevision
(AbstractItem item, String identifier) Returns one old configuration of item.getOldRevision
(Node node, String identifier) Returns one old configuration of node.getOldRevision
(XmlFile xmlFile, String identifier) Returns one old configuration of xmlFile.getOldRevision
(String configFileName, String identifier) Returns one old configuration of file.int
getRevisionAmount
(XmlFile xmlFile) getRevisions
(Node node) Returns a sorted map of all revisions for this node.getRevisions
(XmlFile xmlFile) Returns a sorted map of all revisions for this xmlFile.boolean
hasDuplicateHistory
(Node node) Determines whether the given node has already been recorded in the history.boolean
hasOldRevision
(Node node, String identifier) Returns whether the revision exists.boolean
hasOldRevision
(XmlFile xmlFile, String identifier) Returns whether the revision exists.boolean
revisionEqualsCurrent
(AbstractItem project, String identifier1) boolean
revisionEqualsCurrent
(Node node, String identifier1) void
Saves a copy of a xml file.void
Saves the current configuration of a node.
-
Method Details
-
saveNode
Saves the current configuration of a node.- Parameters:
node
- node
-
saveItem
Saves a copy of a xml file.- Parameters:
file
- xmlFile
-
getRevisions
Returns a sorted map of all revisions for this xmlFile.The key is an identifier which may be used in
getOldRevision(hudson.model.AbstractItem, java.lang.String)
- Parameters:
xmlFile
- file- Returns:
- old revisions mapped to the identifier.
-
getRevisions
Returns a sorted map of all revisions for this node.The key is an identifier which may be used in
getOldRevision(hudson.model.Node, java.lang.String)
- Parameters:
node
- node- Returns:
- old revisions mapped to the identifier.
-
getRevisionAmount
- Parameters:
xmlFile
- the config's history xml file- Returns:
- the amount of revision entries of a certain config.
-
getOldRevision
Returns one old configuration of item.- Parameters:
item
- projectidentifier
- timestamp or hash- Returns:
- old configuration.
-
getOldRevision
Returns one old configuration of node.- Parameters:
node
- nodeidentifier
- timestamp or hash- Returns:
- old configuration.
-
getOldRevision
Returns one old configuration of xmlFile.- Parameters:
xmlFile
- fileidentifier
- timestamp or hash- Returns:
- old configuration.
-
getOldRevision
Returns one old configuration of file.- Parameters:
configFileName
- fileidentifier
- timestamp or hash- Returns:
- old configuration.
-
deleteRevision
Permanently delete the given revision.- Parameters:
item
- itemidentifier
- timestamp or hash
-
deleteRevision
-
deleteRevision
-
revisionEqualsCurrent
-
revisionEqualsCurrent
-
hasOldRevision
Returns whether the revision exists.- Parameters:
node
- nodeidentifier
- timestamp or hash- Returns:
- old configuration.
-
hasOldRevision
Returns whether the revision exists.- Parameters:
xmlFile
- fileidentifier
- timestamp or hash- Returns:
- old configuration.
-
hasDuplicateHistory
Determines whether the given node has already been recorded in the history.- Parameters:
node
- the node to check for duplicate history.- Returns:
- true if the node is a duplicate, false otherwise.
-