Skip navigation links

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

E17493-04


oracle.ide.vcs
Class VCSManager

java.lang.Object
  extended by oracle.ide.vcs.VCSManager


public abstract class VCSManager
extends java.lang.Object

The VCSManager is responsible for managing version control system interactions in the IDE.

Since:
10.1.3

Constructor Summary
VCSManager()
           

 

Method Summary
 void addVCSListener(VCSListener listener, URLFilter filter)
          Adds a VCSListener to the VCSManager.
abstract  boolean canCheckOut(java.net.URL url)
          Asks whether the given URL can be checked out through the version control system.
abstract  boolean checkOut(java.net.URL[] urls)
          Executes check outs synchronously, and silently, on the calling thread.
abstract  boolean checkOutNode(Node node)
          Deprecated. replaced by checkOutUsingUI(VCSTask).
abstract  boolean checkOutNode(Node node, CommandProcessor processor)
          Deprecated. replaced by checkOutUsingUI(VCSTask) and getMetaCheckOutCommand(Node) (depending on usage).
abstract  java.util.concurrent.Future<java.lang.Boolean> checkOutUsingUI(VCSTask task)
          Executes check outs asynchronously, with UI, through the given runnable task.
abstract  boolean containsConflicts(java.net.URL url)
          Asks whether the given URL contains diff3-style merge conflicts.
 void deleteRecursively(java.net.URL url)
          Deletes the given URL, recursively processing all directories.
 void deleteRecursively(java.net.URL[] urls, URLFilter filter, boolean tolerant)
          Deletes the given URLs, recursively processing all directories.
 void deleteRecursively(java.net.URL[] urls, URLFilter filter, boolean tolerant, java.util.Collection<java.net.URL> nonDeletedUrls)
          Deletes the given URLs, recursively processing all directories.
 void deleteRecursively(java.net.URL url, URLFilter filter, boolean tolerant)
          Deletes the given URL, recursively processing all directories.
 void deleteRecursively(java.net.URL url, URLFilter filter, boolean tolerant, java.util.Collection<java.net.URL> nonDeletedUrls)
          Deletes the given URL, recursively processing all directories.
 void deregisterWorkspaceArtifact(java.lang.String path)
          Deprecated. not replaced.
protected abstract  boolean executeTaskImpl(VCSTask task)
          Implementation method.
abstract  java.lang.String getCheckOutCommand(Node node)
          Deprecated. replaced by getMetaCheckOutCommand(Node node)
protected  java.util.Collection<NodeFilter> getCheckOutFilters()
           
abstract  Locatable[] getContextLocatables(Context context)
          Gets the valid locatables from the context node selection.
abstract  ContextMenuListener[] getContextMenuListeners()
          Gets the list of context menu listeners currently registered against the the VCSManager.
abstract  MetaClass getMetaCheckOutCommand(Node node)
          Gets the metaclass representation of the command provider for checking out Node instances through the version control system.
protected  java.util.Map getTaskProperties(VCSTask task)
          Implementation method.
protected  java.util.Map<VCSListener,URLFilter> getVCSListeners()
           
static VCSManager getVCSManager()
          Gets the VCSManager instance that is active in the IDE.
abstract  java.lang.String getVersionName(java.net.URL url)
          Gets a name representing the current version of the given URL.
protected  java.util.Collection<java.lang.String> getWorkspaceArtifacts()
           
abstract  boolean isAutoCheckOutEnabled(java.net.URL url)
          Deprecated. not replaced. The test for the automatic check out preference is encapsulated by check out operations.
abstract  boolean isVersioned(java.net.URL url)
          Asks whether the given URL represents a version controlled resource.
abstract  java.io.InputStream openConflictsStreamAsContributor(java.net.URL url)
          Opens an InputStream on the given URL, which contains diff3-style merge conflicts.
 void registerCheckOutFilter(NodeFilter filter)
          Deprecated. replaced by declarative registration through vcs-checkout-filter-hook.
 void registerWorkspaceArtifact(java.lang.String path)
          Deprecated. replaced by declarative registration through vcs-workspace-artifact-hook.
 void removeVCSListener(VCSListener listener)
          Removes a VCSListener from the VCSManager.
abstract  boolean setReadWrite(java.net.URL[] urls)
          Deprecated. replaced by checkOut(URL[]).
static void setVCSManager(VCSManager vcsManager)
          Sets the specified VCSManager as the active instance in the IDE.
abstract  void validateStatus(java.net.URL url)
          Validates the status of the given URL through the version control system.
abstract  void validateStatus(java.net.URL[] urls)
           
abstract  void validateStatus(URLFilter filter)
          Deprecated. replaced by validateStatus(URL[]).

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

VCSManager

public VCSManager()

Method Detail

getVCSManager

public static VCSManager getVCSManager()
Gets the VCSManager instance that is active in the IDE.
Returns:
the VCSManager instance.

setVCSManager

public static void setVCSManager(VCSManager vcsManager)
Sets the specified VCSManager as the active instance in the IDE.
Parameters:
vcsManager - the VCSManager instance.

checkOutUsingUI

public abstract java.util.concurrent.Future<java.lang.Boolean> checkOutUsingUI(VCSTask task)
Executes check outs asynchronously, with UI, through the given runnable task. The task can be monitored for progress during execution. This method may display a UI confirmation and must be called from an AWT event thread to prevent risk of deadlock.

Files will be batch-processed if necessary to ensure the best performance of the operation. Note that there are no preconditions for the URLs passed to this method, which may or may not be read-only, checked in, or version controlled. There is a guaranteed post-condition that, when the result of the operation is true, all given URLs are read/write regardless of whether they have been checked out during the operation.

Parameters:
task - the task to execute.
Returns:
the future result of the executed task.

checkOut

public abstract boolean checkOut(java.net.URL[] urls)
Executes check outs synchronously, and silently, on the calling thread.

Files will be batch-processed if necessary to ensure the best performance of the operation. Note that there are no preconditions for the URLs passed to this method, which may or may not be read-only, checked in, or version controlled. There is a guaranteed post-condition that, when the result of the operation is true, all given URLs are read/write regardless of whether they have been checked out during the operation.

Parameters:
urls - the URLs to check out.
Returns:
a verdict on whether files are read/write following the operation.

isVersioned

public abstract boolean isVersioned(java.net.URL url)
Asks whether the given URL represents a version controlled resource.
Parameters:
url - the URL to test.
Returns:
a verdict on whether the URL is versioned.

isAutoCheckOutEnabled

@Deprecated
public abstract boolean isAutoCheckOutEnabled(java.net.URL url)
Deprecated. not replaced. The test for the automatic check out preference is encapsulated by check out operations.
Asks whether, according to preferences, automatic check out operations may be performed for a given URL.
Parameters:
url - the context URL to check for auto-checkout.
Returns:
a verdict on whether automatic checkouts are enabled.

canCheckOut

public abstract boolean canCheckOut(java.net.URL url)
Asks whether the given URL can be checked out through the version control system.
Parameters:
url - the URL to test.
Returns:
a verdict on whether the URL can be checked out.

setReadWrite

@Deprecated
public abstract boolean setReadWrite(java.net.URL[] urls)
Deprecated. replaced by checkOut(URL[]).
Make the urls read & write through the version control system. On certain version control systems the urls will be checked out.
Parameters:
urls - array of urls to make writable
Returns:
a verdict on whether the write command succeeded for all urls

checkOutNode

@Deprecated
public abstract boolean checkOutNode(Node node)
Deprecated. replaced by checkOutUsingUI(VCSTask).
Check out the given Node through the version control system using the IDE's CommandProcessor. This undoable command may display a UI confirmation if automatic checkouts are not enabled.
Parameters:
node - the Node for the command.
Returns:
a verdict on whether the check out command succeeded.

checkOutNode

@Deprecated
public abstract boolean checkOutNode(Node node,
                                                CommandProcessor processor)
Deprecated. replaced by checkOutUsingUI(VCSTask) and getMetaCheckOutCommand(Node) (depending on usage).
Check out the given Node through the version control system. This command may display a UI confirmation if automatic checkouts are not enabled.
Parameters:
node - the Node for the command.
processor - the command processor, which may be null.
Returns:
a verdict on whether the check out command succeeded.

getCheckOutCommand

@Deprecated
public abstract java.lang.String getCheckOutCommand(Node node)
Deprecated. replaced by getMetaCheckOutCommand(Node node)
Gets the classname of the command provider for checking out Node instances through the version control system.
Parameters:
node - the Node for the command.
Returns:
the command classname.

getMetaCheckOutCommand

public abstract MetaClass getMetaCheckOutCommand(Node node)
Gets the metaclass representation of the command provider for checking out Node instances through the version control system.
Parameters:
node - the Node for the command.
Returns:
the metaclass command classname.

validateStatus

public abstract void validateStatus(java.net.URL url)
Validates the status of the given URL through the version control system.
Parameters:
url - the URL whose status will be validated.

validateStatus

@Deprecated
public abstract void validateStatus(URLFilter filter)
Deprecated. replaced by validateStatus(URL[]).
Validates the status of accepted URLs through the version control system.
Parameters:
filter - a URLFilter to constrain the URLs whose statuses will be validated.

validateStatus

public abstract void validateStatus(java.net.URL[] urls)

addVCSListener

public final void addVCSListener(VCSListener listener,
                                 URLFilter filter)
Adds a VCSListener to the VCSManager.
Parameters:
listener - the VCS listener.
filter - a URLFilter to constrain the URLs for which this listener will receive notification. This is required in order to receive events of type VCSEvent.FILE_MODIFIED.

removeVCSListener

public final void removeVCSListener(VCSListener listener)
Removes a VCSListener from the VCSManager.
Parameters:
listener - the VCS listener.

getVCSListeners

protected final java.util.Map<VCSListener,URLFilter> getVCSListeners()

getVersionName

public abstract 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.

registerWorkspaceArtifact

@Deprecated
public final void registerWorkspaceArtifact(java.lang.String path)
Deprecated. replaced by declarative registration through vcs-workspace-artifact-hook.
Register a path, relative to workspace directories, that locates other versionable artifacts to track.
Parameters:
path - a relative URL path to a file or directory.

deregisterWorkspaceArtifact

@Deprecated
public final void deregisterWorkspaceArtifact(java.lang.String path)
Deprecated. not replaced.
Deregister a path, relative to workspace directories, that locates other versionable artifacts to track.
Parameters:
path - a relative URL path to a file or directory.

getWorkspaceArtifacts

protected final java.util.Collection<java.lang.String> getWorkspaceArtifacts()

registerCheckOutFilter

@Deprecated
public final void registerCheckOutFilter(NodeFilter filter)
Deprecated. replaced by declarative registration through vcs-checkout-filter-hook.
Register a node filter that will preclude automatic checkout behaviors for nodes that are not accepted.
Parameters:
filter - a node filter controlling checkouts.

getCheckOutFilters

protected final java.util.Collection<NodeFilter> getCheckOutFilters()

containsConflicts

public abstract boolean containsConflicts(java.net.URL url)
Asks whether the given URL contains diff3-style merge conflicts. When true the file may be handled in a special way by consumer code, in particular by being accessed through openConflictsStreamAsContributor(java.net.URL). This assists the prevention of parser failures and similar instabilities in the product when dealing with files containing conflicts.
Parameters:
url - the URL.
Returns:
a verdict on whether the URL contains conflicts.

openConflictsStreamAsContributor

public abstract java.io.InputStream openConflictsStreamAsContributor(java.net.URL url)
                                                              throws java.io.IOException
Opens an InputStream on the given URL, which contains diff3-style merge conflicts. The resulting stream is a partial reconstruction of the local contributor to the conflicts file, before the merge. It is the same as the contents of the conflicts file with all blocks from the local file selected, and blocks from the conflicting file ignored.
Parameters:
url - the URL to open.
Returns:
an InputStream on the deconstructed conflicts file.
Throws:
java.io.IOException - if an I/O error occurs while creating the input stream.

getContextMenuListeners

public abstract ContextMenuListener[] getContextMenuListeners()
Gets the list of context menu listeners currently registered against the the VCSManager.
Returns:
the registered context menu listeners for version control.
See Also:
oracle.ide.controller.ContextMenuListener}

getContextLocatables

public abstract Locatable[] getContextLocatables(Context context)
Gets the valid locatables from the context node selection. Composite nodes are expanded by this method.
Parameters:
context - the locatable context.
Returns:
the valid locatable context.

executeTaskImpl

protected abstract boolean executeTaskImpl(VCSTask task)
Implementation method.

getTaskProperties

protected final java.util.Map getTaskProperties(VCSTask task)
Implementation method.

deleteRecursively

public final void deleteRecursively(java.net.URL url)
                             throws java.io.IOException,
                                    java.lang.InterruptedException
Deletes the given URL, recursively processing all directories. This method offers a performance gain over a normal recursive invocation of URLFileSystem.delete(java.net.URL), because measures are taken to reduce queries and interactions with the version control system. This method may be slow to complete and must be called from a non-event thread.
Parameters:
url - the url (regular file or directory resource) to delete.
Throws:
java.io.IOException - if an I/O exception occurred while trying to delete the URL. The exception message will contain details on why the deletion failed.
java.lang.InterruptedException

deleteRecursively

public final void deleteRecursively(java.net.URL url,
                                    URLFilter filter,
                                    boolean tolerant)
                             throws java.io.IOException,
                                    java.lang.InterruptedException
Deletes the given URL, recursively processing all directories. This method offers a performance gain over a normal recursive invocation of URLFileSystem.delete(java.net.URL), because measures are taken to reduce queries and interactions with the version control system. This method may be slow to complete and must be called from a non-event thread.
Parameters:
url - the url (regular file or directory resource) to delete.
filter - a filter to control deletions, accepting files to delete. This value may be null, in which case all files are assumed to be deletable.
tolerant - a decision on whether to tolerate failed deletions.
Throws:
java.io.IOException - if an I/O exception occurred while trying to delete the URL. The exception message will contain details on why the deletion failed.
java.lang.InterruptedException

deleteRecursively

public void deleteRecursively(java.net.URL url,
                              URLFilter filter,
                              boolean tolerant,
                              java.util.Collection<java.net.URL> nonDeletedUrls)
                       throws java.io.IOException,
                              java.lang.InterruptedException
Deletes the given URL, recursively processing all directories. This method offers a performance gain over a normal recursive invocation of URLFileSystem.delete(java.net.URL), because measures are taken to reduce queries and interactions with the version control system. This method may be slow to complete and must be called from a non-event thread.
Parameters:
url - the url (regular file or directory resource) to delete.
filter - a filter to control deletions, accepting files to delete. This value may be null, in which case all files are assumed to be deletable.
tolerant - a decision on whether to tolerate failed deletions.
nonDeletedUrls - Collection in which to place URLs that fail deletion. This value may also be null
Throws:
java.io.IOException - if an I/O exception occurred while trying to delete the URL. The exception message will contain details on why the deletion failed.
java.lang.InterruptedException

deleteRecursively

public final void deleteRecursively(java.net.URL[] urls,
                                    URLFilter filter,
                                    boolean tolerant)
                             throws java.io.IOException,
                                    java.lang.InterruptedException
Deletes the given URLs, recursively processing all directories. This method offers a performance gain over a normal recursive invocation of URLFileSystem.delete(java.net.URL), because measures are taken to reduce queries and interactions with the version control system. The list of URLs is coalesced before the deletions are performed to encourage correct and optimal processing. This method may be slow to complete and must be called from a non-event thread.
Parameters:
urls - the urls (regular files or directory resources) to delete.
filter - a filter to control deletions, accepting files to delete. This value may be null, in which case all files are assumed to be deletable.
tolerant - a decision on whether to tolerate failed deletions.
Throws:
java.io.IOException - if an I/O exception occurred while trying to delete the URL. The exception message will contain details on why the deletion failed.
java.lang.InterruptedException

deleteRecursively

public final void deleteRecursively(java.net.URL[] urls,
                                    URLFilter filter,
                                    boolean tolerant,
                                    java.util.Collection<java.net.URL> nonDeletedUrls)
                             throws java.io.IOException,
                                    java.lang.InterruptedException
Deletes the given URLs, recursively processing all directories. This method offers a performance gain over a normal recursive invocation of URLFileSystem.delete(java.net.URL), because measures are taken to reduce queries and interactions with the version control system. The list of URLs is coalesced before the deletions are performed to encourage correct and optimal processing. This method may be slow to complete and must be called from a non-event thread.
Parameters:
urls - the urls (regular files or directory resources) to delete.
filter - a filter to control deletions, accepting files to delete. This value may be null, in which case all files are assumed to be deletable.
tolerant - a decision on whether to tolerate failed deletions.
nonDeletedUrls - Collection in which to place URLs that fail deletion. This value may also be null
Throws:
java.io.IOException - if an I/O exception occurred while trying to delete the URL. The exception message will contain details on why the deletion failed.
java.lang.InterruptedException

Skip navigation links

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

E17493-04


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