Interface SpaceService
public interface SpaceService
Provides methods to work with Space.
- Since:
- Aug 29, 2008
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidaddInvitedUser(Space space, String username) Adds a user to the list of users who are invited to join a space.default voidAdds a user to space as "member".default voidAdds a user to a space.default voidaddPendingUser(Space space, String username) Adds a user to the list of pending requests for joining a space.default voidaddPublisher(Space space, String username) Assigns the "publisher" role to a user in a space.default voidaddRedactor(Space space, String username) Assigns the "redactor" role to a user in a space.default booleancanAccessSpacePublicSite(Space space, String username) Checks whether the user can access Space Public Site or notdefault booleancanDeleteSpace(Space space, String username) Checks the deletion permissions added from SpaceTemplate entity to Space entity in space creation step.default booleancanManageSpace(Space space, String username) checks whether the user can manage the space or notdefault booleancanManageSpaceLayout(Space space, String username) default booleancanManageSpacePublicSite(Space space, String username) default booleancanPublishOnSpace(Space space, String username) checks whether the user can publish content in a space or notdefault booleancanRedactOnSpace(Space space, String username) checks whether the user can add content on space or notdefault booleancanRedactOnSpace(Space space, org.exoplatform.services.security.Identity viewer) checks whether the user can add content on space or notdefault booleancanViewSpace(Space space, String username) checks whether the user can view the space or notdefault SpacecreateSpace(Space space) Saves a new space or updates a space.default SpacecreateSpace(Space space, String creatorUsername) Creates a new space: creating a group, its group navigation with pagesdefault SpacecreateSpace(Space space, String creator, List<Identity> identitiesToInvite) Creates a new space and invites all users from identitiesToInvite to join this newly created space.default voiddelete external invitationsdefault voiddeleteSpace(String spaceId) Deletes a space by its Id.default voiddeleteSpace(Space space) Deletes a space.default voiddeleteSpace(Space space, boolean deleteGroup) Deletes a space without deleting the user's group.default voiddeleteSpaceExternalInvitation(String invitationId) delete an external invitation from a spacedefault List<SpaceExternalInvitation> default org.exoplatform.commons.utils.ListAccess<Space> getAccessibleSpacesByFilter(String username, SpaceFilter spaceFilter) Gets a list access containing all spaces that a user has the "member" role or is identified as "admin" in the associated Space template.default org.exoplatform.commons.utils.ListAccess<Space> getAccessibleSpacesWithListAccess(String username) Gets a list access containing all spaces that a user has the "member" role or is identified as "admin" in the associated Space template.default org.exoplatform.commons.utils.ListAccess<Space> getAllSpacesByFilter(SpaceFilter spaceFilter) Gets a list access that contains all spaces matching with a filter.default org.exoplatform.commons.utils.ListAccess<Space> Gets a list access that contains all spaces.default org.exoplatform.commons.utils.ListAccess<Space> getCommonSpaces(String username, String otherUsername) Gets a list access containing all common spaces between two usersdefault org.exoplatform.commons.utils.ListAccess<Space> getEditableSpacesByFilter(String username, SpaceFilter spaceFilter) Gets a list access containing all spaces that a user has the "manager" role or is identified as "admin" in the associated Space template.default org.exoplatform.commons.utils.ListAccess<Space> getFavoriteSpacesByFilter(String username, SpaceFilter spaceFilter) Gets a list of favorite spaces of a user.default org.exoplatform.commons.utils.ListAccess<Space> getInvitedSpacesByFilter(String username, SpaceFilter spaceFilter) Gets a list access containing all spaces that a user is invited to join.default org.exoplatform.commons.utils.ListAccess<Space> getInvitedSpacesWithListAccess(String username) Gets a list access containing all spaces that a user is invited to join.default org.exoplatform.commons.utils.ListAccess<Space> getLastAccessedSpace(String remoteId) Gets a list of the most recently accessed spaces of a user.default org.exoplatform.commons.utils.ListAccess<Space> getLastAccessedSpaceByFilter(String username, SpaceFilter spaceFilter) getLastSpaces(int limit) Gets the last spaces that have been created.default org.exoplatform.commons.utils.ListAccess<Space> getManagerSpaces(String username) Gets a list access containing all spaces that a user has the "manager" role.default org.exoplatform.commons.utils.ListAccess<Space> getManagerSpacesByFilter(String username, SpaceFilter spaceFilter) Gets a list access containing all spaces that a user has the "manager" role.getManagerSpacesIds(String username, int offset, int limit) Gets aListof Space technical identifiers where the user has the "manager" role.default org.exoplatform.commons.utils.ListAccess<Space> getMemberSpaces(String username) Gets a list access containing all spaces that a user has the "member" role.default org.exoplatform.commons.utils.ListAccess<Space> getMemberSpacesByFilter(String username, SpaceFilter spaceFilter) Gets a list access containing all spaces that a user has the "member" role.getMemberSpacesIds(String username, int offset, int limit) Gets aListof Space technical identifiers where the user has the "member" role.default org.exoplatform.commons.utils.ListAccess<Space> getPendingSpaceRequestsToManage(String remoteId) Retrieves the list of pending 'requests to join' a space that the user managesdefault org.exoplatform.commons.utils.ListAccess<Space> getPendingSpacesByFilter(String username, SpaceFilter spaceFilter) Gets a list access containing all spaces that a user sent a request for joining a space.default org.exoplatform.commons.utils.ListAccess<Space> getPendingSpacesWithListAccess(String username) Gets a list access containing all spaces that a user sent a request for joining a space.default SpacegetSpaceByGroupId(String groupId) Gets a space by its group Id.default SpacegetSpaceById(long spaceId) Gets a space by its Id.default SpacegetSpaceById(String spaceId) Gets a space by its Id.default SpacegetSpaceByPrettyName(String spacePrettyName) Gets a space by its pretty name.default SpaceExternalInvitationgetSpaceExternalInvitationById(String invitationId) Gets a Space external invitation by its Id.default InstantgetSpaceMembershipDate(long spaceId, String username) Retrieves the Space Membership datedefault StringgetSpacePublicSiteName(Space space) default org.exoplatform.commons.utils.ListAccess<Space> getVisibleSpacesWithListAccess(String username, SpaceFilter spaceFilter) Gets spaces that a given user can see.default org.exoplatform.commons.utils.ListAccess<Space> getVisitedSpaces(String remoteId) Gets the list of spaces which are visited by usersdefault booleanhasAccessPermission(Space space, String username) Checks if a given user can access a space or not.default booleanhasRedactor(Space space) Checks if a given space has at least one "redactor"default booleanhasSettingPermission(Space space, String username) Checks if a given user has the setting permission to a space or not.default voidinviteIdentities(Space space, List<Identity> identitiesToInvite) Invites users or members of spaces identified by identities list into a a designated spacedefault booleanisContentManager(String username) Checks if the user is a content manager of all spacesdefault booleanisContentPublisher(String username) Checks if the user is a content publisher of all spacesdefault booleanChecks if a user is in the list of users who have ignored the space.default booleanisInvitedUser(Space space, String username) Checks if a user is in the list of users who are invited to join a space.default booleanChecks if a given user has the "manager" role in a space.default booleanChecks if a given user is space member or not.default booleanChecks if a given user is member of space or not.default booleanisOnlyManager(Space space, String username) Checks if a given user is the only one who has the "manager" role in a space.default booleanisPendingUser(Space space, String username) Checks if a user is in the list of pending requests for joining a space.default booleanisPublisher(Space space, String username) Checks if a given user has the "publisher" role in a space.default booleanisRedactor(Space space, String username) Checks if a given user has the "redactor" role in a space.default booleanisSpaceContainsExternals(Long spaceId) Checks if a specific space contains external usersdefault booleanisSuperManager(long spaceId, String username) Checks if the user is a super manager of designated space or notdefault booleanisSuperManager(String username) Checks if the user is a super manager of all spacesdefault booleanisSuperManager(Space space, String username) Checks if the user is a super manager of designated space or notdefault voidRegisters a space lifecycle listener.default voidregisterSpaceListenerPlugin(SpaceListenerPlugin spaceListenerPlugin) Registers a space listener plugin to listen to space lifecyle eventsdefault voidremoveInvitedUser(Space space, String username) Removes a user from the list of users who are invited to join a space.default voidremoveMember(String spaceId, String username) Removes a member from space.default voidremoveMember(Space space, String username) Removes a member from a space.default voidremovePendingUser(Space space, String username) Removes a user from a list of pending requests for joining a space.default voidremovePublisher(Space space, String username) Removes the "publisher" role of a user in a space.default voidremoveRedactor(Space space, String username) Removes the "redactor" role of a user in a space.default voidrenameSpace(Space space, String newDisplayName) Renames a space.default voidrenameSpace(Space space, String newDisplayName, String username) Renames a space by an identity who has rights of super admin.default voidsaveSpaceExternalInvitation(String spaceId, String email, String tokenId) Add an external invitation to spacedefault voidsaveSpacePublicSite(String spaceId, String publicSiteVisibility, String username) Saves the space public site characteristicsdefault voidsaveSpacePublicSite(Space space, String publicSiteVisibility) Saves the space public site characteristicsdefault voidsetIgnored(String spaceId, String username) Assigns the user who has ignored the space.default voidsetManager(Space space, String username, boolean isManager) Assigns the "manager" role to a user in a space.default voidUnregisters a space lifecycle listener.default voidunregisterSpaceListenerPlugin(SpaceListenerPlugin spaceListenerPlugin) Unregisters an existing space listener plugin.default SpaceupdateSpace(Space existingSpace) Updates information of a space.default SpaceupdateSpace(Space existingSpace, List<Identity> identitiesToInvite) Updates information of a space and invites all users from identitiesToInvite to join this space.default voidupdateSpaceAccessed(String remoteId, Space space) Updates the most recently accessed space of a user to the top of spaces list.default SpaceupdateSpaceAvatar(Space existingSpace, String username) Updates a space's avatar.default SpaceupdateSpaceBanner(Space existingSpace, String username) Updates a space's avatar.
-
Method Details
-
getSpaceByPrettyName
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
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
Gets a space by its Id.- Parameters:
spaceId- Id of the space.- Returns:
- The space.
- Since:
- 1.2.0-GA
- eXo level API
- Platform
-
getSpaceById
Gets a space by its Id.- Parameters:
spaceId- Id of the space.- Returns:
- The space.
- Since:
- 1.2.0-GA
- eXo level API
- Platform
-
getAllSpacesWithListAccess
Gets a list access that contains all spaces.- Returns:
- The list access.
- Since:
- 1.2.0-GA
- eXo level API
- Platform
-
getAllSpacesByFilter
default 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
Gets a list access containing all spaces that a user has the "manager" role.- Parameters:
username- The remote user Id.- Returns:
- The list access.
- eXo level API
- Platform
-
getManagerSpacesByFilter
default org.exoplatform.commons.utils.ListAccess<Space> getManagerSpacesByFilter(String username, 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:
username- The remote user Id.spaceFilter- The space filter.- Returns:
- The list access.
- eXo level API
- Platform
-
getEditableSpacesByFilter
default org.exoplatform.commons.utils.ListAccess<Space> getEditableSpacesByFilter(String username, SpaceFilter spaceFilter) Gets a list access containing all spaces that a user has the "manager" role or is identified as "admin" in the associated Space template.- Parameters:
username- The remote user Id.spaceFilter- The space filter.- Returns:
- The list access.
-
getMemberSpaces
Gets a list access containing all spaces that a user has the "member" role.- Parameters:
username- The remote user Id.- Returns:
- The list access.
- Since:
- 1.2.0-GA
- eXo level API
- Platform
-
getMemberSpacesByFilter
default org.exoplatform.commons.utils.ListAccess<Space> getMemberSpacesByFilter(String username, 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:
username- 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 username, SpaceFilter spaceFilter) Gets a list of favorite spaces of a user. This list access matches with the provided space filter.- Parameters:
username- The remote Id of userspaceFilter-SpaceFilterused to filter on spaces- Returns:
ListAccessofSpacemarked as favorite of user- Since:
- Meeds 1.4.0
-
getAccessibleSpacesWithListAccess
default org.exoplatform.commons.utils.ListAccess<Space> getAccessibleSpacesWithListAccess(String username) Gets a list access containing all spaces that a user has the "member" role or is identified as "admin" in the associated Space template.- Parameters:
username- The remote user Id.- Returns:
- The space list access.
-
getAccessibleSpacesByFilter
default org.exoplatform.commons.utils.ListAccess<Space> getAccessibleSpacesByFilter(String username, SpaceFilter spaceFilter) Gets a list access containing all spaces that a user has the "member" role or is identified as "admin" in the associated Space template.- Parameters:
username- The remote user Id.spaceFilter- The provided space filter.- Returns:
- The list access.
-
getInvitedSpacesWithListAccess
default org.exoplatform.commons.utils.ListAccess<Space> getInvitedSpacesWithListAccess(String username) Gets a list access containing all spaces that a user is invited to join.- Parameters:
username- The remote user Id.- Returns:
- The list access.
- Since:
- 1.2.0-GA
- eXo level API
- Platform
-
getInvitedSpacesByFilter
default org.exoplatform.commons.utils.ListAccess<Space> getInvitedSpacesByFilter(String username, 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:
username- The remote user Id.spaceFilter- The provided space filter.- Returns:
- The list access.
- Since:
- 1.2.0-GA
- eXo level API
- Platform
-
getPendingSpacesWithListAccess
default org.exoplatform.commons.utils.ListAccess<Space> getPendingSpacesWithListAccess(String username) Gets a list access containing all spaces that a user sent a request for joining a space.- Parameters:
username- The remote user Id.- Returns:
- The list access.
- Since:
- 1.2.0-GA
- eXo level API
- Platform
-
getPendingSpacesByFilter
default org.exoplatform.commons.utils.ListAccess<Space> getPendingSpacesByFilter(String username, 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:
username- The remote user Id.spaceFilter- The provided space filter.- Returns:
- The list access.
- Since:
- 1.2.0-GA
- eXo level API
- Platform
-
createSpace
Creates a new space: creating a group, its group navigation with pages- Parameters:
space- The space to be created.creatorUsername- The remote user Id.- Returns:
- The created space.
- eXo level API
- Platform
-
updateSpace
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
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
Updates a space's avatar.- Parameters:
existingSpace- The existing space to be updated.username- user making the modification- Returns:
- The updated space.
- Since:
- 1.2.0-GA
- eXo level API
- Platform
-
updateSpaceBanner
Updates a space's avatar.- Parameters:
existingSpace- The existing space to be updated.username- user making the modification- Returns:
- The updated space.
- Since:
- 1.2.0-GA
- eXo level API
- Platform
-
deleteSpace
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.- Throws:
SpaceException- when the space can't be deleted
-
deleteSpace
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.- Throws:
SpaceException- when the space can't be deleted
-
addPendingUser
Adds a user to the list of pending requests for joining a space.- Parameters:
space- The exising space.username- The remote user Id.- Since:
- 1.2.0-GA
- eXo level API
- Platform
-
removePendingUser
Removes a user from a list of pending requests for joining a space.- Parameters:
space- The existing space.username- The remote user Id.- Since:
- 1.2.0-GA
- eXo level API
- Platform
-
isPendingUser
Checks if a user is in the list of pending requests for joining a space.- Parameters:
space- The existing space.username- 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
Adds a user to the list of users who are invited to join a space.- Parameters:
space- The existing space.username- The remote user Id.- Since:
- 1.2.0-GA
- eXo level API
- Platform
-
removeInvitedUser
Removes a user from the list of users who are invited to join a space.- Parameters:
space- The existing space.username- The remote user Id.- Since:
- 1.2.0-GA
- eXo level API
- Platform
-
isInvitedUser
Checks if a user is in the list of users who are invited to join a space.- Parameters:
space- The existing space.username- 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
Adds a user to a space. The user will get the "member" role in a space.- Parameters:
space- The existing space.username- The remote user Id.- eXo level API
- Platform
-
removeMember
Removes a member from a space.- Parameters:
space- The existing space.username- The remote user Id.- eXo level API
- Platform
-
isMember
Checks if a given user is member of space or not.- Parameters:
space- The existing space.username- The remote user Id.- Returns:
- TRUE if the user is member. Otherwise, it is FALSE.
- eXo level API
- Platform
-
addRedactor
Assigns the "redactor" role to a user in a space.- Parameters:
space- The space that its user is assigned to redactor.username- The remote user Id.- eXo level API
- Platform
-
removeRedactor
Removes the "redactor" role of a user in a space.- Parameters:
space- The space that its user is assigned to redactor.username- The remote user Id.- eXo level API
- Platform
-
isRedactor
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.username- The remote user Id.- Returns:
- "True" if the user has the "redactor" role. Otherwise, it returns "false".
- eXo level API
- Platform
-
addPublisher
Assigns the "publisher" role to a user in a space.- Parameters:
space- The space that its user is assigned to publisher.username- The remote user Id.- eXo level API
- Platform
-
removePublisher
Removes the "publisher" role of a user in a space.- Parameters:
space- The space that its user is assigned to publisher.username- The remote user Id.- eXo level API
- Platform
-
isPublisher
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.username- The remote user Id.- Returns:
- "True" if the user has the "publisher" role. Otherwise, it returns "false".
- eXo level API
- Platform
-
hasRedactor
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
checks whether the user can add content on space or not- Parameters:
space-Spaceviewer-Identity- Returns:
- true if can add content, else false
-
canRedactOnSpace
checks whether the user can add content on space or not- Parameters:
space-Spaceusername-- Returns:
- true if can add content, else false
-
canPublishOnSpace
checks whether the user can publish content in a space or not- Parameters:
space-Spaceusername-- Returns:
- true if can publish content, else false
-
canManageSpace
checks whether the user can manage the space or not- Parameters:
space-Spaceusername-- Returns:
- true if can manage the space, else false
-
canManageSpacePublicSite
- Parameters:
space-Spaceto checkusername- user name- Returns:
- true if can create public site else false
-
canManageSpaceLayout
- Parameters:
space-Spaceto checkusername- user name- Returns:
- true if can manage site layout else false
-
canDeleteSpace
Checks the deletion permissions added from SpaceTemplate entity to Space entity in space creation step. If empty, then space admin can delete the space- Parameters:
space-Spaceusername-- Returns:
- true if can delete the space, else false
-
canViewSpace
checks whether the user can view the space or not- Parameters:
space-Spaceusername-- Returns:
- true if can view the space, else false
-
canAccessSpacePublicSite
Checks whether the user can access Space Public Site or not- Parameters:
space-Spaceusername- User name identifier- Returns:
- true if can access sitch Space Settings else false
-
setManager
Assigns the "manager" role to a user in a space.- Parameters:
space- The space that its user is assigned to manager.username- 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
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.username- 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
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.username- 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
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.username- The remote user Id.- Returns:
- "True" if the access permission is allowed. Otherwise, it returns "false".
-
hasSettingPermission
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.username- 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
Registers a space listener plugin to listen to space lifecyle events- Parameters:
spaceListenerPlugin- The space listener plugin to be registered.- Since:
- 1.2.0-GA
- eXo level API
- Platform
-
unregisterSpaceListenerPlugin
Unregisters an existing space listener plugin.- Parameters:
spaceListenerPlugin- The space listener plugin to be unregistered.- Since:
- 1.2.0-GA
- eXo level API
- Platform
-
getVisibleSpacesWithListAccess
default org.exoplatform.commons.utils.ListAccess<Space> getVisibleSpacesWithListAccess(String username, SpaceFilter spaceFilter) Gets spaces that a given user can see.- Parameters:
username- 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
-
createSpace
default 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
-
createSpace
Saves a new space or updates a space.- Parameters:
space- The space to be saved or updated.
-
renameSpace
Renames a space.- Parameters:
space- The space to be renamed.newDisplayName- New name of the space.
-
renameSpace
Renames a space by an identity who has rights of super admin.- Parameters:
space- The space to be renamed.newDisplayName- New name of the space.username- The identity who has renamed a space.- Throws:
SpaceException- Since:
- 4.0.0
- eXo level API
- Platform
-
deleteSpace
Deletes a space by its Id.- Parameters:
spaceId- Id of the deleted space.- Throws:
SpaceException
-
addMember
Adds a user to space as "member".- Parameters:
spaceId- Id of the space.username- Id of the user (remoteId).
-
removeMember
Removes a member from space.- Parameters:
spaceId- Id of the space.username- Id of the user (remoteId).
-
isMember
Checks if a given user is space member or not.- Parameters:
spaceId- Id of the space.username- Id of user (remoteId).- Returns:
- "True" if the user is space member. Otherwise, it returns "false".
-
isIgnored
Checks if a user is in the list of users who have ignored the space.- Parameters:
space- The existing space.username- The remote user Id.- Returns:
- TRUE if the space is an ignored space. Otherwise, it is FALSE.
-
setIgnored
Assigns the user who has ignored the space.- Parameters:
spaceId- The Id of the space ignored by the user.username- The remote user Id.
-
updateSpaceAccessed
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.
-
getLastSpaces
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
Gets a list of the most recently accessed spaces of a user.- Parameters:
remoteId- The remote Id of a user.- eXo level API
- Platform
-
getLastAccessedSpaceByFilter
default org.exoplatform.commons.utils.ListAccess<Space> getLastAccessedSpaceByFilter(String username, SpaceFilter spaceFilter) - Parameters:
username-spaceFilter-- Returns:
-
registerSpaceLifeCycleListener
Registers a space lifecycle listener.- Parameters:
listener- The space lifecycle listener to be registered.
-
unregisterSpaceLifeCycleListener
Unregisters a space lifecycle listener.- Parameters:
listener- The space lifecycle listener to be unregistered.
-
getVisitedSpaces
Gets the list of spaces which are visited by users- Parameters:
remoteId-- Returns:
-
isSuperManager
Checks if the user is a super manager of all spaces- Parameters:
username- user name- Returns:
- true if the user is member of super administrators groups, else false
-
isSuperManager
Checks if the user is a super manager of designated space or not- Parameters:
spaceId- usedSpaceidentifier to check permissionsusername- user name- Returns:
- true if the user is a super manager, else false
-
isSuperManager
Checks if the user is a super manager of designated space or not- Parameters:
space- usedSpaceto check permissionsusername- user name- Returns:
- true if the user is a super manager, else false
-
isContentManager
Checks if the user is a content manager of all spaces- Parameters:
username- user name- Returns:
- true if the user is a content manager
-
isContentPublisher
Checks if the user is a content publisher of all spaces- Parameters:
username- user name- Returns:
- true if the user is a content publisher
-
inviteIdentities
Invites users or members of spaces identified by identities list into a a designated space -
isSpaceContainsExternals
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:
ListAccessofSpacewith pending users requesting to join spaces that the designated user manages
-
findSpaceExternalInvitationsBySpaceId
- Returns:
- a list of external invitations in space
-
saveSpaceExternalInvitation
Add an external invitation to space- Parameters:
spaceId-email-tokenId-
-
getSpaceExternalInvitationById
Gets a Space external invitation by its Id.- Parameters:
invitationId-
-
deleteSpaceExternalInvitation
delete an external invitation from a space- Parameters:
invitationId-
-
findExternalInvitationsSpacesByEmail
- Parameters:
email-- Returns:
- a list of spaces ids by external email
-
deleteExternalUserInvitations
delete external invitations- Parameters:
email-
-
getCommonSpaces
default org.exoplatform.commons.utils.ListAccess<Space> getCommonSpaces(String username, String otherUsername) Gets a list access containing all common spaces between two users- Parameters:
username- current user idotherUsername- visited profile user id- Returns:
- list of common spaces between two users in param
-
getMemberSpacesIds
Gets aListof Space technical identifiers where the user has the "member" role.- Parameters:
username- The remote user Id.offset- The starting pointlimit- The limitation of returned results- Returns:
Listof Space technical identifiers
-
getManagerSpacesIds
Gets aListof Space technical identifiers where the user has the "manager" role.- Parameters:
username- The remote user Id.offset- The starting pointlimit- The limitation of returned results- Returns:
Listof Space technical identifiers
-
getSpaceMembershipDate
Retrieves the Space Membership date -
saveSpacePublicSite
default void saveSpacePublicSite(String spaceId, String publicSiteVisibility, String username) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException Saves the space public site characteristics- Parameters:
spaceId-publicSiteVisibility- Visibility of public site, possible values: manager, member, internal, authenticated or everyone.username- user identifier who's making the operation- Throws:
IllegalAccessException- whenorg.exoplatform.commons.exception.ObjectNotFoundException
-
saveSpacePublicSite
Saves the space public site characteristics- Parameters:
space-SpacepublicSiteVisibility- Visibility of public site, possible values: manager, member, internal, authenticated or everyone.
-
getSpacePublicSiteName
- Parameters:
space-Space- Returns:
- Public site name if exists, else null
-
countSpacesByTemplate
- Returns:
- the count of spaces by Space Template identifier
-