SourceJammer 1.2.0.1 May 20, 2002
Copyright (c) 2001, 2002 Robert MacGrogan

org.sourcejammer.project.controller
Class FileNode

java.lang.Object
  |
  +--org.sourcejammer.project.controller.ControllerNode
        |
        +--org.sourcejammer.project.controller.FileNode
All Implemented Interfaces:
java.lang.Comparable, Node
Direct Known Subclasses:
FileNodeFS

public abstract class FileNode
extends ControllerNode

Title: SourceJammer v 0.1.0 Description: Copyright: Copyright (c) 2001 Company:


Constructor Summary
FileNode()
           
 
Method Summary
 void addVersionNode(NodeInfo version, long key)
          Adds a new VersionNode to this FileNode.
 int childCount()
          Returns number of version.
 void deleteVersionList(long key)
           
 java.util.Date getCheckedOutDate()
           
 java.lang.String getCheckedOutToPath()
           
 java.lang.String getCheckedOutToUser()
           
 java.lang.String getDescrption()
           
 ProjectNode getFileParent()
          Deprecated.  
 int getFileType()
          Compare to org.sourcejammer.util.AppConfig.FileTypes
 int getHistoryStorageType()
           
 NodeInfo getLatestVersionNode()
          Convenience method for returning most recent version node.
 int getMaxHistorySize()
           
 NodeInfo getVersionNode(int index)
          Returns the VersionNode with the specified index.
 NodeInfo getVersionNode(long uniqueID)
          Returns version node based on unique id.
 NodeList getVersionNodeList()
           
 NodeIterator getVersions()
          Returns a NodeIterator for iterating through of all of the VersionNodes of this FileNode.
 boolean isCheckedOut()
           
 boolean isLimitHistorySize()
           
static void main(java.lang.String[] args)
           
 NodeInfo removeOldestVersionNode(long key)
           
 NodeInfo removeVersionNode(long uniqueID, long key)
           
 void rollbackToVersion(int index, long key)
          Removes all versions subsequent to the version number requested.
 void setCheckedOut(boolean b, long key)
           
 void setCheckedOutDate(java.util.Date d, long key)
           
 void setCheckedOutToPath(java.lang.String s, long key)
           
 void setCheckedOutToUser(java.lang.String s, long key)
           
 void setDescription(java.lang.String s, long key)
           
 void setFileParent(ProjectNode parent, long key)
          Convenience method for setting parent as FileNode.
 void setFileType(int i, long key)
           
 void setHistoryStorageType(int i, long key)
           
 void setLimitHistorySize(boolean b, long key)
           
 void setMaxHistorySize(int i, long key)
           
 void setVersionList(NodeList versions)
          Explicitly set the entire version list for this FileNode.
 
Methods inherited from class org.sourcejammer.project.controller.ControllerNode
checkKey, compareTo, equals, getCreatedDate, getNodeName, getParent, getRootParent, getShareParent, getUniqueID, isCorrectKey, isLocked, isShared, lock, setCreatedDate, setNodeName, setParent, setShared, setShareParent, setUniqueID, store, toString, unlock
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FileNode

public FileNode()
Method Detail

getFileParent

public ProjectNode getFileParent()
Deprecated.  

This is a convenience method for returning the parent already cast to ProjectNode. Will throw ConfigurationException if the parent node cannot be cast properly to a ProjectNode.
Returns:
Parent of this FileNode, as ProjectNode.

setFileParent

public void setFileParent(ProjectNode parent,
                          long key)
Convenience method for setting parent as FileNode. setParent() could just as easily be used.
Parameters:
parent - -- parent ProjectNode.

getVersions

public NodeIterator getVersions()
Returns a NodeIterator for iterating through of all of the VersionNodes of this FileNode.
Returns:
a NodeIterator of the FileNode's versions.

getVersionNodeList

public NodeList getVersionNodeList()

addVersionNode

public void addVersionNode(NodeInfo version,
                           long key)
                    throws SecurityException
Adds a new VersionNode to this FileNode. Whether or not the nodeName/versionNumber of the VersionNode has been set, it will be reset here using the next version number.
Parameters:
version - -- a new version.

rollbackToVersion

public void rollbackToVersion(int index,
                              long key)
                       throws NoSuchVersionException
Removes all versions subsequent to the version number requested.
Parameters:
index - -- version number to roll back to.
Throws:
NoSuchVersionException - if the index is >= number of versions in this FileNode.

getLatestVersionNode

public NodeInfo getLatestVersionNode()
                              throws NoSuchVersionException
Convenience method for returning most recent version node.

getVersionNode

public NodeInfo getVersionNode(int index)
                        throws NoSuchVersionException
Returns the VersionNode with the specified index.
Parameters:
index - -- index of the VersionNode to be returned.
Returns:
the VersionNode with the specified index.
Throws:
NoSuchVersionException - if this does not have a version with the specified index.

getVersionNode

public NodeInfo getVersionNode(long uniqueID)
                        throws NoSuchVersionException
Returns version node based on unique id.

removeVersionNode

public NodeInfo removeVersionNode(long uniqueID,
                                  long key)
                           throws NoSuchVersionException

removeOldestVersionNode

public NodeInfo removeOldestVersionNode(long key)
                                 throws NodeDoesNotExistException,
                                        NoSuchVersionException

childCount

public int childCount()
Returns number of version.
Overrides:
childCount in class ControllerNode

setVersionList

public void setVersionList(NodeList versions)
Explicitly set the entire version list for this FileNode. If at least one version exists, this method throws BadMethod exception.

isCheckedOut

public boolean isCheckedOut()

setCheckedOut

public void setCheckedOut(boolean b,
                          long key)

getCheckedOutDate

public java.util.Date getCheckedOutDate()

setCheckedOutDate

public void setCheckedOutDate(java.util.Date d,
                              long key)

getCheckedOutToPath

public java.lang.String getCheckedOutToPath()

setCheckedOutToPath

public void setCheckedOutToPath(java.lang.String s,
                                long key)

getCheckedOutToUser

public java.lang.String getCheckedOutToUser()

setCheckedOutToUser

public void setCheckedOutToUser(java.lang.String s,
                                long key)

deleteVersionList

public void deleteVersionList(long key)

getFileType

public int getFileType()
Compare to org.sourcejammer.util.AppConfig.FileTypes

setDescription

public void setDescription(java.lang.String s,
                           long key)

getDescrption

public java.lang.String getDescrption()

setFileType

public void setFileType(int i,
                        long key)

setHistoryStorageType

public void setHistoryStorageType(int i,
                                  long key)

getHistoryStorageType

public int getHistoryStorageType()

setLimitHistorySize

public void setLimitHistorySize(boolean b,
                                long key)

isLimitHistorySize

public boolean isLimitHistorySize()

setMaxHistorySize

public void setMaxHistorySize(int i,
                              long key)

getMaxHistorySize

public int getMaxHistorySize()

main

public static void main(java.lang.String[] args)

SourceJammer 1.2.0.1 May 20, 2002
Copyright (c) 2001, 2002 Robert MacGrogan