org.openengsb.domain.scm
Interface ScmDomain

All Superinterfaces:
Domain, OpenEngSBService

public interface ScmDomain
extends Domain

ScmDomain is an abstraction for working with SCM tools.


Method Summary
 void add(File file)
          Adds new working file to index.
 void add(File directory, boolean recursive)
          Adds new working directory to index.
 void checkout(String repository, CommitRef version, File directory, boolean recursive)
          Checkout version of repository path to specified working directory.
 void checkout(String path, File directory, boolean recursive)
          Checkout HEAD version of repository path to specified working directory.
 CommitRef commit(File file, String comment)
          Commit changes of working file to repository.
 CommitRef commit(File directory, String comment, boolean recursive)
          Commit working directory changes to repository.
 boolean exists(String file)
          Check if HEAD revision of a file exists in repository.
 boolean exists(String file, CommitRef version)
          Check if given version of a file exists in repository.
 void export(File directory)
          Exports the current head of the repository to the specified directory.
 boolean poll()
          Polls the represented repository for updates.
 
Methods inherited from interface org.openengsb.core.common.Domain
getAliveState
 
Methods inherited from interface org.openengsb.core.common.OpenEngSBService
getInstanceId
 

Method Detail

poll

boolean poll()
Polls the represented repository for updates. Returns true if there have been changes since the last poll.


export

void export(File directory)
Exports the current head of the repository to the specified directory.

Parameters:
directory - if the directory is non-existent, it'll be created. if the directory already exists it must not contain any files.

exists

boolean exists(String file)
Check if HEAD revision of a file exists in repository.

Parameters:
file - relative repository path to file
Returns:
true if item exists in repository, otherwise false

exists

boolean exists(String file,
               CommitRef version)
Check if given version of a file exists in repository.

Parameters:
file - relative repository path to file
version - file version
Returns:
true if file exists in repository, otherwise false

add

void add(File file)
Adds new working file to index.

Throws:
{@link - ScmException} if working file does not exist or is not accessible.

add

void add(File directory,
         boolean recursive)
Adds new working directory to index.

Throws:
{@link - ScmException} if working directory does not exist or is not accessible.

commit

CommitRef commit(File file,
                 String comment)
Commit changes of working file to repository.

Returns:
version number, see CommitRef
Throws:
{@link - ScmException} if working file does not exist or is not accessible.

commit

CommitRef commit(File directory,
                 String comment,
                 boolean recursive)
Commit working directory changes to repository.

Returns:
version number, see CommitRef
Throws:
{@link - ScmException} if working directory does not exist or is not accessible.

checkout

void checkout(String repository,
              CommitRef version,
              File directory,
              boolean recursive)
Checkout version of repository path to specified working directory. To checkout folder with all its children set the recursive flag.

Throws:
{@link - ScmException} if working directory is not accessible or can not be created.

checkout

void checkout(String path,
              File directory,
              boolean recursive)
Checkout HEAD version of repository path to specified working directory. To checkout folder with all its children set the recursive flag.

Throws:
{@link - ScmException} if working directory is not accessible or can not be created.


Copyright © 2009-2011. All Rights Reserved.