hudson.plugins.clearcase.history
Class AbstractHistoryAction

java.lang.Object
  extended by hudson.plugins.clearcase.history.AbstractHistoryAction
All Implemented Interfaces:
HistoryAction
Direct Known Subclasses:
BaseHistoryAction, UcmHistoryAction

public abstract class AbstractHistoryAction
extends java.lang.Object
implements HistoryAction

Author:
hlyh

Field Summary
protected  ClearTool cleartool
           
protected  java.lang.String extendedViewPath
           
protected  java.util.List<Filter> filters
           
 
Constructor Summary
AbstractHistoryAction(ClearTool cleartool, java.util.List<Filter> filters)
           
 
Method Summary
protected abstract  java.util.List<? extends hudson.scm.ChangeLogSet.Entry> buildChangelog(java.lang.String viewName, java.util.List<HistoryEntry> entries)
           
protected  java.util.List<HistoryEntry> filterEntries(java.util.List<HistoryEntry> unfiltered)
           
 java.util.List<? extends hudson.scm.ChangeLogSet.Entry> getChanges(java.util.Date time, java.lang.String viewName, java.lang.String[] branchNames, java.lang.String[] viewPaths)
          Returns if the repository has any changes since the specified time
 java.lang.String getExtendedViewPath()
           
protected abstract  ClearToolFormatHandler getHistoryFormatHandler()
           
 boolean hasChanges(java.util.Date time, java.lang.String viewName, java.lang.String[] branchNames, java.lang.String[] viewPaths)
          Returns if the repository has any changes since the specified time
protected abstract  HistoryEntry parseEventLine(java.util.regex.Matcher matcher, java.lang.String line)
           
protected  java.util.List<HistoryEntry> parseLsHistory(java.io.BufferedReader reader)
           
protected  java.util.List<HistoryEntry> runLsHistory(java.util.Date time, java.lang.String viewName, java.lang.String[] branchNames, java.lang.String[] viewPaths)
           
 void setExtendedViewPath(java.lang.String path)
          Sets the extended view path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cleartool

protected ClearTool cleartool

filters

protected java.util.List<Filter> filters

extendedViewPath

protected java.lang.String extendedViewPath
Constructor Detail

AbstractHistoryAction

public AbstractHistoryAction(ClearTool cleartool,
                             java.util.List<Filter> filters)
Method Detail

hasChanges

public boolean hasChanges(java.util.Date time,
                          java.lang.String viewName,
                          java.lang.String[] branchNames,
                          java.lang.String[] viewPaths)
                   throws java.io.IOException,
                          java.lang.InterruptedException
Description copied from interface: HistoryAction
Returns if the repository has any changes since the specified time

Specified by:
hasChanges in interface HistoryAction
Parameters:
time - check for changes since this time
viewName - the name of the view
branchNames - the branch names
viewPaths - optional vob paths
Returns:
true, if the ClearCase repository has changes; false, otherwise.
Throws:
java.io.IOException
java.lang.InterruptedException

getChanges

public java.util.List<? extends hudson.scm.ChangeLogSet.Entry> getChanges(java.util.Date time,
                                                                          java.lang.String viewName,
                                                                          java.lang.String[] branchNames,
                                                                          java.lang.String[] viewPaths)
                                                                   throws java.io.IOException,
                                                                          java.lang.InterruptedException
Description copied from interface: HistoryAction
Returns if the repository has any changes since the specified time

Specified by:
getChanges in interface HistoryAction
Parameters:
time - check for changes since this time
viewName - the name of the view
branchNames - the branch names
viewPaths - optional vob paths
Returns:
List of changes
Throws:
java.io.IOException
java.lang.InterruptedException

runLsHistory

protected java.util.List<HistoryEntry> runLsHistory(java.util.Date time,
                                                    java.lang.String viewName,
                                                    java.lang.String[] branchNames,
                                                    java.lang.String[] viewPaths)
                                             throws java.io.IOException,
                                                    java.lang.InterruptedException
Throws:
java.io.IOException
java.lang.InterruptedException

parseLsHistory

protected java.util.List<HistoryEntry> parseLsHistory(java.io.BufferedReader reader)
                                               throws java.io.IOException,
                                                      java.lang.InterruptedException,
                                                      java.text.ParseException
Throws:
java.io.IOException
java.lang.InterruptedException
java.text.ParseException

filterEntries

protected java.util.List<HistoryEntry> filterEntries(java.util.List<HistoryEntry> unfiltered)
                                              throws java.io.IOException,
                                                     java.lang.InterruptedException
Throws:
java.io.IOException
java.lang.InterruptedException

buildChangelog

protected abstract java.util.List<? extends hudson.scm.ChangeLogSet.Entry> buildChangelog(java.lang.String viewName,
                                                                                          java.util.List<HistoryEntry> entries)
                                                                                   throws java.io.IOException,
                                                                                          java.lang.InterruptedException
Throws:
java.io.IOException
java.lang.InterruptedException

getHistoryFormatHandler

protected abstract ClearToolFormatHandler getHistoryFormatHandler()

parseEventLine

protected abstract HistoryEntry parseEventLine(java.util.regex.Matcher matcher,
                                               java.lang.String line)
                                        throws java.io.IOException,
                                               java.lang.InterruptedException,
                                               java.text.ParseException
Throws:
java.io.IOException
java.lang.InterruptedException
java.text.ParseException

setExtendedViewPath

public void setExtendedViewPath(java.lang.String path)
Sets the extended view path. The extended view path will be removed from file paths in the event. The extended view path is for example the view root + view name; and this path shows up in the history and can be conusing for users.

Parameters:
path - the new extended view path.

getExtendedViewPath

public java.lang.String getExtendedViewPath()


Copyright © 2009. All Rights Reserved.