Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.0.0)

E17493-01

oracle.jdeveloper.vcs.spi
Class VCSExtension

java.lang.Object
  extended by oracle.jdeveloper.vcs.spi.VCSExtension
All Implemented Interfaces:
ShutdownHook, VCS
Direct Known Subclasses:
VCSProfile

public abstract class VCSExtension
extends java.lang.Object
implements VCS, ShutdownHook

Abstract superclass for a version control system extension.

Since:
9.0.5

Constructor Summary
protected VCSExtension(java.lang.String id)
           
 
Method Summary
 boolean canCheckOut(java.net.URL url)
          Asks whether the given URL can be checked out through the version control system.
 boolean canShutdown()
          Called on shutdown hooks in the order they were registered prior to shutting down the IDE.
 java.lang.String getCheckOutCommand()
          Gets the 'check out Node' command provider classname for the VCS.
 int getControlPrecedence()
          Gets a value for the precedence of the extension in the control order for any given URL.
 VCSExceptionHandler getExceptionHandler()
          Get the exception handler used to report errors for the VCS.
 VCSHistoryProvider getHistoryProvider()
          Gets the provider for the version history associated with a file.
 java.lang.String getId()
          Gets the identifying string used to uniquely represent the version control system implementation
 VCSExtensionInformation getInformation()
          Gets displayable information used to represent the VCS extension in the user interface.
 oracle.jdeveloper.vcs.cache.StatusCache<VCSStatus> getPolicyStatusCache()
          Gets the policy status cache for the VCS extension.
 VCSStatus[] getStatus(java.net.URL[] urls)
          Gets version control statuses for the given URLs.
 VCSStatusCache getStatusCache()
          Deprecated. replaced by getStatusCacheBridge() and getPolicyStatusCache().
 oracle.jdeveloper.vcs.cache.StatusCacheBridge<VCSStatus> getStatusCacheBridge()
           
 URLFilter getURLFilter()
          Gets a URLFilter for the type of files this VCS extension handles.
 java.lang.String getVersionName(java.net.URL url)
          Gets a name representing the current version of the given URL.
 void initialize()
           
 void initializeEx()
           
protected abstract  void initializeImpl()
           
 boolean isConflictsStatus(java.net.URL url)
          Asks whether the given status indicates that diff3-style merge conflicts are present in the file.
 boolean isConflictsStatus(VCSStatus status)
          Asks whether the given status indicates that diff3-style merge conflicts are present in the file.
abstract  boolean isControlled(java.net.URL url)
          Asks whether the given URL is controlled by the version control client.
 boolean setReadWrite(java.net.URL url)
          Deprecated. replaced by setReadWrite(URL[],VCSProgress).
 boolean setReadWrite(java.net.URL[] urls)
          Deprecated. replaced by setReadWrite(URL[],VCSProgress).
 boolean setReadWrite(java.net.URL[] urls, VCSProgress progress)
          Sets the attributes of the given URLs to read/write through an appropriate VCS operation.
 void shutdown()
          Called on all shutdown hooks in the order they were registered when the IDE is terminating.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VCSExtension

protected VCSExtension(java.lang.String id)
Method Detail

getId

public final java.lang.String getId()
Gets the identifying string used to uniquely represent the version control system implementation

Specified by:
getId in interface VCS
Returns:
the vcs' id.

isControlled

public abstract boolean isControlled(java.net.URL url)
Asks whether the given URL is controlled by the version control client.

Parameters:
url - the URL.
Returns:
a verdict on whether the URL is controlled.

getControlPrecedence

public int getControlPrecedence()
Gets a value for the precedence of the extension in the control order for any given URL. By default, returns 2. Override this method to return a higher number (in order to reduce the precedence) where you wish the framework to recognize URLs as being controlled by other VCS extensions before this one. The technique of reducing precedence is also useful for relatively slow implementations of isControlled(URL), so as to minimize impact on the overall performance of control evaluation.

Returns:
a precendence value for the control order.

getStatus

public final VCSStatus[] getStatus(java.net.URL[] urls)
                            throws java.lang.Exception
Gets version control statuses for the given URLs. This method may be called concurrently from different threads.

Parameters:
urls - an array of URLs for the status query.
Returns:
the resulting array of statuses, corresponding by index.
Throws:
java.lang.Exception - if a critical exception occurred.

getExceptionHandler

public VCSExceptionHandler getExceptionHandler()
Get the exception handler used to report errors for the VCS. By default, a VCSExceptionHandler instance is created and returned.

Returns:
the exception handler.

getStatusCache

@Deprecated
public VCSStatusCache getStatusCache()
Deprecated. replaced by getStatusCacheBridge() and getPolicyStatusCache().

Gets the status cache for the VCS extension. By default, returns null.

Returns:
the extension's status cache. (null-capable)

getPolicyStatusCache

public oracle.jdeveloper.vcs.cache.StatusCache<VCSStatus> getPolicyStatusCache()
Gets the policy status cache for the VCS extension. By default, returns null.

Returns:
the extension's status cache. (null-capable)

getStatusCacheBridge

public oracle.jdeveloper.vcs.cache.StatusCacheBridge<VCSStatus> getStatusCacheBridge()

getURLFilter

public URLFilter getURLFilter()
Gets a URLFilter for the type of files this VCS extension handles. By default, returns null.

Returns:
a filter which returns only those URLs that can be handled by this extension. (null-capable)

getInformation

public VCSExtensionInformation getInformation()
Gets displayable information used to represent the VCS extension in the user interface. By default, a VCSExtensionInformation is created and returned based on the extension's classname.

Returns:
the displayable information.

getHistoryProvider

public VCSHistoryProvider getHistoryProvider()
Gets the provider for the version history associated with a file. By default, returns null.

Returns:
the history provider. (null-capable)

canCheckOut

public boolean canCheckOut(java.net.URL url)
                    throws java.lang.Exception
Asks whether the given URL can be checked out through the version control system. By default, returns true if the file is both read-only and versioned.

Parameters:
url - the URL to test.
Returns:
a verdict on whether the URL can be checked out.
Throws:
java.lang.Exception

setReadWrite

@Deprecated
public boolean setReadWrite(java.net.URL url)
                     throws java.lang.Exception
Deprecated. replaced by setReadWrite(URL[],VCSProgress).

Sets the attributes of the given URL to read/write through an appropriate VCS operation. By default, throws an UnsupportedOperationException. URL is already read/write.

Parameters:
url - the URL to set read/write.
Returns:
true if the URL was successfully set read/write.
Throws:
java.lang.Exception - if a critical exception occurred.

setReadWrite

@Deprecated
public boolean setReadWrite(java.net.URL[] urls)
                     throws java.lang.Exception
Deprecated. replaced by setReadWrite(URL[],VCSProgress).

Sets the attributes of the given URLs to read/write through an appropriate VCS operation. By default, throws an UnsupportedOperationException.

Parameters:
urls - the URLs to set read/write.
Returns:
true if the URLs was successfully set read/write.
Throws:
java.lang.Exception - if a critical exception occurred.

setReadWrite

public boolean setReadWrite(java.net.URL[] urls,
                            VCSProgress progress)
                     throws java.lang.Exception
Sets the attributes of the given URLs to read/write through an appropriate VCS operation. By default, calls setReadWrite(URL[]).

Parameters:
urls - the URLs to set read/write.
progress - an object representing the progress of the wider operation. The progress value associated with this object should be incremented by 1 per processed URL.
Returns:
true if the URLs was successfully set read/write.
Throws:
java.lang.Exception - if a critical exception occurred.

getCheckOutCommand

public java.lang.String getCheckOutCommand()
Gets the 'check out Node' command provider classname for the VCS. By default, returns null. The provider class is usually of type VCSCheckOutNodeCmd, but this is not a requirement.

Returns:
the classname of the check out command. (null-capable)

getVersionName

public java.lang.String getVersionName(java.net.URL url)
Gets a name representing the current version of the given URL.

Returns:
the version name of the URL.

isConflictsStatus

public boolean isConflictsStatus(VCSStatus status)
Asks whether the given status indicates that diff3-style merge conflicts are present in the file. Where true, the file may be deconstructed before being processed by the IDE. This prevents parser failures and similar instabilities in the product when dealing with files containing conflicts.

Parameters:
status - the status.
Returns:
a verdict on whether the status represents conflicts.
Throws:
java.lang.Exception - if a critical exception occurred.

isConflictsStatus

public boolean isConflictsStatus(java.net.URL url)
Asks whether the given status indicates that diff3-style merge conflicts are present in the file. Where true, the file may be deconstructed before being processed by the IDE. This prevents parser failures and similar instabilities in the product when dealing with files containing conflicts.

Parameters:
url - the url.
Returns:
a verdict on whether the status represents conflicts.
Throws:
java.lang.Exception - if a critical exception occurred.

initialize

public final void initialize()

initializeEx

public final void initializeEx()

initializeImpl

protected abstract void initializeImpl()

canShutdown

public boolean canShutdown()
Called on shutdown hooks in the order they were registered prior to shutting down the IDE. If any hook returns false, the shutdown sequence will be aborted and no further hooks will be queried.

Specified by:
canShutdown in interface ShutdownHook
Returns:
true if shutdown can proceed, false to abort shutdown.

shutdown

public void shutdown()
Called on all shutdown hooks in the order they were registered when the IDE is terminating. The IDE will quit when this method is called, therefore it is unnecessary to perform deregistration tasks that do not have an external effect. For example, it is unnecessary to deregister menu items, but it might be necessary to close a network connection or save a file.

Specified by:
shutdown in interface ShutdownHook

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.0.0)

E17493-01

Copyright © 1997, 2011, Oracle. All rights reserved.