@Path(value="/common")
@Produces(value="application/json")
public interface CommonRestInterface
Modifier and Type | Method and Description |
---|---|
boolean |
checkPcaAdmin(String sessionId)
Check if a user has admin privilege in cloud automation service.
|
boolean |
checkSubscriptionAdmin(String sessionId)
Check if a user has admin privilege in notification service.
|
String |
currentUser(String sessionId)
Get the login string associated to a session.
|
UserData |
currentUserData(String sessionId)
Get a UserData object associated to a session.
|
boolean |
isConnected(String sessionId)
Tests whether the session is connected to the ProActive server.
|
String |
login(String username,
String password)
login to the server with username and password form.
|
String |
loginWithCredential(LoginForm multipart)
Login to the server using a multipart form.
|
void |
logout(String sessionId)
Terminates a session.
|
boolean |
portalAccess(String sessionId,
String portal)
Check single portal access.
|
List<String> |
portalsAccesses(String sessionId,
List<String> portals)
Check multiple portals accesses.
|
@POST @Path(value="login") String login(@FormParam(value="username") String username, @FormParam(value="password") String password) throws LoginException, SchedulerRestException
username
- usernamepassword
- passwordLoginException
- if the authentication failsSchedulerRestException
- if any other error occurs@POST @Consumes(value="multipart/form-data") @Path(value="login") String loginWithCredential(LoginForm multipart) throws KeyException, LoginException, SchedulerRestException
multipart
- multipart formLoginException
- if the authentication failsKeyException
- if the credentials file cannot be decryptedSchedulerRestException
- if any other error occurs@PUT @Path(value="logout") void logout(@HeaderParam(value="sessionid") String sessionId) throws RestException
sessionId
- id of the session to terminateRestException
- if the server cannot be contacted@GET @Path(value="connected") boolean isConnected(@HeaderParam(value="sessionid") String sessionId)
sessionId
- the session to test@GET @Path(value="currentuser") String currentUser(@HeaderParam(value="sessionid") String sessionId)
sessionId
- id of a session@GET @Path(value="currentuserdata") UserData currentUserData(@HeaderParam(value="sessionid") String sessionId)
sessionId
- id of a session@GET @Path(value="permissions/portals") List<String> portalsAccesses(@HeaderParam(value="sessionid") String sessionId, @QueryParam(value="portals") List<String> portals) throws RestException
sessionId
- id of a sessionportals
- a list of portals access to testRestException
- if an error occurs or the session is invalid@GET @Path(value="permissions/portals/{portal}") boolean portalAccess(@HeaderParam(value="sessionid") String sessionId, @PathParam(value="portal") String portal) throws RestException
sessionId
- id of a sessionportal
- string value identifying the portalRestException
- if an error occurs or the session is invalid@GET @Path(value="permissions/notification-service/admin") boolean checkSubscriptionAdmin(@HeaderParam(value="sessionid") String sessionId) throws RestException
sessionId
- id of a sessionRestException
- if an error occurs or the session is invalid@GET @Path(value="permissions/cloud-automation-service/admin") boolean checkPcaAdmin(@HeaderParam(value="sessionid") String sessionId) throws RestException
sessionId
- id of a sessionRestException
- if an error occurs or the session is invalid