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, org.sourcejammer.project.Node
Direct Known Subclasses:
FileNodeFS

public abstract class FileNode
extends ControllerNode

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

Version:
1.0
Author:
Robert MacGrogan

Field Summary
private static java.lang.String INDEX_SEP
           
private  boolean mbCheckedOut
           
private  boolean mbLimitHistorySize
           
private  java.util.Date mdCheckedOutDate
           
private  java.util.Hashtable mhshChildIDIndex
           
private  int miFileHistoryStorageType
           
private  int miFileType
           
private  int miMaxHistorySize
           
private  org.sourcejammer.project.NodeList moVersions
           
private  java.lang.String msCheckedOutPath
           
private  java.lang.String msCheckedOutToUser
           
private  java.lang.String msDescription
           
 
Fields inherited from class org.sourcejammer.project.controller.ControllerNode
lightweightView
 
Constructor Summary
FileNode()
           
 
Method Summary
 void addVersionNode(org.sourcejammer.project.view.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()
           
 org.sourcejammer.project.view.NodeInfo getLatestVersionNode()
          Convenience method for returning most recent version node.
 int getMaxHistorySize()
           
 org.sourcejammer.project.view.NodeInfo getVersionNode(int index)
          Returns the VersionNode with the specified index.
 org.sourcejammer.project.view.NodeInfo getVersionNode(long uniqueID)
          Returns version node based on unique id.
 org.sourcejammer.project.NodeList getVersionNodeList()
           
 org.sourcejammer.project.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)
           
 org.sourcejammer.project.view.NodeInfo removeOldestVersionNode(long key)
           
 org.sourcejammer.project.view.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(org.sourcejammer.project.NodeList versions)
          Explicitly set the entire version list for this FileNode.
 
Methods inherited from class org.sourcejammer.project.controller.ControllerNode
checkKey, compareTo, equals, getCreatedDate, getLightweightView, getLightweightViewString, getNodeName, getParent, getRootParent, getShareParent, getUniqueID, isCorrectKey, isLocked, isShared, lock, setCreatedDate, setNodeName, setParent, setShared, setShareParent, setUniqueID, store, toString, unlock, updateLightweightViewString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

moVersions

private org.sourcejammer.project.NodeList moVersions

mbCheckedOut

private boolean mbCheckedOut

mdCheckedOutDate

private java.util.Date mdCheckedOutDate

msCheckedOutPath

private java.lang.String msCheckedOutPath

msCheckedOutToUser

private java.lang.String msCheckedOutToUser

miFileType

private int miFileType

msDescription

private java.lang.String msDescription

miFileHistoryStorageType

private int miFileHistoryStorageType

mbLimitHistorySize

private boolean mbLimitHistorySize

miMaxHistorySize

private int miMaxHistorySize

mhshChildIDIndex

private java.util.Hashtable mhshChildIDIndex

INDEX_SEP

private static final java.lang.String INDEX_SEP
See Also:
Constant Field Values
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 org.sourcejammer.project.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 org.sourcejammer.project.NodeList getVersionNodeList()

addVersionNode

public void addVersionNode(org.sourcejammer.project.view.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.
SecurityException

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 org.sourcejammer.project.view.NodeInfo getLatestVersionNode()
                                                            throws NoSuchVersionException
Convenience method for returning most recent version node.

NoSuchVersionException

getVersionNode

public org.sourcejammer.project.view.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 org.sourcejammer.project.view.NodeInfo getVersionNode(long uniqueID)
                                                      throws NoSuchVersionException
Returns version node based on unique id.

NoSuchVersionException

removeVersionNode

public org.sourcejammer.project.view.NodeInfo removeVersionNode(long uniqueID,
                                                                long key)
                                                         throws NoSuchVersionException
NoSuchVersionException

removeOldestVersionNode

public org.sourcejammer.project.view.NodeInfo removeOldestVersionNode(long key)
                                                               throws org.sourcejammer.project.NodeDoesNotExistException,
                                                                      NoSuchVersionException
org.sourcejammer.project.NodeDoesNotExistException
NoSuchVersionException

childCount

public int childCount()
Returns number of version.

Specified by:
childCount in interface org.sourcejammer.project.Node
Specified by:
childCount in class ControllerNode

setVersionList

public void setVersionList(org.sourcejammer.project.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)


Copyright 2003 Soucejammer project.