|
SourceJammer 1.1.0 March 1, 2002 Copyright (c) 2001, 2002 Robert MacGrogan |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.sourcejammer.project.model.filesys.NodeLibraryFS
Class that handles locking and unlocking of project, file, and version nodes.
Inner Class Summary | |
static class |
NodeLibraryFS.NodeType
|
Constructor Summary | |
NodeLibraryFS(ArchiveInfoFS info)
|
Method Summary | |
void |
deleteNode(ControllerNode node)
|
FileNode |
getFileNode(long nodeID)
Retrieves and locks a File node on the file system. |
FileNode |
getFileNode(long nodeID,
boolean readOnly)
Retrieve or construct a FileNode based on it's node id. |
FileNode |
getNewFileNodeFromModel()
Subclasses should implement this to return a new FileNode object. |
LabelInfo |
getNewLabelInfoFromModel()
|
ProjectNode |
getNewProjectFromModel()
Subclasses should implement this to return a new ProjectNode object. |
long |
getNextVersionNodeID()
Returns next unique ID for a version. |
java.lang.String |
getProjectChildName(ProjectChild child)
Return the name of a project child object. |
ProjectNode |
getProjectNode(long nodeID)
Retrieve or construct a ProjectNode based on it's node id. |
long |
lockNode(ControllerNode nd)
Locks the node and returns the key. |
long |
lockNode(ControllerNode nd,
long lTimeOutValue)
Locks the node and returns the key used to lock it. |
void |
releaseNode(ControllerNode nd)
Releases the node after use. |
Label |
retrieveLabel(LabelInfo labelInfo)
|
NodeList |
retrieveLabelList()
Loads all the labels for this archive as a NodeList. |
java.lang.String |
retrieveVersionComment(long versionID)
|
Delta |
retrieveVersionDelta(NodeInfo versionNode)
|
byte[] |
retrieveVersionFull(NodeInfo versionNode)
|
TextLineReader |
retrieveVersionTextLineReader(NodeInfo versionNode)
When implemented, this method returns the full source of the specified VersionNode as a TextLineReader. |
void |
storeLabel(LabelInfo labelInfo,
Label label,
NodeList allLabels)
Subclasses should implement to store the labeled version info. |
void |
storeVersion(FileNode ndFile,
long fileKey,
long versionID,
byte[] file)
Subclasses should implement to store version file in the model implementation. |
void |
storeVersion(FileNode ndFile,
long fileKey,
long versionID,
Delta file)
Subclasses should implement to store file delta in the model implementation. |
void |
storeVersion(FileNode ndFile,
long fileKey,
long versionID,
TextDiff file)
|
void |
storeVersionComment(FileNode ndFile,
long fileKey,
long versionID,
java.lang.String comment)
|
protected void |
unlockNode(ControllerNode nd)
|
protected void |
unlockNode(long nodeID,
java.lang.String nodeType,
long key)
Unlocks the node with the specified ID and type, using the key. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public NodeLibraryFS(ArchiveInfoFS info)
Method Detail |
protected void unlockNode(long nodeID, java.lang.String nodeType, long key) throws ObjectLockingException
nodeID
- -- unique id of the node.noteType
- -- String from NodeTypes inner class.
param key -- key returned when the node was locked.public ProjectNode getProjectNode(long nodeID) throws FileAccessException, ProjectDoesNotExistException, SecurityException
public java.lang.String getProjectChildName(ProjectChild child) throws FileAccessException, NodeDoesNotExistException
public FileNode getFileNode(long nodeID) throws FileAccessException, FileDoesNotExistException, SecurityException
public FileNode getFileNode(long nodeID, boolean readOnly) throws FileAccessException, FileDoesNotExistException, SecurityException
nodeID
- -- unique id of the FileNode to retrieve.readOnly
- -- if true, the FileNode will not be lock-able and should
probably be a clone of any FileNode stored in the cache.public void releaseNode(ControllerNode nd) throws FileAccessException
protected void unlockNode(ControllerNode nd) throws FileAccessException
public void storeLabel(LabelInfo labelInfo, Label label, NodeList allLabels) throws FileAccessException
public void storeVersion(FileNode ndFile, long fileKey, long versionID, byte[] file) throws FileAccessException
public void storeVersion(FileNode ndFile, long fileKey, long versionID, Delta file) throws FileAccessException
public void storeVersion(FileNode ndFile, long fileKey, long versionID, TextDiff file) throws FileAccessException
public ProjectNode getNewProjectFromModel() throws FileAccessException
public FileNode getNewFileNodeFromModel() throws FileAccessException
public long getNextVersionNodeID() throws FileAccessException
public LabelInfo getNewLabelInfoFromModel() throws FileAccessException
public void storeVersionComment(FileNode ndFile, long fileKey, long versionID, java.lang.String comment) throws FileAccessException
public java.lang.String retrieveVersionComment(long versionID) throws FileAccessException
public byte[] retrieveVersionFull(NodeInfo versionNode) throws FileAccessException, WrongFileTypeException
public TextLineReader retrieveVersionTextLineReader(NodeInfo versionNode) throws FileAccessException, WrongFileTypeException, SourceJammerVersionException
public Delta retrieveVersionDelta(NodeInfo versionNode) throws FileAccessException, WrongFileTypeException
public Label retrieveLabel(LabelInfo labelInfo) throws FileAccessException
public long lockNode(ControllerNode nd) throws SecurityException
public long lockNode(ControllerNode nd, long lTimeOutValue) throws SecurityException
public NodeList retrieveLabelList() throws FileAccessException
public void deleteNode(ControllerNode node) throws FileAccessException, NodeDoesNotExistException, SecurityException
|
SourceJammer 1.1.0 March 1, 2002 Copyright (c) 2001, 2002 Robert MacGrogan |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |