com.borland.primetime.node
Class UrlNode

java.lang.Object
  |
  +--com.borland.primetime.node.Node
        |
        +--com.borland.primetime.node.UrlNode
All Implemented Interfaces:
java.lang.Comparable
Direct Known Subclasses:
FileNode, Project

public abstract class UrlNode
extends Node

UrlNode is an abstract class that defines methods common to FileNode and Project.


Fields inherited from class com.borland.primetime.node.Node
EMPTY_ARRAY, nodeListeners
 
Method Summary
 Url getSuggestedUrl()
          Hook for future use.
abstract  Url getUrl()
          Returns the node's associated Url.
abstract  boolean isModified()
          Return if any existing Buffer for this Node is modified or not.
abstract  boolean isNew()
          Returns whether nor the Url filesystem is the NewFilesystem.
abstract  void rename(Url url)
          Attempt to rename Node (it is not allowed to change the type of a Node) to match the given Url.
abstract  void revert()
          Attempt to revert the file associated with this Node by reloading it from storage.
abstract  void save()
          Attempt to save Node (unless it is using the NewFilesystem).
abstract  void saveAs(Url url)
          Attempt to save Node (it is not allowed to change the type of a Node) to the given Url (overwriting existing files) causing a name change if needed.
 
Methods inherited from class com.borland.primetime.node.Node
addNodeListener, check, compareTo, dumpNodes, dumpNodes, dumpNodes, equals, fireNodeRenamed, getChildren, getDisplayChildren, getDisplayIcon, getDisplayName, getDisplaySequence, getLongDisplayName, getNodeID, getParent, getProject, getProperties, getProperty, getProperty, getProperty, hasChildren, hasDisplayChildren, hashCode, isPersistant, makePersistant, removeNodeListener, setParent, setProperty, setProperty, setProperty, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getUrl

public abstract Url getUrl()
Returns the node's associated Url.
Returns:
The Url associated with this FileNode.

revert

public abstract void revert()
                     throws java.io.IOException
Attempt to revert the file associated with this Node by reloading it from storage.
Throws:
java.io.IOException - If the Url specifies a resource that could not be successfully reverted.

save

public abstract void save()
                   throws java.io.IOException,
                          InvalidUrlException
Attempt to save Node (unless it is using the NewFilesystem).
Throws:
java.io.IOException -  
InvalidUrlException -  

saveAs

public abstract void saveAs(Url url)
                     throws java.io.IOException,
                            InvalidUrlException,
                            DuplicateNodeException
Attempt to save Node (it is not allowed to change the type of a Node) to the given Url (overwriting existing files) causing a name change if needed.
Parameters:
url - Url with new name where to save.
Throws:
java.io.IOException -  
InvalidUrlException -  
DuplicateNodeException -  

rename

public abstract void rename(Url url)
                     throws java.io.IOException,
                            InvalidUrlException,
                            DuplicateNodeException,
                            ReadOnlyException
Attempt to rename Node (it is not allowed to change the type of a Node) to match the given Url.
Parameters:
url - Url with new name.
Throws:
java.io.IOException -  
InvalidUrlException -  
DuplicateNodeException -  
ReadOnlyException -  

isModified

public abstract boolean isModified()
Return if any existing Buffer for this Node is modified or not.
Overrides:
isModified in class Node
Returns:
Returns true if the Buffer if modified or not.

isNew

public abstract boolean isNew()
Returns whether nor the Url filesystem is the NewFilesystem.
Returns:
Returns true if Url filesystem is the NewFilesystem.
See Also:
NewFilesystem

getSuggestedUrl

public Url getSuggestedUrl()
Hook for future use.
Returns:
Always returns null.