# com.bea.ide.sourcecontrol
ISCMDriver Interface

public interface ISCMDriver

Concrete implementation of an SCM service. SourceControlSvc uses this interface to perform SCM actions and gather information about this SCM service.

## Method Summary

`public boolean` | `canPerform`(int actionType, `URI`[] paths) Checks to see if the operation defined by actionType can be performed on the files in the paths array.
`public `IActionProxy`[]` | `getActions`() Provides a set of actions for a given URI.
`public `Integer`` | `getMnemonicKey`() The keystroke to use as the mnemonic key in the Tools menu.
`public `String`` | `getName`() Human-readable name for this SCM service.
`public `SCMPropertyPanel`` | `getSCMPropertyPanel`() SCMPrefs are displayed in the Preferences panel in either the workspace or the project properties.
`public boolean` | `perform`(int actionType, `URI`[] paths) Perform the action defined by actionType on all the paths.
`public boolean` | `performDialog`(int actionType, `URI`[] paths) Same as perform except that the implementation is allowed to show dialogs.
`public void` | `setPreferences`(`Preferences` prefs) Preferences are set by SCMServices (the concrete, user-visible SourceControlSvc implementation) when appropriate, so that the strategy does not have to determine whether or not it should use project preferences or workspace preferences.

## Method Detail

### canPerform(int, URI[]) Method

    public boolean canPerform(int actionType,
                              URI[] paths)

Checks to see if the operation defined by actionType can be performed on the files in the paths array.

#### Parameters

actionType
  See SourceControlSvc for a list of actionTypes

paths
  URIs to check if the action can be performed.

#### Returns

true if the action can be performed on all the paths.

### getActions() Method

    public IActionProxy[] getActions()

Provides a set of actions for a given URI. These are specific to the SCM's gestalt. For instance, the CVS driver will have actions like "update" and "commit", while the Perforce driver will have actions like "sync" and "submit".

### getMnemonicKey() Method

    public Integer getMnemonicKey()

The keystroke to use as the mnemonic key in the Tools menu.

#### Returns

a keystroke value from KeyEvent.

### getName() Method

    public String getName()

Human-readable name for this SCM service. For instance, "Perforce" or "CVS".

### getSCMPropertyPanel() Method

    public SCMPropertyPanel getSCMPropertyPanel()

SCMPrefs are displayed in the Preferences panel in either the workspace or the project properties.

### perform(int, URI[]) Method

    public boolean perform(int actionType,
                           URI[] paths)

Perform the action defined by actionType on all the paths. This call is preceded with a call to canPerform, usually. Return true if the action was successful. Note that the implementation is not allowed to show dialogs during this call.

#### Parameters

actionType
  See SourceControlSvc for a list of actionTypes

paths
  URIs to perform the action on.

#### Returns

true if successful for all URIs.

### performDialog(int, URI[]) Method

    public boolean performDialog(int actionType,
                                 URI[] paths)

Same as perform except that the implementation is allowed to show dialogs.

Related Topics

``ISCMDriver.perform(int, URI[])``

### setPreferences(Preferences) Method

    public void setPreferences(Preferences prefs)

Preferences are set by SCMServices (the concrete, user-visible SourceControlSvc implementation) when appropriate, so that the strategy does not have to determine whether or not it should use project preferences or workspace preferences. The strategy can assume that the preferences it maintains from this call are kept up-to-date.