org.sourcejammer.project.view
Class PluginArchiveContext

java.lang.Object
  |
  +--org.sourcejammer.project.view.PluginArchiveContext
All Implemented Interfaces:
ArchiveContext

public class PluginArchiveContext
extends java.lang.Object
implements ArchiveContext

Title: $FileName: PluginArchiveContext.java$

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

$Description: Implementation of ArchiveContext.$
$KeyWordsOff: $

Field Summary
private  Archive archive
           
 
Constructor Summary
PluginArchiveContext(Archive archive)
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

archive

private Archive archive
Constructor Detail

PluginArchiveContext

public PluginArchiveContext(Archive archive)
Method Detail

getFile

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

Specified by:
getFile in interface ArchiveContext
FileAccessException
FileDoesNotExistException
SecurityException
See Also:
ArchiveContext.getFile(long)

getPathToProject

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

  /full/path/to/project

Specified by:
getPathToProject in interface ArchiveContext
SecurityException
ProjectDoesNotExistException
FileAccessException

getProject

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

Specified by:
getProject in interface ArchiveContext
FileAccessException
ProjectDoesNotExistException
SecurityException
See Also:
ArchiveContext.getProject(long)

buildFileList

public org.sourcejammer.project.view.Project buildFileList(long[] fileIDs)
                                                    throws SecurityException,
                                                           FileAccessException,
                                                           FileDoesNotExistException
Description copied from interface: ArchiveContext
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.

Specified by:
buildFileList in interface ArchiveContext
SecurityException
FileAccessException
FileDoesNotExistException
See Also:
ArchiveContext.buildFileList(long[])

getArchiveName

public java.lang.String getArchiveName()
Description copied from interface: ArchiveContext
Returns the name of the archive.

Specified by:
getArchiveName in interface ArchiveContext
See Also:
ArchiveContext.getArchiveName()

checkSession

public long checkSession(org.sourcejammer.project.view.SJRequest request)
                  throws UserDoesNotExistException,
                         InvalidPasswordException,
                         SecurityException
Description copied from interface: ArchiveContext
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.

Specified by:
checkSession in interface ArchiveContext
UserDoesNotExistException
InvalidPasswordException
SecurityException
See Also:
ArchiveContext.checkSession(SJRequest)

checkSessionAdminRequired

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

Specified by:
checkSessionAdminRequired in interface ArchiveContext
UserDoesNotExistException
InvalidPasswordException
SecurityException
See Also:
ArchiveContext.checkSessionAdminRequired(SJRequest)

checkSessionAllowAnon

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

Specified by:
checkSessionAllowAnon in interface ArchiveContext
UserDoesNotExistException
InvalidPasswordException
SecurityException
See Also:
ArchiveContext.checkSessionAllowAnon(SJRequest)

checkSessionArchUserRequired

public long checkSessionArchUserRequired(org.sourcejammer.project.view.SJRequest request)
                                  throws UserDoesNotExistException,
                                         InvalidPasswordException,
                                         SecurityException
Description copied from interface: ArchiveContext
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.

Specified by:
checkSessionArchUserRequired in interface ArchiveContext
UserDoesNotExistException
InvalidPasswordException
SecurityException
See Also:
ArchiveContext.checkSessionArchUserRequired(SJRequest)

checkSessionControllerRequired

public long checkSessionControllerRequired(org.sourcejammer.project.view.SJRequest request)
                                    throws UserDoesNotExistException,
                                           InvalidPasswordException,
                                           SecurityException
Description copied from interface: ArchiveContext
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.

Specified by:
checkSessionControllerRequired in interface ArchiveContext
UserDoesNotExistException
InvalidPasswordException
SecurityException
See Also:
ArchiveContext.checkSessionControllerRequired(SJRequest)

getComment

public java.lang.String getComment(long versionID)
                            throws FileAccessException,
                                   NoSuchVersionException
Description copied from interface: ArchiveContext
Returns comment for the specified file version as a String.

Specified by:
getComment in interface ArchiveContext
FileAccessException
NoSuchVersionException


Copyright 2003 Soucejammer project.