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

E17493-02

oracle.jdeveloper.vcs.util
Class VCSCommandUtils

java.lang.Object
  extended by oracle.jdeveloper.vcs.util.VCSCommandUtils

public class VCSCommandUtils
extends java.lang.Object

Utility class for version control client commands.

Since:
9.0.5

Method Summary
static void closeMissingNodes(Node[] nodes)
          Deprecated. replaced with VCSCommand.fireSomeFilesDeleted(java.net.URL[]) and VCSFileEventSender.fireFilesDeleted(java.net.URL[]).
static java.util.Collection<Locatable> getCandidateSelection(Locatable[] locatables, oracle.jdeveloper.vcs.cache.StatusCacheBridge<VCSStatus> cache)
          Gets the locatable selection whose files are candidates to be added.
static java.util.Collection<Locatable> getFilteredSelection(Locatable[] locatables, oracle.jdeveloper.vcs.cache.StatusCacheBridge<VCSStatus> cache, VCSStatus[] statuses)
          Gets the locatable selection, filtered for the given file statuses.
static java.util.Collection<Locatable> getFilteredSelection(Locatable[] locatables, oracle.jdeveloper.vcs.cache.StatusCacheBridge<VCSStatus> cache, VCSStatusFilter filter)
          Gets the locatable selection, filtered for the given file statuses.
static java.util.Collection<Locatable> getVersionedSelection(Locatable[] locatables, oracle.jdeveloper.vcs.cache.StatusCacheBridge<VCSStatus> cache)
          Gets the locatable selection whose files are versioned.
static void removeNonEditableNodes(java.util.Collection<?> nodes)
          Removes all non-editable nodes from the given collection.
static boolean saveDirtyNodes(Locatable[] locatables)
          Saves all of the given locatables which are dirty.
static boolean saveDirtyNodes(Locatable[] locatables, boolean silent, java.lang.String helpTopicId)
          Deprecated. replaced with #saveDirtyNodes(Locatable[]), which handles a 'Skip this Message Next Time' preference.
static boolean saveDirtyNodesSilently(Locatable[] locatables)
          Saves all of the given locatables which are dirty, without displaying a dialog.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getFilteredSelection

public static final java.util.Collection<Locatable> getFilteredSelection(Locatable[] locatables,
                                                                         oracle.jdeveloper.vcs.cache.StatusCacheBridge<VCSStatus> cache,
                                                                         VCSStatus[] statuses)
                                                                  throws java.lang.Exception
Gets the locatable selection, filtered for the given file statuses.

Parameters:
locatables - the locatable selection.
cache - the status cache to use.
statuses - the statuses to accept.
Returns:
the selection of locatables filtered by state.
Throws:
java.lang.Exception - if a critical exception occurred.

getFilteredSelection

public static final java.util.Collection<Locatable> getFilteredSelection(Locatable[] locatables,
                                                                         oracle.jdeveloper.vcs.cache.StatusCacheBridge<VCSStatus> cache,
                                                                         VCSStatusFilter filter)
                                                                  throws java.lang.Exception
Gets the locatable selection, filtered for the given file statuses.

Parameters:
locatables - the locatable selection.
cache - the status cache to use.
filter - the filter to control VCSStatus acceptance.
Returns:
the selection of locatables filtered by state.
Throws:
java.lang.Exception - if a critical exception occurred.

getVersionedSelection

public static final java.util.Collection<Locatable> getVersionedSelection(Locatable[] locatables,
                                                                          oracle.jdeveloper.vcs.cache.StatusCacheBridge<VCSStatus> cache)
                                                                   throws java.lang.Exception
Gets the locatable selection whose files are versioned.

Parameters:
locatables - the locatable selection.
cache - the status cache to use.
Returns:
the selection of locatables with versioned files.
Throws:
java.lang.Exception - if a critical exception occurred.

getCandidateSelection

public static final java.util.Collection<Locatable> getCandidateSelection(Locatable[] locatables,
                                                                          oracle.jdeveloper.vcs.cache.StatusCacheBridge<VCSStatus> cache)
                                                                   throws java.lang.Exception
Gets the locatable selection whose files are candidates to be added.

Parameters:
locatables - the locatable selection.
cache - the status cache to use.
Returns:
the selection of locatables with candidate state files.
Throws:
java.lang.Exception - if a critical exception occurred.

saveDirtyNodes

public static final boolean saveDirtyNodes(Locatable[] locatables)
                                    throws java.lang.Exception
Saves all of the given locatables which are dirty.

Parameters:
locatables - the locatables which should be saved if dirty.
Returns:
a verdict on whether files were saved, false if the user cancelled or an exception occurred.
Throws:
java.lang.Exception

saveDirtyNodesSilently

public static final boolean saveDirtyNodesSilently(Locatable[] locatables)
                                            throws java.lang.Exception
Saves all of the given locatables which are dirty, without displaying a dialog.

Parameters:
locatables - the locatables which should be saved if dirty.
Returns:
true, always.
Throws:
java.lang.Exception

saveDirtyNodes

@Deprecated
public static final boolean saveDirtyNodes(Locatable[] locatables,
                                                      boolean silent,
                                                      java.lang.String helpTopicId)
                                    throws java.lang.Exception
Deprecated. replaced with #saveDirtyNodes(Locatable[]), which handles a 'Skip this Message Next Time' preference.

Saves all of the given locatables which are dirty, optionally prompting the user for confirmation.

Parameters:
locatables - the locatables which should be saved if dirty.
silent - a decision on whether this method should operate silently.
helpTopicId - the help topic ID for the dialog. (null-capable)
Returns:
a verdict on whether files were saved, false if the user cancelled or an exception occurred.
Throws:
java.lang.Exception

closeMissingNodes

@Deprecated
public static final void closeMissingNodes(Node[] nodes)
Deprecated. replaced with VCSCommand.fireSomeFilesDeleted(java.net.URL[]) and VCSFileEventSender.fireFilesDeleted(java.net.URL[]).

Closes all of the given nodes whose files are absent on disk.

Parameters:
nodes - the array of nodes to check.

removeNonEditableNodes

public static final void removeNonEditableNodes(java.util.Collection<?> nodes)
Removes all non-editable nodes from the given collection. A non-editable node has the attribute ElementAttributes.NON_EDITABLE set.

Parameters:
nodes - the collection of nodes to filter.

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

E17493-02

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