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

org.sourcejammer.project.controller
Interface Archive

All Known Implementing Classes:
ProjectController

public interface Archive

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


Method Summary
 long addFile(long parentID, java.lang.String name, java.io.File file, FileProperties props, java.lang.String userName)
          Adds a new file to this archive, at the specified location.
 long addNewVersion(long fileID, java.io.File newVersion, java.io.File replaceCurrLatestVer, java.lang.String comment, java.lang.String userName)
          Adds a new version to an existing file.
 long addProject(long parentID, java.lang.String name)
          Adds a new project at the specified location (the NodeName object) to this archive.
 void checkInFile(long fileID)
          Set status of specified file to checked in.
 void checkOutFile(long fileID, java.lang.String userName, java.lang.String checkOutLocation)
          Set status of specified file to checked out.
 ArchiveInfo getArchiveInfo()
          Returns the ArchiveInfo object for this Archive.
 File getFile(long fileID)
          Get File object (info about file).
 java.lang.String getFileDescription(long fileID)
          Returns the description of a file.
 long getFileLatestVersion(long fileID, int requestedEOL)
          Get latest version of file source to temp dir and return temp file ID.
 TextLineReader getFileLatestVersionTLR(long fileID)
          Get latest version of text file source as TextLineReader.
 FileNode getFileNode(long fileID)
          Allows "master control" to look at file info to verify check out, check in, file type, etc.
 FileNode getFileNode(long fileID, boolean readOnly)
          Allows "master control" to look at file info to verify check out, check in, file type, etc.
 Delta getFileVersionDelta(long versionID)
          Get specified delta object for file.
 Label getLabelContentList(java.lang.String labelName)
          Returns the Label object (which contains the sourcejammer path and version number for each object in the labeled version) with the specified name.
 NodeList getLabelList()
          Returns NodeList of all LabelInfo objects in this archive.
 java.io.File getLatestVersionSourceFilePointer(long fileID)
          Returns java.io.File object for latest version's source.
 Project getProject(long projectID)
          Get Project object (info about project).
 java.util.Vector getRemovedNodes(long projectID)
          Returns a Vector of NodeInfo objects, one for each node that has been removed (but not permanently deleted) from the parent project.
 Project getRootProject()
          Returns the view Project for the root node of the archive for this ProjectController.
 long getUniqueIDFromPath(long parentID, java.lang.String path)
          Returns unique id based on a path.
 java.lang.String getVersionComment(long versionID)
          Get the comment for the specified version.
 long getVersionFileSizeInBytes(long fileID, int versionNumber)
          Gets the size of the version file in bytes.
 void makeLabeledVersion(java.lang.String name, java.lang.String description, long parentID)
          Create and save a new labeled version with the passed-in name and description and containing all of the latest versions that are children of parent.
 void permanentlyDeleteRemovedNode(long parentID, int index)
          Permanently delete the specified removed node from the archive.
 void releaseFileNode(FileNode nd)
          Release a file node.
 void removeFile(long parentID, long fileID)
          Remove specified file from project hierarchy.
 void removeProject(long parentID, long projectID)
          Remove specified project from the project hierarchy.
 void renameFile(long parentID, long fileID, java.lang.String newName)
           
 void renameProject(long parentID, long projectID, java.lang.String newName)
           
 void restoreRemovedNode(long parentID, int index)
          Restores a project or file node that was previously removed from the archive.
 void restoreRemovedNode(long parentID, java.lang.String newName, int index)
          & Restores a project or file node that was previously removed from the archive.
 java.io.File retrieveVersionDeltaFile(NodeInfo versionNode)
           
 void rollbackToVersion(long fileID, long versionID, java.io.File newLatestVersion)
          Rollback specified file to specified version number.
 void setArchiveInfo(ArchiveInfo info)
          Sets the ArchiveInfo object for this Archive.
 void setFileDescription(long fileID, java.lang.String description)
          Changes description of a file.
 void setVersionComment(long fileID, int version, java.lang.String comment)
          Set the comment of the specified version.
 

Method Detail

setArchiveInfo

public void setArchiveInfo(ArchiveInfo info)
                    throws FileAccessException
Sets the ArchiveInfo object for this Archive.

getArchiveInfo

public ArchiveInfo getArchiveInfo()
Returns the ArchiveInfo object for this Archive.

getRootProject

public Project getRootProject()
                       throws FileAccessException,
                              SecurityException
Returns the view Project for the root node of the archive for this ProjectController.

addProject

public long addProject(long parentID,
                       java.lang.String name)
                throws FileAccessException,
                       ProjectDoesNotExistException,
                       NodeExistsException,
                       SecurityException
Adds a new project at the specified location (the NodeName object) to this archive.
Returns:
unique id of new project.

addFile

public long addFile(long parentID,
                    java.lang.String name,
                    java.io.File file,
                    FileProperties props,
                    java.lang.String userName)
             throws FileAccessException,
                    ProjectDoesNotExistException,
                    FileAlreadyExistsException,
                    SecurityException,
                    TextFileException
Adds a new file to this archive, at the specified location. Note: fileType means binary or text.

getFileDescription

public java.lang.String getFileDescription(long fileID)
                                    throws FileAccessException,
                                           FileDoesNotExistException,
                                           SecurityException
Returns the description of a file.

setFileDescription

public void setFileDescription(long fileID,
                               java.lang.String description)
                        throws FileAccessException,
                               ProjectDoesNotExistException,
                               FileDoesNotExistException,
                               SecurityException
Changes description of a file.

getVersionFileSizeInBytes

public long getVersionFileSizeInBytes(long fileID,
                                      int versionNumber)
                               throws FileAccessException,
                                      ProjectDoesNotExistException,
                                      FileDoesNotExistException,
                                      NoSuchVersionException,
                                      SecurityException
Gets the size of the version file in bytes.

getUniqueIDFromPath

public long getUniqueIDFromPath(long parentID,
                                java.lang.String path)
                         throws FileAccessException,
                                ProjectDoesNotExistException,
                                NodeDoesNotExistException,
                                SecurityException
Returns unique id based on a path.

addNewVersion

public long addNewVersion(long fileID,
                          java.io.File newVersion,
                          java.io.File replaceCurrLatestVer,
                          java.lang.String comment,
                          java.lang.String userName)
                   throws FileAccessException,
                          ProjectDoesNotExistException,
                          FileDoesNotExistException,
                          TextFileException,
                          SecurityException
Adds a new version to an existing file. Returns newest version unique id.

getProject

public Project getProject(long projectID)
                   throws FileAccessException,
                          ProjectDoesNotExistException,
                          SecurityException
Get Project object (info about project).

getFile

public File getFile(long fileID)
             throws FileAccessException,
                    FileDoesNotExistException,
                    SecurityException
Get File object (info about file).

getLatestVersionSourceFilePointer

public java.io.File getLatestVersionSourceFilePointer(long fileID)
                                               throws FileAccessException,
                                                      FileDoesNotExistException,
                                                      SecurityException
Returns java.io.File object for latest version's source.

getFileLatestVersion

public long getFileLatestVersion(long fileID,
                                 int requestedEOL)
                          throws FileAccessException,
                                 FileDoesNotExistException,
                                 TextFileException,
                                 SecurityException
Get latest version of file source to temp dir and return temp file ID.

getFileLatestVersionTLR

public TextLineReader getFileLatestVersionTLR(long fileID)
                                       throws FileAccessException,
                                              FileDoesNotExistException,
                                              TextFileException,
                                              SecurityException
Get latest version of text file source as TextLineReader.

getFileVersionDelta

public Delta getFileVersionDelta(long versionID)
                          throws FileAccessException,
                                 ProjectDoesNotExistException,
                                 FileDoesNotExistException,
                                 NoSuchVersionException,
                                 WrongFileTypeException
Get specified delta object for file.

removeProject

public void removeProject(long parentID,
                          long projectID)
                   throws FileAccessException,
                          ProjectDoesNotExistException,
                          SecurityException
Remove specified project from the project hierarchy.

removeFile

public void removeFile(long parentID,
                       long fileID)
                throws FileAccessException,
                       ProjectDoesNotExistException,
                       FileDoesNotExistException,
                       SecurityException
Remove specified file from project hierarchy.

retrieveVersionDeltaFile

public java.io.File retrieveVersionDeltaFile(NodeInfo versionNode)
                                      throws FileAccessException,
                                             WrongFileTypeException

rollbackToVersion

public void rollbackToVersion(long fileID,
                              long versionID,
                              java.io.File newLatestVersion)
                       throws FileAccessException,
                              ProjectDoesNotExistException,
                              FileDoesNotExistException,
                              NoSuchVersionException,
                              SecurityException,
                              TextFileException
Rollback specified file to specified version number. Sets the latestversion source to newLatestVersion.

setVersionComment

public void setVersionComment(long fileID,
                              int version,
                              java.lang.String comment)
                       throws FileAccessException,
                              ProjectDoesNotExistException,
                              FileDoesNotExistException,
                              NoSuchVersionException,
                              SecurityException
Set the comment of the specified version.

getVersionComment

public java.lang.String getVersionComment(long versionID)
                                   throws FileAccessException,
                                          ProjectDoesNotExistException,
                                          FileDoesNotExistException,
                                          NoSuchVersionException
Get the comment for the specified version.

checkOutFile

public void checkOutFile(long fileID,
                         java.lang.String userName,
                         java.lang.String checkOutLocation)
                  throws FileAccessException,
                         ProjectDoesNotExistException,
                         FileDoesNotExistException,
                         CheckOutException,
                         SecurityException
Set status of specified file to checked out. Does not return the file. Does guarantee that no other method will check out the file until it is checked in.

checkInFile

public void checkInFile(long fileID)
                 throws FileAccessException,
                        ProjectDoesNotExistException,
                        FileDoesNotExistException,
                        CheckInException,
                        SecurityException
Set status of specified file to checked in. Does not add the new file version to model implementation. Does not guarantee that user checking in file is the same user who checked it out. Does guaranted that file will not be checked in if it has already been checked it.

getFileNode

public FileNode getFileNode(long fileID)
                     throws FileAccessException,
                            FileDoesNotExistException,
                            SecurityException
Allows "master control" to look at file info to verify check out, check in, file type, etc.

getFileNode

public FileNode getFileNode(long fileID,
                            boolean readOnly)
                     throws FileAccessException,
                            FileDoesNotExistException,
                            SecurityException
Allows "master control" to look at file info to verify check out, check in, file type, etc.

releaseFileNode

public void releaseFileNode(FileNode nd)
                     throws FileAccessException
Release a file node.

restoreRemovedNode

public void restoreRemovedNode(long parentID,
                               int index)
                        throws FileAccessException,
                               ProjectDoesNotExistException,
                               FileDoesNotExistException,
                               NodeDoesNotExistException,
                               NodeExistsException,
                               SecurityException
Restores a project or file node that was previously removed from the archive.
Parameters:
parent - -- NodeName of the project from which the node was removed.
index - -- Index value of the removed node in the removed nodes list (see getRemovedNodes()).

restoreRemovedNode

public void restoreRemovedNode(long parentID,
                               java.lang.String newName,
                               int index)
                        throws FileAccessException,
                               ProjectDoesNotExistException,
                               FileDoesNotExistException,
                               NodeDoesNotExistException,
                               NodeExistsException,
                               SecurityException
& Restores a project or file node that was previously removed from the archive.
Parameters:
parent - -- NodeName of the project from which the node was removed.
newName - -- a new name for the removed node.
index - -- Index value of the removed node in the removed nodes list (see getRemovedNodes()).

getRemovedNodes

public java.util.Vector getRemovedNodes(long projectID)
                                 throws FileAccessException,
                                        ProjectDoesNotExistException,
                                        SecurityException
Returns a Vector of NodeInfo objects, one for each node that has been removed (but not permanently deleted) from the parent project.
Parameters:
parent - -- project NodeName to return a list of removed nodes for.

permanentlyDeleteRemovedNode

public void permanentlyDeleteRemovedNode(long parentID,
                                         int index)
                                  throws FileAccessException,
                                         ProjectDoesNotExistException,
                                         NodeDoesNotExistException,
                                         SecurityException
Permanently delete the specified removed node from the archive.

makeLabeledVersion

public void makeLabeledVersion(java.lang.String name,
                               java.lang.String description,
                               long parentID)
                        throws NodeExistsException,
                               FileAccessException,
                               ProjectDoesNotExistException,
                               NoSuchVersionException,
                               FileDoesNotExistException,
                               SecurityException
Create and save a new labeled version with the passed-in name and description and containing all of the latest versions that are children of parent.

getLabelContentList

public Label getLabelContentList(java.lang.String labelName)
                          throws NodeDoesNotExistException,
                                 FileAccessException
Returns the Label object (which contains the sourcejammer path and version number for each object in the labeled version) with the specified name.

getLabelList

public NodeList getLabelList()
Returns NodeList of all LabelInfo objects in this archive.

renameFile

public void renameFile(long parentID,
                       long fileID,
                       java.lang.String newName)
                throws FileAccessException,
                       ProjectDoesNotExistException,
                       FileDoesNotExistException,
                       NodeExistsException,
                       SecurityException

renameProject

public void renameProject(long parentID,
                          long projectID,
                          java.lang.String newName)
                   throws FileAccessException,
                          ProjectDoesNotExistException,
                          NodeExistsException,
                          SecurityException

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