Extension SDK 10.1.2

oracle.ide.model
Class NodeUtil

java.lang.Object
  extended byoracle.ide.model.NodeUtil

public final class NodeUtil
extends java.lang.Object

Utilities involving Nodes.


Method Summary
static void reloadBuffers(java.util.Collection nodes, boolean silentReload)
          Identical to reloadBuffers(java.util.Map, boolean) but reloads the node independently of the timestamp
static void reloadBuffers(java.util.Map timestampMap)
          This is a convenience method for calling reloadBuffers(timestampMap, true).
static void reloadBuffers(java.util.Map timestampMap, boolean silentReload)
          This method reloads Node buffers by comparing timestamps stored in the map, Node, and on disk.
static void reloadBuffers(java.util.Map timestampMap, boolean silentReload, boolean manualReload)
          This method reloads Node buffers by comparing timestamps stored in the map, Node, and on disk.
static void storeAllTimestamps(java.util.Map timestampMap)
          Stores the timestamps for all Nodes in the NodeFactory's cache that are currently open.
static void storeTimestamps(java.util.Map timestampMap, java.util.Collection nodes)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

storeAllTimestamps

public static void storeAllTimestamps(java.util.Map timestampMap)
Stores the timestamps for all Nodes in the NodeFactory's cache that are currently open.

Parameters:
timestampMap - A Map of Node->Long. This method will fill in the Map. The Long represents the current value returned by URLFileSystem.lastModified(URL) for the Node's URL.
Throws:
java.lang.NullPointerException - if the specified timestampMap is null.

storeTimestamps

public static void storeTimestamps(java.util.Map timestampMap,
                                   java.util.Collection nodes)
Parameters:
timestampMap - A Map of Node->Long. This method will fill in the Map. The Long represents the current value returned by URLFileSystem.lastModified(URL) for the Node's URL.
nodes - A Collection of Node objects whose timestamps will be stored in the timestampMap. Only Nodes whose LazyLoadable.isOpen() method returns true will have their timestamp stored in the timestampMap; otherwise, if the Node is not open, its timestamp will be removed from the Map. Any timestamp in the map not corresponding to any Node in the Collection will remain. This allows multiple calls to storeTimestamps with different Collections of Nodes.
Throws:
java.lang.NullPointerException - if any of the parameters are null.

reloadBuffers

public static void reloadBuffers(java.util.Map timestampMap)
This is a convenience method for calling reloadBuffers(timestampMap, true).

See Also:
{@link #reloadBuffers(Map, boolean)}

reloadBuffers

public static void reloadBuffers(java.util.Map timestampMap,
                                 boolean silentReload)
This method reloads Node buffers by comparing timestamps stored in the map, Node, and on disk. This method is synchronous -- i.e. it blocks until all reloading is finished.

Parameters:
timestampMap - A Map of Node->Long. This must be the same map that was passed to storeTimestamps(java.util.Map, java.util.Collection). This method will reload the buffers of all the Nodes in the timestampMap that are open and have currently have a different on-disk timestamp than what is stored in the timestampMap.
silentReload - Pass true if reloading should proceed without prompting the user whenever possible. Pass false if reloading should always prompt the user. Even when true is passed, the UI would still end up prompting the user if the Node buffer was modified within the IDE and externally at the same time.

reloadBuffers

public static void reloadBuffers(java.util.Map timestampMap,
                                 boolean silentReload,
                                 boolean manualReload)
This method reloads Node buffers by comparing timestamps stored in the map, Node, and on disk. This method is synchronous -- i.e. it blocks until all reloading is finished.

Parameters:
timestampMap - A Map of Node->Long. This must be the same map that was passed to storeTimestamps(java.util.Map, java.util.Collection). This method will reload the buffers of all the Nodes in the timestampMap that are open and have currently have a different on-disk timestamp than what is stored in the timestampMap.
silentReload - Pass true if reloading should proceed without prompting the user whenever possible. Pass false if reloading should always prompt the user. Even when true is passed, the UI would still end up prompting the user if the Node buffer was modified within the IDE and externally at the same time.
manualReload - Pass true if reloading is being requested manually (eg, from a menu or explicit user action); false otherwise.

reloadBuffers

public static void reloadBuffers(java.util.Collection nodes,
                                 boolean silentReload)
Identical to reloadBuffers(java.util.Map, boolean) but reloads the node independently of the timestamp

Parameters:
nodes - a collection of nodes to reload
silentReload - Pass true if reloading should proceed without prompting the user whenever possible. Pass false if reloading should always prompt the user. Even when true is passed, the UI would still end up prompting the user if the Node buffer was modified within the IDE and externally at the same time.
See Also:
reloadBuffers(java.util.Map)

Extension SDK

 

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