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.
-
-
Field Summary
-
Fields inherited from class org.pentaho.platform.web.http.api.resources.AbstractJaxRSResource
acceptableMediaTypes, httpServletRequest, httpServletResponse, TEXT_HTML
-
-
Constructor Summary
Constructors Constructor Description SessionResource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
doGetCurrentUser()
Returns the current user's user name.String
doGetCurrentUserDir()
Returns the current user's workspace folder path.String
doGetUserDir(String user)
Returns the workspace folder path for the selected user.protected org.pentaho.platform.api.engine.IPentahoSession
getSession()
protected String
getUserHomeFolderPath(String username)
javax.ws.rs.core.Response
setredirect()
-
Methods inherited from class org.pentaho.platform.web.http.api.resources.AbstractJaxRSResource
setHttpHeaders
-
-
-
-
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()
-
-