Interface CommunityOfUsersRepository

  • All Superinterfaces:
    org.silverpeas.core.persistence.datasource.repository.EntityRepository<CommunityOfUsers>
    All Known Implementing Classes:
    CommunityOfUsersJpaRepository

    public interface CommunityOfUsersRepository
    extends org.silverpeas.core.persistence.datasource.repository.EntityRepository<CommunityOfUsers>
    This repository manages the persistence of communities of users. It abstracts the nature of the datasource in which are stored the communities as well as the persistence engine used to manage the access to such a datasource.
    • Method Detail

      • getByComponentInstanceId

        Optional<CommunityOfUsers> getByComponentInstanceId​(String componentInstanceId)
        Gets the community of users managed by the specified component instance.
        Parameters:
        componentInstanceId - the unique identifier of a component instance.
        Returns:
        an Optional with the CommunityOfUsers instance or an empty Optional if no such component instance exists.
      • getBySpaceId

        Optional<CommunityOfUsers> getBySpaceId​(String spaceId)
        Gets the community of users of the specified collaborative space.
        Parameters:
        spaceId - the unique identifier of a space.
        Returns:
        an Optional with the CommunityOfUsers instance or an empty Optional if no such space exists or if the space doesn't have any community.
      • getAllByUserId

        List<CommunityOfUsers> getAllByUserId​(String userId)
        Gets all the community of users the specified user is currently a member.
        Parameters:
        userId - the unique identifier of a user.
        Returns:
        a list of communities to which the given user is a member.