Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.5.0)

E13403-06


oracle.jdeveloper.vcs.spi
Class VCSExtension

java.lang.Object
  extended by oracle.jdeveloper.vcs.spi.VCSExtension

All Implemented Interfaces:
Addin, ShutdownHook, VCS

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

Abstract superclass for a version control system extension.

Since:
9.0.5

Constructor Summary
VCSExtension()
           

 

Method Summary
 void activate()
          Activates the feature.
 boolean canActivate()
          Asks whether the feature can be activated.
 boolean canCheckOut(java.net.URL url)
          Asks whether the given URL can be checked out through the version control system.
 boolean canDeactivate()
          Deprecated. not replaced; VCS extensions operate simultaneously and deactivation is never performed.
 boolean canShutdown()
          Called on shutdown hooks in the order they were registered prior to shutting down the IDE.
 void deactivate()
          Deprecated. not replaced; VCS extensions operate simultaneously and deactivation is never performed.
 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.
 VCSPropertyDescriptor getPropertyDescriptor()
          Gets a common property descriptor object for the VCS.
 VCSStatus[] getStatus(java.net.URL[] urls)
          Gets version control statuses for the given URLs.
 VCSStatusCache getStatusCache()
          Gets the status cache for the VCS extension.
 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()
          Invoked by the AddinManager after the instance of the Addin is instantiated.
 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

public VCSExtension()

Method Detail

getId

public 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

public VCSStatusCache getStatusCache()
Gets the status cache for the VCS extension. By default, returns null.
Returns:
the extension's status cache. (null-capable)

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)

getPropertyDescriptor

public VCSPropertyDescriptor getPropertyDescriptor()
Gets a common property descriptor object for the VCS. By default, returns null.
Returns:
the descriptor for common properties. (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.

canActivate

public boolean canActivate()
Asks whether the feature can be activated. By default, returns true.
Returns:
a verdict on feature activation.

activate

public void activate()
Activates the feature.

canDeactivate

@Deprecated
public final boolean canDeactivate()
Deprecated. not replaced; VCS extensions operate simultaneously and deactivation is never performed.
Asks whether the feature can be deactivated. By default, returns true.
Returns:
a verdict on feature deactivation.

deactivate

@Deprecated
public final void deactivate()
Deprecated. not replaced; VCS extensions operate simultaneously and deactivation is never performed.
Deactivates the feature.

initialize

public void initialize()
Invoked by the AddinManager after the instance of the Addin is instantiated. When invoked, The Addin should register and menu items, and actions required for use during this classes lifecycle. Addin authors should take care to ensure that any extraneous initialization is not preformed on this method, and any startup code that can be delayed until a later time is delayed, as the Addin's are synchronously initialized during the startup of the IDE, and each Addin has the potential to negatively impact the startup time of the product.
Specified by:
initialize in interface Addin
See Also:
AddinManager

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

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.5.0)

E13403-06


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