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

org.sourcejammer.project.view
Class MasterControlProgram

java.lang.Object
  |
  +--org.sourcejammer.project.view.MasterControlProgram

public class MasterControlProgram
extends java.lang.Object

This is a central clearing house for commands sent to SourceJammer from remote clients. All methods are static. Clients can use SOAP to call methods in this Class, which deals with all the server-side objects.


Method Summary
static SJResponse addArchive(SJRequest request)
           
static SJResponse addFile(SJRequest request)
          Adds a new file.
static SJResponse addProject(SJRequest request)
          Adds a new project.
static SJResponse addToArchiveControllerUsers(SJRequest request)
          Add user to controller users list for an archive.

Required SJRequest Params:
   newUserName -- user name of user being added to controller users list.
static SJResponse addToArchiveUsers(SJRequest request)
          Add user to users list for an archive.

Required SJRequest Params:
   newUserName -- user name of user being added to controller users list.
static SJResponse addUser(SJRequest request)
           
static SJResponse changePassword(SJRequest request)
          Change a user's password.
static SJResponse checkInFile(SJRequest request)
          Check in a file.
static SJResponse checkOutFile(SJRequest request)
          Check out a file.
static SJResponse connect(SJRequest request)
          Returns response with welcome message and session id.
static SJResponse deleteArchive(SJRequest request)
          Permanently deletes an archive.

Required SJRequest Params:
   newArchiveName -- name of archive to be deleted.
static SJResponse disconnect(SJRequest request)
          Logs user out.
static ArchiveInfo getArchiveInfo(java.lang.String archiveName)
           
static SJResponse getArchiveNames(SJRequest request)
          Return a list of archives available on this server.

Required SJRequest Params:
   newArchiveName -- name of archive to be deleted.
static SJResponse getArchiveUserList(SJRequest request)
           
static SJResponse getCompleteUserList(SJRequest request)
           
static SJResponse getControllerUserList(SJRequest request)
           
static SJResponse getFileInfo(SJRequest request)
          Gets information about a file.
static SJResponse getFileLatestVersion(SJRequest request)
          Gets latest version of a file.
static SJResponse getFileLatestVersionID(SJRequest request)
          Gets unique ID of latest version of a file.

Required SJRequest Params:
   requestedNodeUniqueID -- id of file.
static SJResponse getFileVersion(SJRequest request)
          Gets a previous version of a file.
static SJResponse getLabelContentList(SJRequest request)
          Gets info about all file/versions in a label.

Required SJRequest Params:
   requestedNodeName -- Name of requested label.

Info about response:
   nodeUniqueID -- Unique Id of root project of label.
   objectArray -- Array of LabelVersionMappingBeans, one for each file in the label.
static SJResponse getLabelList(SJRequest request)
          Gets a list of labels available in the archive.

static SJResponse getProjectInfo(SJRequest request)
          Gets information about a project.
static SJResponse getUniqueIDFromPath(SJRequest request)
          Returns the node unique ID from a path and parent node id.

Required SJRequest Params:
   requestedNodeUniqueID -- id of the parent project.
   requestedNodeName -- Path.
static SJResponse login(SJRequest request)
          Logs in user but does not connect to an archive.
static SJResponse makeLabeledVersion(SJRequest request)
          Makes a labeled version.

Required SJRequest Params:
   requestedNodeUniqueID -- root project for label.
   requestedNodeName -- Name for the new label.
   comment -- Description of the label.
static SJResponse permanentlyDeleteNode(SJRequest request)
          Permanently deletes a node that was previously removed.

Required SJRequest Params:
   requestedNodeUniqueID -- id of parent project from which the node is to be deleted.
   versionNumber -- The number (index in removed nodes) of the node to delete.
static SJResponse removeFile(SJRequest request)
          Remove a file from a project.

Required SJRequest Params:
   requestedNodeUniqueID -- id of file to remove.
   parentNodeUniqueID -- id of parent project.
static SJResponse removeFromArchiveControllerUsers(SJRequest request)
          Remove user from controller users list for an archive.

Required SJRequest Params:
   newUserName -- user name of user being added to controller users list.
static SJResponse removeFromArchiveUsers(SJRequest request)
          Remove user from users list for an archive.

Required SJRequest Params:
   newUserName -- user name of user being added to controller users list.
static SJResponse removeProject(SJRequest request)
          Remove a Project from a project.

Required SJRequest Params:
   requestedNodeUniqueID -- id of project to remove.
   parentNodeUniqueID -- id of parent project.
static SJResponse removeUser(SJRequest request)
           
static SJResponse renameFile(SJRequest request)
          Change the name of a file.

Required SJRequest Params:
   requestedNodeUniqueID -- id of the file being renamed.
   parentNodeUniqueID -- id of parent project of the file being renamed
   requestedNodeName -- new name for the file
static SJResponse renameProject(SJRequest request)
          Change the name of a project.

Required SJRequest Params:
   requestedNodeUniqueID -- id of the project being renamed.
   parentNodeUniqueID -- id of parent project of the project being renamed
   requestedNodeName -- new name for the project
static SJResponse restoreRemovedNode(SJRequest request)
          Restored a node that was removed from a project.

Required SJRequest Params:
   requestedNodeUniqueID -- id of parent project that node is to be restored to.
   requestedNodeName -- name to that restore node is to be named, when restored.
   versionNumber -- The number (index) of the node to restore.
static SJResponse rollBackToVersions(SJRequest request)
          Rollback a file in the archive to a previous version.

Required SJRequest Params:
   requestedNodeUniqueID -- id of the version to roll back to.
   parentNodeUniqueID -- id of the file being rolled back.
static SJResponse setUserAdmin(SJRequest request)
          Set a user's admin status.

Required SJRequest Params:
   newUserName -- User name of user being modified.
   newUserAdmin -- If true, user is set as admin.
static SJResponse undoCheckOut(SJRequest request)
          Undo check out of a checked out file.
static SJResponse viewRemovedNodes(SJRequest request)
          View info about nodes removed from a project.

Required SJRequest Params:
   requestedNodeUniqueID -- id of project whose removed nodes are to be returned.
static SJResponse viewVersionComment(SJRequest request)
          Returns comment for a version.

Required SJRequest Params:
   requestedNodeUniqueID -- id of version.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getArchiveInfo

public static ArchiveInfo getArchiveInfo(java.lang.String archiveName)
                                  throws FileAccessException

login

public static SJResponse login(SJRequest request)
Logs in user but does not connect to an archive.

changePassword

public static SJResponse changePassword(SJRequest request)
Change a user's password.

connect

public static SJResponse connect(SJRequest request)
Returns response with welcome message and session id. Request must include user name and password.

disconnect

public static SJResponse disconnect(SJRequest request)
Logs user out.

addProject

public static SJResponse addProject(SJRequest request)
Adds a new project.

Required SJRequest Params:
   requestedNodeUniqueID -- id of parent project for new project.
   requestedNodeName -- name of new project.

addFile

public static SJResponse addFile(SJRequest request)
Adds a new file.

Note: Call Uploader first to send file and get uploadFileID

Required SJRequest Params:
   requestedNodeUniqueID -- id of parent project for new file.
   requestedNodeName -- name of new file.
   fileUploadID -- ID of the file uploaded using Uploader.
   isBinaryZipped -- true if binary file is zipped.
   comment -- file description.
   fileProperties -- FileProperties object with info about file.
   userName -- Name of user adding file.

checkOutFile

public static SJResponse checkOutFile(SJRequest request)
Check out a file.

Required SJRequest Params:
   requestedNodeUniqueID -- id of file to be checked out.
   userName -- user name of current user.
   checkOutPath -- full path to which user is checking out file.
   requestedEOLType -- EOL type requested.

deleteArchive

public static SJResponse deleteArchive(SJRequest request)
Permanently deletes an archive.

Required SJRequest Params:
   newArchiveName -- name of archive to be deleted.

getArchiveNames

public static SJResponse getArchiveNames(SJRequest request)
Return a list of archives available on this server.

Required SJRequest Params:
   newArchiveName -- name of archive to be deleted.

checkInFile

public static SJResponse checkInFile(SJRequest request)
Check in a file.

Required SJRequest Params:
   requestedNodeUniqueID -- id of file to be checked in.
   userName -- user name of current user.
   comment -- new version comment.
   fileUploadID -- Upload id from Uploader.
   isBinaryZipped -- true if binary file is zipped.

getProjectInfo

public static SJResponse getProjectInfo(SJRequest request)
Gets information about a project.

Required SJRequest Params:
   requestedNodeUniqueID -- id of project.

getFileInfo

public static SJResponse getFileInfo(SJRequest request)
Gets information about a file.

Required SJRequest Params:
   requestedNodeUniqueID -- id of file.

getFileLatestVersionID

public static SJResponse getFileLatestVersionID(SJRequest request)
Gets unique ID of latest version of a file.

Required SJRequest Params:
   requestedNodeUniqueID -- id of file.

getFileLatestVersion

public static SJResponse getFileLatestVersion(SJRequest request)
Gets latest version of a file.

Note: Returns DownloadFileIdentifier object that can be used with Downloader to download the actual file.

Required SJRequest Params:
   requestedNodeUniqueID -- id of file.
   requestedEOLType -- EOL type requested.

getFileVersion

public static SJResponse getFileVersion(SJRequest request)
Gets a previous version of a file.

Required SJRequest Params:
   requestedNodeUniqueID -- id of file.
   requestedEOLType -- EOL type requested.
   versionNumber -- Version number (NOT unique ID) of the file requested.

makeLabeledVersion

public static SJResponse makeLabeledVersion(SJRequest request)
Makes a labeled version.

Required SJRequest Params:
   requestedNodeUniqueID -- root project for label.
   requestedNodeName -- Name for the new label.
   comment -- Description of the label.

getLabelContentList

public static SJResponse getLabelContentList(SJRequest request)
Gets info about all file/versions in a label.

Required SJRequest Params:
   requestedNodeName -- Name of requested label.

Info about response:
   nodeUniqueID -- Unique Id of root project of label.
   objectArray -- Array of LabelVersionMappingBeans, one for each file in the label.

undoCheckOut

public static SJResponse undoCheckOut(SJRequest request)
Undo check out of a checked out file. User must be user who checked out file.

Required SJRequest Params:
   requestedNodeUniqueID -- id of file to un-check out.

removeFile

public static SJResponse removeFile(SJRequest request)
Remove a file from a project.

Required SJRequest Params:
   requestedNodeUniqueID -- id of file to remove.
   parentNodeUniqueID -- id of parent project.

removeProject

public static SJResponse removeProject(SJRequest request)
Remove a Project from a project.

Required SJRequest Params:
   requestedNodeUniqueID -- id of project to remove.
   parentNodeUniqueID -- id of parent project.

viewVersionComment

public static SJResponse viewVersionComment(SJRequest request)
Returns comment for a version.

Required SJRequest Params:
   requestedNodeUniqueID -- id of version.

viewRemovedNodes

public static SJResponse viewRemovedNodes(SJRequest request)
View info about nodes removed from a project.

Required SJRequest Params:
   requestedNodeUniqueID -- id of project whose removed nodes are to be returned.

restoreRemovedNode

public static SJResponse restoreRemovedNode(SJRequest request)
Restored a node that was removed from a project.

Required SJRequest Params:
   requestedNodeUniqueID -- id of parent project that node is to be restored to.
   requestedNodeName -- name to that restore node is to be named, when restored.
   versionNumber -- The number (index) of the node to restore.

addArchive

public static SJResponse addArchive(SJRequest request)

getCompleteUserList

public static SJResponse getCompleteUserList(SJRequest request)

getControllerUserList

public static SJResponse getControllerUserList(SJRequest request)

getArchiveUserList

public static SJResponse getArchiveUserList(SJRequest request)

setUserAdmin

public static SJResponse setUserAdmin(SJRequest request)
Set a user's admin status.

Required SJRequest Params:
   newUserName -- User name of user being modified.
   newUserAdmin -- If true, user is set as admin. If false, user is set as non-admin.

addUser

public static SJResponse addUser(SJRequest request)

removeUser

public static SJResponse removeUser(SJRequest request)

permanentlyDeleteNode

public static SJResponse permanentlyDeleteNode(SJRequest request)
Permanently deletes a node that was previously removed.

Required SJRequest Params:
   requestedNodeUniqueID -- id of parent project from which the node is to be deleted.
   versionNumber -- The number (index in removed nodes) of the node to delete.

getUniqueIDFromPath

public static SJResponse getUniqueIDFromPath(SJRequest request)
Returns the node unique ID from a path and parent node id.

Required SJRequest Params:
   requestedNodeUniqueID -- id of the parent project.
   requestedNodeName -- Path.

rollBackToVersions

public static SJResponse rollBackToVersions(SJRequest request)
Rollback a file in the archive to a previous version.

Required SJRequest Params:
   requestedNodeUniqueID -- id of the version to roll back to.
   parentNodeUniqueID -- id of the file being rolled back.

addToArchiveControllerUsers

public static SJResponse addToArchiveControllerUsers(SJRequest request)
Add user to controller users list for an archive.

Required SJRequest Params:
   newUserName -- user name of user being added to controller users list.

removeFromArchiveControllerUsers

public static SJResponse removeFromArchiveControllerUsers(SJRequest request)
Remove user from controller users list for an archive.

Required SJRequest Params:
   newUserName -- user name of user being added to controller users list.

addToArchiveUsers

public static SJResponse addToArchiveUsers(SJRequest request)
Add user to users list for an archive.

Required SJRequest Params:
   newUserName -- user name of user being added to controller users list.

removeFromArchiveUsers

public static SJResponse removeFromArchiveUsers(SJRequest request)
Remove user from users list for an archive.

Required SJRequest Params:
   newUserName -- user name of user being added to controller users list.

renameFile

public static SJResponse renameFile(SJRequest request)
Change the name of a file.

Required SJRequest Params:
   requestedNodeUniqueID -- id of the file being renamed.
   parentNodeUniqueID -- id of parent project of the file being renamed
   requestedNodeName -- new name for the file

renameProject

public static SJResponse renameProject(SJRequest request)
Change the name of a project.

Required SJRequest Params:
   requestedNodeUniqueID -- id of the project being renamed.
   parentNodeUniqueID -- id of parent project of the project being renamed
   requestedNodeName -- new name for the project

getLabelList

public static SJResponse getLabelList(SJRequest request)
Gets a list of labels available in the archive.


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