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  boolean isDynamicView
           
 
Constructor Summary
AbstractHistoryAction(ClearTool cleartool, boolean isDynamicView, Filter filter)
           
 
Method Summary
protected abstract  java.util.List<? extends hudson.scm.ChangeLogSet.Entry> buildChangelog(java.lang.String viewPath, java.util.List<HistoryEntry> entries)
           
protected  java.util.List<HistoryEntry> filterEntries(java.util.List<HistoryEntry> entries)
           
 java.util.List<? extends hudson.scm.ChangeLogSet.Entry> getChanges(java.util.Date time, java.lang.String viewPath, java.lang.String viewTag, 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 viewPath, java.lang.String viewTag, 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  void parseLsHistory(java.io.BufferedReader reader, java.util.Collection<HistoryEntry> history)
           
protected  java.util.List<HistoryEntry> runLsHistory(java.util.Date time, java.lang.String viewPath, java.lang.String viewTag, 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

extendedViewPath

protected java.lang.String extendedViewPath

isDynamicView

protected boolean isDynamicView
Constructor Detail

AbstractHistoryAction

public AbstractHistoryAction(ClearTool cleartool,
                             boolean isDynamicView,
                             Filter filter)
Method Detail

buildChangelog

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

filterEntries

protected java.util.List<HistoryEntry> filterEntries(java.util.List<HistoryEntry> entries)
                                              throws java.io.IOException,
                                                     java.lang.InterruptedException
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 viewPath,
                                                                          java.lang.String viewTag,
                                                                          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
viewPath - The view path name (local path in the workspace)
viewTag - The view tag (unique identifier on CC Server)
branchNames - the branch names
viewPaths - optional vob paths
Returns:
List of changes
Throws:
java.io.IOException
java.lang.InterruptedException

getExtendedViewPath

public java.lang.String getExtendedViewPath()

getHistoryFormatHandler

protected abstract ClearToolFormatHandler getHistoryFormatHandler()

hasChanges

public boolean hasChanges(java.util.Date time,
                          java.lang.String viewPath,
                          java.lang.String viewTag,
                          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
viewPath - The view path name (local path in the workspace)
viewTag - The view tag (unique identifier on CC Server)
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

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

parseLsHistory

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

runLsHistory

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

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 confusing for users.

Parameters:
path - the new extended view path.


Copyright © 2010. All Rights Reserved.