Class ScimUserAdminService

  • All Implemented Interfaces:
    edu.psu.swe.scim.server.provider.Provider<edu.psu.swe.scim.spec.resources.ScimUser>

    @Service
    public class ScimUserAdminService
    extends Object
    implements edu.psu.swe.scim.server.provider.Provider<edu.psu.swe.scim.spec.resources.ScimUser>

    The service in charge of handling the Silverpeas's users against those sent by SCIM client.
    It is finally kind of CRUD service.

    All provider methods are called by WEB services which are decoding the HTTP requests in front.

    Author:
    silveryocha
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      edu.psu.swe.scim.spec.resources.ScimUser create​(edu.psu.swe.scim.spec.resources.ScimUser resource)  
      void delete​(String id)  
      edu.psu.swe.scim.spec.protocol.filter.FilterResponse<edu.psu.swe.scim.spec.resources.ScimUser> find​(edu.psu.swe.scim.spec.protocol.search.Filter filter, edu.psu.swe.scim.spec.protocol.search.PageRequest pageRequest, edu.psu.swe.scim.spec.protocol.search.SortRequest sortRequest)  
      edu.psu.swe.scim.spec.resources.ScimUser get​(String id)  
      List<Class<? extends edu.psu.swe.scim.spec.resources.ScimExtension>> getExtensionList()  
      protected <T extends SearchCriteria>
      T
      processExpression​(edu.psu.swe.scim.spec.protocol.filter.FilterExpression expression, T searchCriteria)
      Centralizing the SearchCriteria instance creation from FilterExpression given by SCIM client.
      edu.psu.swe.scim.spec.resources.ScimUser update​(edu.psu.swe.scim.server.provider.UpdateRequest<edu.psu.swe.scim.spec.resources.ScimUser> updateRequest)  
      protected void validateDomainExists()  
      • Methods inherited from interface edu.psu.swe.scim.server.provider.Provider

        handleException
    • Field Detail

      • scimRequestContext

        @Inject
        protected org.silverpeas.core.webapi.admin.scim.ScimRequestContext scimRequestContext
    • Constructor Detail

      • ScimUserAdminService

        public ScimUserAdminService()
    • Method Detail

      • create

        public edu.psu.swe.scim.spec.resources.ScimUser create​(edu.psu.swe.scim.spec.resources.ScimUser resource)
                                                        throws edu.psu.swe.scim.server.exception.UnableToCreateResourceException
        Specified by:
        create in interface edu.psu.swe.scim.server.provider.Provider<edu.psu.swe.scim.spec.resources.ScimUser>
        Throws:
        edu.psu.swe.scim.server.exception.UnableToCreateResourceException
      • update

        public edu.psu.swe.scim.spec.resources.ScimUser update​(edu.psu.swe.scim.server.provider.UpdateRequest<edu.psu.swe.scim.spec.resources.ScimUser> updateRequest)
                                                        throws edu.psu.swe.scim.server.exception.UnableToUpdateResourceException
        Specified by:
        update in interface edu.psu.swe.scim.server.provider.Provider<edu.psu.swe.scim.spec.resources.ScimUser>
        Throws:
        edu.psu.swe.scim.server.exception.UnableToUpdateResourceException
      • get

        public edu.psu.swe.scim.spec.resources.ScimUser get​(String id)
                                                     throws edu.psu.swe.scim.server.exception.UnableToRetrieveResourceException
        Specified by:
        get in interface edu.psu.swe.scim.server.provider.Provider<edu.psu.swe.scim.spec.resources.ScimUser>
        Throws:
        edu.psu.swe.scim.server.exception.UnableToRetrieveResourceException
      • find

        public edu.psu.swe.scim.spec.protocol.filter.FilterResponse<edu.psu.swe.scim.spec.resources.ScimUser> find​(edu.psu.swe.scim.spec.protocol.search.Filter filter,
                                                                                                                   edu.psu.swe.scim.spec.protocol.search.PageRequest pageRequest,
                                                                                                                   edu.psu.swe.scim.spec.protocol.search.SortRequest sortRequest)
                                                                                                            throws edu.psu.swe.scim.server.exception.UnableToRetrieveResourceException
        Specified by:
        find in interface edu.psu.swe.scim.server.provider.Provider<edu.psu.swe.scim.spec.resources.ScimUser>
        Throws:
        edu.psu.swe.scim.server.exception.UnableToRetrieveResourceException
      • delete

        public void delete​(String id)
                    throws edu.psu.swe.scim.server.exception.UnableToDeleteResourceException
        Specified by:
        delete in interface edu.psu.swe.scim.server.provider.Provider<edu.psu.swe.scim.spec.resources.ScimUser>
        Throws:
        edu.psu.swe.scim.server.exception.UnableToDeleteResourceException
      • getExtensionList

        public List<Class<? extends edu.psu.swe.scim.spec.resources.ScimExtension>> getExtensionList()
        Specified by:
        getExtensionList in interface edu.psu.swe.scim.server.provider.Provider<edu.psu.swe.scim.spec.resources.ScimUser>
      • validateDomainExists

        protected void validateDomainExists()
      • processExpression

        protected <T extends SearchCriteria> T processExpression​(edu.psu.swe.scim.spec.protocol.filter.FilterExpression expression,
                                                                 T searchCriteria)
                                                          throws edu.psu.swe.scim.server.exception.UnableToRetrieveResourceException
        Centralizing the SearchCriteria instance creation from FilterExpression given by SCIM client.
        Type Parameters:
        T - the type of SearchCriteria
        Parameters:
        expression - the filters given by the SCIM client.
        searchCriteria - the silverpeas SearchCriteria instance.
        Returns:
        the completed SearchCriteria instance.
        Throws:
        edu.psu.swe.scim.server.exception.UnableToRetrieveResourceException