Interface SpaceStorage


public interface SpaceStorage
Version:
$Revision$
Author:
Alain Defrance
  • Method Details

    • getSpaceByDisplayName

      Space getSpaceByDisplayName(String spaceDisplayName) throws SpaceStorageException
      Gets a space by its display name.
      Parameters:
      spaceDisplayName -
      Returns:
      the space with spaceDisplayName that matches the spaceDisplayName input.
      Throws:
      SpaceStorageException
      Since:
      1.2.0-GA
    • saveSpace

      void saveSpace(Space space, boolean isNew) throws SpaceStorageException
      Saves a space. If isNew is true, creates new space. If not only updates space an saves it.
      Parameters:
      space -
      isNew -
      Throws:
      SpaceStorageException
    • renameSpace

      void renameSpace(Space space, String newDisplayName) throws SpaceStorageException
      Renames a space.
      Parameters:
      space -
      newDisplayName -
      Throws:
      SpaceStorageException
      Since:
      1.2.8
    • deleteSpace

      void deleteSpace(String id) throws SpaceStorageException
      Deletes a space by space id.
      Parameters:
      id -
      Throws:
      SpaceStorageException
    • ignoreSpace

      void ignoreSpace(String spaceId, String userId)
      update the SpaceMembership between space and user
      Parameters:
      spaceId - the space Id
      userId - user Id
    • isSpaceIgnored

      boolean isSpaceIgnored(String spaceId, String userId)
      Verify if a space is ignored by the user or not.
      Parameters:
      spaceId - the id of the space
      userId - the id of the user
      Returns:
      true if user has ignored the space from suggested list
    • getManagerSpacesCount

      int getManagerSpacesCount(String userId)
      Gets the count of the spaces that a user has the "manager" role.
      Parameters:
      userId -
      Returns:
      the count of the manager spaces
      Throws:
      SpaceStorageException
      Since:
      1.2.0-GA
    • getManagerSpacesByFilterCount

      int getManagerSpacesByFilterCount(String userId, SpaceFilter spaceFilter)
      Gets the count of the spaces which user has "manager" role by filter.
      Parameters:
      userId -
      spaceFilter -
      Returns:
      Since:
      1.2.0-GA
    • getManagerSpaces

      List<Space> getManagerSpaces(String userId, long offset, long limit)
      Gets the spaces that a user has the "manager" role with offset, limit.
      Parameters:
      userId -
      offset -
      limit -
      Returns:
      a list of the manager spaces with offset, limit
      Throws:
      SpaceStorageException
      Since:
      1.2.0-GA
    • getManagerSpacesByFilter

      List<Space> getManagerSpacesByFilter(String userId, SpaceFilter spaceFilter, long offset, long limit)
      Gets the manager spaces of the user id by the filter with offset, limit.
      Parameters:
      userId -
      spaceFilter -
      offset -
      limit -
      Returns:
      Since:
      1.2.0-GA
    • getMemberSpacesCount

      int getMemberSpacesCount(String userId) throws SpaceStorageException
      Gets the count of the spaces that a user has the "member" role.
      Parameters:
      userId -
      Returns:
      the count of the member spaces
      Throws:
      SpaceStorageException
      Since:
      1.2.0-GA
    • getMemberSpacesByFilterCount

      int getMemberSpacesByFilterCount(String userId, SpaceFilter spaceFilter)
      Gets the count of the spaces which user has "member" role by filter.
      Parameters:
      userId -
      spaceFilter -
      Returns:
      Since:
      1.2.0-GA
    • getMemberSpaces

      @Deprecated List<Space> getMemberSpaces(String userId) throws SpaceStorageException
      Deprecated.
      use getMemberSpaces(String, long, long) instead with offset and limit
      Gets the spaces that a user has the "member" role.
      Parameters:
      userId -
      Returns:
      a list of the member spaces
      Throws:
      SpaceStorageException
      Since:
      1.2.0-GA
    • getMemberSpaces

      List<Space> getMemberSpaces(String userId, long offset, long limit) throws SpaceStorageException
      Gets the spaces that a user has the "member" role with offset, limit.
      Parameters:
      userId -
      offset -
      limit -
      Returns:
      a list of the member spaces with offset, limit
      Throws:
      SpaceStorageException
      Since:
      1.2.0-GA
    • getMemberSpacesByFilter

      List<Space> getMemberSpacesByFilter(String userId, SpaceFilter spaceFilter, long offset, long limit)
      Gets the member spaces of the user id by the filter with offset, limit.
      Parameters:
      userId -
      spaceFilter -
      offset -
      limit -
      Returns:
      Since:
      1.2.0-GA
    • getFavoriteSpacesByFilterCount

      int getFavoriteSpacesByFilterCount(String userId, SpaceFilter spaceFilter)
      Gets the count of the favorite spaces of the user id.
      Parameters:
      userId -
      spaceFilter -
      Returns:
      Since:
      1.2.0-GA
    • getFavoriteSpacesByFilter

      List<Space> getFavoriteSpacesByFilter(String userId, SpaceFilter spaceFilter, long offset, long limit)
      Gets the favorite spaces of the user id by the filter with offset, limit.
      Parameters:
      userId -
      spaceFilter -
      offset -
      limit -
      Returns:
      Since:
      1.2.0-GA
    • getPendingSpacesCount

      int getPendingSpacesCount(String userId) throws SpaceStorageException
      Gets the count of the pending spaces of the userId.
      Parameters:
      userId -
      Returns:
      the count of the pending spaces
      Throws:
      SpaceStorageException
      Since:
      1.2.0-GA
    • getPendingSpacesByFilterCount

      int getPendingSpacesByFilterCount(String userId, SpaceFilter spaceFilter)
      Gets the count of the pending spaces of the user by space filter.
      Parameters:
      userId -
      spaceFilter -
      Returns:
      Since:
      1.2.0-GA
    • getPendingSpaces

      List<Space> getPendingSpaces(String userId) throws SpaceStorageException
      Gets a user's pending spaces and that the user can revoke that request.
      Parameters:
      userId -
      Returns:
      a list of the pending spaces
      Throws:
      SpaceStorageException
      Since:
      1.2.0-GA
    • getPendingSpaces

      List<Space> getPendingSpaces(String userId, long offset, long limit) throws SpaceStorageException
      Gets a user's pending spaces and that the user can revoke that request with offset, limit.
      Parameters:
      userId -
      offset -
      limit -
      Returns:
      a list of the pending spaces with offset, limit
      Throws:
      SpaceStorageException
      Since:
      1.2.0-GA
    • getPendingSpacesByFilter

      List<Space> getPendingSpacesByFilter(String userId, SpaceFilter spaceFilter, long offset, long limit)
      Gets the pending spaces of the user by space filter with offset, limit.
      Parameters:
      userId -
      spaceFilter -
      offset -
      limit -
      Returns:
      Since:
      1.2.0-GA
    • getInvitedSpacesCount

      int getInvitedSpacesCount(String userId) throws SpaceStorageException
      Gets the count of the invited spaces of the userId.
      Parameters:
      userId -
      Returns:
      the count of the invited spaces
      Throws:
      SpaceStorageException
      Since:
      1.2.0-GA
    • getInvitedSpacesByFilterCount

      int getInvitedSpacesByFilterCount(String userId, SpaceFilter spaceFilter)
      Gets the count of the invited spaces of the user by filter.
      Parameters:
      userId -
      spaceFilter -
      Returns:
      Since:
      1.2.0-GA
    • getInvitedSpaces

      List<Space> getInvitedSpaces(String userId) throws SpaceStorageException
      Gets a user's invited spaces and that user can accept or deny the request.
      Parameters:
      userId -
      Returns:
      a list of the invited spaces.
      Throws:
      SpaceStorageException
      Since:
      1.2.0-GA
    • getInvitedSpaces

      List<Space> getInvitedSpaces(String userId, long offset, long limit) throws SpaceStorageException
      Gets a user's invited spaces and that user can accept or deny the request with offset, limit.
      Parameters:
      userId -
      offset -
      limit -
      Returns:
      a list of the invited spaces with offset, limit
      Throws:
      SpaceStorageException
      Since:
      1.2.0-GA
    • getInvitedSpacesByFilter

      List<Space> getInvitedSpacesByFilter(String userId, SpaceFilter spaceFilter, long offset, long limit)
      Gets the invited spaces of the user by space filter with offset, limit.
      Parameters:
      userId -
      spaceFilter -
      offset -
      limit -
      Returns:
      Since:
      1.2.0-GA
    • getPublicSpacesCount

      int getPublicSpacesCount(String userId) throws SpaceStorageException
      Gets the count of the public spaces of the userId.
      Parameters:
      userId -
      Returns:
      the count of the spaces in which the user can request to join
      Throws:
      SpaceStorageException
      Since:
      1.2.0-GA
    • getPublicSpacesByFilterCount

      int getPublicSpacesByFilterCount(String userId, SpaceFilter spaceFilter)
      Gets the count of the public spaces of the user by space filter.
      Parameters:
      userId -
      spaceFilter -
      Returns:
      Since:
      1.2.0-GA
    • getPublicSpacesByFilter

      List<Space> getPublicSpacesByFilter(String userId, SpaceFilter spaceFilter, long offset, long limit)
      Gets the public spaces of the user by filter with offset, limit.
      Parameters:
      userId -
      spaceFilter -
      offset -
      limit -
      Returns:
      Since:
      1.2.0-GA
    • getPublicSpaces

      List<Space> getPublicSpaces(String userId) throws SpaceStorageException
      Gets a user's public spaces and that user can request to join.
      Parameters:
      userId -
      Returns:
      spaces list in which the user can request to join.
      Throws:
      SpaceStorageException
      Since:
      1.2.0-GA
    • getPublicSpaces

      List<Space> getPublicSpaces(String userId, long offset, long limit) throws SpaceStorageException
      Gets a user's public spaces and that user can request to join with offset, limit.
      Parameters:
      userId -
      offset -
      limit -
      Returns:
      spaces list in which the user can request to join with offset, limit
      Throws:
      SpaceStorageException
      Since:
      1.2.0-GA
    • getAccessibleSpacesCount

      int getAccessibleSpacesCount(String userId) throws SpaceStorageException
      Gets the count of the accessible spaces of the userId.
      Parameters:
      userId -
      Returns:
      the count of the accessible spaces
      Throws:
      SpaceStorageException
      Since:
      1.2.0-GA
    • getVisibleSpacesCount

      int getVisibleSpacesCount(String userId, SpaceFilter spaceFilter) throws SpaceStorageException
      Gets the count of the visible spaces of the userId.
      Parameters:
      userId -
      spaceFilter -
      Returns:
      Throws:
      SpaceStorageException
      Since:
      1.2.5-GA
    • getAccessibleSpacesByFilterCount

      int getAccessibleSpacesByFilterCount(String userId, SpaceFilter spaceFilter)
      Gets the count of the accessible spaces of the user by filter.
      Parameters:
      userId -
      spaceFilter -
      Returns:
      Since:
      1.2.0-GA
    • getAccessibleSpaces

      @Deprecated List<Space> getAccessibleSpaces(String userId) throws SpaceStorageException
      Deprecated.
      4.0.0-RC2
      Gets the spaces of a user which that user has the "member" role or edit permission.
      Parameters:
      userId - the userId
      Returns:
      a list of the accessible spaces
      Throws:
      SpaceStorageException
      Since:
      1.2.0-GA
    • getVisibleSpaces

      List<Space> getVisibleSpaces(String userId, SpaceFilter spaceFilter, long offset, long limit) throws SpaceStorageException
      Gets the spaces of a user which that user has the visible spaces.
      Parameters:
      userId - the userId
      Returns:
      a list of the accessible spaces
      Throws:
      SpaceStorageException
      Since:
      1.2.5-GA
    • getVisibleSpaces

      List<Space> getVisibleSpaces(String userId, SpaceFilter spaceFilter) throws SpaceStorageException
      Gets the spaces of a user which that user has the "member" role or edit permission.
      Parameters:
      userId - the userId
      Returns:
      a list of the accessible spaces
      Throws:
      SpaceStorageException
      Since:
      1.2.0-GA
    • getAccessibleSpaces

      List<Space> getAccessibleSpaces(String userId, long offset, long limit) throws SpaceStorageException
      Gets the spaces of a user which that user has "member" role or edit permission with offset, limit.
      Parameters:
      userId - the userId
      offset -
      limit -
      Returns:
      a list of the accessible space with offset, limit
      Throws:
      SpaceStorageException
      Since:
      1.2.0-GA
    • getAccessibleSpacesByFilter

      List<Space> getAccessibleSpacesByFilter(String userId, SpaceFilter spaceFilter, long offset, long limit)
      Gets the accessible spaces of the user by filter with offset, limit.
      Parameters:
      userId -
      spaceFilter -
      offset -
      limit -
      Returns:
      Since:
      1.2.0-GA
    • getEditableSpacesCount

      int getEditableSpacesCount(String userId) throws SpaceStorageException
      Gets the count of the spaces of a user which that user has the edit permission.
      Parameters:
      userId -
      Returns:
      the count of the editable spaces.
      Throws:
      SpaceStorageException
      Since:
      1.2.0-GA
    • getEditableSpacesByFilterCount

      int getEditableSpacesByFilterCount(String userId, SpaceFilter spaceFilter)
      Gets the count of the editable spaces of the user by filter.
      Parameters:
      userId -
      spaceFilter -
      Returns:
      Since:
      1.2.0-GA
    • getEditableSpaces

      List<Space> getEditableSpaces(String userId) throws SpaceStorageException
      Gets the spaces of a user which that user has the edit permission.
      Parameters:
      userId -
      Returns:
      a list of the editable spaces.
      Throws:
      SpaceStorageException
      Since:
      1.2.0-GA
    • getEditableSpaces

      List<Space> getEditableSpaces(String userId, long offset, long limit) throws SpaceStorageException
      Gets the spaces of a user which that user has the edit permission with offset, limit.
      Parameters:
      userId -
      offset -
      limit -
      Returns:
      a list of the spaces with offset, limit
      Throws:
      SpaceStorageException
      Since:
      1.2.0-GA
    • getEditableSpacesByFilter

      List<Space> getEditableSpacesByFilter(String userId, SpaceFilter spaceFilter, long offset, long limit)
      Gets the editable spaces of the user by filter with offset, limit.
      Parameters:
      userId -
      spaceFilter -
      offset -
      limit -
      Returns:
      Since:
      1.2.0-GA
    • getAllSpacesCount

      int getAllSpacesCount() throws SpaceStorageException
      Gets the count of the spaces.
      Returns:
      the count of all spaces
      Throws:
      SpaceStorageException
      Since:
      1.2.0-GA
    • getAllSpaces

      List<Space> getAllSpaces() throws SpaceStorageException
      Gets all the spaces. By the default get the all spaces with OFFSET = 0, LIMIT = 200;
      Returns:
      the list of all spaces
      Throws:
      SpaceStorageException
    • getAllSpacesByFilterCount

      int getAllSpacesByFilterCount(SpaceFilter spaceFilter)
      Gets the count of the spaces which are searched by space filter.
      Parameters:
      spaceFilter -
      Returns:
      Since:
      1.2.0-GA
    • getSpaces

      List<Space> getSpaces(long offset, long limit) throws SpaceStorageException
      Gets the spaces with offset, limit.
      Parameters:
      offset -
      limit -
      Returns:
      the list of the spaces with offset, limit
      Throws:
      SpaceStorageException
      Since:
      1.2.0-GA
    • getSpacesByFilter

      List<Space> getSpacesByFilter(SpaceFilter spaceFilter, long offset, long limit)
      Gets the spaces by space filter with offset, limit.
      Parameters:
      spaceFilter -
      offset -
      limit -
      Returns:
      Throws:
      SpaceStorageException
    • getSpaceById

      Space getSpaceById(String id) throws SpaceStorageException
      Gets a space by its space id.
      Parameters:
      id -
      Returns:
      space with id specified
      Throws:
      SpaceStorageException
    • getSpaceSimpleById

      Space getSpaceSimpleById(String id) throws SpaceStorageException
      Gets a space simple by its space id to aim decrease workload to get full information. It's only to get a little space information such as displayName, groupId, prettyName description, id, avatar ..
      Parameters:
      id -
      Returns:
      space with id specified
      Throws:
      SpaceStorageException
    • getSpaceByPrettyName

      Space getSpaceByPrettyName(String spacePrettyName) throws SpaceStorageException
      Gets a space by its pretty name.
      Parameters:
      spacePrettyName -
      Returns:
      the space with spacePrettyName that matches spacePrettyName input.
      Throws:
      SpaceStorageException
      Since:
      1.2.0-GA
    • getSpaceByGroupId

      Space getSpaceByGroupId(String groupId) throws SpaceStorageException
      Gets a space by its associated group id.
      Parameters:
      groupId -
      Returns:
      the space that has group id matching the groupId string input.
      Throws:
      SpaceStorageException
      Since:
      1.2.0-GA
    • getSpaceByUrl

      Space getSpaceByUrl(String url) throws SpaceStorageException
      Gets a space by its url.
      Parameters:
      url -
      Returns:
      the space with string url specified
      Throws:
      SpaceStorageException
    • updateSpaceAccessed

      void updateSpaceAccessed(String remoteId, Space space) throws SpaceStorageException
      Update accessed space to top of space members list of Identity model
      Parameters:
      remoteId -
      space -
      Throws:
      SpaceStorageException
    • getLastAccessedSpace

      List<Space> getLastAccessedSpace(SpaceFilter filter, int offset, int limit) throws SpaceStorageException
      Gets list of spaces which user has been last visited.
      Parameters:
      filter -
      offset - TODO
      limit -
      Throws:
      SpaceStorageException
    • getLastAccessedSpaceCount

      int getLastAccessedSpaceCount(SpaceFilter filter) throws SpaceStorageException
      Gets number of spaces which user has been last visited.
      Parameters:
      filter -
      Throws:
      SpaceStorageException
    • getNumberOfMemberPublicSpaces

      int getNumberOfMemberPublicSpaces(String userId)
      Gets the count of the public spaces of the userId.
      Parameters:
      userId -
      Returns:
      number of public space of a user where he is member
      Since:
      4.0.0.Beta01
    • getVisitedSpaces

      List<Space> getVisitedSpaces(SpaceFilter filter, int offset, int limit) throws SpaceStorageException
      Get the visited spaces
      Parameters:
      filter -
      offset -
      limit -
      Returns:
      list of browsed spaces
      Throws:
      SpaceStorageException
    • getLastSpaces

      List<Space> getLastSpaces(int limit)
      Gets the last spaces that have been created.
      Parameters:
      limit - the limit of spaces to provide.
      Returns:
      The last spaces.
      Since:
      4.0.x
      eXo level API
      Experimental
    • getMemberSpaceIds

      @Deprecated(since="6.4.0", forRemoval=true) default List<String> getMemberSpaceIds(String identityId, int offset, int limit) throws SpaceStorageException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Retrieves the list of Space Identity technical identifiers
      Parameters:
      identityId - user Identity technical identifier
      offset - The starting point
      limit - The limitation of returned results
      Returns:
      List of space Identity technical identifiers
      Throws:
      SpaceStorageException
      Since:
      6.4.0
    • getSpaceIdentityIdsByUserRole

      default List<String> getSpaceIdentityIdsByUserRole(String remoteId, String status, int offset, int limit)
      Retrieves the list of Space Identity technical identifiers
      Parameters:
      remoteId - user Identity remote Id
      status - String equals to MEMBER, MANAGER, REDACTOR, PENDING, INVITED, IGNORED
      offset - The starting point
      limit - The limitation of returned results
      Returns:
      List of space Identity technical identifiers
    • getFavoriteSpaceIdentityIds

      default List<String> getFavoriteSpaceIdentityIds(String userIdentityId, SpaceFilter spaceFilter, int offset, int limit)
      Retrieves the list of favorite Space Identity technical identifiers
      Parameters:
      userIdentityId - user Identity technical identifier
      spaceFilter - SpaceFilter used to filter on spaces
      offset - The starting point
      limit - The limitation of returned results
      Returns:
      List of space Identity technical identifiers
    • getMemberRoleSpaceIdentityIds

      List<String> getMemberRoleSpaceIdentityIds(String identityId, int offset, int limit) throws SpaceStorageException
      Retrieves the list of Space Identity technical identifiers
      Parameters:
      identityId - user Identity technical identifier
      offset - The starting point
      limit - The limitation of returned results
      Returns:
      List of space Identity technical identifiers
      Throws:
      SpaceStorageException
    • getMemberRoleSpaceIds

      List<String> getMemberRoleSpaceIds(String identityId, int offset, int limit) throws SpaceStorageException
      Retrieves the list of Space technical identifiers
      Parameters:
      identityId - user Identity technical identifier
      offset - The starting point
      limit - The limitation of returned results
      Returns:
      List of Space technical identifiers
      Throws:
      SpaceStorageException
    • getManagerRoleSpaceIds

      List<String> getManagerRoleSpaceIds(String identityId, int offset, int limit) throws SpaceStorageException
      Retrieves the list of Space technical identifiers
      Parameters:
      identityId - user Identity technical identifier
      offset - The starting point
      limit - The limitation of returned results
      Returns:
      List of Space technical identifiers
      Throws:
      SpaceStorageException
    • findSpaceExternalInvitationsBySpaceId

      List<SpaceExternalInvitation> findSpaceExternalInvitationsBySpaceId(String spaceId) throws SpaceStorageException
      Parameters:
      spaceId -
      Returns:
      Throws:
      SpaceStorageException
    • saveSpaceExternalInvitation

      void saveSpaceExternalInvitation(String spaceId, String email, String tokenId) throws SpaceStorageException
      Saves a new external invitation in space
      Parameters:
      spaceId -
      email -
      Throws:
      SpaceStorageException
    • findSpaceExternalInvitationById

      SpaceExternalInvitation findSpaceExternalInvitationById(String invitationId) throws SpaceStorageException
      Get an external invitation by invitation id
      Parameters:
      invitationId -
      Throws:
      SpaceStorageException
    • deleteSpaceExternalInvitation

      void deleteSpaceExternalInvitation(SpaceExternalInvitation spaceExternalInvitation) throws SpaceStorageException
      Delete an external invitation from a space
      Parameters:
      spaceExternalInvitation -
      Throws:
      SpaceStorageException
    • findExternalInvitationsSpacesByEmail

      List<String> findExternalInvitationsSpacesByEmail(String email) throws SpaceStorageException
      get the list of spaces ids by external email
      Parameters:
      email -
      Throws:
      SpaceStorageException
    • deleteExternalUserInvitations

      void deleteExternalUserInvitations(String email) throws SpaceStorageException
      Delete external invitations
      Parameters:
      email -
      Throws:
      SpaceStorageException
    • countPendingSpaceRequestsToManage

      default int countPendingSpaceRequestsToManage(String username)
      Parameters:
      username - username used to retrieve user spaces
      Returns:
      the count of users requested to join spaces that user manages
    • getPendingSpaceRequestsToManage

      default List<Space> getPendingSpaceRequestsToManage(String username, int offset, int limit)
      Parameters:
      username - username used to retrieve user spaces
      offset - offset of the query
      limit - limit of the query
      Returns:
      List of Space with pending users requesting to join spaces that the designated user manages
    • countExternalMembers

      default int countExternalMembers(Long spaceId)
      Counts the number of external users in a specific space
      Parameters:
      spaceId -
      Returns:
      counts the external members in the space
    • getCommonSpaces

      default List<Space> getCommonSpaces(String userId, String otherUserId, int offset, int limit)
      Get common spaces between two users
      Parameters:
      userId - connected user id
      otherUserId - visited profile user id
      Returns:
      list of common spaces between two users in param
    • countCommonSpaces

      default int countCommonSpaces(String userId, String otherUserId)
      Count common spaces between two users
      Parameters:
      userId - connected user id
      otherUserId - visited profile user id
      Returns:
      list of common spaces between two users in param
    • getSpaceMembershipDate

      default Instant getSpaceMembershipDate(long spaceId, String username)
      Retrieves the Space Membership date
      Parameters:
      spaceId - Space technical id
      username - User name (identifier)
      Returns:
      Instant corresponding to the creation date of the membership