Package org.intermine.web.struts
Class WebserviceCodeGenAction
- java.lang.Object
-
- org.apache.struts.action.Action
-
- org.intermine.web.struts.InterMineAction
-
- org.intermine.web.struts.WebserviceCodeGenAction
-
public class WebserviceCodeGenAction extends InterMineAction
Action to handle the web service code generation. Multiple-query is not supported.- Author:
- Fengyuan Hu, Alexis Kalderimis
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.apache.log4j.Logger
LOG
-
Constructor Summary
Constructors Constructor Description WebserviceCodeGenAction()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.struts.action.ActionForward
execute(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
protected static boolean
pathQueryIsPublic(PathQuery pq, InterMineAPI im, Profile p)
Utility function to determine whether the PathQuery is publicly accessible.protected static boolean
templateIsPublic(TemplateQuery t, InterMineAPI im, Profile p)
Utility function to determine whether the template is publicly accessible.-
Methods inherited from class org.intermine.web.struts.InterMineAction
getWebProperties, recordError, recordError, recordError, recordMessage
-
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.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.lang.Exception
- Overrides:
execute
in classorg.apache.struts.action.Action
- Throws:
java.lang.Exception
-
templateIsPublic
protected static boolean templateIsPublic(TemplateQuery t, InterMineAPI im, Profile p)
Utility function to determine whether the template is publicly accessible. This is determined by checking whether this template is within the current user's profile, and whether the underlying query is itself public.- Parameters:
t
- The templateim
- A reference to the APIp
- A reference to the current user's Profile- Returns:
- whether or not Joe Public could run this without logging in.
-
pathQueryIsPublic
protected static boolean pathQueryIsPublic(PathQuery pq, InterMineAPI im, Profile p)
Utility function to determine whether the PathQuery is publicly accessible. PathQueries are accessibly publicly as long as they do not reference private lists.- Parameters:
pq
- The query to interrogateim
- A reference to the InterMine APIp
- A user's profile- Returns:
- whether the query is accessible publicly or not
-
-