org.sourcejammer.server.plugin
Interface ArchiveContext

All Known Implementing Classes:
PluginArchiveContext

public interface ArchiveContext

Title: $FileName: ArchiveContext.java$

Version:
$VerNum: 5$
Author:
$AuthorName: Rob MacGrogan$

$Description: Allows certain read-only actions to be performed on an archive. The ArchiveContext is provided to an SJServerAction via that class's actionPerformed() method.$
$KeyWordsOff: $

Method Summary
 org.sourcejammer.project.view.Project buildFileList(long[] fileIDs)
          Constructs a file list (in the form of a Project) from the list of file ids passed in.
 long checkSession(org.sourcejammer.project.view.SJRequest request)
          Checks user's login status.
 long checkSessionAdminRequired(org.sourcejammer.project.view.SJRequest request)
          Checks user's login status.
 long checkSessionAllowAnon(org.sourcejammer.project.view.SJRequest request)
          Checks user's login status.
 long checkSessionArchUserRequired(org.sourcejammer.project.view.SJRequest request)
          Checks user's login status.
 long checkSessionControllerRequired(org.sourcejammer.project.view.SJRequest request)
          Checks users login status.
 java.lang.String getArchiveName()
          Returns the name of the archive.
 java.lang.String getComment(long versionID)
          Returns comment for the specified file version as a String.
 ROFile getFile(long fileID)
          Returns the read-only view object for the file with the specified ID.
 java.lang.String getPathToProject(long projectID)
          Get the full path to a project in the following format:

  /full/path/to/project
 ROProject getProject(long projectID)
          Returns the read-only view object for the project with the specified ID.
 

Method Detail

getFile

public ROFile getFile(long fileID)
               throws FileAccessException,
                      FileDoesNotExistException,
                      SecurityException
Returns the read-only view object for the file with the specified ID.

FileAccessException
FileDoesNotExistException
SecurityException

getPathToProject

public java.lang.String getPathToProject(long projectID)
                                  throws SecurityException,
                                         ProjectDoesNotExistException,
                                         FileAccessException
Get the full path to a project in the following format:

  /full/path/to/project

SecurityException
ProjectDoesNotExistException
FileAccessException

getProject

public ROProject getProject(long projectID)
                     throws FileAccessException,
                            ProjectDoesNotExistException,
                            SecurityException
Returns the read-only view object for the project with the specified ID.

FileAccessException
ProjectDoesNotExistException
SecurityException

buildFileList

public org.sourcejammer.project.view.Project buildFileList(long[] fileIDs)
                                                    throws SecurityException,
                                                           FileAccessException,
                                                           FileDoesNotExistException
Constructs a file list (in the form of a Project) from the list of file ids passed in. The list constructed is suitable for returning to the client.

SecurityException
FileAccessException
FileDoesNotExistException

getArchiveName

public java.lang.String getArchiveName()
Returns the name of the archive.


checkSession

public long checkSession(org.sourcejammer.project.view.SJRequest request)
                  throws UserDoesNotExistException,
                         InvalidPasswordException,
                         SecurityException
Checks user's login status. Throws exception if user can't be logged in, or if user is logged in as anonymous user or if archive is restricted and user is not admin, controller, or archive user.

UserDoesNotExistException
InvalidPasswordException
SecurityException

checkSessionAdminRequired

public long checkSessionAdminRequired(org.sourcejammer.project.view.SJRequest request)
                               throws UserDoesNotExistException,
                                      InvalidPasswordException,
                                      SecurityException
Checks user's login status. Throws exception if user can't be logged in, or if user is not admin.

UserDoesNotExistException
InvalidPasswordException
SecurityException

checkSessionAllowAnon

public long checkSessionAllowAnon(org.sourcejammer.project.view.SJRequest request)
                           throws UserDoesNotExistException,
                                  InvalidPasswordException,
                                  SecurityException
Checks user's login status. Allows anonymous logins to pass through without throwing an exception.

UserDoesNotExistException
InvalidPasswordException
SecurityException

checkSessionArchUserRequired

public long checkSessionArchUserRequired(org.sourcejammer.project.view.SJRequest request)
                                  throws UserDoesNotExistException,
                                         InvalidPasswordException,
                                         SecurityException
Checks user's login status. Throws exception if user can't be logged in, or if user is not a registered user or controller of this archive or admin.

UserDoesNotExistException
InvalidPasswordException
SecurityException

checkSessionControllerRequired

public long checkSessionControllerRequired(org.sourcejammer.project.view.SJRequest request)
                                    throws UserDoesNotExistException,
                                           InvalidPasswordException,
                                           SecurityException
Checks users login status. Throws exception if user can't be logged in, or if user is not a controller of this archive or admin.

UserDoesNotExistException
InvalidPasswordException
SecurityException

getComment

public java.lang.String getComment(long versionID)
                            throws FileAccessException,
                                   NoSuchVersionException
Returns comment for the specified file version as a String.

FileAccessException
NoSuchVersionException


Copyright 2003 Soucejammer project.