com.togethersoft.openapi.vcs
Class DefaultVcsProvider


public class DefaultVcsProvider
implements VcsProvider, VcsProviderConstants

A default implementation of VcsProvider which defines basic functinality of the provider. The implementation may inherit from this class to reuse this functionality.

Author:
TogetherSoft

Method Summary
 voidchangeWorkingDirectory(File workingDirectory)
           Changes the value of internal current working directory field.
 voidendSession()
           Clears all internal fields.
 intexecAddFiles(String[] files, int[] fileTypes, String comment, boolean makeCheckedOut, boolean removeLocal)
           Throws CapabilityException.
 intexecCheckInFiles(String[] files, String comment, boolean keepCheckedOut, boolean removeLocal, boolean wholeProject, boolean projectRecursively)
           Throws CapabilityException.
 intexecCheckOutFiles(String[] files, String comment, boolean wholeProject, boolean projectRecursively)
           Throws CapabilityException.
 intexecGetFiles(String[] files, boolean wholeProject, boolean projectRecursively)
           Throws CapabilityException.
 intexecGetFilesStatuses(String[] files, int[] statuses)
           Throws CapabilityException.
 intexecGetMissingFiles(Vector files)
           Throws CapabilityException.
 intexecGetRawFileDiff(String fileName, boolean ignoreCase, boolean ignoreSpace, StringBuffer diff)
           Throws CapabilityException.
 intexecLockFiles(String[] files, boolean wholeProject, boolean projectRecursively)
           Throws CapabilityException.
 intexecRemoveFiles(String[] files, String comment, boolean removeLocal)
           Throws CapabilityException.
 intexecRenameFile(String fileName, String newFileName)
           Throws CapabilityException.
 intexecSelectProject(String defaultProject, File workingDir, boolean createNewProject, StringBuffer selectedProject)
           Throws CapabilityException.
 intexecSetFilesLabel(String[] files, String label, boolean wholeProject, boolean projectRecursively)
           Throws CapabilityException.
 intexecShowAdvancedOptions(String command, boolean project)
           Throws CapabilityException.
 intexecShowFileDiff(String fileName, boolean ignoreCase, boolean ignoreSpace)
           Throws CapabilityException.
 intexecShowFileProperties(String fileName)
           Throws CapabilityException.
 intexecShowFilesHistory(String[] files, boolean wholeProject, boolean projectRecursively)
           Throws CapabilityException.
 intexecUnCheckOutFiles(String[] files, boolean removeLocal, boolean wholeProject, boolean projectRecursively)
           Throws CapabilityException.
 intexecUnLockFiles(String[] files, boolean wholeProject, boolean projectRecursively)
           Throws CapabilityException.
 intexecUpdateFiles(String[] files, boolean wholeProject, boolean projectRecursively)
           Throws CapabilityException.
 voidfree()
           Clears all internal fields.
 StringgetCurrentProject()
           Returns root project + path from root working directory to current working directory.
 FilegetCurrentWorkingDirectory()
           Returns value of internal current project field.
 intgetFileStatus(String filename)
           Returns FILE_STATUS_NONE.
 StringgetID()
           Returns "DEFAULT" as provider ID.
 StringgetRootProject()
           Returns value of internal root project field.
 FilegetRootWorkingDirectory()
           Returns value of internal root working directory field.
 booleanisSessionStarted()
           Returns true if both internal root project and working directories are not null.
 booleanisValid()
           Always returns false.
 voidstartSession(String rootProject, File rootWorkingDir)
           Initializes internal root project and working directory values.

Method Detail

changeWorkingDirectory

public void changeWorkingDirectory(File workingDirectory)
throws VcsProviderException
Changes the value of internal current working directory field.

endSession

public void endSession()
throws VcsProviderException
Clears all internal fields.

execAddFiles

public int execAddFiles(String[] files, int[] fileTypes, String comment, boolean makeCheckedOut, boolean removeLocal)
throws VcsProviderException
Throws CapabilityException. This method should be overridden by subclass if the command is supported.

execCheckInFiles

public int execCheckInFiles(String[] files, String comment, boolean keepCheckedOut, boolean removeLocal, boolean wholeProject, boolean projectRecursively)
throws VcsProviderException
Throws CapabilityException. This method should be overridden by subclass if the command is supported.

execCheckOutFiles

public int execCheckOutFiles(String[] files, String comment, boolean wholeProject, boolean projectRecursively)
throws VcsProviderException
Throws CapabilityException. This method should be overridden by subclass if the command is supported.

execGetFiles

public int execGetFiles(String[] files, boolean wholeProject, boolean projectRecursively)
throws VcsProviderException
Throws CapabilityException. This method should be overridden by subclass if the command is supported.

execGetFilesStatuses

public int execGetFilesStatuses(String[] files, int[] statuses)
throws VcsProviderException
Throws CapabilityException. This method should be overridden by subclass if the command is supported.

execGetMissingFiles

public int execGetMissingFiles(Vector files)
throws VcsProviderException
Throws CapabilityException. This method should be overridden by subclass if the command is supported.

execGetRawFileDiff

public int execGetRawFileDiff(String fileName, boolean ignoreCase, boolean ignoreSpace, StringBuffer diff)
throws VcsProviderException
Throws CapabilityException. This method should be overridden by subclass if the command is supported.

execLockFiles

public int execLockFiles(String[] files, boolean wholeProject, boolean projectRecursively)
throws VcsProviderException
Throws CapabilityException. This method should be overridden by subclass if the command is supported.

execRemoveFiles

public int execRemoveFiles(String[] files, String comment, boolean removeLocal)
throws VcsProviderException
Throws CapabilityException. This method should be overridden by subclass if the command is supported.

execRenameFile

public int execRenameFile(String fileName, String newFileName)
throws VcsProviderException
Throws CapabilityException. This method should be overridden by subclass if the command is supported.

execSelectProject

public int execSelectProject(String defaultProject, File workingDir, boolean createNewProject, StringBuffer selectedProject)
throws VcsProviderException
Throws CapabilityException. This method should be overridden by subclass if the command is supported.

execSetFilesLabel

public int execSetFilesLabel(String[] files, String label, boolean wholeProject, boolean projectRecursively)
throws VcsProviderException
Throws CapabilityException. This method should be overridden by subclass if the command is supported.

execShowAdvancedOptions

public int execShowAdvancedOptions(String command, boolean project)
throws VcsProviderException
Throws CapabilityException. This method should be overridden by subclass if the command is supported.

execShowFileDiff

public int execShowFileDiff(String fileName, boolean ignoreCase, boolean ignoreSpace)
throws VcsProviderException
Throws CapabilityException. This method should be overridden by subclass if the command is supported.

execShowFileProperties

public int execShowFileProperties(String fileName)
throws VcsProviderException
Throws CapabilityException. This method should be overridden by subclass if the command is supported.

execShowFilesHistory

public int execShowFilesHistory(String[] files, boolean wholeProject, boolean projectRecursively)
throws VcsProviderException
Throws CapabilityException. This method should be overridden by subclass if the command is supported.

execUnCheckOutFiles

public int execUnCheckOutFiles(String[] files, boolean removeLocal, boolean wholeProject, boolean projectRecursively)
throws VcsProviderException
Throws CapabilityException. This method should be overridden by subclass if the command is supported.

execUnLockFiles

public int execUnLockFiles(String[] files, boolean wholeProject, boolean projectRecursively)
throws VcsProviderException
Throws CapabilityException. This method should be overridden by subclass if the command is supported.

execUpdateFiles

public int execUpdateFiles(String[] files, boolean wholeProject, boolean projectRecursively)
throws VcsProviderException
Throws CapabilityException. This method should be overridden by subclass if the command is supported.

free

public void free()
Clears all internal fields.

getCurrentProject

public String getCurrentProject()
Returns root project + path from root working directory to current working directory. All delimiters guaranteed to be "/". This method may be overridden to get correct project.

getCurrentWorkingDirectory

public File getCurrentWorkingDirectory()
Returns value of internal current project field.

getFileStatus

public int getFileStatus(String filename)
throws VcsProviderException
Returns FILE_STATUS_NONE.

getID

public String getID()
Returns "DEFAULT" as provider ID. Should be overridden by subclass.

getRootProject

public String getRootProject()
Returns value of internal root project field.

getRootWorkingDirectory

public File getRootWorkingDirectory()
Returns value of internal root working directory field.

isSessionStarted

public boolean isSessionStarted()
Returns true if both internal root project and working directories are not null.

isValid

public boolean isValid()
Always returns false.

startSession

public void startSession(String rootProject, File rootWorkingDir)
Initializes internal root project and working directory values. Current working directory set to root. None of parameters can be null.
throw IllegalArgumentException if any of parameters is null.

Association Links

to Class java.io.File

to Class java.io.File

to Class java.lang.String