com.pmease.quickbuild.repositorysupport
Class WorkingDirLocator<T extends Revision>

java.lang.Object
  extended by com.pmease.quickbuild.repositorysupport.SourceViewSupport<T>
      extended by com.pmease.quickbuild.repositorysupport.WorkingDirLocator<T>
All Implemented Interfaces:
java.io.Serializable

public class WorkingDirLocator<T extends Revision>
extends SourceViewSupport<T>

See Also:
Serialized Form

Nested Class Summary
static class WorkingDirLocator.SourceViewJob<T extends Revision>
           
 
Constructor Summary
WorkingDirLocator(SourceViewSupport<T> sourceViewSupport)
           
 
Method Summary
 java.lang.String getRepositoryPath(java.lang.String checkoutPath)
          Get the path in repository given a checkout path on disk.
 java.util.List<java.lang.String> readSourceByEdition(java.lang.String repositoryPath, java.lang.String edition)
          Get source file content by specified file edition
 java.util.List<java.lang.String> readSourceByRevision(java.lang.String repositoryPath, T revision)
          Get source file content by specified repository revision.
 
Methods inherited from class com.pmease.quickbuild.repositorysupport.SourceViewSupport
getRepository, readSource, readSourceAsString, readSourceAsString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorkingDirLocator

public WorkingDirLocator(SourceViewSupport<T> sourceViewSupport)
Method Detail

getRepositoryPath

public java.lang.String getRepositoryPath(java.lang.String checkoutPath)
Description copied from class: SourceViewSupport
Get the path in repository given a checkout path on disk. Please note that the checkout path is the path to a checkout file relative to the workspace. This file does not necessarily to be exist on disk, and this method might be called even if the checkouts has been cleared.

Specified by:
getRepositoryPath in class SourceViewSupport<T extends Revision>
Returns:
null if specified checkout file can not be mapped to a path in repository

readSourceByRevision

public java.util.List<java.lang.String> readSourceByRevision(java.lang.String repositoryPath,
                                                             T revision)
Description copied from class: SourceViewSupport
Get source file content by specified repository revision.

Specified by:
readSourceByRevision in class SourceViewSupport<T extends Revision>
Parameters:
repositoryPath - the path in repository
revision - revision of the repository as returned by Repository.getHeadRevision() or Repository#getLabelRevision(String)
Returns:
lines of the source file. Null value will be returned if specified path does not represents a text file or file does not exist.

readSourceByEdition

public java.util.List<java.lang.String> readSourceByEdition(java.lang.String repositoryPath,
                                                            java.lang.String edition)
Description copied from class: SourceViewSupport
Get source file content by specified file edition

Specified by:
readSourceByEdition in class SourceViewSupport<T extends Revision>
Parameters:
repositoryPath - the path in repository
edition - the file edition defined in Modification.getEdition() which is fetched from Repository#getChangesBetween().
Returns:
lines of the source file. Null value will be returned if specified path does not represents a text file or file does not exist.


Copyright © 2005-2010 PMEase Inc. All Rights Reserved.