Class SessionResource

java.lang.Object
org.pentaho.platform.web.http.api.resources.AbstractJaxRSResource
org.pentaho.platform.web.http.api.resources.SessionResource

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

    • SessionResource

      public SessionResource()
  • Method Details

    • 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)