LoginServiceImpl (gCube Bundle Login Portlet 2.0.0-SNAPSHOT API)
Date: 2014-05-10

org.gcube.portlets.user.gcubelogin.server

## Class LoginServiceImpl

- java.lang.Object
- - javax.servlet.GenericServlet
  - - javax.servlet.http.HttpServlet
    - - com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
      - - com.google.gwt.user.server.rpc.RemoteServiceServlet
        - - org.gcube.portlets.user.gcubelogin.server.LoginServiceImpl

- All Implemented Interfaces:
    com.google.gwt.user.client.rpc.RemoteService, com.google.gwt.user.server.rpc.SerializationPolicyProvider, Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig, NewLoginService

      public class LoginServiceImpl
      extends com.google.gwt.user.server.rpc.RemoteServiceServlet
      implements NewLoginService

  Version:
    2.0 SEP 2013
  Author:
    Massimiliano Assante ISTI-CNR
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `CACHED_VOS`
    `String` | `SELECTED_THEMEID`

    - ### Fields inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet

      `perThreadRequest, perThreadResponse`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LoginServiceImpl()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addMembershipRequest(String scope, String optionalMessage)` addMembershipRequest
    `HashMap<String,ArrayList<CheckResult>>` | `checkInfrastructure(String infrastructure, String startScopes)`
    `Boolean` | `checkVresPresence(String infrastructure, String startScopes)` check if the vo scope contain VREs
    `Boolean` | `createAdministratorAccount(String email, String password, String firstname, String lastname)` this method create a user and assigns the role Administrator to this user, also assigns the VO-ADMIN role or VRE-Manager for each VO/VRE present in the infrastructure
    `String[]` | `getConfigFromGCore()` return the infrastructure name in [0], the scopes in [1]
    `ArrayList<VO>` | `getInfrastructureVOs()` first method called by the UI
    `VO` | `getRootVO()` return the root org
    `ResearchEnvironment` | `getSelectedRE()` return the current selected VRE
    `ArrayList<VO>` | `getVresFromInfrastructure(String infrastructure, String startScopes)`
    `Boolean` | `installPortalEnv(String infrastructure, String startScopes, SelectedTheme theme, boolean automaticRedirect)` this method start the portal installation, tipically the parameters come from the gHNConfig.xml
    `Boolean` | `installVREs(ArrayList<VO> parents)` install the VREs chosen by the end user
    `Boolean` | `isLayoutLoaded()` the first method to call
    `void` | `loadLayout(String scope, String URL)`

    - ### 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`

- - ### Field Detail

    - #### CACHED_VOS

          public static final String CACHED_VOS

      See Also:
        Constant Field Values

    - #### SELECTED_THEMEID

          public String SELECTED_THEMEID

  - ### Constructor Detail

    - #### LoginServiceImpl

          public LoginServiceImpl()

  - ### Method Detail

    - #### getInfrastructureVOs

          public ArrayList<VO> getInfrastructureVOs()

      first method called by the UI
      Specified by:
        `getInfrastructureVOs` in interface `NewLoginService`

    - #### addMembershipRequest

          public void addMembershipRequest(String scope,
                                  String optionalMessage)

      addMembershipRequest
      Specified by:
        `addMembershipRequest` in interface `NewLoginService`

    - #### getConfigFromGCore

          public String[] getConfigFromGCore()

      return the infrastructure name in [0], the scopes in [1]
      Specified by:
        `getConfigFromGCore` in interface `NewLoginService`

    - #### getRootVO

          public VO getRootVO()

      return the root org
      Specified by:
        `getRootVO` in interface `NewLoginService`

    - #### getSelectedRE

          public ResearchEnvironment getSelectedRE()

      return the current selected VRE
      Specified by:
        `getSelectedRE` in interface `NewLoginService`

    - #### installPortalEnv

          public Boolean installPortalEnv(String infrastructure,
                                 String startScopes,
                                 SelectedTheme theme,
                                 boolean automaticRedirect)

      this method start the portal installation, tipically the parameters come from the gHNConfig.xml
      Specified by:
        `installPortalEnv` in interface `NewLoginService`
      Parameters:
        `infrastructure` - the name of the infrastructure
        `startScopes` - the name of the starting scopes, comma separated

    - #### isLayoutLoaded

          public Boolean isLayoutLoaded()

      the first method to call
      Specified by:
        `isLayoutLoaded` in interface `NewLoginService`

    - #### loadLayout

          public void loadLayout(String scope,
                        String URL)

      Specified by:
        `loadLayout` in interface `NewLoginService`
      Parameters:
        `scope` -

    - #### checkInfrastructure

          public HashMap<String,ArrayList<CheckResult>> checkInfrastructure(String infrastructure,
                                                                   String startScopes)

      Specified by:
        `checkInfrastructure` in interface `NewLoginService`
      Parameters:
        `infrastructure` - the infrastructure name as in GHNConfig.xml
        `startScopes` - the starting scopes as in GHNConfig.xml
      Returns:
        an Hashmap containing for each scope, and array of CheckResult

    - #### checkVresPresence

          public Boolean checkVresPresence(String infrastructure,
                                  String startScopes)

      check if the vo scope contain VREs
      Specified by:
        `checkVresPresence` in interface `NewLoginService`

    - #### getVresFromInfrastructure

          public ArrayList<VO> getVresFromInfrastructure(String infrastructure,
                                                String startScopes)

      Specified by:
        `getVresFromInfrastructure` in interface `NewLoginService`
      Parameters:
        `infrastructure` - the infrastructure name
        `startScopes` - the starting scopes
      Returns:
        an arraylist of VO containing their child VREs

    - #### installVREs

          public Boolean installVREs(ArrayList<VO> parents)

      install the VREs chosen by the end user
      Specified by:
        `installVREs` in interface `NewLoginService`

    - #### createAdministratorAccount

          public Boolean createAdministratorAccount(String email,
                                           String password,
                                           String firstname,
                                           String lastname)

      this method create a user and assigns the role Administrator to this user, also assigns the VO-ADMIN role or VRE-Manager for each VO/VRE present in the infrastructure
      Specified by:
        `createAdministratorAccount` in interface `NewLoginService`

Copyright © 2014. All Rights Reserved.