org.gcube.portlets.admin.rolesmanagementportlet.gwt.server
Class RolesManagementServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
              extended by com.google.gwt.user.server.rpc.RemoteServiceServlet
                  extended by org.gcube.portlets.admin.rolesmanagementportlet.gwt.server.RolesManagementServlet
All Implemented Interfaces:
com.google.gwt.user.client.rpc.RemoteService, com.google.gwt.user.server.rpc.SerializationPolicyProvider, Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig, RolesManagementService

public class RolesManagementServlet
extends com.google.gwt.user.server.rpc.RemoteServiceServlet
implements RolesManagementService

Author:
Panagiota Koltsida, NKUA
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
perThreadRequest, perThreadResponse
 
Constructor Summary
RolesManagementServlet()
          Class constructor
 
Method Summary
 Boolean createNewRole(String roleName, String roleDesc)
          Creates a role with the given name
 Boolean deleteRoles(ArrayList<String> roleNames)
          Deletes all the given roles
 ArrayList<RoleInfo> getAvailableRoles()
          Returns the available roles of the current VO/VRE
 ArrayList<RoleInfo> listAllowedRoles()
          Lists the allowed roles that can be created for the current VO/VRE
 void sendEmailWithErrorToSupport(Throwable caught)
           
 Boolean updateRole(String roleName, String newRoleName, String newRoleDescription)
           
 
Methods inherited from class com.google.gwt.user.server.rpc.RemoteServiceServlet
checkPermutationStrongName, doGetSerializationPolicy, getSerializationPolicy, onAfterResponseSerialized, onBeforeRequestDeserialized, processCall, processPost, shouldCompressResponse
 
Methods inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
doPost, doUnexpectedFailure, getPermutationStrongName, getThreadLocalRequest, getThreadLocalResponse, onAfterRequestDeserialized, readContent
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RolesManagementServlet

public RolesManagementServlet()
Class constructor

Method Detail

listAllowedRoles

public ArrayList<RoleInfo> listAllowedRoles()
                                     throws CurrentGroupRetrievalException,
                                            RetrieveAllowedRolesException
Lists the allowed roles that can be created for the current VO/VRE

Specified by:
listAllowedRoles in interface RolesManagementService
Returns:
An array with the allowed roles' names
Throws:
CurrentGroupRetrievalException
RetrieveAllowedRolesException

getAvailableRoles

public ArrayList<RoleInfo> getAvailableRoles()
                                      throws RolesRetrievalException,
                                             CurrentGroupRetrievalException
Returns the available roles of the current VO/VRE

Specified by:
getAvailableRoles in interface RolesManagementService
Returns:
An array with the available roles
Throws:
RolesRetrievalException
CurrentGroupRetrievalException

deleteRoles

public Boolean deleteRoles(ArrayList<String> roleNames)
Deletes all the given roles

Specified by:
deleteRoles in interface RolesManagementService
Parameters:
roleNames - The names of roles to be deleted
Returns:
True if all roles deleted, or False if something failed

createNewRole

public Boolean createNewRole(String roleName,
                             String roleDesc)
                      throws RoleCreationException
Creates a role with the given name

Specified by:
createNewRole in interface RolesManagementService
Parameters:
roleName - The name of the role to be created
Returns:
True if the role is created, or False if something failed
Throws:
RoleCreationException

updateRole

public Boolean updateRole(String roleName,
                          String newRoleName,
                          String newRoleDescription)
                   throws RoleUpdateException,
                          RolesRetrievalException,
                          CurrentGroupRetrievalException
Specified by:
updateRole in interface RolesManagementService
Throws:
RoleUpdateException
RolesRetrievalException
CurrentGroupRetrievalException

sendEmailWithErrorToSupport

public void sendEmailWithErrorToSupport(Throwable caught)
Specified by:
sendEmailWithErrorToSupport in interface RolesManagementService


Copyright © 2013. All Rights Reserved.