Interface CommunityApi


  • public interface CommunityApi
    Contains the Community related functionalities.
    • Method Detail

      • addCommunity

        Community addCommunity​(AddCommunityRequest addCommunityRequest)
        Adds a new community or subcommunity.
        Parameters:
        addCommunityRequest - the properties of the community to be added
        Returns:
        the newly added community
      • addCommunities

        @SecurityAuditMethod(resultFormatter=com.collibra.audit.formatter.CollectionFormatter.class)
        List<Community> addCommunities​(List<AddCommunityRequest> addCommunityRequests)
        Adds multiple communities in one go.
        Parameters:
        addCommunityRequests - a list of AddCommunity requests
        Returns:
        a list of the newly created communities
      • changeCommunity

        Community changeCommunity​(ChangeCommunityRequest changeCommunityRequest)
        Changes the community with the information that is present in the request.
        Parameters:
        changeCommunityRequest - changes that to be performed on the community
        Returns:
        the changed community
      • changeCommunities

        @SecurityAuditMethod(resultFormatter=com.collibra.audit.formatter.CollectionFormatter.class)
        List<Community> changeCommunities​(List<ChangeCommunityRequest> changeCommunityRequests)
        Changes multiple communities.
        Parameters:
        changeCommunityRequests - the properties of the communities to be changed
        Returns:
        the changed communities
      • makeRootCommunity

        @Deprecated
        Community makeRootCommunity​(UUID communityId)
        Deprecated.
        This method will be removed in the future. Please, use changeToRootCommunity(UUID).
        Turns the community indicated by the given communityId in a root community, meaning it has no longer a parent.
        Parameters:
        communityId - the identifier of the community
        Returns:
        the adapted community.
      • changeToRootCommunity

        Community changeToRootCommunity​(UUID communityId)
        Turns the community indicated by the given communityId in a root community, meaning it has no longer a parent.
        Parameters:
        communityId - the identifier of the community
        Returns:
        the adapted community.
      • getCommunity

        Community getCommunity​(UUID communityId)
        Returns the community identified by given communityId.
        Parameters:
        communityId - the identifier of the community.
        Returns:
        the found community
      • exists

        boolean exists​(UUID communityId)
        Returns true if a community with given communityId exists.
        Parameters:
        communityId - the identifier of the community
        Returns:
        true if a community with given communityId exists, false otherwise
      • removeCommunity

        @Deprecated
        void removeCommunity​(UUID communityId)
        Deprecated.
        This method will be removed in the future. Please, use removeCommunityInJob(UUID).
        Removes a community identified by given communityId.
        Parameters:
        communityId - the identifier of the community to remove
      • removeCommunities

        @Deprecated
        void removeCommunities​(List<UUID> communityIds)
        Deprecated.
        This method will be removed in the future. Please, use removeCommunitiesInJob(List, boolean).
        Removes multiple communities.
        Parameters:
        communityIds - the identifiers of the communities to remove
      • removeCommunityInJob

        Job removeCommunityInJob​(UUID communityId)
        Removes a community identified by the given communityId asynchronously.
        Parameters:
        communityId - the identifier of the community to remove
        Returns:
        the job that is removing the community async
      • removeCommunitiesInJob

        Job removeCommunitiesInJob​(List<UUID> communityIds,
                                   boolean sendNotification)
        Removes a communities identified by the given communityIds asynchronously.
        Parameters:
        communityIds - the identifiers of communities to remove
        sendNotification - a boolean value indicating wether a notification should be send or not
        Returns:
        the Job removing the communities