Interface SpaceService


public interface SpaceService
Provides methods to work with Space.
Since:
Aug 29, 2008
  • Field Details

  • Method Details

    • getSpaceByDisplayName

      Space getSpaceByDisplayName(String spaceDisplayName)
      Gets a space by its display name.
      Parameters:
      spaceDisplayName - The space display name.
      Returns:
      The space.
      Since:
      1.2.0-GA
      eXo level API
      Platform
    • getSpaceByPrettyName

      Space getSpaceByPrettyName(String spacePrettyName)
      Gets a space by its pretty name.
      Parameters:
      spacePrettyName - The space's pretty name.
      Returns:
      The space.
      Since:
      1.2.0-GA
      eXo level API
      Platform
    • getSpaceByGroupId

      Space getSpaceByGroupId(String groupId)
      Gets a space by its group Id.
      Parameters:
      groupId - The group Id.
      Returns:
      The space.
      Since:
      1.2.0-GA
      eXo level API
      Platform
    • getSpaceById

      Space getSpaceById(String spaceId)
      Gets a space by its Id.
      Parameters:
      spaceId - Id of the space.
      Returns:
      The space.
      Since:
      1.2.0-GA
      eXo level API
      Platform
    • getSpaceByUrl

      Space getSpaceByUrl(String spaceUrl)
      Gets a space by its URL.
      Parameters:
      spaceUrl - URL of the space.
      Returns:
      The space.
      Since:
      1.2.0-GA
      eXo level API
      Platform
    • getAllSpacesWithListAccess

      org.exoplatform.commons.utils.ListAccess<Space> getAllSpacesWithListAccess()
      Gets a list access that contains all spaces.
      Returns:
      The list access.
      Since:
      1.2.0-GA
      eXo level API
      Platform
    • getAllSpacesByFilter

      org.exoplatform.commons.utils.ListAccess<Space> getAllSpacesByFilter(SpaceFilter spaceFilter)
      Gets a list access that contains all spaces matching with a filter.
      Parameters:
      spaceFilter - The space filter.
      Returns:
      The list access.
      Since:
      1.2.0-GA
      eXo level API
      Platform
    • getManagerSpaces

      default org.exoplatform.commons.utils.ListAccess<Space> getManagerSpaces(String userId)
      Gets a list access containing all spaces that a user has the "manager" role.
      Parameters:
      userId - The remote user Id.
      Returns:
      The list access.
      eXo level API
      Platform
    • getManagerSpacesByFilter

      default org.exoplatform.commons.utils.ListAccess<Space> getManagerSpacesByFilter(String userId, SpaceFilter spaceFilter)
      Gets a list access containing all spaces that a user has the "manager" role. This list access matches with the provided space filter.
      Parameters:
      userId - The remote user Id.
      spaceFilter - The space filter.
      Returns:
      The list access.
      eXo level API
      Platform
    • getMemberSpaces

      org.exoplatform.commons.utils.ListAccess<Space> getMemberSpaces(String userId)
      Gets a list access containing all spaces that a user has the "member" role.
      Parameters:
      userId - The remote user Id.
      Returns:
      The list access.
      Since:
      1.2.0-GA
      eXo level API
      Platform
    • getMemberSpacesByFilter

      org.exoplatform.commons.utils.ListAccess<Space> getMemberSpacesByFilter(String userId, SpaceFilter spaceFilter)
      Gets a list access containing all spaces that a user has the "member" role. This list access matches with the provided space filter.
      Parameters:
      userId - The remote user Id.
      spaceFilter - The space filter.
      Returns:
      The list access.
      Since:
      1.2.0-GA
      eXo level API
      Platform
    • getFavoriteSpacesByFilter

      default org.exoplatform.commons.utils.ListAccess<Space> getFavoriteSpacesByFilter(String userId, SpaceFilter spaceFilter)
      Gets a list of favorite spaces of a user. This list access matches with the provided space filter.
      Parameters:
      userId - The remote Id of user
      spaceFilter - SpaceFilter used to filter on spaces
      Returns:
      ListAccess of Space marked as favorite of user
      Since:
      Meeds 1.4.0
    • getAccessibleSpacesWithListAccess

      org.exoplatform.commons.utils.ListAccess<Space> getAccessibleSpacesWithListAccess(String userId)
      Gets a list access containing all spaces that a user has the access permission.
      Parameters:
      userId - The remote user Id.
      Returns:
      The space list access.
      Since:
      1.2.0-GA
      eXo level API
      Platform
    • getAccessibleSpacesByFilter

      org.exoplatform.commons.utils.ListAccess<Space> getAccessibleSpacesByFilter(String userId, SpaceFilter spaceFilter)
      Gets a list access containing all spaces that a user has the access permission. This list access matches with the provided space filter.
      Parameters:
      userId - The remote user Id.
      spaceFilter - The provided space filter.
      Returns:
      The list access.
      Since:
      1.2.0-GA
      eXo level API
      Platform
    • getSettingableSpaces

      org.exoplatform.commons.utils.ListAccess<Space> getSettingableSpaces(String userId)
      Gets a list access containing all spaces that a user has the setting permission.
      Parameters:
      userId - The remote user Id.
      Returns:
      The space list access.
      Since:
      1.2.0-GA
      eXo level API
      Platform
    • getSettingabledSpacesByFilter

      org.exoplatform.commons.utils.ListAccess<Space> getSettingabledSpacesByFilter(String userId, SpaceFilter spaceFilter)
      Gets a list access containing all spaces that a user has the setting permission. This list access matches with the provided space filter.
      Parameters:
      userId - The remote user Id.
      spaceFilter - The provided space filter.
      Returns:
      The space list access.
      Since:
      1.2.0-GA
      eXo level API
      Platform
    • getInvitedSpacesWithListAccess

      org.exoplatform.commons.utils.ListAccess<Space> getInvitedSpacesWithListAccess(String userId)
      Gets a list access containing all spaces that a user is invited to join.
      Parameters:
      userId - The remote user Id.
      Returns:
      The list access.
      Since:
      1.2.0-GA
      eXo level API
      Platform
    • getInvitedSpacesByFilter

      org.exoplatform.commons.utils.ListAccess<Space> getInvitedSpacesByFilter(String userId, SpaceFilter spaceFilter)
      Gets a list access containing all spaces that a user is invited to join. This list access matches with the provided space filter.
      Parameters:
      userId - The remote user Id.
      spaceFilter - The provided space filter.
      Returns:
      The list access.
      Since:
      1.2.0-GA
      eXo level API
      Platform
    • getPublicSpacesWithListAccess

      org.exoplatform.commons.utils.ListAccess<Space> getPublicSpacesWithListAccess(String userId)
      Gets a list access containing all spaces that a user can request to join.
      Parameters:
      userId - The remote user Id.
      Returns:
      The space list access.
      Since:
      1.2.0-GA
      eXo level API
      Platform
    • getPublicSpacesByFilter

      org.exoplatform.commons.utils.ListAccess<Space> getPublicSpacesByFilter(String userId, SpaceFilter spaceFilter)
      Gets a list access containing all spaces that a user can request to join. This list access matches with the provided space filter.
      Parameters:
      userId - The remote user Id.
      spaceFilter - The provided space filter.
      Returns:
      The list access.
      Since:
      1.2.0-GA
      eXo level API
      Platform
    • getPendingSpacesWithListAccess

      org.exoplatform.commons.utils.ListAccess<Space> getPendingSpacesWithListAccess(String userId)
      Gets a list access containing all spaces that a user sent a request for joining a space.
      Parameters:
      userId - The remote user Id.
      Returns:
      The list access.
      Since:
      1.2.0-GA
      eXo level API
      Platform
    • getPendingSpacesByFilter

      org.exoplatform.commons.utils.ListAccess<Space> getPendingSpacesByFilter(String userId, SpaceFilter spaceFilter)
      Gets a list access containing all spaces that a user sent a request for joining a space. This list access matches with the provided space filter.
      Parameters:
      userId - The remote user Id.
      spaceFilter - The provided space filter.
      Returns:
      The list access.
      Since:
      1.2.0-GA
      eXo level API
      Platform
    • createSpace

      Space createSpace(Space space, String creatorUserId)
      Creates a new space: creating a group, its group navigation with pages for installing space applications.
      Parameters:
      space - The space to be created.
      creatorUserId - The remote user Id.
      Returns:
      The created space.
      eXo level API
      Platform
    • updateSpace

      default Space updateSpace(Space existingSpace, List<Identity> identitiesToInvite)
      Updates information of a space and invites all users from identitiesToInvite to join this space.
      Parameters:
      existingSpace - The existing space to be updated.
      identitiesToInvite - The list of identities who are invited to join the space. Identity could be of type user or space
      Returns:
      updated space entity
    • updateSpace

      Space updateSpace(Space existingSpace)
      Updates information of a space.
      Parameters:
      existingSpace - The existing space to be updated.
      Returns:
      The updated space.
      Since:
      1.2.0-GA
      eXo level API
      Platform
    • updateSpaceAvatar

      Space updateSpaceAvatar(Space existingSpace)
      Updates a space's avatar.
      Parameters:
      existingSpace - The existing space to be updated.
      Returns:
      The updated space.
      Since:
      1.2.0-GA
      eXo level API
      Platform
    • updateSpaceBanner

      Space updateSpaceBanner(Space existingSpace)
      Updates a space's avatar.
      Parameters:
      existingSpace - The existing space to be updated.
      Returns:
      The updated space.
      Since:
      1.2.0-GA
      eXo level API
      Platform
    • deleteSpace

      void deleteSpace(Space space)
      Deletes a space. When a space is deleted, all of its page navigations and its group will be deleted.
      Parameters:
      space - The space to be deleted.
      eXo level API
      Platform
    • deleteSpace

      default void deleteSpace(Space space, boolean deleteGroup)
      Deletes a space without deleting the user's group. When a space is deleted, all of its page navigations and its group will be deleted.
      Parameters:
      space - The space to be deleted.
      eXo level API
      Platform
    • addPendingUser

      void addPendingUser(Space space, String userId)
      Adds a user to the list of pending requests for joining a space.
      Parameters:
      space - The exising space.
      userId - The remote user Id.
      Since:
      1.2.0-GA
      eXo level API
      Platform
    • removePendingUser

      void removePendingUser(Space space, String userId)
      Removes a user from a list of pending requests for joining a space.
      Parameters:
      space - The existing space.
      userId - The remote user Id.
      Since:
      1.2.0-GA
      eXo level API
      Platform
    • isPendingUser

      boolean isPendingUser(Space space, String userId)
      Checks if a user is in the list of pending requests for joining a space.
      Parameters:
      space - The existing space.
      userId - The remote user Id.
      Returns:
      TRUE if the user request is pending. Otherwise, it is FALSE.
      Since:
      1.2.0-GA
      eXo level API
      Platform
    • addInvitedUser

      void addInvitedUser(Space space, String userId)
      Adds a user to the list of users who are invited to join a space.
      Parameters:
      space - The existing space.
      userId - The remote user Id.
      Since:
      1.2.0-GA
      eXo level API
      Platform
    • removeInvitedUser

      void removeInvitedUser(Space space, String userId)
      Removes a user from the list of users who are invited to join a space.
      Parameters:
      space - The existing space.
      userId - The remote user Id.
      Since:
      1.2.0-GA
      eXo level API
      Platform
    • isInvitedUser

      boolean isInvitedUser(Space space, String userId)
      Checks if a user is in the list of users who are invited to join a space.
      Parameters:
      space - The existing space.
      userId - The remote user Id.
      Returns:
      TRUE if the user is in the list of invited users. Otherwise, it is FALSE.
      Since:
      1.2.0-GA
      eXo level API
      Platform
    • addMember

      void addMember(Space space, String userId)
      Adds a user to a space. The user will get the "member" role in a space.
      Parameters:
      space - The existing space.
      userId - The remote user Id.
      eXo level API
      Platform
    • removeMember

      void removeMember(Space space, String userId)
      Removes a member from a space.
      Parameters:
      space - The existing space.
      userId - The remote user Id.
      eXo level API
      Platform
    • isMember

      boolean isMember(Space space, String userId)
      Checks if a given user is member of space or not.
      Parameters:
      space - The existing space.
      userId - The remote user Id.
      Returns:
      TRUE if the user is member. Otherwise, it is FALSE.
      eXo level API
      Platform
    • addRedactor

      default void addRedactor(Space space, String userId)
      Assigns the "redactor" role to a user in a space.
      Parameters:
      space - The space that its user is assigned to redactor.
      userId - The remote user Id.
      eXo level API
      Platform
    • removeRedactor

      default void removeRedactor(Space space, String userId)
      Removes the "redactor" role of a user in a space.
      Parameters:
      space - The space that its user is assigned to redactor.
      userId - The remote user Id.
      eXo level API
      Platform
    • isRedactor

      default boolean isRedactor(Space space, String userId)
      Checks if a given user has the "redactor" role in a space.
      Parameters:
      space - The space that its user is checked if he has the "redactor" role or not.
      userId - The remote user Id.
      Returns:
      "True" if the user has the "redactor" role. Otherwise, it returns "false".
      eXo level API
      Platform
    • addPublisher

      default void addPublisher(Space space, String userId)
      Assigns the "publisher" role to a user in a space.
      Parameters:
      space - The space that its user is assigned to publisher.
      userId - The remote user Id.
      eXo level API
      Platform
    • removePublisher

      default void removePublisher(Space space, String userId)
      Removes the "publisher" role of a user in a space.
      Parameters:
      space - The space that its user is assigned to publisher.
      userId - The remote user Id.
      eXo level API
      Platform
    • isPublisher

      default boolean isPublisher(Space space, String userId)
      Checks if a given user has the "publisher" role in a space.
      Parameters:
      space - The space that its user is checked if he has the "publisher" role or not.
      userId - The remote user Id.
      Returns:
      "True" if the user has the "publisher" role. Otherwise, it returns "false".
      eXo level API
      Platform
    • hasRedactor

      default boolean hasRedactor(Space space)
      Checks if a given space has at least one "redactor"
      Parameters:
      space - The space that its user is checked if he has the "redactor" role or not.
      Returns:
      true if the user has a "redactor" role into it
    • canRedactOnSpace

      default boolean canRedactOnSpace(Space space, org.exoplatform.services.security.Identity viewer)
      checks whether the user can add content on space or not
      Parameters:
      space - Space
      viewer - Identity
      Returns:
      true if can add content, else false
    • setManager

      void setManager(Space space, String userId, boolean isManager)
      Assigns the "manager" role to a user in a space.
      Parameters:
      space - The space that its user is assigned to manager.
      userId - The remote user Id.
      isManager - "True" if the user gets the "manager" role. "False" if the user only gets the "member" role.
      Since:
      1.2.0-GA
      eXo level API
      Platform
    • isManager

      boolean isManager(Space space, String userId)
      Checks if a given user has the "manager" role in a space.
      Parameters:
      space - The space that its user is checked if he has the "manager" role or not.
      userId - The remote user Id.
      Returns:
      "True" if the user has the "manager" role. Otherwise, it returns "false".
      Since:
      1.2.0-GA
      eXo level API
      Platform
    • isOnlyManager

      boolean isOnlyManager(Space space, String userId)
      Checks if a given user is the only one who has the "manager" role in a space.
      Parameters:
      space - The space that its user is checked if he is the only manager or not.
      userId - The remote user Id.
      Returns:
      "True" if the user Id is the only one who has "manager" role in the space. Otherwise, it returns "false".
      Since:
      1.2.0-GA
      eXo level API
      Platform
    • hasAccessPermission

      boolean hasAccessPermission(Space space, String userId)
      Checks if a given user can access a space or not.
      Parameters:
      space - The space that its user is checked if he can access it.
      userId - The remote user Id.
      Returns:
      "True" if the access permission is allowed. Otherwise, it returns "false".
      eXo level API
      Platform
    • hasSettingPermission

      boolean hasSettingPermission(Space space, String userId)
      Checks if a given user has the setting permission to a space or not.
      Parameters:
      space - The space that its user is checked if he has the setting permission or not.
      userId - The remote user Id.
      Returns:
      If the user is root or the space's member, "true" is returned. Otherwise, it returns "false".
      Since:
      1.2.0-GA
      eXo level API
      Platform
    • registerSpaceListenerPlugin

      void registerSpaceListenerPlugin(SpaceListenerPlugin spaceListenerPlugin)
      Registers a space listener plugin to listen to space lifecyle events: creating, updating, installing an application, and more.
      Parameters:
      spaceListenerPlugin - The space listener plugin to be registered.
      Since:
      1.2.0-GA
      eXo level API
      Platform
    • unregisterSpaceListenerPlugin

      void unregisterSpaceListenerPlugin(SpaceListenerPlugin spaceListenerPlugin)
      Unregisters an existing space listener plugin.
      Parameters:
      spaceListenerPlugin - The space listener plugin to be unregistered.
      Since:
      1.2.0-GA
      eXo level API
      Platform
    • setSpaceApplicationConfigPlugin

      @Deprecated void setSpaceApplicationConfigPlugin(SpaceApplicationConfigPlugin spaceApplicationConfigPlugin)
      Deprecated.
      Sets a space application config plugin for configuring the home and space applications.
      By configuring this, the space service will know how to create a new page node with title, URL and portlet.
      Parameters:
      spaceApplicationConfigPlugin - The space application config plugin to be set.
      Since:
      1.2.0-GA
      eXo level API
      Platform
    • getSpaceApplicationConfigPlugin

      @Deprecated SpaceApplicationConfigPlugin getSpaceApplicationConfigPlugin()
      Deprecated.
      Gets the space application config plugin.
      Returns:
      The space application config plugin.
      eXo level API
      Platform
    • getAllSpaces

      @Deprecated List<Space> getAllSpaces() throws SpaceException
      Deprecated.
      Use getAllSpacesWithListAccess() instead. Will be removed by 4.0.x.
      Gets all spaces in Social.
      Returns:
      The list of spaces in Social.
      Throws:
      SpaceException - with code SpaceException.Code.ERROR_DATASTORE
      eXo level API
      Provisional
    • getSpaceByName

      Space getSpaceByName(String spaceName) throws SpaceException
      Deprecated.
      Use getSpaceByPrettyName(String) instead. Will be removed at 4.0.x.
      Gets a space by its space name.
      Parameters:
      spaceName - The space name.
      Returns:
      The stored space.
      Throws:
      SpaceException
      eXo level API
      Provisional
    • getSpacesBySearchCondition

      List<Space> getSpacesBySearchCondition(String condition) throws Exception
      Deprecated.
      Gets all spaces that their names or descriptions match with the input condition.
      Parameters:
      condition - The input condition.
      Returns:
      The list of spaces.
      Throws:
      Exception
      eXo level API
      Provisional
    • getSpaces

      @Deprecated List<Space> getSpaces(String userId) throws SpaceException
      Deprecated.
      Use getMemberSpaces(String) instead. Will be removed by 4.0.x.
      Gets spaces that a given user is member.
      Parameters:
      userId - Id of the user.
      Returns:
      All spaces that the user is member.
      Throws:
      SpaceException - with code SpaceException.Code.ERROR_DATASTORE
      eXo level API
      Provisional
    • getAccessibleSpaces

      List<Space> getAccessibleSpaces(String userId) throws SpaceException
      Deprecated.
      Use getAccessibleSpacesWithListAccess(String) instead. Will be removed by 4.0.x.
      Gets spaces that a given user has the access permission.
      Parameters:
      userId - Id of the user.
      Returns:
      The list of spaces.
      Throws:
      SpaceException
      eXo level API
      Provisional
    • getVisibleSpaces

      List<Space> getVisibleSpaces(String userId, SpaceFilter spaceFilter) throws SpaceException
      Gets spaces that a given user can see.
      Parameters:
      userId - Id of the user.
      spaceFilter - Condition by which spaces are filtered.
      Returns:
      The list of spaces.
      Throws:
      SpaceException
      Since:
      1.2.5-GA
      eXo level API
      Platform
    • getVisibleSpacesWithListAccess

      SpaceListAccess getVisibleSpacesWithListAccess(String userId, SpaceFilter spaceFilter)
      Gets spaces that a given user can see.
      Parameters:
      userId - Id of the user.
      spaceFilter - The condition by which spaces are filtered.
      Returns:
      The list of spaces.
      Since:
      1.2.5-GA
      eXo level API
      Platform
    • getUnifiedSearchSpacesWithListAccess

      SpaceListAccess getUnifiedSearchSpacesWithListAccess(String userId, SpaceFilter spaceFilter)
      Provides the Unified Search feature to get spaces that a user can see.
      Parameters:
      userId - Id of the user.
      spaceFilter - The condition by which spaces are filtered.
      Returns:
      The list of spaces.
      Since:
      4.0.0-GA
      eXo level API
      Platform
    • getEditableSpaces

      @Deprecated List<Space> getEditableSpaces(String userId) throws SpaceException
      Deprecated.
      Use getSettingableSpaces(String) instead. Will be removed by 4.0.x.
      Gets spaces that a given user has the edit permission.
      Parameters:
      userId - Id of the user.
      Returns:
      The list of spaces.
      Throws:
      SpaceException
      eXo level API
      Provisional
    • getInvitedSpaces

      @Deprecated List<Space> getInvitedSpaces(String userId) throws SpaceException
      Deprecated.
      Use getInvitedSpacesWithListAccess(String) instead. Will be removed by 4.0.x.
      Gets all spaces that a given user is invited and can accept or deny requests.
      Parameters:
      userId - Id of the user.
      Returns:
      The list of spaces that the user is invited.
      Throws:
      SpaceException
      eXo level API
      Provisional
    • getPublicSpaces

      @Deprecated List<Space> getPublicSpaces(String userId) throws SpaceException
      Deprecated.
      Use getPublicSpacesWithListAccess(String) instead. Will be removed by 4.0.x.
      Gets public spaces which a given user can request to join.
      Parameters:
      userId - Id of the user.
      Returns:
      The list of spaces that the user can request to join.
      Throws:
      SpaceException
      eXo level API
      Provisional
    • getPendingSpaces

      @Deprecated List<Space> getPendingSpaces(String userId) throws SpaceException
      Deprecated.
      Use getPendingSpacesWithListAccess(String) instead. Will be removed by 4.0.x.
      Gets pending spaces which a given user can revoke requests.
      Parameters:
      userId - Id of the user.
      Returns:
      The list of pending spaces.
      Throws:
      SpaceException
      eXo level API
      Provisional
    • createSpace

      @Deprecated Space createSpace(Space space, String creator, String invitedGroupId) throws SpaceException
      Deprecated.
      Creates a new space and invites all users from invitedGroupId to join this newly created space.
      Parameters:
      space - The space to be created.
      creator - The user who creates the space.
      invitedGroupId - Id of group who is invited to join the space.
      Returns:
      The space.
      Throws:
      SpaceException - with possible code SpaceException.Code.SPACE_ALREADY_EXIST; UNABLE_TO_ADD_CREATOR
      eXo level API
      Platform
    • createSpace

      Space createSpace(Space space, String creator, List<Identity> identitiesToInvite) throws SpaceException
      Creates a new space and invites all users from identitiesToInvite to join this newly created space.
      Parameters:
      space - The space to be created.
      creator - The user who creates the space.
      identitiesToInvite - The list of identities who are invited to join the space. Identity could be of type user or space
      Returns:
      The space.
      Throws:
      SpaceException - with possible code SpaceException.Code.SPACE_ALREADY_EXIST; UNABLE_TO_ADD_CREATOR
    • saveSpace

      void saveSpace(Space space, boolean isNew) throws SpaceException
      Deprecated.
      Use updateSpace(org.exoplatform.social.core.space.model.Space) instead. Will be removed by 4.0.x.
      Saves a new space or updates a space.
      Parameters:
      space - The space to be saved or updated.
      isNew - "True" if a new space is created. "False" if an existing space is updated.
      Throws:
      SpaceException - with code: SpaceException.Code.ERROR_DATASTORE
      eXo level API
      Provisional
    • renameSpace

      void renameSpace(Space space, String newDisplayName) throws SpaceException
      Renames a space.
      Parameters:
      space - The space to be renamed.
      newDisplayName - New name of the space.
      Throws:
      SpaceException
      Since:
      1.2.8
      eXo level API
      Platform
    • renameSpace

      void renameSpace(String remoteId, Space space, String newDisplayName) throws SpaceException
      Renames a space by an identity who has rights of super admin.
      Parameters:
      remoteId - The identity who has renamed a space.
      space - The space to be renamed.
      newDisplayName - New name of the space.
      Throws:
      SpaceException
      Since:
      4.0.0
      eXo level API
      Platform
    • deleteSpace

      @Deprecated void deleteSpace(String spaceId) throws SpaceException
      Deprecated.
      Use deleteSpace(org.exoplatform.social.core.space.model.Space) instead. Will be removed by 4.0.x.
      Deletes a space by its Id.
      Parameters:
      spaceId - Id of the deleted space.
      Throws:
      SpaceException
      eXo level API
      Provisional
    • initApp

      @Deprecated void initApp(Space space) throws SpaceException
      Deprecated.
      Will be removed by 4.0.x.
      Does nothing, just for compatible.
      Parameters:
      space - The space.
      Throws:
      SpaceException - with code SpaceException.Code.UNABLE_INIT_APP
      eXo level API
      Provisional
    • initApps

      @Deprecated void initApps(Space space) throws SpaceException
      Deprecated.
      Will be removed by 4.0.x.
      Does nothing, just for compatible.
      Parameters:
      space - The space.
      Throws:
      SpaceException - with code SpaceException.Code.UNABLE_INIT_APP
      eXo level API
      Provisional
    • deInitApps

      @Deprecated void deInitApps(Space space) throws SpaceException
      Deprecated.
      Will be removed by 4.0.x.
      Does nothing, just for compatible.
      Parameters:
      space - The space.
      Throws:
      SpaceException
      eXo level API
      Provisional
    • addMember

      @Deprecated void addMember(String spaceId, String userId) throws SpaceException
      Deprecated.
      Adds a user to space as "member".
      Parameters:
      spaceId - Id of the space.
      userId - Id of the user (remoteId).
      Throws:
      SpaceException
      eXo level API
      Provisional
    • removeMember

      @Deprecated void removeMember(String spaceId, String userId) throws SpaceException
      Deprecated.
      Removes a member from space.
      Parameters:
      spaceId - Id of the space.
      userId - Id of the user (remoteId).
      Throws:
      SpaceException
      eXo level API
      Provisional
    • getMembers

      @Deprecated List<String> getMembers(Space space) throws SpaceException
      Deprecated.
      Use Space.getMembers() instead. Will be removed by 4.0.x.
      Gets a list of members from a given space.
      Parameters:
      space - The space.
      Returns:
      The list of space members.
      Throws:
      SpaceException
      eXo level API
      Provisional
    • getMembers

      @Deprecated List<String> getMembers(String spaceId) throws SpaceException
      Deprecated.
      Use Space.getMembers() instead. Will be removed by 4.0.x.
      Gets a list of members from a given space.
      Parameters:
      spaceId - Id of the space.
      Returns:
      The list of space members.
      Throws:
      SpaceException
      eXo level API
      Provisional
    • setLeader

      @Deprecated void setLeader(Space space, String userId, boolean isLeader) throws SpaceException
      Deprecated.
      Sets a space member to manager or vice versa.
      Parameters:
      space - The space.
      userId - Id of the user (remoteId).
      isLeader - If "true", the space member is set to manager. If "false", the space manager is set to member.
      Throws:
      SpaceException
      eXo level API
      Provisional
    • setLeader

      @Deprecated void setLeader(String spaceId, String userId, boolean isLeader) throws SpaceException
      Deprecated.
      Sets a space member to manager or vice versa.
      Parameters:
      spaceId - Id of the space.
      userId - Id of the user (remoteId).
      isLeader - If "true", the space member is set to manager. If "false", the space manager is set to member.
      Throws:
      SpaceException
      eXo level API
      Provisional
    • isLeader

      @Deprecated boolean isLeader(Space space, String userId) throws SpaceException
      Deprecated.
      Checks if a given user is space manager or not.
      Parameters:
      space - The space.
      userId - Id of the user (remoteId).
      Returns:
      "True" if the user is space manager. Otherwise, it returns "false".
      Throws:
      SpaceException
      eXo level API
      Provisional
    • isLeader

      @Deprecated boolean isLeader(String spaceId, String userId) throws SpaceException
      Deprecated.
      Checks if a given user is space manager or not.
      Parameters:
      spaceId - Id of the space.
      userId - Id of the user (remoteId).
      Returns:
      "True" if the user is space manager. Otherwise, it returns "false".
      Throws:
      SpaceException
      eXo level API
      Provisional
    • isOnlyLeader

      @Deprecated boolean isOnlyLeader(Space space, String userId) throws SpaceException
      Deprecated.
      Checks if a given user is the only manager of space or not.
      Parameters:
      space - The space.
      userId - Id of the user (remoteId).
      Returns:
      "True" if the user is the only space manager. Otherwise, it returns "false".
      Throws:
      SpaceException
      eXo level API
      Provisional
    • isOnlyLeader

      @Deprecated boolean isOnlyLeader(String spaceId, String userId) throws SpaceException
      Deprecated.
      Checks if a given user is the only manager of space or not.
      Parameters:
      spaceId - Id of the space.
      userId - Id of the user (remoteId).
      Returns:
      "True" if the user is the only space manager. Otherwise, it returns "false".
      Throws:
      SpaceException
      eXo level API
      Provisional
    • isMember

      @Deprecated boolean isMember(String spaceId, String userId) throws SpaceException
      Deprecated.
      Checks if a given user is space member or not.
      Parameters:
      spaceId - Id of the space.
      userId - Id of user (remoteId).
      Returns:
      "True" if the user is space member. Otherwise, it returns "false".
      Throws:
      SpaceException
      eXo level API
      Provisional
    • hasAccessPermission

      @Deprecated boolean hasAccessPermission(String spaceId, String userId) throws SpaceException
      Deprecated.
      Checks if a user can access a space or not. If the user is root or the space's member, the "true" value is returned.
      Parameters:
      spaceId - Id of the space.
      userId - Id of the user (remoteId).
      Returns:
      "True" if the user has the access permission. "False" if the user does not have the access permission.
      Throws:
      SpaceException
      eXo level API
      Provisional
    • hasEditPermission

      @Deprecated boolean hasEditPermission(Space space, String userId) throws SpaceException
      Deprecated.
      Checks if a user has the edit permission on a space or not. If the user is root or the space's manager, "true" is returned.
      Parameters:
      space - The provided space.
      userId - Id of the user (remoteId).
      Returns:
      "True" if the user has the edit permission. "False" if the user does not have the edit permission.
      Throws:
      SpaceException
      eXo level API
      Provisional
    • hasEditPermission

      @Deprecated boolean hasEditPermission(String spaceId, String userId) throws SpaceException
      Deprecated.
      Checks if a user has the edit permission on a space. If user is root or the space's manager, "true" is returned.
      Parameters:
      spaceId - Id of the space.
      userId - Id of the user (remoteId).
      Returns:
      "True" if the user has the edit permission. "False" if the user does not have the edit permission.
      Throws:
      SpaceException
      eXo level API
      Provisional
    • isInvited

      @Deprecated boolean isInvited(Space space, String userId) throws SpaceException
      Deprecated.
      Checks if a user is in the list of invited users of a space.
      Parameters:
      space - The provided space.
      userId - Id of the user (remoteId).
      Returns:
      "True" if the user is in the list of invited users. Otherwise, it returns "false".
      Throws:
      SpaceException
      eXo level API
      Provisional
    • isInvited

      @Deprecated boolean isInvited(String spaceId, String userId) throws SpaceException
      Deprecated.
      Checks if a user is in the list of invited users of a space.
      Parameters:
      spaceId - Id of the space.
      userId - Id of the user (remoteId).
      Returns:
      "True" if the user is in the list of invited users. Otherwise, it returns "false".
      Throws:
      SpaceException
      eXo level API
      Provisional
    • isPending

      @Deprecated boolean isPending(Space space, String userId) throws SpaceException
      Deprecated.
      Checks if a user is in the list of pending users of a space or not.
      Parameters:
      space - The space.
      userId - Id of the user (remoteId).
      Returns:
      "True" if the user is in the list of pending users. Otherwise, it returns "false".
      Throws:
      SpaceException
      eXo level API
      Provisional
    • isPending

      @Deprecated boolean isPending(String spaceId, String userId) throws SpaceException
      Deprecated.
      Checks if a user is in the list of pending users of a space.
      Parameters:
      spaceId - Id of the user.
      userId - Id of the user (remoteId).
      Returns:
      "True" if the user is in the list of pending users. Otherwise, it returns "false".
      Throws:
      SpaceException
      eXo level API
      Provisional
    • isIgnored

      default boolean isIgnored(Space space, String userId)
      Checks if a user is in the list of users who have ignored the space.
      Parameters:
      space - The existing space.
      userId - The remote user Id.
      Returns:
      TRUE if the space is an ignored space. Otherwise, it is FALSE.
    • setIgnored

      default void setIgnored(String spaceId, String userId)
      Assigns the user who has ignored the space.
      Parameters:
      spaceId - The Id of the space ignored by the user.
      userId - The remote user Id.
    • installApplication

      void installApplication(String spaceId, String appId) throws SpaceException
      Installs an application in a space.
      Parameters:
      spaceId - Id of the space that the application is installed.
      appId - Id of the application which is installed.
      Throws:
      SpaceException - with code SpaceException.Code.ERROR_DATA_STORE
      eXo level API
      Platform
    • restoreSpacePageLayout

      default void restoreSpacePageLayout(String spaceId, String appId, org.exoplatform.services.security.Identity identity) throws IllegalAccessException, SpaceException
      Restores a page layout to its default associated to Space Template
      Parameters:
      spaceId - Space technical identifier
      appId - Id of the installed application or can be 'home' to designate the space home page
      identity - user Identity making the change
      Throws:
      IllegalAccessException - when current user doesn't have permission to manage spaces
      SpaceException - when error reading Space identified by its id
    • installApplication

      void installApplication(Space space, String appId) throws SpaceException
      Installs an application in a space.
      Parameters:
      space - The space that the application is installed.
      appId - Id of the installed application.
      Throws:
      SpaceException - with code SpaceException.Code.ERROR_DATA_STORE
      eXo level API
      Platform
    • activateApplication

      void activateApplication(Space space, String appId) throws SpaceException
      Activates an installed application in a space.
      Parameters:
      space - The space that the installed application is activated.
      appId - Id of the installed application.
      Throws:
      SpaceException - with possible code: SpaceException.Code.UNABLE_TO_ADD_APPLICATION, SpaceExeption.Code.ERROR_DATA_STORE
      eXo level API
      Platform
    • activateApplication

      void activateApplication(String spaceId, String appId) throws SpaceException
      Activates an installed application in a space.
      Parameters:
      spaceId - Id of the space that the installed application is activated.
      appId - Id of the installed application.
      Throws:
      SpaceException - with possible code: SpaceException.Code.UNABLE_TO_ADD_APPLICATION, SpaceExeption.Code.ERROR_DATA_STORE
      eXo level API
      Platform
    • deactivateApplication

      void deactivateApplication(Space space, String appId) throws SpaceException
      Deactivates an installed application in a space.
      Parameters:
      space - The space that the installed application is deactivated.
      appId - Id of the installed application.
      Throws:
      SpaceException
      eXo level API
      Platform
    • deactivateApplication

      void deactivateApplication(String spaceId, String appId) throws SpaceException
      Deactivates an installed application in a space.
      Parameters:
      spaceId - Id of the space that the installed application is deactivated.
      appId - Id of the installed application.
      Throws:
      SpaceException
      eXo level API
      Platform
    • removeApplication

      void removeApplication(Space space, String appId, String appName) throws SpaceException
      Removes an installed application from a space.
      Parameters:
      space - The space that the installed application is removed.
      appId - Id of the installed application.
      Throws:
      SpaceException
      eXo level API
      Platform
    • removeApplication

      void removeApplication(String spaceId, String appId, String appName) throws SpaceException
      Removes an installed application from a space.
      Parameters:
      spaceId - Id of the space that the installed application is removed.
      appId - Id of the installed application.
      Throws:
      SpaceException
      eXo level API
      Platform
    • updateSpaceAccessed

      void updateSpaceAccessed(String remoteId, Space space) throws SpaceException
      Updates the most recently accessed space of a user to the top of spaces list.
      Parameters:
      remoteId - The remote Id of the user.
      space - The last accessed space of the user.
      Throws:
      SpaceException
      eXo level API
      Platform
    • getLastAccessedSpace

      List<Space> getLastAccessedSpace(String remoteId, String appId, int offset, int limit) throws SpaceException
      Gets a list of the most recently accessed spaces of a user.
      Parameters:
      remoteId - The remote Id of user.
      appId - Id of the installed application in a space.
      offset - The starting point to get the most recently accessed spaces.
      limit - The limitation of the most recently accessed spaces.
      Throws:
      SpaceException
      eXo level API
      Platform
    • 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
    • getLastAccessedSpace

      org.exoplatform.commons.utils.ListAccess<Space> getLastAccessedSpace(String remoteId, String appId)
      Gets a list of the most recently accessed spaces of a user.
      Parameters:
      remoteId - The remote Id of a user.
      appId - Id of the installed application in a space.
      eXo level API
      Platform
    • requestJoin

      @Deprecated void requestJoin(Space space, String userId) throws SpaceException
      Deprecated.
      Requests to join a space, then adds the requester to the list of pending spaces.
      Parameters:
      space - The space which the user requests to join.
      userId - Id of the user (remoteId).
      Throws:
      SpaceException
      eXo level API
      Provisional
    • requestJoin

      @Deprecated void requestJoin(String spaceId, String userId) throws SpaceException
      Deprecated.
      Requests to join a space, then adds the requester to the list of pending spaces.
      Parameters:
      spaceId - Id of the space.
      userId - Id of the user (remoteId).
      Throws:
      SpaceException
      eXo level API
      Provisional
    • revokeRequestJoin

      @Deprecated void revokeRequestJoin(Space space, String userId) throws SpaceException
      Deprecated.
      Revokes a request to join a space.
      Parameters:
      space - The space which the user requests to join.
      userId - Id of the user (remoteId).
      Throws:
      SpaceException
      eXo level API
      Provisional
    • revokeRequestJoin

      @Deprecated void revokeRequestJoin(String spaceId, String userId) throws SpaceException
      Deprecated.
      Revokes a request to join a space.
      Parameters:
      spaceId - Id of the space.
      userId - Id of the user.
      Throws:
      SpaceException
      eXo level API
      Provisional
    • inviteMember

      @Deprecated void inviteMember(Space space, String userId) throws SpaceException
      Deprecated.
      Invites a user to become a space member.
      Parameters:
      space - The space.
      userId - Id of the user (remoteId).
      Throws:
      SpaceException
      eXo level API
      Provisional
    • inviteMember

      @Deprecated void inviteMember(String spaceId, String userId) throws SpaceException
      Deprecated.
      Invites a user to become a space member.
      Parameters:
      spaceId - Id of the space.
      userId - Id of the user (remoteId).
      Throws:
      SpaceException
      eXo level API
      Provisional
    • revokeInvitation

      @Deprecated void revokeInvitation(Space space, String userId) throws SpaceException
      Deprecated.
      Revokes an invitation - Removes the user from the list of invited users of the space.
      Parameters:
      space - The space.
      userId - Id of the user (remoteId).
      Throws:
      SpaceException
      eXo level API
      Provisional
    • revokeInvitation

      @Deprecated void revokeInvitation(String spaceId, String userId) throws SpaceException
      Deprecated.
      Revokes an invitation - Removes the user from the list of invited users of the space.
      Parameters:
      spaceId - Id of the space.
      userId - Id of the user (remoteId).
      Throws:
      SpaceException
      eXo level API
      Provisional
    • acceptInvitation

      @Deprecated void acceptInvitation(Space space, String userId) throws SpaceException
      Deprecated.
      Accepts an invitation - Moves the user from the invited users list to the members list.
      Parameters:
      space - The space.
      userId - Id of the user (remoteId).
      Throws:
      SpaceException
      eXo level API
      Provisional
    • acceptInvitation

      @Deprecated void acceptInvitation(String spaceId, String userId) throws SpaceException
      Deprecated.
      Accepts an invitation - Moves the user from the invited users list to the members list.
      Parameters:
      spaceId - Id of the space.
      userId - Id of the user (remoteId).
      Throws:
      SpaceException
      eXo level API
      Provisional
    • denyInvitation

      @Deprecated void denyInvitation(Space space, String userId) throws SpaceException
      Deprecated.
      Denies an invitation - Removes the user from the list of invited users.
      Parameters:
      space - The space.
      userId - Id of the user (remoteId).
      Throws:
      SpaceException
      eXo level API
      Provisional
    • denyInvitation

      @Deprecated void denyInvitation(String spaceId, String userId) throws SpaceException
      Deprecated.
      Denies an invitation - Removes the user from the list of invited users.
      Parameters:
      spaceId - Id of the space.
      userId - Id of the user (remoteId).
      Throws:
      SpaceException
      eXo level API
      Provisional
    • validateRequest

      @Deprecated void validateRequest(Space space, String userId) throws SpaceException
      Deprecated.
      Validates a request - Moves the user from the pending users list to the members list.
      Parameters:
      space - The space.
      userId - Id of the user (remoteId).
      Throws:
      SpaceException
      eXo level API
      Provisional
    • validateRequest

      @Deprecated void validateRequest(String spaceId, String userId) throws SpaceException
      Deprecated.
      Validates a request - Moves the user from the pending users list to the members list.
      Parameters:
      spaceId - Id of the space.
      userId - Id of the user (remoteId).
      Throws:
      SpaceException
      eXo level API
      Provisional
    • declineRequest

      @Deprecated void declineRequest(Space space, String userId) throws SpaceException
      Deprecated.
      Declines a request - Removes the user from the pending users list.
      Parameters:
      space - The space.
      userId - Id of the user (remoteId).
      Throws:
      SpaceException
      eXo level API
      Provisional
    • declineRequest

      @Deprecated void declineRequest(String spaceId, String userId) throws SpaceException
      Deprecated.
      Declines a request - Removes the user from the pending users list.
      Parameters:
      spaceId - Id of the space.
      userId - Id of the user (remoteId).
      Throws:
      SpaceException
      eXo level API
      Provisional
    • registerSpaceLifeCycleListener

      @Deprecated void registerSpaceLifeCycleListener(SpaceLifeCycleListener listener)
      Deprecated.
      Will be removed by 4.0.x.
      Registers a space lifecycle listener.
      Parameters:
      listener - The space lifecycle listener to be registered.
      eXo level API
      Provisional
    • unregisterSpaceLifeCycleListener

      @Deprecated void unregisterSpaceLifeCycleListener(SpaceLifeCycleListener listener)
      Deprecated.
      Will be removed by 4.0.x.
      Unregisters a space lifecycle listener.
      Parameters:
      listener - The space lifecycle listener to be unregistered.
      eXo level API
      Provisional
    • setPortletsPrefsRequired

      @Deprecated void setPortletsPrefsRequired(PortletPreferenceRequiredPlugin portletPrefsRequiredPlugin)
      Deprecated.
      Use SpaceApplicationConfigPlugin instead. Will be removed by 4.0.x.
      Sets the portlet preferences got from the plugin configuration.
      Parameters:
      portletPrefsRequiredPlugin - The plugin that configures portlets to store spaceUrl in its portlet-preference.
      eXo level API
      Provisional
    • getPortletsPrefsRequired

      String[] getPortletsPrefsRequired()
      Deprecated.
      Will be removed by 4.0.x.
      Gets the portlet preferences which are required for creating the portlet application.
      Returns:
      Array of the portlet preferences.
      eXo level API
      Provisional
    • getVisitedSpaces

      org.exoplatform.commons.utils.ListAccess<Space> getVisitedSpaces(String remoteId, String appId)
      Gets the list of spaces which are visited by users
      Parameters:
      remoteId -
      appId -
      Returns:
    • isSuperManager

      boolean isSuperManager(String userId)
      Checks if the user is a super manager of all spaces
      Parameters:
      userId - username
      Returns:
      true if the user is member of super administrators groups, else false
    • inviteIdentities

      default void inviteIdentities(Space space, List<Identity> identitiesToInvite)
      Invites users or members of spaces identified by identities list into a a designated space
      Parameters:
      space - target Space to invite identites
      identitiesToInvite - List of Identity (space or user) to invite
    • isSpaceContainsExternals

      default boolean isSpaceContainsExternals(Long spaceId)
      Checks if a specific space contains external users
      Parameters:
      spaceId -
      Returns:
      true if the space contains external users
    • getPendingSpaceRequestsToManage

      default org.exoplatform.commons.utils.ListAccess<Space> getPendingSpaceRequestsToManage(String remoteId)
      Retrieves the list of pending 'requests to join' a space that the user manages
      Parameters:
      remoteId -
      Returns:
      ListAccess of Space with pending users requesting to join spaces that the designated user manages
    • moveApplication

      default void moveApplication(String spaceId, String appId, int transition) throws SpaceException
      Parameters:
      spaceId - technical id of the space
      appId - application identifier
      transition - how much levels to move up or down an application
      Throws:
      SpaceException
    • getSpacesApplications

      default List<org.exoplatform.application.registry.Application> getSpacesApplications()
      Returns:
      List of Application that can be instantiated in spaces
    • findSpaceExternalInvitationsBySpaceId

      default List<SpaceExternalInvitation> findSpaceExternalInvitationsBySpaceId(String spaceId)
      Returns:
      a list of external invitations in space
    • saveSpaceExternalInvitation

      default void saveSpaceExternalInvitation(String spaceId, String email, String tokenId)
      Add an external invitation to space
      Parameters:
      spaceId -
      email -
      tokenId -
    • getSpaceExternalInvitationById

      default SpaceExternalInvitation getSpaceExternalInvitationById(String invitationId)
      Gets a Space external invitation by its Id.
      Parameters:
      invitationId -
    • deleteSpaceExternalInvitation

      default void deleteSpaceExternalInvitation(String invitationId)
      delete an external invitation from a space
      Parameters:
      invitationId -
    • findExternalInvitationsSpacesByEmail

      default List<String> findExternalInvitationsSpacesByEmail(String email)
      Parameters:
      email -
      Returns:
      a list of spaces ids by external email
    • deleteExternalUserInvitations

      default void deleteExternalUserInvitations(String email)
      delete external invitations
      Parameters:
      email -
    • addSpacesApplication

      default void addSpacesApplication(org.exoplatform.application.registry.Application application)
      Add an application to applications list that can be instantiated in space context
      Parameters:
      application - of type Application
    • deleteSpacesApplication

      default void deleteSpacesApplication(String applicationName)
      Delete application from list of spaces applications
      Parameters:
      applicationName - application name to delete
    • getCommonSpaces

      default org.exoplatform.commons.utils.ListAccess<Space> getCommonSpaces(String userId, String otherUserId)
      Gets a list access containing all 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
    • getMemberSpacesIds

      default List<String> getMemberSpacesIds(String username, int offset, int limit)
      Gets a List of Space technical identifiers where the user has the "member" role.
      Parameters:
      username - The remote user Id.
      offset - The starting point
      limit - The limitation of returned results
      Returns:
      List of Space technical identifiers
    • getManagerSpacesIds

      default List<String> getManagerSpacesIds(String username, int offset, int limit)
      Gets a List of Space technical identifiers where the user has the "manager" role.
      Parameters:
      username - The remote user Id.
      offset - The starting point
      limit - The limitation of returned results
      Returns:
      List of Space technical identifiers