public interface

DirectoryBrowser

com.atlassian.crucible.scm.DirectoryBrowser

Summary

Public Methods
abstract FileHistory getFileHistory(Principal principal, String path, String pegRevision)
Get the change history of the given file or directory (history of directory changes may not be supported by all SCMs).
abstract List<DirectorySummary> listDirectories(Principal principal, String path)
Get a summary of each directory directly under a given path
abstract List<FileSummary> listFiles(Principal principal, String path)
Get a summary of each file directly under a given path.

Public Methods

public abstract FileHistory getFileHistory (Principal principal, String path, String pegRevision)

Get the change history of the given file or directory (history of directory changes may not be supported by all SCMs).

Parameters
principal the principal performing this operation
path the path to the file or directory in question
pegRevision for those SCMs which support it, this is the peg revision to identify which particular version of the file on the path is required.
Returns
  • The file or directory's change history
Throws
NotFoundException when the specified path cannot be found.

public abstract List<DirectorySummary> listDirectories (Principal principal, String path)

Get a summary of each directory directly under a given path

Parameters
principal the principal performing this operation
path the path to the directory whose directories are required
Returns
  • a list of DirectorySummary objects, each being a directory directly at the given path
Throws
NotFoundException when the specified path cannot be found.

public abstract List<FileSummary> listFiles (Principal principal, String path)

Get a summary of each file directly under a given path. If the specified path refers to a file instead of a directory, an empty is returned.

Parameters
principal the principal performing this operation
path the path to the directory whose files are required
Returns
  • a list of FileSummary objects, each being a file directly at the given path (directories excluded)
Throws
NotFoundException when the specified path cannot be found.