Class 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  
      • Fields inherited from class org.apache.struts.action.Action

        servlet
    • 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.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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • LOG

        protected static final org.apache.log4j.Logger LOG
    • Constructor Detail

      • WebserviceCodeGenAction

        public WebserviceCodeGenAction()
    • 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 class org.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 template
        im - A reference to the API
        p - 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 interrogate
        im - A reference to the InterMine API
        p - A user's profile
        Returns:
        whether the query is accessible publicly or not