org.sourcejammer.project.controller
Class ControllerNode

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

public abstract class ControllerNode
extends java.lang.Object
implements org.sourcejammer.project.Node, java.lang.Comparable

Title: $FileName: ControllerNode.java$

Version:
$VerNum: 4$
Author:
$AuthorName: Rob MacGrogan$

$Description: $
$KeyWordsOff: $

Highest level Node for Controller Nodes.

Field Summary
protected  org.sourcejammer.project.view.NodeInfo lightweightView
           
private  java.lang.String lightweightViewString
           
private  boolean mbLocked
           
private  boolean mbShared
           
private  java.util.Date mdCreatedDate
           
private  long mlKey
           
private  long mlUniqueID
           
private  java.lang.String msNodeName
           
 
Constructor Summary
ControllerNode()
           
 
Method Summary
 void checkKey(long key)
          This method throws BadMethodArgumentException (runtime) if the node is not locked or if the keys do not match.
abstract  int childCount()
           
 int compareTo(java.lang.Object o)
           
 boolean equals(java.lang.Object o)
           
 java.util.Date getCreatedDate()
           
 org.sourcejammer.project.view.NodeInfo getLightweightView()
          Returns the lightweightView.
 java.lang.String getLightweightViewString()
          Returns the lightweightViewString.
 java.lang.String getNodeName()
           
 long getUniqueID()
           
 boolean isLocked()
           
 boolean isShared()
           
 void lock(long key)
          Locks this node so that set methods can only be run if this combination is included.
 void setCreatedDate(java.util.Date d, long key)
           
 void setNodeName(java.lang.String s, long key)
           
 void setUniqueID(long l, long key)
           
abstract  void store(long key, ArchiveInfoFlex info)
          To be implemented by model implementation of this class for storing needed data from this node.
 java.lang.String toString()
          Prints path up to this project node.
 void unlock(long key)
           
 void updateLightweightViewString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

mbShared

private boolean mbShared

mdCreatedDate

private java.util.Date mdCreatedDate

msNodeName

private java.lang.String msNodeName

lightweightView

protected org.sourcejammer.project.view.NodeInfo lightweightView

lightweightViewString

private java.lang.String lightweightViewString

mlUniqueID

private long mlUniqueID

mbLocked

private boolean mbLocked

mlKey

private long mlKey
Constructor Detail

ControllerNode

public ControllerNode()
Method Detail

lock

public void lock(long key)
          throws SecurityException
Locks this node so that set methods can only be run if this combination is included.

SecurityException

unlock

public void unlock(long key)
            throws SecurityException
SecurityException

checkKey

public void checkKey(long key)
This method throws BadMethodArgumentException (runtime) if the node is not locked or if the keys do not match. Otherwise, it returns nothing and makes no changes.


isLocked

public boolean isLocked()

getNodeName

public java.lang.String getNodeName()
Specified by:
getNodeName in interface org.sourcejammer.project.Node

setNodeName

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

compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

getCreatedDate

public java.util.Date getCreatedDate()

setCreatedDate

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

isShared

public boolean isShared()
Specified by:
isShared in interface org.sourcejammer.project.Node

childCount

public abstract int childCount()
Specified by:
childCount in interface org.sourcejammer.project.Node

toString

public java.lang.String toString()
Prints path up to this project node. For example:

/this/is/a/path

Overrides:
toString in class java.lang.Object

setUniqueID

public void setUniqueID(long l,
                        long key)

getUniqueID

public long getUniqueID()
Specified by:
getUniqueID in interface org.sourcejammer.project.Node

store

public abstract void store(long key,
                           ArchiveInfoFlex info)
                    throws FileAccessException
To be implemented by model implementation of this class for storing needed data from this node.

FileAccessException

getLightweightView

public org.sourcejammer.project.view.NodeInfo getLightweightView()
Returns the lightweightView.

Returns:
NodeInfo

updateLightweightViewString

public void updateLightweightViewString()

getLightweightViewString

public java.lang.String getLightweightViewString()
Returns the lightweightViewString.

Returns:
String


Copyright 2003 Soucejammer project.