Class SessionResource


  • public class SessionResource
    extends AbstractJaxRSResource
    The SessionResource service lists the user's current workspace as well as the workspace folder path.
    • Constructor Detail

      • SessionResource

        public SessionResource()
    • Method Detail

      • doGetCurrentUserDir

        public String doGetCurrentUserDir()
        Returns the current user's workspace folder path.

        Example Request:
        GET pentaho/api/session/userWorkspaceDir

        Returns:
        String object containing the workspace folder path.

        Example Response:

            /home/admin/workspace
          
      • doGetCurrentUser

        public String doGetCurrentUser()
        Returns the current user's user name.

        Example Request:
        GET pentaho/api/session/userName

        Returns:
        String object The current user name.

        Example Response:

            suzy
          
      • doGetUserDir

        public String doGetUserDir​(String user)
        Returns the workspace folder path for the selected user.

        Example Request:
        GET pentaho/api/session/workspaceDirForUser/admin

        Parameters:
        user - String of the user name.
        Returns:
        String object containing the workspace folder path.

        Example Response:

            workspace
          
      • setredirect

        public javax.ws.rs.core.Response setredirect()
      • getSession

        protected org.pentaho.platform.api.engine.IPentahoSession getSession()
      • getUserHomeFolderPath

        protected String getUserHomeFolderPath​(String username)