Interface UserManagementService

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void changePassword​(User user, java.lang.String password)
      This method update and save password from database entity (user).
      java.util.Optional<User> createUser​(User user)
      This method creates a database entity.
      java.util.Optional<User> createUser​(java.util.LinkedHashMap<java.lang.String,​java.lang.Object> userAsMap)
      This method creates a database entity.
      User getLoggedUser()
      This method does return database entity which logged in system.
      java.util.Deque<java.util.Map<java.lang.String,​java.lang.Object>> getPaginationFilter​(java.lang.String requestJson)
      This method does calculation for a pages based on the request.
      UserPrincipal getPrincipal()
      This method returns user principal object from context.
      UserRepository getRepository()  
      boolean isLogged()
      This method does check is database entity logged in system.
      boolean isNotLogged()
      This method does check is not database entity logged in system.
      boolean isSuperUser()
      This method does check is database entity had super status.
      boolean isUserPermissionAll()
      This method does check is database entity had all permissions.
      boolean isUserPermissionApplication()
      This method does check is database entity had application permission.
      void removeUserAndClean​(java.lang.String userId)
      This method removes a database entity and clean all relationships from another entities.
      void removeUsersByIds​(java.util.ArrayList<java.lang.String> userIds)
      This method removes a list of database entities.
      java.util.Optional<User> revertPasswordToSaved​(java.lang.String userId)
      This method does revert and save database entity field value
      void saveSavedPassword​(java.lang.String userId)
      This method update and save password from database entity (user).
      java.util.Optional<User> saveUser​(User user)
      This method saves a database entity.
      java.util.Optional<User> saveUser​(java.util.LinkedHashMap<java.lang.String,​java.lang.Object> userAsMap)
      This method saves database entity.
      java.util.LinkedHashSet<User> searchUsers​(java.lang.String requestJson)
      This method does search requests and returns data as list.
      java.util.List<User> searchUsers​(java.lang.String query, int from, int to)
      This method does search requests and returns data as list.
      org.springframework.data.domain.Page<User> searchUsersPaged​(java.lang.String requestJson)
      This method does search requests and returns data as pages.
    • Method Detail

      • getPaginationFilter

        java.util.Deque<java.util.Map<java.lang.String,​java.lang.Object>> getPaginationFilter​(java.lang.String requestJson)
        This method does calculation for a pages based on the request.
        Parameters:
        requestJson - JSON-object of request contains an instructions for search queries
        Returns:
        map-representation of data
      • searchUsers

        java.util.LinkedHashSet<User> searchUsers​(java.lang.String requestJson)
        This method does search requests and returns data as list.
        Parameters:
        requestJson - search request
        Returns:
        data transport entities as list
      • searchUsersPaged

        org.springframework.data.domain.Page<User> searchUsersPaged​(java.lang.String requestJson)
        This method does search requests and returns data as pages.
        Parameters:
        requestJson - JSON-object of request contains an instructions for search queries
        Returns:
        database entities separated to pages
      • getPrincipal

        UserPrincipal getPrincipal()
        This method returns user principal object from context.
        Returns:
        user principal object
      • getLoggedUser

        User getLoggedUser()
        This method does return database entity which logged in system.
        Returns:
        database entity
      • isLogged

        boolean isLogged()
        This method does check is database entity logged in system.
        Returns:
        value as boolean
      • isNotLogged

        boolean isNotLogged()
        This method does check is not database entity logged in system.
        Returns:
        value as boolean
      • isSuperUser

        boolean isSuperUser()
        This method does check is database entity had super status.
        Returns:
        value as boolean
      • isUserPermissionAll

        boolean isUserPermissionAll()
        This method does check is database entity had all permissions.
        Returns:
        value as boolean
      • isUserPermissionApplication

        boolean isUserPermissionApplication()
        This method does check is database entity had application permission.
        Returns:
        value as boolean
      • searchUsers

        java.util.List<User> searchUsers​(java.lang.String query,
                                         int from,
                                         int to)
        This method does search requests and returns data as list.
        Parameters:
        query - search query
        from - field which filter and returned items
        to - field which filter and returned items
        Returns:
        database entities as list
      • createUser

        java.util.Optional<User> createUser​(java.util.LinkedHashMap<java.lang.String,​java.lang.Object> userAsMap)
        This method creates a database entity.
        Parameters:
        userAsMap - map-representation of database entity
        Returns:
        optional value to externally interaction
      • createUser

        java.util.Optional<User> createUser​(User user)
        This method creates a database entity.
        Parameters:
        user - database entity
        Returns:
        optional value to externally interaction
      • saveUser

        java.util.Optional<User> saveUser​(java.util.LinkedHashMap<java.lang.String,​java.lang.Object> userAsMap)
        This method saves database entity.
        Parameters:
        userAsMap - map-representation of database entity
        Returns:
        saved instance of database entity
      • revertPasswordToSaved

        java.util.Optional<User> revertPasswordToSaved​(java.lang.String userId)
        This method does revert and save database entity field value
        Parameters:
        userId - identification for database entity which will be updated
        Returns:
        saved instance of database entity
      • saveSavedPassword

        void saveSavedPassword​(java.lang.String userId)
        This method update and save password from database entity (user).
        Parameters:
        userId - identification for database entity which will be updated
      • saveUser

        java.util.Optional<User> saveUser​(User user)
        This method saves a database entity.
        Parameters:
        user - database entity
        Returns:
        saved instance of database entity
      • removeUserAndClean

        void removeUserAndClean​(java.lang.String userId)
        This method removes a database entity and clean all relationships from another entities.
        Parameters:
        userId - identification for database entity which will be removed
      • removeUsersByIds

        void removeUsersByIds​(java.util.ArrayList<java.lang.String> userIds)
        This method removes a list of database entities.
        Parameters:
        userIds - the list of database entities which will be removed
      • changePassword

        void changePassword​(User user,
                            java.lang.String password)
        This method update and save password from database entity (user).
        Parameters:
        user - the database entity which will be updated
        password - the database entity field which will be saved