Package org.intermine.web.struts
Class ObjectTrailController
- java.lang.Object
-
- org.apache.struts.action.Action
-
- org.apache.struts.tiles.actions.TilesAction
-
- org.intermine.web.struts.ObjectTrailController
-
public class ObjectTrailController extends org.apache.struts.tiles.actions.TilesAction
Controller for the object trail tile.- Author:
- Thomas Riley
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ObjectTrailController.TrailElement
Bean passed to JSP to represent an element in the trail.
-
Field Summary
Fields Modifier and Type Field Description protected static org.apache.log4j.Logger
LOG
-
Constructor Summary
Constructors Constructor Description ObjectTrailController()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static java.lang.String
createTrailLabel(InterMineObject object, Model model)
Create trail element label.org.apache.struts.action.ActionForward
execute(org.apache.struts.tiles.ComponentContext context, org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Looks at the "trail" request parameter and extracts the object ids from it, then looks up the actual objects and creates a list of TrailItems.-
Methods inherited from class org.apache.struts.action.Action
addErrors, addMessages, execute, generateToken, getErrors, getLocale, getMessages, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, resetToken, saveErrors, saveErrors, saveMessages, saveMessages, saveToken, setLocale, setServlet
-
-
-
-
Method Detail
-
execute
public org.apache.struts.action.ActionForward execute(org.apache.struts.tiles.ComponentContext context, org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.lang.Exception
Looks at the "trail" request parameter and extracts the object ids from it, then looks up the actual objects and creates a list of TrailItems.- Overrides:
execute
in classorg.apache.struts.tiles.actions.TilesAction
- Parameters:
context
- The Tiles ComponentContextmapping
- The ActionMapping used to select this instanceform
- The optional ActionForm bean for this request (if any)request
- The HTTP request we are processingresponse
- The HTTP response we are creating- Returns:
- an ActionForward object defining where control goes next
- Throws:
java.lang.Exception
- if an error occurs
-
createTrailLabel
protected static java.lang.String createTrailLabel(InterMineObject object, Model model)
Create trail element label. Label is a list of each leaf class name.- Parameters:
object
- the intermine object associated with the trail elementmodel
- the model- Returns:
- label for TrailElement
-
-