org.netbeans.modules.versioning.core/1 1.5.0 1

org.netbeans.modules.versioning.core.util
Class Utils

java.lang.Object
  extended by org.netbeans.modules.versioning.core.util.Utils

public final class Utils
extends Object

Provides access to some versioning.core functionality needed by versioning.spi and versioning.ui. WARNING: VCS internal use only, might be subject of future change and shouldn't be accessed by vcs clients.


Field Summary
static String EVENT_ANNOTATIONS_CHANGED
          Used to signal the Versioning manager that some annotations changed.
static String EVENT_STATUS_CHANGED
          The NEW value is a Set of Files whose versioning status changed.
static String EVENT_VERSIONED_ROOTS
          Indicates to the Versioning manager that the layout of versioned files may have changed.
 
Method Summary
static void addPropertyChangeListener(PropertyChangeListener l)
          Add PropertyChangeListener to be notified about changes in the versioning infrastructure.
static void connectRepository(VCSSystemProvider.VersioningSystem versioningSystem, String absolutePath)
          Start again to manage the given path by the given versioning system
static VCSHistoryProvider.HistoryEntry createHistoryEntry(VCSFileProxy[] proxies, Date dateTime, String message, String username, String usernameShort, String revision, String revisionShort, Action[] actions, VCSHistoryProvider.RevisionProvider rp, VCSHistoryProvider.MessageEditProvider mep, VCSHistoryProvider.ParentProvider pp, Object[] lookupObjects)
           
static void disconnectRepository(VCSSystemProvider.VersioningSystem versioningSystem, String absolutePath)
          Stop managing the given path by the given versioning system
static void fireVisibilityChanged()
          Notifies about visibility changes according to VisibilityQueryImplementation
static void flushNullOwners()
          Empties the file owner cache
static Object[] getDelegateEntry(VCSHistoryProvider.HistoryEntry entry)
           
static String[] getDisconnectedRoots(VCSSystemProvider.VersioningSystem versioningSystem)
          Returns all paths marked as not to managed by the given system
static File getFlat(String path)
          Creates a File that is marked is flat (eg a java package), that is a folder that contains only its direct children.
static VCSSystemProvider.VersioningSystem getLocalHistory(File file)
           
static VCSSystemProvider.VersioningSystem getOwner(VCSFileProxy proxy)
          Queries the Versioning infrastructure for file ownership.
static boolean isFlat(File file)
          Tests whether the given file represents a flat folder (eg a java package), that is a folder that contains only its direct children.
static void removePropertyChangeListener(PropertyChangeListener l)
          Remove PropertyChangeListener
static void versionedRootsChanged()
          Notifies that a versioning system started to manage some previously unversioned files (e.g.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EVENT_VERSIONED_ROOTS

public static final String EVENT_VERSIONED_ROOTS
Indicates to the Versioning manager that the layout of versioned files may have changed. Previously unversioned files became versioned, versioned files became unversioned or the versioning system for some files changed. The manager will flush any caches that may be holding such information. A versioning system usually needs to fire this after an Import action.

See Also:
Constant Field Values

EVENT_STATUS_CHANGED

public static final String EVENT_STATUS_CHANGED
The NEW value is a Set of Files whose versioning status changed. This event is used to re-annotate files, re-fetch original content of files and generally refresh all components that are connected to these files.

See Also:
Constant Field Values

EVENT_ANNOTATIONS_CHANGED

public static final String EVENT_ANNOTATIONS_CHANGED
Used to signal the Versioning manager that some annotations changed. Note that this event is NOT required in case the status of the file changes in which case annotations are updated automatically. Use this event to force annotations refresh in special cases, for example when the format of annotations changes. Use null as new value to force refresh of all annotations.

See Also:
Constant Field Values
Method Detail

getLocalHistory

public static VCSSystemProvider.VersioningSystem getLocalHistory(File file)

disconnectRepository

public static void disconnectRepository(VCSSystemProvider.VersioningSystem versioningSystem,
                                        String absolutePath)
Stop managing the given path by the given versioning system

Parameters:
versioningSystem - the versioning system to stop manage for the given path
absolutePath - the path to stop managed by the given versioning system
See Also:
connectRepository(org.netbeans.modules.versioning.core.util.VCSSystemProvider.VersioningSystem, java.lang.String)

connectRepository

public static void connectRepository(VCSSystemProvider.VersioningSystem versioningSystem,
                                     String absolutePath)
Start again to manage the given path by the given versioning system

Parameters:
versioningSystem - the versioning system to stop manage for the given path
absolutePath - the path to stop managed by the given versioning system
See Also:
disconnectRepository(org.netbeans.modules.versioning.core.util.VCSSystemProvider.VersioningSystem, java.lang.String)

getDisconnectedRoots

public static String[] getDisconnectedRoots(VCSSystemProvider.VersioningSystem versioningSystem)
Returns all paths marked as not to managed by the given system

Parameters:
versioningSystem - the versioning system
Returns:
path not managed by the given versioning system

flushNullOwners

public static void flushNullOwners()
Empties the file owner cache


fireVisibilityChanged

public static void fireVisibilityChanged()
Notifies about visibility changes according to VisibilityQueryImplementation


versionedRootsChanged

public static void versionedRootsChanged()
Notifies that a versioning system started to manage some previously unversioned files (e.g. those files were imported into repository).


getOwner

public static VCSSystemProvider.VersioningSystem getOwner(VCSFileProxy proxy)
Queries the Versioning infrastructure for file ownership.

Parameters:
proxy -
Returns:
VersioningSystem a system that owns (manages) the file or null if the file is not versioned

isFlat

public static boolean isFlat(File file)
Tests whether the given file represents a flat folder (eg a java package), that is a folder that contains only its direct children.

Parameters:
file - a File to test
Returns:
true if the File represents a flat folder (eg a java package), false otherwise

getFlat

public static File getFlat(String path)
Creates a File that is marked is flat (eg a java package), that is a folder that contains only its direct children.

Parameters:
path - a file path
Returns:
File a flat file representing given abstract path

addPropertyChangeListener

public static void addPropertyChangeListener(PropertyChangeListener l)
Add PropertyChangeListener to be notified about changes in the versioning infrastructure.

Parameters:
l -

removePropertyChangeListener

public static void removePropertyChangeListener(PropertyChangeListener l)
Remove PropertyChangeListener

Parameters:
l -

getDelegateEntry

public static Object[] getDelegateEntry(VCSHistoryProvider.HistoryEntry entry)

createHistoryEntry

public static VCSHistoryProvider.HistoryEntry createHistoryEntry(VCSFileProxy[] proxies,
                                                                 Date dateTime,
                                                                 String message,
                                                                 String username,
                                                                 String usernameShort,
                                                                 String revision,
                                                                 String revisionShort,
                                                                 Action[] actions,
                                                                 VCSHistoryProvider.RevisionProvider rp,
                                                                 VCSHistoryProvider.MessageEditProvider mep,
                                                                 VCSHistoryProvider.ParentProvider pp,
                                                                 Object[] lookupObjects)

org.netbeans.modules.versioning.core/1 1.5.0 1

Built on May 25 2012.  |  Portions Copyright 1997-2012 Oracle. All rights reserved.