|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecthudson.plugins.jobConfigHistory.FileHistoryDao
public class FileHistoryDao
Defines some helper functions needed by JobConfigHistoryJobListener and
JobConfigHistorySaveableListener.
| Method Summary | |
|---|---|
void |
copyHistoryAndDelete(String oldName,
String newName)
Copies the history files of a restored project from the old location (_deleted_) to a directory with the new name and deletes the old entries. |
void |
copyNodeHistoryAndDelete(String oldName,
String newName)
Copies the history files of a restored node from the old location (_deleted_) to a directory with the new name and deletes the old entries. |
void |
createNewItem(hudson.model.Item item)
Adds and saves the initial configuration of an item. |
void |
createNewNode(hudson.model.Node node)
Adds and saves the initial configuration of a node. |
void |
deleteItem(hudson.model.Item item)
Deletes the history of an item. |
void |
deleteNode(hudson.model.Node node)
Deletes the history of an node. |
File[] |
getDeletedJobs(String folderName)
Returns a list of deleted jobs with a history. |
File[] |
getDeletedNodes(String folderName)
Returns a list of deleted nodes with a history. |
SortedMap<String,HistoryDescr> |
getJobHistory(String jobName)
Returns a sorted map of all HistoryDescr for a given job. |
File[] |
getJobs(String folderName)
Returns a list of jobs with a history. |
SortedMap<String,HistoryDescr> |
getNodeHistory(String nodeName)
Returns a sorted map of all HistoryDescr for a given node. |
File[] |
getNodes(String folderName)
Returns a list of nodes with a history. |
hudson.XmlFile |
getOldRevision(hudson.model.AbstractItem item,
String identifier)
Returns one old configuration of item. |
hudson.XmlFile |
getOldRevision(File configFile,
String identifier)
Returns one old configuration of file. |
hudson.XmlFile |
getOldRevision(hudson.model.Node node,
String identifier)
Returns one old configuration of node. |
hudson.XmlFile |
getOldRevision(String configFileName,
String identifier)
Returns one old configuration of file. |
hudson.XmlFile |
getOldRevision(hudson.XmlFile xmlFile,
String identifier)
Returns one old configuration of xmlFile. |
SortedMap<String,HistoryDescr> |
getRevisions(File configFile)
Returns a sorted map of all revisions for this configFile. |
SortedMap<String,HistoryDescr> |
getRevisions(hudson.model.Node node)
Returns a sorted map of all revisions for this node. |
SortedMap<String,HistoryDescr> |
getRevisions(hudson.XmlFile xmlFile)
Returns a sorted map of all revisions for this xmlFile. |
File[] |
getSystemConfigs()
Returns a list of all system configuration files with a history. |
SortedMap<String,HistoryDescr> |
getSystemHistory(String name)
Returns a sorted map of all HistoryDescr for a given system configuration. |
boolean |
hasOldRevision(hudson.model.AbstractItem item,
String identifier)
Returns whether the revision exists. |
boolean |
hasOldRevision(File configFile,
String identifier)
Returns whether the revision exists. |
boolean |
hasOldRevision(hudson.model.Node node,
String identifier)
Returns whether the revision exists. |
boolean |
hasOldRevision(hudson.XmlFile xmlFile,
String identifier)
Returns whether the revision exists. |
boolean |
isCreatedEntry(File historyDir)
Checks whether the respective history entry is a 'Created' entry. |
void |
purgeOldEntries(File itemHistoryRoot,
int maxEntries)
Purges old entries for the given history root to maxEntries. |
void |
renameItem(hudson.model.Item item,
String oldName,
String newName)
Save and renames the item. |
void |
renameNode(hudson.model.Node node,
String oldName,
String newName)
Save and renames the node. |
void |
saveItem(hudson.model.AbstractItem item)
Saves the current configuration of an item. |
void |
saveItem(hudson.XmlFile file)
Saves a copy of an xml file. |
void |
saveNode(hudson.model.Node node)
Saves the current configuration of an node. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public void createNewItem(hudson.model.Item item)
ItemListenerHistoryDao
createNewItem in interface ItemListenerHistoryDaoitem - projectpublic void saveItem(hudson.model.AbstractItem item)
HistoryDao
saveItem in interface HistoryDaoitem - projectpublic void saveItem(hudson.XmlFile file)
HistoryDao
saveItem in interface HistoryDaofile - xmlFilepublic void deleteItem(hudson.model.Item item)
ItemListenerHistoryDao
deleteItem in interface ItemListenerHistoryDaoitem - project
public void renameItem(hudson.model.Item item,
String oldName,
String newName)
ItemListenerHistoryDao
renameItem in interface ItemListenerHistoryDaoitem - projectoldName - old project namenewName - new namepublic SortedMap<String,HistoryDescr> getRevisions(hudson.XmlFile xmlFile)
HistoryDaoHistoryDao.getOldRevision(hudson.model.AbstractItem, java.lang.String)
getRevisions in interface HistoryDaoxmlFile - file
public SortedMap<String,HistoryDescr> getRevisions(File configFile)
HistoryDaoHistoryDao.getOldRevision(hudson.model.AbstractItem, java.lang.String)
getRevisions in interface HistoryDaoconfigFile - file
public hudson.XmlFile getOldRevision(hudson.model.AbstractItem item,
String identifier)
HistoryDao
getOldRevision in interface HistoryDaoitem - projectidentifier - timestamp or hash
public hudson.XmlFile getOldRevision(hudson.XmlFile xmlFile,
String identifier)
HistoryDao
getOldRevision in interface HistoryDaoxmlFile - fileidentifier - timestamp or hash
public hudson.XmlFile getOldRevision(File configFile,
String identifier)
HistoryDao
getOldRevision in interface HistoryDaoconfigFile - fileidentifier - timestamp or hash
public hudson.XmlFile getOldRevision(String configFileName,
String identifier)
HistoryDao
getOldRevision in interface HistoryDaoconfigFileName - fileidentifier - timestamp or hash
public boolean hasOldRevision(hudson.model.AbstractItem item,
String identifier)
HistoryDao
hasOldRevision in interface HistoryDaoitem - projectidentifier - timestamp or hash
public boolean hasOldRevision(hudson.XmlFile xmlFile,
String identifier)
HistoryDao
hasOldRevision in interface HistoryDaoxmlFile - fileidentifier - timestamp or hash
public boolean hasOldRevision(File configFile,
String identifier)
HistoryDao
hasOldRevision in interface HistoryDaoconfigFile - fileidentifier - timestamp or hash
public void purgeOldEntries(File itemHistoryRoot,
int maxEntries)
HistoryDao
purgeOldEntries in interface HistoryDaoitemHistoryRoot - directory to inspect.maxEntries - maximum number of entries.public boolean isCreatedEntry(File historyDir)
HistoryDao
isCreatedEntry in interface HistoryDaohistoryDir - The directory, e.g. 2013-01-18_17-33-51
public File[] getDeletedJobs(String folderName)
OverviewHistoryDao
getDeletedJobs in interface OverviewHistoryDaofolderName - name of folder.
public File[] getJobs(String folderName)
OverviewHistoryDao
getJobs in interface OverviewHistoryDaofolderName - name of folder
public File[] getSystemConfigs()
OverviewHistoryDao
getSystemConfigs in interface OverviewHistoryDaopublic SortedMap<String,HistoryDescr> getJobHistory(String jobName)
OverviewHistoryDao
getJobHistory in interface OverviewHistoryDaojobName - of the job
public SortedMap<String,HistoryDescr> getSystemHistory(String name)
OverviewHistoryDao
getSystemHistory in interface OverviewHistoryDaoname - of the configuration
public void copyHistoryAndDelete(String oldName,
String newName)
HistoryDao
copyHistoryAndDelete in interface HistoryDaooldName - The old name of the project (containing "_deleted_")newName - The new name of the projectpublic void createNewNode(hudson.model.Node node)
NodeListenerHistoryDao
createNewNode in interface NodeListenerHistoryDaonode - nodepublic void deleteNode(hudson.model.Node node)
NodeListenerHistoryDao
deleteNode in interface NodeListenerHistoryDaonode - node
public void renameNode(hudson.model.Node node,
String oldName,
String newName)
NodeListenerHistoryDao
renameNode in interface NodeListenerHistoryDaonode - nodeoldName - old node namenewName - new namepublic SortedMap<String,HistoryDescr> getRevisions(hudson.model.Node node)
HistoryDaoHistoryDao.getOldRevision(hudson.model.Node, java.lang.String)
getRevisions in interface HistoryDaonode - node
public void copyNodeHistoryAndDelete(String oldName,
String newName)
HistoryDao
copyNodeHistoryAndDelete in interface HistoryDaooldName - The old name of the node (containing "_deleted_")newName - The new name of the nodepublic void saveNode(hudson.model.Node node)
HistoryDao
saveNode in interface HistoryDaonode - node
public hudson.XmlFile getOldRevision(hudson.model.Node node,
String identifier)
HistoryDao
getOldRevision in interface HistoryDaonode - nodeidentifier - timestamp or hash
public boolean hasOldRevision(hudson.model.Node node,
String identifier)
HistoryDao
hasOldRevision in interface HistoryDaonode - nodeidentifier - timestamp or hash
public File[] getDeletedNodes(String folderName)
OverviewHistoryDao
getDeletedNodes in interface OverviewHistoryDaofolderName - name of folder.
public File[] getNodes(String folderName)
OverviewHistoryDao
getNodes in interface OverviewHistoryDaofolderName - name of folder
public SortedMap<String,HistoryDescr> getNodeHistory(String nodeName)
OverviewHistoryDao
getNodeHistory in interface OverviewHistoryDaonodeName - of the node
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||