edu.jhu.tmaj.servlet.request
Class BaseRequest

java.lang.Object
  extended by edu.jhu.tmaj.servlet.request.BaseRequest
All Implemented Interfaces:
CommandRequest, java.io.Serializable
Direct Known Subclasses:
ArrayCoreReferenceRequest, ArrayCoresOpenRequest, ArrayCoresSaveRequest, ArrayImageAddRequest, ArrayImageCollectionRequest, ArrayImageCoresRequest, BadImagesUpdateRequest, CellLinesReferenceRequest, ChangeLogsSaveRequest, ChangePasswordRequest, CheckIfSpecimenExistsRequest, CopyArrayBlockRequest, CopySessionRequest, DetailsRequest, DiagnosisLookupRequest, DynamicMetaDataRequest, EnumerationsRequest, ExpressEntryRequest, FileChecksumRequest, FileDeleteRequest, FileDownloadRequest, FilesGetRequest, FilesLargeGetRequest, FileUploadRequest, FolderCheckRequest, FolderCreateRequest, FolderDeleteRequest, FolderGetRequest, GrossDescriptionRequest, GrossDescriptionWipeRequest, HistoryRequest, ImageInfoRequest, InvalidateMachineScoresRequest, IsArrayBlockBlankRequest, KeyValueGetRequest, KeyValueSetRequest, LoginRequest, LogoutRequest, LookupTableRequest, MachineScoresImportRequest, MachineScoresInfoRequest, ManyToManyTableRequest, ManyToManyUpdateRequest, MaskReadRequest, MaskStatsWriteRequest, MasksWriteRequest, MetaDataAddRequest, MetaDataAlterRequest, OriginalTypeRequest, ProjectsArraySlidesAddRequest, QuantityLeftRequest, RecentSessionDeleteRequest, RecentSessionGetRequest, RecentSessionUpdateRequest, ScanCheckDataRequest, ScanDeleteRequest, SelectRequest, SessionDescriptionsRequest, ShapesLoadRequest, ShapesSaveRequest, SpecimenIdentifiersRequest, SpecimensAssignRequest, SurgPathNumberRequest, TranslatedRowRequest, UpdateRequest, UsedTissueTypesRequest, UsersSessionsGetRequest, UsersSessionsSaveRequest

public abstract class BaseRequest
extends java.lang.Object
implements CommandRequest, java.io.Serializable

All Requests extend this class. All requests are required to supply a username and password

See Also:
Serialized Form

Field Summary
 java.lang.String password
           
 java.lang.String username
           
 
Constructor Summary
BaseRequest()
          Construct this request with the currently logged on user.
BaseRequest(java.lang.String username, java.lang.String password)
          Construct this request with a specified username and password.
 
Method Summary
 CommandResponse executeCommand()
          Executes code on the server side that queries the database, and returns a ServerResponse.
 java.lang.String getPassword()
          Gets the password of the user making this Request
 java.lang.String getUsername()
          Gets the username of the user making this Request
abstract  CommandResponse processRequest(UserBean userBean)
          This request is executed on the server assuming the username and password returns a valid UserBean.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

username

public final java.lang.String username

password

public final java.lang.String password
Constructor Detail

BaseRequest

public BaseRequest(java.lang.String username,
                   java.lang.String password)
Construct this request with a specified username and password.


BaseRequest

public BaseRequest()
Construct this request with the currently logged on user.

Method Detail

executeCommand

public final CommandResponse executeCommand()
Description copied from interface: CommandRequest
Executes code on the server side that queries the database, and returns a ServerResponse. ExecuteCommand should verify the username and password supplied with the request, and determines if the user has permission to execute the request.

Specified by:
executeCommand in interface CommandRequest

processRequest

public abstract CommandResponse processRequest(UserBean userBean)
                                        throws java.lang.Exception
This request is executed on the server assuming the username and password returns a valid UserBean.

Throws:
java.lang.Exception

getUsername

public final java.lang.String getUsername()
Description copied from interface: CommandRequest
Gets the username of the user making this Request

Specified by:
getUsername in interface CommandRequest

getPassword

public final java.lang.String getPassword()
Description copied from interface: CommandRequest
Gets the password of the user making this Request

Specified by:
getPassword in interface CommandRequest