OpenAPI 1.0

com.aquafold.openapi.vcs
Interface AQWorkspace


public interface AQWorkspace

This interface is designed to provide common functionality for a version control workspace.


Method Summary
 void addVC(Object files)
          This method adds a file or a folder in the local workspace and marks it for addition.
 void commit(Object files, String comment)
          This method commits specified file or files, adding unversioned files if necessary.
 void deleteVC(Object files)
          This method deletes a file or a folder in the local workspace and marks it for deletion.
 AQRevision[] getHistory(String filename)
          Returns the file's complete revision history.
 AQRevision[] getHistory(String filename, String startRevision, String endRevision)
          Returns the change set between two revisions.
 String getProvider()
          Returns provider type string.
 AQRevision getRevision(String filename)
          Returns the file revision.
 byte[] getRevisionContents(String filename, Object revision)
          Returns the binary contents of the specified revision.
 String getRevisionContentsAsString(String filename, Object revision, String encoding)
          Returns the contents of the specified revision as text string.
 boolean isVerbose()
          Returns the current verbose flag.
 void setPassword(Object password)
          Sets the password for subsequent operations.
 void setUsername(Object username)
          Sets the user name for subsequent operations.
 void setVerbose(boolean verbose)
          Defines whether the output of version control operations (update, commit) will be displayed in the AquaScript console.
 void update(Object files)
          This method updates a file or a folder to the HEAD revision.
 void update(Object files, String revision)
          This method updates selected file(s) to the specified revision, recursively.
 

Method Detail

setUsername

void setUsername(Object username)
Sets the user name for subsequent operations.

Parameters:
username - A String or a AQOpaqueObject containing the user name.

setPassword

void setPassword(Object password)
Sets the password for subsequent operations.

Parameters:
password - A String password or a AQOpaqueObject containing the password.

getProvider

String getProvider()
Returns provider type string.


setVerbose

void setVerbose(boolean verbose)
Defines whether the output of version control operations (update, commit) will be displayed in the AquaScript console. Default value = true.

Parameters:
verbose -

isVerbose

boolean isVerbose()
Returns the current verbose flag.


commit

void commit(Object files,
            String comment)
            throws Exception
This method commits specified file or files, adding unversioned files if necessary.

Parameters:
files - A single file name (String), a single File, a list of files in the form of AQFileSet, or an array of filenames.
comment - Commit comment.
Throws:
Exception

update

void update(Object files)
            throws Exception
This method updates a file or a folder to the HEAD revision. If the specified path is a folder, this method updates the workspace recursively.

Parameters:
files - A single file name (String), a single File, a list of files in the form of AQFileSet, or an array of filenames.
Throws:
Exception

update

void update(Object files,
            String revision)
            throws Exception
This method updates selected file(s) to the specified revision, recursively. If the specified path is a folder, this method updates the workspace recursively.

Parameters:
files - A single file name (String), a single File, a list of files in the form of AQFileSet, or an array of filenames.
Throws:
Exception

deleteVC

void deleteVC(Object files)
              throws Exception
This method deletes a file or a folder in the local workspace and marks it for deletion. If the specified path is a folder, this method deletes the workspace folder recursively.

Parameters:
files - A single file name (String), a single File, a list of files in the form of AQFileSet, or an array of filenames.
Throws:
Exception

addVC

void addVC(Object files)
           throws Exception
This method adds a file or a folder in the local workspace and marks it for addition. If the specified path is a folder, this method adds the workspace folder recursively.

Parameters:
files - A single file name (String), a single File, a list of files in the form of AQFileSet, or an array of filenames.
Throws:
Exception

getRevision

AQRevision getRevision(String filename)
                       throws Exception
Returns the file revision. This light-weight method does not typically provide additional information such as comments or affected paths. Please use getHistory(String, String, String) method when more detailed information is needed.

Parameters:
filename - Workspace file name.
Throws:
Exception

getHistory

AQRevision[] getHistory(String filename)
                        throws Exception
Returns the file's complete revision history. Currently, CVS does not support this operation if invoked on a folder.

Parameters:
filename - Workspace file name.
Throws:
Exception

getHistory

AQRevision[] getHistory(String filename,
                        String startRevision,
                        String endRevision)
                        throws Exception
Returns the change set between two revisions. This is a more detailed variant of getHistory(String) where individual revision objects may contain additional information provided by the version control system, such as comments or affected paths.

Parameters:
filename - Workspace file name.
startRevision - Start revision number or tag.
endRevision - End revision number or tag.
Throws:
Exception

getRevisionContents

byte[] getRevisionContents(String filename,
                           Object revision)
                           throws Exception
Returns the binary contents of the specified revision.

Parameters:
filename - Workspace file name.
revision - Revision string, an AQRevision object, or null for HEAD revision.
Throws:
Exception

getRevisionContentsAsString

String getRevisionContentsAsString(String filename,
                                   Object revision,
                                   String encoding)
                                   throws Exception
Returns the contents of the specified revision as text string.

Parameters:
filename - Workspace file name.
revision - Revision string, an AQRevision object, or null for HEAD revision.
encoding - Character encoding
Throws:
Exception

OpenAPI 1.0


Copyright © 2010 AquaFold, Inc. All Rights Reserved. Use is subject to license terms.