Skip navigation links

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

E17493-03


oracle.jdeveloper.vcs.spi
Class VCSSingleNodeObserver

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

All Implemented Interfaces:
VCSEBComponent

public class VCSSingleNodeObserver
extends java.lang.Object
implements VCSEBComponent

Observer class to flush a status cache on node events, including reloading and file save notifications.

Since:
10.1.3

Constructor Summary
VCSSingleNodeObserver()
          Constructs a new VCSSingleNodeObserver whose VCSStatusCache and, optionally, URLFilter may be subsequently set using the setStatusCache(VCSStatusCache) and setURLFilter(URLFilter) methods.
VCSSingleNodeObserver(VCSStatusCache cache, URLFilter urlfilter)
          Deprecated. replaced by VCSSingleNodeObserver(VCSStatusCache,URLFilter,String).
VCSSingleNodeObserver(VCSStatusCache cache, URLFilter urlfilter, java.lang.String vcsId)
          Constructor.

 

Method Summary
protected  void clearStatusCacheParentURLs(java.net.URL url)
          Clears the internal status cache for any parent directories.
 oracle.jdeveloper.vcs.cache.StatusCache<VCSStatus> getPolicyStatusCache()
           
 VCSStatusCache getStatusCache()
          Deprecated. replaced by getStatusCacheBridge() and getPolicyStatusCache().
 oracle.jdeveloper.vcs.cache.StatusCacheBridge<VCSStatus> getStatusCacheBridge()
           
 java.lang.String getSystemId()
          Gets the VCS extension ID of the observer.
 URLFilter getURLFilter()
          Gets the url filter of this save observer.
 void handleMessage(VCSEBMessage message)
          Handles a message sent on the VCSEventBus.
protected  boolean isSaveStateChange(java.net.URL url)
          Returns true if the specified url can change state due to a save operation.
protected  void nodeReloaded(java.net.URL url)
          Responds to notification that a node object has been reloaded.
protected  void nodeRenamed(java.net.URL oldUrl, java.net.URL newUrl)
          Responds to notification that a node object has been renamed.
protected  void nodeSaved(java.net.URL url)
          Deprecated. replaced by nodeSaved(URL[]).
protected  void nodeSaved(java.net.URL[] urls)
          Responds to notification that node objects have been saved.
 void setPolicyStatusCache(oracle.jdeveloper.vcs.cache.StatusCache<VCSStatus> cache)
          Sets the status cache of this save observer.
 void setStatusCache(VCSStatusCache cache)
          Deprecated. replaced by setStatusCacheBridge(oracle.jdeveloper.vcs.cache.StatusCacheBridge<oracle.jdeveloper.vcs.spi.VCSStatus>) and setPolicyStatusCache(oracle.jdeveloper.vcs.cache.StatusCache<oracle.jdeveloper.vcs.spi.VCSStatus>).
 void setStatusCacheBridge(oracle.jdeveloper.vcs.cache.StatusCacheBridge<VCSStatus> cache)
          Sets the status cache of this save observer.
 void setSystemId(java.lang.String systemId)
          Sets the VCS extension ID of the observer.
 void setURLFilter(URLFilter filter)
          Sets the url filter of this save observer.

 

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

 

Constructor Detail

VCSSingleNodeObserver

public VCSSingleNodeObserver()
Constructs a new VCSSingleNodeObserver whose VCSStatusCache and, optionally, URLFilter may be subsequently set using the setStatusCache(VCSStatusCache) and setURLFilter(URLFilter) methods.

VCSSingleNodeObserver

@Deprecated
public VCSSingleNodeObserver(VCSStatusCache cache,
                                        URLFilter urlfilter)
Deprecated. replaced by VCSSingleNodeObserver(VCSStatusCache,URLFilter,String).
Constructor.
Parameters:
cache - the status cache for the save observer.
urlfilter - the URLFilter defining relevant urls

VCSSingleNodeObserver

public VCSSingleNodeObserver(VCSStatusCache cache,
                             URLFilter urlfilter,
                             java.lang.String vcsId)
Constructor.
Parameters:
cache - the status cache for the save observer.
urlfilter - the URLFilter defining relevant urls
vcsId - the VCS extension ID.

Method Detail

getStatusCache

@Deprecated
public VCSStatusCache getStatusCache()
Deprecated. replaced by getStatusCacheBridge() and getPolicyStatusCache().
Gets the status cache of this save observer.
Returns:
the status cache.

getPolicyStatusCache

public oracle.jdeveloper.vcs.cache.StatusCache<VCSStatus> getPolicyStatusCache()

getStatusCacheBridge

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

setStatusCache

public void setStatusCache(VCSStatusCache cache)
Deprecated. replaced by setStatusCacheBridge(oracle.jdeveloper.vcs.cache.StatusCacheBridge<oracle.jdeveloper.vcs.spi.VCSStatus>) and setPolicyStatusCache(oracle.jdeveloper.vcs.cache.StatusCache<oracle.jdeveloper.vcs.spi.VCSStatus>).
Sets the status cache of this save observer. Note: this method is not thread safe. The behaviour of this save observer if the status cache is changed during an invocation of handleMessage(VCSEBMessage) is not defined.
Parameters:
cache - the VCSStatusCache.

setStatusCacheBridge

public void setStatusCacheBridge(oracle.jdeveloper.vcs.cache.StatusCacheBridge<VCSStatus> cache)
Sets the status cache of this save observer. Note: this method is not thread safe. The behaviour of this save observer if the status cache is changed during an invocation of handleMessage(VCSEBMessage) is not defined.
Parameters:
cache - the StatusCacheBridge.

setPolicyStatusCache

public void setPolicyStatusCache(oracle.jdeveloper.vcs.cache.StatusCache<VCSStatus> cache)
Sets the status cache of this save observer. Note: this method is not thread safe. The behaviour of this save observer if the status cache is changed during an invocation of handleMessage(VCSEBMessage) is not defined.
Parameters:
cache - the StatusCache.

getURLFilter

public URLFilter getURLFilter()
Gets the url filter of this save observer.
Returns:
the URLFilter.

setURLFilter

public void setURLFilter(URLFilter filter)
Sets the url filter of this save observer. Note: this method is not thread safe. The behaviour of this save observer if the url filter is changed during an invocation of handleMessage(VCSEBMessage) is not defined.
Parameters:
filter - the required URLFilter.

getSystemId

public java.lang.String getSystemId()
Gets the VCS extension ID of the observer. If set, events will only be dispatched for controlled URLs.
Returns:
the VCS extension ID.

setSystemId

public void setSystemId(java.lang.String systemId)
Sets the VCS extension ID of the observer.
Parameters:
systemId - the VCS extension ID.

isSaveStateChange

protected boolean isSaveStateChange(java.net.URL url)
Returns true if the specified url can change state due to a save operation. By default, returns true regardless of the specified url.
Parameters:
url - the URL to check
Returns:
true if saving the specified url can cause a state change.

clearStatusCacheParentURLs

protected void clearStatusCacheParentURLs(java.net.URL url)
Clears the internal status cache for any parent directories.
Parameters:
url - the URL whose parents should be cleared from the status cache.

nodeSaved

protected void nodeSaved(java.net.URL url)
Deprecated. replaced by nodeSaved(URL[]).
Responds to notification that a node object has been saved. By default, clears the status cache for the given URL and any parent directories.
Parameters:
url - the URL of the saved object.

nodeSaved

protected void nodeSaved(java.net.URL[] urls)
Responds to notification that node objects have been saved. By default, clears the status cache for the given URLs and any parent directories.
Parameters:
urls - the URLs of the saved objects.

nodeReloaded

protected void nodeReloaded(java.net.URL url)
Responds to notification that a node object has been reloaded. By default, clears the status cache for the given URL.
Parameters:
url - the URL of the reloaded object.

nodeRenamed

protected void nodeRenamed(java.net.URL oldUrl,
                           java.net.URL newUrl)
Responds to notification that a node object has been renamed. By default, clears the status cache for the given URLs.
Parameters:
oldUrl - the old URL of the renamed object.
newUrl - the new URL of the renamed object.

handleMessage

public void handleMessage(VCSEBMessage message)
Description copied from interface: VCSEBComponent
Handles a message sent on the VCSEventBus.
Specified by:
handleMessage in interface VCSEBComponent
Parameters:
message - the message to handle.

Skip navigation links

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

E17493-03


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