Class GetProjectsAction

    • Field Detail

      • _currentUserProvider

        protected CurrentUserProvider _currentUserProvider
        The current user provider
      • _jsonUtils

        protected JSONUtils _jsonUtils
        JSON Utils
    • Method Detail

      • doLoggedInAction

        protected Map<String,​ObjectdoLoggedInAction​(Request request,
                                                            Map<String,​Object> jsonParams)
        Execute the action that requires to be logged in
        Parameters:
        request - the request
        jsonParams - map of parameters passed in the post body as json
        Returns:
        the json map to return
      • doAction

        public Map<String,​Object> doAction​(Request request,
                                                 Map<String,​Object> jsonParams)
        Execute the action
        Parameters:
        request - the request
        jsonParams - map of parameters passed in the post body as json
        Returns:
        the json map to return
      • getParameters

        protected Map<String,​Object> getParameters​(Map objectModel)
                                                  throws IOException
        Get a map of parameters from the POST body
        Parameters:
        objectModel - the objectModel from whidh the body will be read
        Returns:
        a Map representing the body, parsed as json
        Throws:
        IOException - something went wrong
      • getParameter

        protected Object getParameter​(String name,
                                      Map<String,​Object> jsonParams,
                                      Request request)
        Get a parameter either from the POST body or directly from the request parameters
        Parameters:
        name - the name of the parameter to fetch
        jsonParams - the json parameters passed
        request - the request to read from
        Returns:
        an Object (if from json) or a String (if from the request)