Package org.silverpeas.mobile.server.services

## Class ServiceConnection

- java.lang.Object
- - org.silverpeas.core.web.rs.RESTWebService
  - - org.silverpeas.mobile.server.services.AbstractRestWebService
    - - org.silverpeas.mobile.server.services.ServiceConnection

- All Implemented Interfaces:
    `org.silverpeas.core.web.rs.ProtectedWebResource`, `org.silverpeas.core.web.rs.WebAuthenticationValidation`, `org.silverpeas.core.web.rs.WebAuthorizationValidation`, `org.silverpeas.core.web.SilverpeasWebResource`

      @WebService
      @Path("mobile/connection")
      public class ServiceConnection
      extends AbstractRestWebService

  Service de gestion des connexions.
  Author:
    svuillet

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.silverpeas.core.web.rs.RESTWebService

      `org.silverpeas.core.web.rs.RESTWebService.WebProcess<R extends Object>, org.silverpeas.core.web.rs.RESTWebService.WebTreatment<R extends Object>`

  - ### Field Summary

    - ### Fields inherited from class org.silverpeas.mobile.server.services.AbstractRestWebService

      `MAINSESSIONCONTROLLER_ATTRIBUT_NAME`

    - ### Fields inherited from class org.silverpeas.core.web.rs.RESTWebService

      `RESPONSE_HEADER_ARRAYSIZE`

    - ### Fields inherited from interface org.silverpeas.core.web.SilverpeasWebResource

      `BASE_PATH`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ServiceConnection()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `changePwd​(String newPwd)` |
    `Boolean` | `checkSecurityCode​(String login, String domainId, String code)` |
    `void` | `generateSecurityCode​(String login, String domainId)` |
    `String` | `getComponentId()` |
    `List<DomainDTO>` | `getDomains()` |
    `protected String` | `getResourceBasePath()` |
    `protected org.silverpeas.core.admin.user.model.UserDetail` | `getUserInSession()` |
    `DetailUserDTO` | `login​(List<String> ids)` |
    `Boolean` | `setTabletMode()` |
    `protected void` | `setUserInSession​(org.silverpeas.core.admin.user.model.UserDetail user)` |
    `void` | `userAcceptsTermsOfService()` |
    `Boolean` | `userExist​(String login, String domainId)` |
    `void` | `validateUserAuthorization​(org.silverpeas.core.web.rs.UserPrivilegeValidation validation)` |

    - ### Methods inherited from class org.silverpeas.mobile.server.services.AbstractRestWebService

      `createStreamingList, getMainSessionController, getSettings, initSilverpeasSession, makeStreamingList, setMainsessioncontroller`

    - ### Methods inherited from class org.silverpeas.core.web.rs.RESTWebService

      `createWebResourceUri, fromPage, getBundle, getBundleLocation, getHighestUserRole, getHttpRequest, getHttpServletRequest, getHttpServletResponse, getOrganisationController, getSilverpeasContext, getUri, getUser, getUserPreferences, getUserRoles, identifiedBy, identifiedBy, initContext, initWebResourceUri, isUserDefined, process`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.silverpeas.core.web.rs.WebAuthenticationValidation

      `validateUserAuthentication`

- - ### Constructor Detail

    - #### ServiceConnection

          public ServiceConnection()

  - ### Method Detail

    - #### login

          @POST
          @Produces("application/json")
          @Consumes("application/json")
          @Path("login")
          public DetailUserDTO login​(List<String> ids)

    - #### checkSecurityCode

          @GET
          @Produces("application/json")
          @Path("securityCode/check/{login}/{domainId}/{code}")
          public Boolean checkSecurityCode​(@PathParam("login")
                                           String login,
                                           @PathParam("domainId")
                                           String domainId,
                                           @PathParam("code")
                                           String code)

    - #### generateSecurityCode

          @GET
          @Produces("application/json")
          @Path("securityCode/{login}/{domainId}")
          public void generateSecurityCode​(@PathParam("login")
                                           String login,
                                           @PathParam("domainId")
                                           String domainId)

    - #### userExist

          @GET
          @Produces("application/json")
          @Path("userExist/{login}/{domainId}")
          public Boolean userExist​(@PathParam("login")
                                   String login,
                                   @PathParam("domainId")
                                   String domainId)

    - #### setTabletMode

          @PUT
          @Produces("application/json")
          @Path("setTabletMode")
          public Boolean setTabletMode()

    - #### getDomains

          @GET
          @Produces("application/json")
          @Path("domains")
          public List<DomainDTO> getDomains()

    - #### changePwd

          @PUT
          @Consumes("application/json")
          @Produces("application/json")
          @Path("changePwd/")
          public void changePwd​(String newPwd)

    - #### userAcceptsTermsOfService

          @PUT
          @Produces("application/json")
          @Path("userAcceptsTermsOfService")
          public void userAcceptsTermsOfService()

    - #### setUserInSession

          protected void setUserInSession​(org.silverpeas.core.admin.user.model.UserDetail user)

    - #### getUserInSession

          protected org.silverpeas.core.admin.user.model.UserDetail getUserInSession()

    - #### getResourceBasePath

          protected String getResourceBasePath()

      Specified by:
        `getResourceBasePath` in class `org.silverpeas.core.web.rs.RESTWebService`

    - #### getComponentId

          public String getComponentId()

    - #### validateUserAuthorization

          public void validateUserAuthorization​(org.silverpeas.core.web.rs.UserPrivilegeValidation validation)