Interface ProfileManagementService

    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods 
      Modifier and Type Method Description
      java.util.Optional<Profile> createProfile​(Profile profile)
      This method creates a database entity.
      java.util.Optional<Profile> createProfile​(java.util.LinkedHashMap<java.lang.String,​java.lang.Object> profileAsMap)
      This method creates a database entity.
      void deactivateProfile​(java.lang.String profileId)
      This method updates database entity.
      java.util.List<java.util.Map<java.lang.String,​java.lang.Object>> getGenders()
      This method retrieves a map, which can be processed in a templates.
      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.
      ProfileRepository getRepository()  
      boolean isProfileBelongsToLoggedUser​(java.lang.String profileId)
      Checks if the provided profile ID belongs to the logged-in user.
      void removeProfileAndClean​(java.lang.String profileId)
      This method removes a database entity and clean all relationships from another entities.
      void removeProfilesByIds​(java.util.ArrayList<java.lang.String> profilesIds)
      This method removes a list of database entities.
      java.util.Optional<Profile> saveProfile​(Profile profile)
      This method saves a database entity.
      java.util.Optional<Profile> saveProfile​(java.util.LinkedHashMap<java.lang.String,​java.lang.Object> profileAsMap)
      This method saves database entity.
      java.util.LinkedHashSet<Profile> searchProfiles​(java.lang.String requestJson)
      This method does search requests and returns data as list.
      java.util.List<Profile> searchProfiles​(java.lang.String query, int from, int to)
      Deprecated.
      org.springframework.data.domain.Page<Profile> searchProfilesPaged​(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
      • searchProfiles

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

        org.springframework.data.domain.Page<Profile> searchProfilesPaged​(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
      • searchProfiles

        @Deprecated
        java.util.List<Profile> searchProfiles​(java.lang.String query,
                                               int from,
                                               int to)
        Deprecated.
        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
      • createProfile

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

        java.util.Optional<Profile> createProfile​(Profile profile)
        This method creates a database entity.
        Parameters:
        profile - database entity
        Returns:
        optional value to externally interaction
      • saveProfile

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

        java.util.Optional<Profile> saveProfile​(Profile profile)
        This method saves a database entity.
        Parameters:
        profile - database entity
        Returns:
        saved instance of database entity
      • removeProfileAndClean

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

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

        java.util.List<java.util.Map<java.lang.String,​java.lang.Object>> getGenders()
        This method retrieves a map, which can be processed in a templates.
        Returns:
        map-representation of data
      • deactivateProfile

        void deactivateProfile​(java.lang.String profileId)
        This method updates database entity.
        Parameters:
        profileId - identification for database entity which will be find and deactivate their profiles
      • isProfileBelongsToLoggedUser

        boolean isProfileBelongsToLoggedUser​(java.lang.String profileId)
        Checks if the provided profile ID belongs to the logged-in user.
        Parameters:
        profileId - The ID of the profile to be checked.
        Returns:
        true if the profile ID belongs to the logged-in user, false otherwise.