com.borland.primetime.teamdev.vcs
Interface VCS


public interface VCS

Every VCS back-end that needs to be integrated in JBuilder has to implement the VCS interface. There are several query methods that are used to expose the capabilities of a VCS. The interface is meant to be simpel and quick to be impelemented but it has to be generic enough to support widely different systems. For example, the method hasProjectHandling() is used to return if the VCS is able to manage multiple files as a single unit, called project. This is capability can be used to do multiple check-ins with one operation, delegating to the VCS the task to discover what files need to be checked-in. This is a much more efficient solution than having to call the VCS for each single file. Nevertheless if somebody writes a back-end for RCS, a file-base VCS, JBuilder will respect this limitation. Note that if the a class that returns false from hasProjectHandling() will still need to implement the project-based version of the checkin() method leaving it empty.


Field Summary
static java.lang.String CATEGORY
           
static java.lang.String PROP_IGNORE
           
 
Method Summary
 DeleteDialogInterface getDeleteDialog()
          Return a custom dialog for deleting/removing a Url from a repository
 java.lang.String getDescription()
          Returns a longer description for the VCS that can be used to describe it
 java.lang.String getName()
          Returns a name that can be used to describe the back-end implementation (i.e.: CVS,PVCS,ClearCase etc.)
 PropertyPage getProjectConfigPage(JBProject project)
          Returns the JPanel used to configure a repository for a particular VCS system.
 java.util.List getProjectStatus(Project project)
          Returns a List of VCSFileinfos describing the status of each node in the VCS.
 java.util.Vector getRevisions(Url url)
          Given a FileNode, it retrieves the revision history for the file.
 byte[] getSource(Url url, RevisionInfo rev)
          Retrieves the source of a file given the revision.
 VCSBrowserContextActionProvider getVCSBrowserContextActionProvider()
          When the VCSProjectBrowser displays the list of files that need VCS actions it needs to know who provides the context actions for the right-click operation of the file list.
 ActionGroup getVCSContextMenuGroup()
          Get the Project Pane's context menu Group specification for this VCS.
 ActionGroup getVCSFileMenuGroup()
          Get the File-based Menu Group specification for this VCS.
 javax.swing.Icon getVCSIcon()
          Return a 20x20 icon for this Version Control System
 ActionGroup getVCSProjectMenuGroup()
          Get the Project-based VCS menu items to appear in the Team menu.
 boolean isBinary(Url fnode)
          Test if the file is flagged as binary by the VCS.
 boolean isUnderVCS(Url url)
          Check if a file is under control of the VCS.
 

Field Detail

CATEGORY

public static final java.lang.String CATEGORY

PROP_IGNORE

public static final java.lang.String PROP_IGNORE
Method Detail

getProjectConfigPage

public PropertyPage getProjectConfigPage(JBProject project)
Returns the JPanel used to configure a repository for a particular VCS system. This is hosted in ui.RepositoryDialog.

isUnderVCS

public boolean isUnderVCS(Url url)
Check if a file is under control of the VCS.
Parameters:
fileNode - The Project node that identyfies the file.

getRevisions

public java.util.Vector getRevisions(Url url)
Given a FileNode, it retrieves the revision history for the file.
Parameters:
url - The Url that points to the file.
See Also:
RevisionInfo, Url

getSource

public byte[] getSource(Url url,
                        RevisionInfo rev)
Retrieves the source of a file given the revision.
Parameters:
fileNode - The FileNode that points to the file.
rev - The RevisionInfo object that identifies the revision to retrieve.
Returns:
A byte array with the "raw" content of the source file. This can be either text or binary content.
See Also:
FileNode, RevisionInfo

getProjectStatus

public java.util.List getProjectStatus(Project project)
Returns a List of VCSFileinfos describing the status of each node in the VCS.
Parameters:
project - The base project used for the search.

getVCSBrowserContextActionProvider

public VCSBrowserContextActionProvider getVCSBrowserContextActionProvider()
When the VCSProjectBrowser displays the list of files that need VCS actions it needs to know who provides the context actions for the right-click operation of the file list. This is of course VCS dependend so the implementor should provide a class that implements the VCSBrowserContextActionProvider interface. If there's no support for the VCSProjectBrowser this method should return null.
See Also:
VCSBrowserContextActionProvider

isBinary

public boolean isBinary(Url fnode)
Test if the file is flagged as binary by the VCS. A binary file usually has no "deltas" under a VCS.

getName

public java.lang.String getName()
Returns a name that can be used to describe the back-end implementation (i.e.: CVS,PVCS,ClearCase etc.)

getDescription

public java.lang.String getDescription()
Returns a longer description for the VCS that can be used to describe it

getVCSIcon

public javax.swing.Icon getVCSIcon()
Return a 20x20 icon for this Version Control System
Returns:
the icon to be associated with this VCS

getVCSProjectMenuGroup

public ActionGroup getVCSProjectMenuGroup()
Get the Project-based VCS menu items to appear in the Team menu.
Returns:
an ordered list of menu items or null should no menu items be desired

getVCSFileMenuGroup

public ActionGroup getVCSFileMenuGroup()
Get the File-based Menu Group specification for this VCS.
Returns:
a File Menu Group decription for this VCS or null if this VCS does not need menu items on the File Menu

getVCSContextMenuGroup

public ActionGroup getVCSContextMenuGroup()
Get the Project Pane's context menu Group specification for this VCS.
Returns:
a Context Menu Group decription for this VCS or null if this VCS does not need menu items in the Project Pane's Context Menu.

getDeleteDialog

public DeleteDialogInterface getDeleteDialog()
Return a custom dialog for deleting/removing a Url from a repository