SigPath

Package org.sigpath.action

Controller classes for the Struts model-view-controller (MVC) pattern.

See:
          Description

Interface Summary
DBWriteAccess Indicates that the specified action requires Database write access.
Secure Indicates that the specified action is available to authenicated users only.
SecureAdmin Indicates that the specified action is available to the SigPath Administrator only.
 

Class Summary
ActionRoot Base class for all Action classes.
ChangeDBStatus Action for Updating Database Status
CreateModel Action for Creating a Model for Export.
CreatePathway  
DeleteConcentration Action for Deleting Concentration
DisplayJSP Action for Displaying any JSP page.
GetConcentration Action for Retrieving a Concentration Measurement.
GetModel Action for Retrieving a Model from the Database.
GetSpidRange Created by IntelliJ IDEA.
Login Action for Authenticating Users.
PopulateUserData Action for Populating User Data Form.
RetrieveChemical Action for Adding a Chemical SPID to the Request.
SaveConcentration Action for Saving Concentration
SaveUpdatedReaction Action for Saving an updated Reaction.
SaveXML Action to save XML import data.
SearchChemicals Action for Searching Molecules.
SearchModels Action for Searching Models.
SearchPathways Action for Searching Pathways.
SearchReactions Action for Searching Reactions.
SecureAdminDisplayJSP Action for Displaying JSP Page to SigPath Admin only.
SecureDBWriteDisplayJSP Action for Displaying any Secure DBWriteAccess required JSP page.
SecureDisplayJSP Action for Displaying any Secure JSP page.
SetupConcentration Action for clearing the SpecifyConcentration form and adding a chemical to the request.
SigPathServlet Controller class for all user requests.
SnoopHTTP Action for Snooping on the Current HTTP Request.
StoreAffiliation Action for Storing User Affiliation
StoreConcentration Action for Storing Concentration
StoreNextPage Stores the page the user just came from as nextPage in the session.
StoreUserData Action for Storing User Data
TurnXDebugOn_Off Action for Turning Live Debugging On/Off.
UIHelper Provides a number of utilities that help create the Data Submission Wizard
UpdateAffiliation Action for Updating User Affiliation
UpdateReactionParameters Action for Updating Reaction Parameters
UpdateUserData Action for Updating User Data
UploadXML Action for Uploading an XML document.
ViewDBInfo Action for Viewing Database/Dictionary Properties.
ViewDetails Action for Viewing Details of a SigPathEntity.
ViewModelImage  
ViewModelImageNone Action for showing message when the required yFiles library is not available.
ViewModelImageYFiles Action for Retrieving a Model and Viewing as an Image.
ViewNamedChemicalImageYFiles Action for Retrieving and Viewing graphics in gif format.
ViewSPEBaseInfo Action for Viewing a SigPathEntity for editing purposes.
 

Package org.sigpath.action Description

Controller classes for the Struts model-view-controller (MVC) pattern.

Overview

Controller classes control the overall flow of the web application. In general, a browser request first goes to the generic SigPathServlet, which then forwards the request to the appropriate action class. The action class generally calls one or more database tasks, and passes the results onto a Java Server Page (JSP). HTML formatting is done within the JSP page.

Creating New Actions Classes

All new action classes should extent ActionRoot. Action Root centralizes all live debugging, setting of user messages and exception handling. To create a new action, simply extend ActionRoot and implement the _perform() method. For example:
public class DeleteExternalReference extends ActionRoot {

  protected ActionForward _perform
    (ActionMapping mapping, ActionForm form, HttpServletRequest request,
    HttpServletResponse response, ActionForward actionForward, XDebug xdebug)
    throws Exception {
      xdebug.logMsg(this, "Starting Action:  Delete External Reference");
      ...
  }
}

Warning: The Struts framework will only create one instance of your Action class, and this one object will serve multiple browser requests. Therefore, you must avoid using instance variables within your Action class. Otherwise, you may end up with unpredictable multi-threading issues.

Modifying the struts-config file

Once you have created a new action class, you must register it in the struts-config.xml file. For example:
<action path="/deleteExternalReference"
  type="org.sigpath.action.edit.DeleteExternalReference"
  name="SpecifyExternalReferenceForm"
  input="/editSigPathEntity.action">
  <forward
    name="success"
    path="/editSigPathEntity.action"/>
  </action>

Controlling Access

If you want to restrict access to your action class, you can specify one or more access control interfaces: For example, to create an action that is available only to the SigPath administrator, you would write the following code:
  public class ChangeDBStatus extends ActionRoot implements SecureAdmin {
    ...
  }

Background Information


SigPath

Copyright © 2002-2006 Institute for Computational Biomedicine, All Rights Reserved.