org.sourcejammer.project.controller
Interface Archive

All Known Implementing Classes:
ProjectController

public interface Archive

Title: $FileName: Archive.java$

Version:
$VerNum: 30$
Author:
$AuthorName: Rob MacGrogan$
$Description: $
$KeyWordsOff: $


Method Summary
 long[] addFile(long parentID, java.lang.String name, java.io.File file, org.sourcejammer.project.view.FileProperties props, java.lang.String userName, java.lang.String initialBranchIdentifier)
          Adds a new file to this archive, at the specified location.
 long addNewVersion(long fileID, java.io.File newVersion, java.lang.String comment, java.lang.String userName)
          Adds a new version to an existing file.
 long addProject(long parentID, java.lang.String name, org.sourcejammer.project.view.SJRequest request, org.sourcejammer.project.view.SJResponse response)
          Adds a new project at the specified location (the NodeName object) to this archive.
 long branchFile(long fileID, long parentProjectID, java.lang.String userName, java.lang.String comment, java.lang.String newBranchIdentifier)
          Creates a new branch of a shared file in parentProject.
 void branchProject(long projectID, java.lang.String userName, java.lang.String comment, java.lang.String newBranchIdentifier, org.sourcejammer.project.view.SJRequest request, org.sourcejammer.project.view.SJResponse response)
          Creates a new branch of all shared files in project, recursively.
 SharesCheckouts checkDeletedNodeShareStatus(long parentID, int removedIndex)
          Returns true if the deleted item is a file with shares or with more than one parent (removed or ordinary parents combined) or if the deleted item is a project that contains any files that meet this definition.
 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.
 void copyFile(long fileID, long newParentProjectID, java.lang.String userName, org.sourcejammer.project.view.SJRequest request, org.sourcejammer.project.view.SJResponse response)
          Copies the specified file from one project to another.
 void copyProject(long projectID, long newParentProjectID, java.lang.String userName, java.lang.String newProjectName, org.sourcejammer.project.view.SJRequest request, org.sourcejammer.project.view.SJResponse response)
          Copies the specified project and all children from one project to another.
 void deleteRemovedNode(long parentID, int index, boolean permanentlyDeleteAllShares, org.sourcejammer.project.view.SJRequest request, org.sourcejammer.project.view.SJResponse response)
          Permanently delete the specified removed node from the archive.
 boolean doesProjectContainShares(long projectID)
          Returns true if any file in the project tree is shared.
 ServerActionPluginPool getActionPlugins()
           
 ArchiveContext getArchiveContext()
           
 ArchiveInfoFlex getArchiveInfo()
          Returns the ArchiveInfo object for this Archive.
 org.sourcejammer.project.view.Branch getBranches(long fileID)
          Return master file object (as a Branch object) for the specified file id.
 long getChangeList(long labelID, int verNewer, int verOlder, int eolType)
          Generated change list for specified label and saves it as a temp file.
 org.sourcejammer.project.view.File getFile(long fileID)
          Get File object (info about 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.
 FileChangeListenerPool getFileListeners()
           
 FileNode getFileNode(long fileID)
          Allows "master control" to look at file info to verify check out, check in, file type, etc.
 Delta getFileVersionDelta(org.sourcejammer.project.view.NodeInfo ver)
          Get specified delta object for file.
 Delta getFileVersionTextDelta(org.sourcejammer.project.view.NodeInfo ver)
          Get specified delta object for a text file.
 Label getLabelContentList(long labelID, int versionNumber)
          Returns the Label object (which contains the sourcejammer path and version number for each object in the labeled version) with the specified name.
 java.io.File getLatestVersionSourceFilePointer(long fileID)
          Returns java.io.File object for latest version's source.
 NodeLibrary getNodeLibrary()
           
 java.lang.String getPathToProject(long projectID)
           
 org.sourcejammer.project.view.Project getProject(long projectID)
          Get Project object (info about project).
 ProjectChangeListenerPool getProjectListeners()
           
 ProjectNode getProjectNode(long projectID)
          Be careful with this direct reference to a ProjectNode object in the cache.
 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.
 org.sourcejammer.project.view.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.
 java.io.File getVersionCommentFilePointer(long fileID, int versionNumber)
          Returns java.io.File object for requested version's comment file.
 java.io.File getVersionSourceFilePointer(long fileID, int versionNumber)
          Returns java.io.File object for requested version's source.
 void makeLabeledVersion(java.lang.String name, java.lang.String description, long parentID, java.lang.String userName)
          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 moveFile(long fileID, long parentProjectID, long newParentProjectID, java.lang.String userName)
          Moves the specified file from one project to another.
 void moveProject(long projectID, long newParentProjectID, java.lang.String newProjectName)
           
 void rebuildLabel(long labelID, java.lang.String description, long parentProjectID, java.lang.String userName, boolean buildChangeList)
           
 void releaseFileNode(FileNode nd)
          Release a file node.
 void removeFile(long parentID, long fileID, org.sourcejammer.project.view.SJRequest request, org.sourcejammer.project.view.SJResponse response)
          Remove specified file from project hierarchy.
 void removeFileFromAllParents(long fileID, org.sourcejammer.project.view.SJRequest request, org.sourcejammer.project.view.SJResponse response)
          Remove specified file from all parent projects.
 void removeFileShare(long fileID, long parentProjectID)
          Remove a share from a file.
 void removeProject(long parentID, long projectID, org.sourcejammer.project.view.SJRequest request, org.sourcejammer.project.view.SJResponse response)
          Remove specified project from the project hierarchy.
 void removeProjectAndRemoveFilesFromAllParents(long projectID, org.sourcejammer.project.view.SJRequest request, org.sourcejammer.project.view.SJResponse response)
          Remove specified project from the project hierarchy.
 void removeProjectShare(long projectID, org.sourcejammer.project.view.SJRequest request, org.sourcejammer.project.view.SJResponse response)
          Recursively removes shares from all shared files.
 java.lang.String renameFile(long parentID, long fileID, java.lang.String newName)
          Returns previous file name.
 java.lang.String renameProject(long parentID, long projectID, java.lang.String newName)
          Returns previous project name.
 void restoreRemovedNode(long parentID, java.lang.String newName, int index, org.sourcejammer.project.view.SJRequest request, org.sourcejammer.project.view.SJResponse response)
          & Restores a project or file node that was previously removed from the archive.
 java.io.File retrieveVersionDeltaFile(org.sourcejammer.project.view.NodeInfo versionNode)
           
 void setArchiveContext(ArchiveContext context)
           
 java.lang.String 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.
 void shareFile(long fileID, long newParentProjectID)
          Creates a new share for the specified file in the specified project.
 void shareProject(long projectID, long newParentProjectID, java.lang.String newProjectName, java.lang.String userName, org.sourcejammer.project.view.SJRequest request, org.sourcejammer.project.view.SJResponse response)
          Recurses through the project specified by projectID and creates a new share for each file in newParentProject.
 

Method Detail

setArchiveContext

public void setArchiveContext(ArchiveContext context)

getArchiveContext

public ArchiveContext getArchiveContext()

getFileListeners

public FileChangeListenerPool getFileListeners()

getProjectListeners

public ProjectChangeListenerPool getProjectListeners()

getActionPlugins

public ServerActionPluginPool getActionPlugins()

getNodeLibrary

public NodeLibrary getNodeLibrary()

doesProjectContainShares

public boolean doesProjectContainShares(long projectID)
                                 throws FileAccessException,
                                        SecurityException,
                                        ProjectDoesNotExistException,
                                        FileDoesNotExistException
Returns true if any file in the project tree is shared.

FileAccessException
SecurityException
ProjectDoesNotExistException
FileDoesNotExistException

checkDeletedNodeShareStatus

public SharesCheckouts checkDeletedNodeShareStatus(long parentID,
                                                   int removedIndex)
                                            throws ProjectDoesNotExistException,
                                                   FileAccessException,
                                                   SecurityException,
                                                   org.sourcejammer.project.NodeDoesNotExistException,
                                                   FileDoesNotExistException
Returns true if the deleted item is a file with shares or with more than one parent (removed or ordinary parents combined) or if the deleted item is a project that contains any files that meet this definition.

ProjectDoesNotExistException
FileAccessException
SecurityException
org.sourcejammer.project.NodeDoesNotExistException
FileDoesNotExistException

shareFile

public void shareFile(long fileID,
                      long newParentProjectID)
               throws SecurityException,
                      FileDoesNotExistException,
                      FileAccessException,
                      ProjectDoesNotExistException,
                      NoSuchVersionException,
                      org.sourcejammer.project.NodeExistsException
Creates a new share for the specified file in the specified project.

SecurityException
FileDoesNotExistException
FileAccessException
ProjectDoesNotExistException
NoSuchVersionException
org.sourcejammer.project.NodeExistsException

shareProject

public void shareProject(long projectID,
                         long newParentProjectID,
                         java.lang.String newProjectName,
                         java.lang.String userName,
                         org.sourcejammer.project.view.SJRequest request,
                         org.sourcejammer.project.view.SJResponse response)
                  throws FileAccessException,
                         SecurityException,
                         ProjectDoesNotExistException,
                         org.sourcejammer.project.NodeExistsException,
                         NoSuchVersionException,
                         FileDoesNotExistException
Recurses through the project specified by projectID and creates a new share for each file in newParentProject. New projects are created for all subprojects of project.

FileAccessException
SecurityException
ProjectDoesNotExistException
org.sourcejammer.project.NodeExistsException
NoSuchVersionException
FileDoesNotExistException

removeFileShare

public void removeFileShare(long fileID,
                            long parentProjectID)
                     throws SecurityException,
                            FileDoesNotExistException,
                            FileAccessException,
                            ProjectDoesNotExistException,
                            NoSuchVersionException,
                            org.sourcejammer.project.NodeDoesNotExistException
Remove a share from a file. This is NOT the same as a branch.

SecurityException
FileDoesNotExistException
FileAccessException
ProjectDoesNotExistException
NoSuchVersionException
org.sourcejammer.project.NodeDoesNotExistException

removeProjectShare

public void removeProjectShare(long projectID,
                               org.sourcejammer.project.view.SJRequest request,
                               org.sourcejammer.project.view.SJResponse response)
                        throws FileAccessException,
                               FileDoesNotExistException,
                               SecurityException,
                               ProjectDoesNotExistException,
                               NoSuchVersionException,
                               org.sourcejammer.project.NodeDoesNotExistException
Recursively removes shares from all shared files.

FileAccessException
FileDoesNotExistException
SecurityException
ProjectDoesNotExistException
NoSuchVersionException
org.sourcejammer.project.NodeDoesNotExistException

getBranches

public org.sourcejammer.project.view.Branch getBranches(long fileID)
                                                 throws SecurityException,
                                                        FileDoesNotExistException,
                                                        FileAccessException
Return master file object (as a Branch object) for the specified file id.

SecurityException
FileDoesNotExistException
FileAccessException

branchFile

public long branchFile(long fileID,
                       long parentProjectID,
                       java.lang.String userName,
                       java.lang.String comment,
                       java.lang.String newBranchIdentifier)
                throws SecurityException,
                       FileDoesNotExistException,
                       FileAccessException,
                       NoSuchVersionException,
                       ProjectDoesNotExistException,
                       org.sourcejammer.project.NodeDoesNotExistException,
                       org.sourcejammer.project.NodeExistsException
Creates a new branch of a shared file in parentProject.

SecurityException
FileDoesNotExistException
FileAccessException
NoSuchVersionException
ProjectDoesNotExistException
org.sourcejammer.project.NodeDoesNotExistException
org.sourcejammer.project.NodeExistsException

branchProject

public void branchProject(long projectID,
                          java.lang.String userName,
                          java.lang.String comment,
                          java.lang.String newBranchIdentifier,
                          org.sourcejammer.project.view.SJRequest request,
                          org.sourcejammer.project.view.SJResponse response)
                   throws FileAccessException,
                          SecurityException,
                          ProjectDoesNotExistException,
                          org.sourcejammer.project.NodeExistsException,
                          NoSuchVersionException,
                          FileDoesNotExistException,
                          org.sourcejammer.project.NodeDoesNotExistException
Creates a new branch of all shared files in project, recursively.

FileAccessException
SecurityException
ProjectDoesNotExistException
org.sourcejammer.project.NodeExistsException
NoSuchVersionException
FileDoesNotExistException
org.sourcejammer.project.NodeDoesNotExistException

copyFile

public void copyFile(long fileID,
                     long newParentProjectID,
                     java.lang.String userName,
                     org.sourcejammer.project.view.SJRequest request,
                     org.sourcejammer.project.view.SJResponse response)
              throws org.sourcejammer.project.NodeExistsException,
                     org.sourcejammer.project.NodeDoesNotExistException,
                     SecurityException,
                     FileAccessException,
                     FileDoesNotExistException,
                     NoSuchVersionException
Copies the specified file from one project to another. No file history is copied. A new source file is created.

org.sourcejammer.project.NodeExistsException
org.sourcejammer.project.NodeDoesNotExistException
SecurityException
FileAccessException
FileDoesNotExistException
NoSuchVersionException

moveProject

public void moveProject(long projectID,
                        long newParentProjectID,
                        java.lang.String newProjectName)
                 throws org.sourcejammer.project.NodeExistsException,
                        FileAccessException,
                        SecurityException,
                        NoSuchVersionException,
                        org.sourcejammer.project.NodeDoesNotExistException,
                        ProjectDoesNotExistException
org.sourcejammer.project.NodeExistsException
FileAccessException
SecurityException
NoSuchVersionException
org.sourcejammer.project.NodeDoesNotExistException
ProjectDoesNotExistException

copyProject

public void copyProject(long projectID,
                        long newParentProjectID,
                        java.lang.String userName,
                        java.lang.String newProjectName,
                        org.sourcejammer.project.view.SJRequest request,
                        org.sourcejammer.project.view.SJResponse response)
                 throws org.sourcejammer.project.NodeExistsException,
                        org.sourcejammer.project.NodeDoesNotExistException,
                        SecurityException,
                        FileAccessException,
                        FileDoesNotExistException,
                        NoSuchVersionException,
                        ProjectDoesNotExistException
Copies the specified project and all children from one project to another. No file history is copied. A new source for each file is created.

org.sourcejammer.project.NodeExistsException
org.sourcejammer.project.NodeDoesNotExistException
SecurityException
FileAccessException
FileDoesNotExistException
NoSuchVersionException
ProjectDoesNotExistException

moveFile

public void moveFile(long fileID,
                     long parentProjectID,
                     long newParentProjectID,
                     java.lang.String userName)
              throws org.sourcejammer.project.NodeExistsException,
                     FileAccessException,
                     SecurityException,
                     NoSuchVersionException,
                     org.sourcejammer.project.NodeDoesNotExistException,
                     FileDoesNotExistException
Moves the specified file from one project to another.

org.sourcejammer.project.NodeExistsException
FileAccessException
SecurityException
NoSuchVersionException
org.sourcejammer.project.NodeDoesNotExistException
FileDoesNotExistException

getArchiveInfo

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


getRootProject

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

FileAccessException
SecurityException

addProject

public long addProject(long parentID,
                       java.lang.String name,
                       org.sourcejammer.project.view.SJRequest request,
                       org.sourcejammer.project.view.SJResponse response)
                throws FileAccessException,
                       ProjectDoesNotExistException,
                       org.sourcejammer.project.NodeExistsException,
                       SecurityException
Adds a new project at the specified location (the NodeName object) to this archive.

Returns:
unique id of new project.
FileAccessException
ProjectDoesNotExistException
org.sourcejammer.project.NodeExistsException
SecurityException

addFile

public long[] addFile(long parentID,
                      java.lang.String name,
                      java.io.File file,
                      org.sourcejammer.project.view.FileProperties props,
                      java.lang.String userName,
                      java.lang.String initialBranchIdentifier)
               throws FileAccessException,
                      ProjectDoesNotExistException,
                      FileAlreadyExistsException,
                      SecurityException,
                      TextFileException
Adds a new file to this archive, at the specified location. Returns 0=file id, 1 = verison id. Note: fileType means binary or text.

FileAccessException
ProjectDoesNotExistException
FileAlreadyExistsException
SecurityException
TextFileException

setFileDescription

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

FileAccessException
ProjectDoesNotExistException
FileDoesNotExistException
SecurityException

getUniqueIDFromPath

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

FileAccessException
ProjectDoesNotExistException
org.sourcejammer.project.NodeDoesNotExistException
SecurityException

addNewVersion

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

FileAccessException
ProjectDoesNotExistException
FileDoesNotExistException
TextFileException
SecurityException
EndOfSourceException
InvalidSourceException
WrongFileTypeException

getProject

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

FileAccessException
ProjectDoesNotExistException
SecurityException

getPathToProject

public java.lang.String getPathToProject(long projectID)
                                  throws SecurityException,
                                         ProjectDoesNotExistException,
                                         FileAccessException
SecurityException
ProjectDoesNotExistException
FileAccessException

getProjectNode

public ProjectNode getProjectNode(long projectID)
                           throws SecurityException,
                                  FileAccessException,
                                  ProjectDoesNotExistException
Be careful with this direct reference to a ProjectNode object in the cache.

SecurityException
FileAccessException
ProjectDoesNotExistException

getFile

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

FileAccessException
FileDoesNotExistException
SecurityException

getLatestVersionSourceFilePointer

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

FileAccessException
FileDoesNotExistException
SecurityException

getVersionCommentFilePointer

public java.io.File getVersionCommentFilePointer(long fileID,
                                                 int versionNumber)
                                          throws FileAccessException,
                                                 FileDoesNotExistException,
                                                 SecurityException
Returns java.io.File object for requested version's comment file.

FileAccessException
FileDoesNotExistException
SecurityException

getVersionSourceFilePointer

public java.io.File getVersionSourceFilePointer(long fileID,
                                                int versionNumber)
                                         throws FileAccessException,
                                                FileDoesNotExistException,
                                                SecurityException
Returns java.io.File object for requested version's source.

FileAccessException
FileDoesNotExistException
SecurityException

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.

FileAccessException
FileDoesNotExistException
TextFileException
SecurityException

getFileLatestVersionTLR

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

FileAccessException
FileDoesNotExistException
TextFileException
SecurityException

getFileVersionDelta

public Delta getFileVersionDelta(org.sourcejammer.project.view.NodeInfo ver)
                          throws FileAccessException,
                                 ProjectDoesNotExistException,
                                 FileDoesNotExistException,
                                 NoSuchVersionException,
                                 WrongFileTypeException
Get specified delta object for file.

FileAccessException
ProjectDoesNotExistException
FileDoesNotExistException
NoSuchVersionException
WrongFileTypeException

getFileVersionTextDelta

public Delta getFileVersionTextDelta(org.sourcejammer.project.view.NodeInfo ver)
                              throws FileAccessException,
                                     ProjectDoesNotExistException,
                                     FileDoesNotExistException,
                                     NoSuchVersionException,
                                     WrongFileTypeException
Get specified delta object for a text file.

FileAccessException
ProjectDoesNotExistException
FileDoesNotExistException
NoSuchVersionException
WrongFileTypeException

removeProjectAndRemoveFilesFromAllParents

public void removeProjectAndRemoveFilesFromAllParents(long projectID,
                                                      org.sourcejammer.project.view.SJRequest request,
                                                      org.sourcejammer.project.view.SJResponse response)
                                               throws FileAccessException,
                                                      ProjectDoesNotExistException,
                                                      SecurityException
Remove specified project from the project hierarchy. And removes shared subfiles from all parents. We need request and response here so we can call listeners for every file removed.

FileAccessException
ProjectDoesNotExistException
SecurityException

removeProject

public void removeProject(long parentID,
                          long projectID,
                          org.sourcejammer.project.view.SJRequest request,
                          org.sourcejammer.project.view.SJResponse response)
                   throws FileAccessException,
                          ProjectDoesNotExistException,
                          SecurityException
Remove specified project from the project hierarchy. We need request and response here so we can call listeners for every file removed.

FileAccessException
ProjectDoesNotExistException
SecurityException

removeFile

public void removeFile(long parentID,
                       long fileID,
                       org.sourcejammer.project.view.SJRequest request,
                       org.sourcejammer.project.view.SJResponse response)
                throws FileAccessException,
                       ProjectDoesNotExistException,
                       FileDoesNotExistException,
                       SecurityException
Remove specified file from project hierarchy.

FileAccessException
ProjectDoesNotExistException
FileDoesNotExistException
SecurityException

removeFileFromAllParents

public void removeFileFromAllParents(long fileID,
                                     org.sourcejammer.project.view.SJRequest request,
                                     org.sourcejammer.project.view.SJResponse response)
                              throws FileAccessException,
                                     ProjectDoesNotExistException,
                                     FileDoesNotExistException,
                                     SecurityException
Remove specified file from all parent projects.

FileAccessException
ProjectDoesNotExistException
FileDoesNotExistException
SecurityException

retrieveVersionDeltaFile

public java.io.File retrieveVersionDeltaFile(org.sourcejammer.project.view.NodeInfo versionNode)
                                      throws FileAccessException,
                                             WrongFileTypeException
FileAccessException
WrongFileTypeException

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.

FileAccessException
ProjectDoesNotExistException
FileDoesNotExistException
NoSuchVersionException
SecurityException

getVersionComment

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

FileAccessException
ProjectDoesNotExistException
FileDoesNotExistException
NoSuchVersionException

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.

FileAccessException
ProjectDoesNotExistException
FileDoesNotExistException
CheckOutException
SecurityException

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.

FileAccessException
ProjectDoesNotExistException
FileDoesNotExistException
CheckInException
SecurityException

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.

FileAccessException
FileDoesNotExistException
SecurityException

releaseFileNode

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

FileAccessException

restoreRemovedNode

public void restoreRemovedNode(long parentID,
                               java.lang.String newName,
                               int index,
                               org.sourcejammer.project.view.SJRequest request,
                               org.sourcejammer.project.view.SJResponse response)
                        throws FileAccessException,
                               ProjectDoesNotExistException,
                               FileDoesNotExistException,
                               org.sourcejammer.project.NodeDoesNotExistException,
                               org.sourcejammer.project.NodeExistsException,
                               SecurityException
& Restores a project or file node that was previously removed from the archive.

Parameters:
parentID - -- id 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()).
FileAccessException
ProjectDoesNotExistException
FileDoesNotExistException
org.sourcejammer.project.NodeDoesNotExistException
org.sourcejammer.project.NodeExistsException
SecurityException

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:
projectID - -- project id to return a list of removed nodes for.
FileAccessException
ProjectDoesNotExistException
SecurityException

deleteRemovedNode

public void deleteRemovedNode(long parentID,
                              int index,
                              boolean permanentlyDeleteAllShares,
                              org.sourcejammer.project.view.SJRequest request,
                              org.sourcejammer.project.view.SJResponse response)
                       throws FileAccessException,
                              FileDoesNotExistException,
                              ProjectDoesNotExistException,
                              SecurityException,
                              org.sourcejammer.project.NodeDoesNotExistException
Permanently delete the specified removed node from the archive.

FileAccessException
FileDoesNotExistException
ProjectDoesNotExistException
SecurityException
org.sourcejammer.project.NodeDoesNotExistException

makeLabeledVersion

public void makeLabeledVersion(java.lang.String name,
                               java.lang.String description,
                               long parentID,
                               java.lang.String userName)
                        throws LabelBuildException,
                               FileAccessException,
                               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.

LabelBuildException
FileAccessException
SecurityException

getChangeList

public long getChangeList(long labelID,
                          int verNewer,
                          int verOlder,
                          int eolType)
                   throws org.sourcejammer.project.NodeDoesNotExistException,
                          FileAccessException,
                          FileDoesNotExistException,
                          SecurityException,
                          EndOfSourceException,
                          InvalidSourceException,
                          WrongFileTypeException,
                          NoSuchVersionException,
                          TextFileException,
                          ProjectDoesNotExistException
Generated change list for specified label and saves it as a temp file. Returns id of temp file.

org.sourcejammer.project.NodeDoesNotExistException
FileAccessException
FileDoesNotExistException
SecurityException
EndOfSourceException
InvalidSourceException
WrongFileTypeException
NoSuchVersionException
TextFileException
ProjectDoesNotExistException

getLabelContentList

public Label getLabelContentList(long labelID,
                                 int versionNumber)
                          throws org.sourcejammer.project.NodeDoesNotExistException,
                                 FileAccessException,
                                 FileDoesNotExistException,
                                 SecurityException,
                                 EndOfSourceException,
                                 InvalidSourceException,
                                 WrongFileTypeException,
                                 NoSuchVersionException,
                                 TextFileException,
                                 ProjectDoesNotExistException
Returns the Label object (which contains the sourcejammer path and version number for each object in the labeled version) with the specified name.

org.sourcejammer.project.NodeDoesNotExistException
FileAccessException
FileDoesNotExistException
SecurityException
EndOfSourceException
InvalidSourceException
WrongFileTypeException
NoSuchVersionException
TextFileException
ProjectDoesNotExistException

rebuildLabel

public void rebuildLabel(long labelID,
                         java.lang.String description,
                         long parentProjectID,
                         java.lang.String userName,
                         boolean buildChangeList)
                  throws LabelBuildException,
                         FileAccessException,
                         SecurityException
LabelBuildException
FileAccessException
SecurityException

renameFile

public java.lang.String renameFile(long parentID,
                                   long fileID,
                                   java.lang.String newName)
                            throws FileAccessException,
                                   ProjectDoesNotExistException,
                                   FileDoesNotExistException,
                                   org.sourcejammer.project.NodeExistsException,
                                   SecurityException
Returns previous file name.

FileAccessException
ProjectDoesNotExistException
FileDoesNotExistException
org.sourcejammer.project.NodeExistsException
SecurityException

renameProject

public java.lang.String renameProject(long parentID,
                                      long projectID,
                                      java.lang.String newName)
                               throws FileAccessException,
                                      ProjectDoesNotExistException,
                                      org.sourcejammer.project.NodeExistsException,
                                      SecurityException
Returns previous project name.

FileAccessException
ProjectDoesNotExistException
org.sourcejammer.project.NodeExistsException
SecurityException


Copyright © 2003 Soucejammer project.