|
SourceJammer 1.3.0 November 20, 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(ArchiveInfoFlexFS 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. |
java.io.File |
getSourceFilePointer(NodeInfo versionNode)
|
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. |
void |
removeVersion(FileNode ndFile,
long fileKey,
long versionID)
Remove all files assocaited with version from file system. |
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)
|
java.io.File |
retrieveVersionDeltaFile(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 |
storeVersionComment(FileNode ndFile,
long fileKey,
long versionID,
java.lang.String comment)
|
void |
storeVersionDelta(FileNode ndFile,
long fileKey,
long versionID,
java.io.File file)
Subclasses should implement to store file delta in the model implementation. |
void |
storeVersionFull(FileNode ndFile,
long fileKey,
long versionID,
java.io.File file)
Subclasses should implement to store version file in the model implementation. |
void |
storeVersionTextDiff(FileNode ndFile,
long fileKey,
long versionID,
TextDiff file)
|
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(ArchiveInfoFlexFS 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.ObjectLockingException
- if the node is not locked, or if the key
is inaccurate.public ProjectNode getProjectNode(long nodeID) throws FileAccessException, ProjectDoesNotExistException, SecurityException
NodeLibrary
getProjectNode
in interface NodeLibrary
public java.lang.String getProjectChildName(ProjectChild child) throws FileAccessException, NodeDoesNotExistException
getProjectChildName
in interface NodeLibrary
public FileNode getFileNode(long nodeID) throws FileAccessException, FileDoesNotExistException, SecurityException
getFileNode
in interface NodeLibrary
public FileNode getFileNode(long nodeID, boolean readOnly) throws FileAccessException, FileDoesNotExistException, SecurityException
getFileNode
in interface NodeLibrary
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
NodeLibrary
releaseNode
in interface NodeLibrary
protected void unlockNode(ControllerNode nd) throws FileAccessException
public void storeLabel(LabelInfo labelInfo, Label label, NodeList allLabels) throws FileAccessException
storeLabel
in interface NodeLibrary
public void storeVersionFull(FileNode ndFile, long fileKey, long versionID, java.io.File file) throws FileAccessException
storeVersionFull
in interface NodeLibrary
public void storeVersionDelta(FileNode ndFile, long fileKey, long versionID, java.io.File file) throws FileAccessException
storeVersionDelta
in interface NodeLibrary
public void storeVersionTextDiff(FileNode ndFile, long fileKey, long versionID, TextDiff file) throws FileAccessException
storeVersionTextDiff
in interface NodeLibrary
public ProjectNode getNewProjectFromModel() throws FileAccessException
getNewProjectFromModel
in interface NodeLibrary
public FileNode getNewFileNodeFromModel() throws FileAccessException
getNewFileNodeFromModel
in interface NodeLibrary
public long getNextVersionNodeID() throws FileAccessException
getNextVersionNodeID
in interface NodeLibrary
public LabelInfo getNewLabelInfoFromModel() throws FileAccessException
getNewLabelInfoFromModel
in interface NodeLibrary
public void storeVersionComment(FileNode ndFile, long fileKey, long versionID, java.lang.String comment) throws FileAccessException
storeVersionComment
in interface NodeLibrary
public java.lang.String retrieveVersionComment(long versionID) throws FileAccessException
retrieveVersionComment
in interface NodeLibrary
public java.io.File getSourceFilePointer(NodeInfo versionNode)
getSourceFilePointer
in interface NodeLibrary
public byte[] retrieveVersionFull(NodeInfo versionNode) throws FileAccessException, WrongFileTypeException
retrieveVersionFull
in interface NodeLibrary
public TextLineReader retrieveVersionTextLineReader(NodeInfo versionNode) throws FileAccessException, WrongFileTypeException, SourceJammerVersionException
retrieveVersionTextLineReader
in interface NodeLibrary
public java.io.File retrieveVersionDeltaFile(NodeInfo versionNode) throws FileAccessException, WrongFileTypeException
retrieveVersionDeltaFile
in interface NodeLibrary
public Delta retrieveVersionDelta(NodeInfo versionNode) throws FileAccessException, WrongFileTypeException
retrieveVersionDelta
in interface NodeLibrary
public Label retrieveLabel(LabelInfo labelInfo) throws FileAccessException
retrieveLabel
in interface NodeLibrary
public long lockNode(ControllerNode nd) throws SecurityException
lockNode
in interface NodeLibrary
public long lockNode(ControllerNode nd, long lTimeOutValue) throws SecurityException
lockNode
in interface NodeLibrary
public NodeList retrieveLabelList() throws FileAccessException
retrieveLabelList
in interface NodeLibrary
public void deleteNode(ControllerNode node) throws FileAccessException, NodeDoesNotExistException, SecurityException
deleteNode
in interface NodeLibrary
public void removeVersion(FileNode ndFile, long fileKey, long versionID) throws FileAccessException, NoSuchVersionException
removeVersion
in interface NodeLibrary
|
SourceJammer 1.3.0 November 20, 2002 Copyright (c) 2001, 2002 Robert MacGrogan |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |