com.atlassian.crucible.scm
Interface SCMRepository

All Known Subinterfaces:
HasChangelogBrowser, HasDirectoryBrowser

public interface SCMRepository

A single Crucible plugin-based SCM repository.


Method Summary
 java.lang.String getDescription()
          A user friendly description of this repository
 RevisionKey getDiffRevisionKey(Principal principal, RevisionKey key)
          get the prior revision key, this is the revision this one came from
 java.lang.String getName()
          A unique key for the repository.
 RevisionData getRevisionData(Principal principal, RevisionKey key)
          Return information about a particular revision of a particular path.
 java.lang.String getStateDescription()
          A human readable description of the repository's current state
 boolean isAvailable(Principal principal)
          Is this repository available?
 void streamContents(Principal principal, RevisionKey key, java.io.OutputStream os)
          Stream the content of the revision to the given output stream
 

Method Detail

isAvailable

boolean isAvailable(Principal principal)
Is this repository available?

Parameters:
principal -

getName

java.lang.String getName()
A unique key for the repository. This key must be unique across all SCM plugins, not just over the repositories in a single plugin.

Returns:

getDescription

java.lang.String getDescription()
A user friendly description of this repository

Returns:

getStateDescription

java.lang.String getStateDescription()
A human readable description of the repository's current state

Returns:

getRevisionData

RevisionData getRevisionData(Principal principal,
                             RevisionKey key)
                             throws NotFoundException
Return information about a particular revision of a particular path. TODO: recommendations about what to set: definitely DELETED good: author, commit, date, nice: branch, added, modifed other: lines added, copied, moved

Throws:
NotFoundException

streamContents

void streamContents(Principal principal,
                    RevisionKey key,
                    java.io.OutputStream os)
                    throws java.io.IOException,
                           NotFoundException
Stream the content of the revision to the given output stream

Throws:
java.io.IOException
NotFoundException

getDiffRevisionKey

RevisionKey getDiffRevisionKey(Principal principal,
                               RevisionKey key)
                               throws NotFoundException
get the prior revision key, this is the revision this one came from

Throws:
NotFoundException