Interface SpaceService
-
public interface SpaceServiceProvides methods to work with Space.- Since:
- Aug 29, 2008
-
-
Field Summary
Fields Modifier and Type Field Description static StringSPACES_APP_IDDeprecated.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description voidacceptInvitation(String spaceId, String userId)Deprecated.voidacceptInvitation(Space space, String userId)Deprecated.voidactivateApplication(String spaceId, String appId)Activates an installed application in a space.voidactivateApplication(Space space, String appId)Activates an installed application in a space.voidaddInvitedUser(Space space, String userId)Adds a user to the list of users who are invited to join a space.voidaddMember(String spaceId, String userId)Deprecated.voidaddMember(Space space, String userId)Adds a user to a space.voidaddPendingUser(Space space, String userId)Adds a user to the list of pending requests for joining a space.default voidaddRedactor(Space space, String userId)Assigns the "redactor" role to a user in a space.default voidaddSpacesApplication(org.exoplatform.application.registry.Application application)Add an application to applications list that can be instantiated in space contextdefault booleancanRedactOnSpace(Space space, org.exoplatform.services.security.Identity viewer)checks whether the user can add content on space or notSpacecreateSpace(Space space, String creatorUserId)Creates a new space: creating a group, its group navigation with pages for installing space applications.SpacecreateSpace(Space space, String creator, String invitedGroupId)Deprecated.UsecreateSpace(Space, String, List)instead.SpacecreateSpace(Space space, String creator, List<Identity> identitiesToInvite)Creates a new space and invites all users from identitiesToInvite to join this newly created space.voiddeactivateApplication(String spaceId, String appId)Deactivates an installed application in a space.voiddeactivateApplication(Space space, String appId)Deactivates an installed application in a space.voiddeclineRequest(String spaceId, String userId)Deprecated.voiddeclineRequest(Space space, String userId)Deprecated.voiddeInitApps(Space space)Deprecated.Will be removed by 4.0.x.default voiddeleteExternalUserInvitations(String email)delete external invitationsvoiddeleteSpace(String spaceId)Deprecated.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 voiddeleteSpacesApplication(String applicationName)Delete application from list of spaces applicationsvoiddenyInvitation(String spaceId, String userId)Deprecated.voiddenyInvitation(Space space, String userId)Deprecated.default List<String>findExternalInvitationsSpacesByEmail(String email)default List<SpaceExternalInvitation>findSpaceExternalInvitationsBySpaceId(String spaceId)List<Space>getAccessibleSpaces(String userId)Deprecated.UsegetAccessibleSpacesWithListAccess(String)instead.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.org.exoplatform.commons.utils.ListAccess<Space>getAccessibleSpacesWithListAccess(String userId)Gets a list access containing all spaces that a user has the access permission.List<Space>getAllSpaces()Deprecated.UsegetAllSpacesWithListAccess()instead.org.exoplatform.commons.utils.ListAccess<Space>getAllSpacesByFilter(SpaceFilter spaceFilter)Gets a list access that contains all spaces matching with a filter.org.exoplatform.commons.utils.ListAccess<Space>getAllSpacesWithListAccess()Gets a list access that contains all spaces.default org.exoplatform.commons.utils.ListAccess<Space>getCommonSpaces(String userId, String otherUserId)Gets a list access containing all common spaces between two usersList<Space>getEditableSpaces(String userId)Deprecated.UsegetSettingableSpaces(String)instead.List<Space>getInvitedSpaces(String userId)Deprecated.UsegetInvitedSpacesWithListAccess(String)instead.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.org.exoplatform.commons.utils.ListAccess<Space>getInvitedSpacesWithListAccess(String userId)Gets a list access containing all spaces that a user is invited to join.org.exoplatform.commons.utils.ListAccess<Space>getLastAccessedSpace(String remoteId, String appId)Gets a list of the most recently accessed spaces of a user.List<Space>getLastAccessedSpace(String remoteId, String appId, int offset, int limit)Gets a list of the most recently accessed spaces of a user.List<Space>getLastSpaces(int limit)Gets the last spaces that have been created.default org.exoplatform.commons.utils.ListAccess<Space>getManagerSpaces(String userId)Gets a list access containing all spaces that a user has the "manager" role.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.List<String>getMembers(String spaceId)Deprecated.UseSpace.getMembers()instead.List<String>getMembers(Space space)Deprecated.UseSpace.getMembers()instead.org.exoplatform.commons.utils.ListAccess<Space>getMemberSpaces(String userId)Gets a list access containing all spaces that a user has the "member" role.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.default org.exoplatform.commons.utils.ListAccess<Space>getPendingSpaceRequestsToManage(String remoteId)Retrieves the list of pending 'requests to join' a space that the user managesList<Space>getPendingSpaces(String userId)Deprecated.UsegetPendingSpacesWithListAccess(String)instead.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.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.String[]getPortletsPrefsRequired()Deprecated.Will be removed by 4.0.x.List<Space>getPublicSpaces(String userId)Deprecated.UsegetPublicSpacesWithListAccess(String)instead.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.org.exoplatform.commons.utils.ListAccess<Space>getPublicSpacesWithListAccess(String userId)Gets a list access containing all spaces that a user can request to join.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.org.exoplatform.commons.utils.ListAccess<Space>getSettingableSpaces(String userId)Gets a list access containing all spaces that a user has the setting permission.SpaceApplicationConfigPlugingetSpaceApplicationConfigPlugin()Deprecated.SpacegetSpaceByDisplayName(String spaceDisplayName)Gets a space by its display name.SpacegetSpaceByGroupId(String groupId)Gets a space by its group Id.SpacegetSpaceById(String spaceId)Gets a space by its Id.SpacegetSpaceByName(String spaceName)Deprecated.UsegetSpaceByPrettyName(String)instead.SpacegetSpaceByPrettyName(String spacePrettyName)Gets a space by its pretty name.SpacegetSpaceByUrl(String spaceUrl)Gets a space by its URL.default SpaceExternalInvitationgetSpaceExternalInvitationById(String invitationId)Gets a Space external invitation by its Id.List<Space>getSpaces(String userId)Deprecated.UsegetMemberSpaces(String)instead.default List<org.exoplatform.application.registry.Application>getSpacesApplications()List<Space>getSpacesByFirstCharacterOfName(String firstCharacterOfName)Deprecated.List<Space>getSpacesBySearchCondition(String condition)Deprecated.SpaceListAccessgetUnifiedSearchSpacesWithListAccess(String userId, SpaceFilter spaceFilter)Provides the Unified Search feature to get spaces that a user can see.List<Space>getVisibleSpaces(String userId, SpaceFilter spaceFilter)Gets spaces that a given user can see.SpaceListAccessgetVisibleSpacesWithListAccess(String userId, SpaceFilter spaceFilter)Gets spaces that a given user can see.org.exoplatform.commons.utils.ListAccess<Space>getVisitedSpaces(String remoteId, String appId)Gets the list of spaces which are visited by usersbooleanhasAccessPermission(String spaceId, String userId)Deprecated.booleanhasAccessPermission(Space space, String userId)Checks if a given user can access a space or not.booleanhasEditPermission(String spaceId, String userId)Deprecated.booleanhasEditPermission(Space space, String userId)Deprecated.default booleanhasRedactor(Space space)Checks if a given space has at least one "redactor"booleanhasSettingPermission(Space space, String userId)Checks if a given user has the setting permission to a space or not.voidinitApp(Space space)Deprecated.Will be removed by 4.0.x.voidinitApps(Space space)Deprecated.Will be removed by 4.0.x.voidinstallApplication(String spaceId, String appId)Installs an application in a space.voidinstallApplication(Space space, String appId)Installs an application in a space.default voidinviteIdentities(Space space, List<Identity> identitiesToInvite)Invites users or members of spaces identified by identities list into a a designated spacevoidinviteMember(String spaceId, String userId)Deprecated.voidinviteMember(Space space, String userId)Deprecated.default booleanisIgnored(Space space, String userId)Checks if a user is in the list of users who have ignored the space.booleanisInvited(String spaceId, String userId)Deprecated.booleanisInvited(Space space, String userId)Deprecated.booleanisInvitedUser(Space space, String userId)Checks if a user is in the list of users who are invited to join a space.booleanisLeader(String spaceId, String userId)Deprecated.booleanisLeader(Space space, String userId)Deprecated.booleanisManager(Space space, String userId)Checks if a given user has the "manager" role in a space.booleanisMember(String spaceId, String userId)Deprecated.booleanisMember(Space space, String userId)Checks if a given user is member of space or not.booleanisOnlyLeader(String spaceId, String userId)Deprecated.booleanisOnlyLeader(Space space, String userId)Deprecated.booleanisOnlyManager(Space space, String userId)Checks if a given user is the only one who has the "manager" role in a space.booleanisPending(String spaceId, String userId)Deprecated.booleanisPending(Space space, String userId)Deprecated.booleanisPendingUser(Space space, String userId)Checks if a user is in the list of pending requests for joining a space.default booleanisRedactor(Space space, String userId)Checks if a given user has the "redactor" role in a space.default booleanisSpaceContainsExternals(Long spaceId)Checks if a specific space contains external usersbooleanisSuperManager(String userId)Checks if the user is a super manager of all spacesdefault voidmoveApplication(String spaceId, String appId, int transition)voidregisterSpaceLifeCycleListener(SpaceLifeCycleListener listener)Deprecated.Will be removed by 4.0.x.voidregisterSpaceListenerPlugin(SpaceListenerPlugin spaceListenerPlugin)Registers a space listener plugin to listen to space lifecyle events: creating, updating, installing an application, and more.voidremoveApplication(String spaceId, String appId, String appName)Removes an installed application from a space.voidremoveApplication(Space space, String appId, String appName)Removes an installed application from a space.voidremoveInvitedUser(Space space, String userId)Removes a user from the list of users who are invited to join a space.voidremoveMember(String spaceId, String userId)Deprecated.voidremoveMember(Space space, String userId)Removes a member from a space.voidremovePendingUser(Space space, String userId)Removes a user from a list of pending requests for joining a space.default voidremoveRedactor(Space space, String userId)Removes the "redactor" role of a user in a space.voidrenameSpace(String remoteId, Space space, String newDisplayName)Renames a space by an identity who has rights of super admin.voidrenameSpace(Space space, String newDisplayName)Renames a space.voidrequestJoin(String spaceId, String userId)Deprecated.voidrequestJoin(Space space, String userId)Deprecated.voidrevokeInvitation(String spaceId, String userId)Deprecated.voidrevokeInvitation(Space space, String userId)Deprecated.voidrevokeRequestJoin(String spaceId, String userId)Deprecated.voidrevokeRequestJoin(Space space, String userId)Deprecated.voidsaveSpace(Space space, boolean isNew)Deprecated.default voidsaveSpaceExternalInvitation(String spaceId, String email, String tokenId)Add an external invitation to spacedefault voidsetIgnored(String spaceId, String userId)Assigns the user who has ignored the space.voidsetLeader(String spaceId, String userId, boolean isLeader)Deprecated.voidsetLeader(Space space, String userId, boolean isLeader)Deprecated.voidsetManager(Space space, String userId, boolean isManager)Assigns the "manager" role to a user in a space.voidsetPortletsPrefsRequired(PortletPreferenceRequiredPlugin portletPrefsRequiredPlugin)Deprecated.UseSpaceApplicationConfigPlugininstead.voidsetSpaceApplicationConfigPlugin(SpaceApplicationConfigPlugin spaceApplicationConfigPlugin)Deprecated.voidunregisterSpaceLifeCycleListener(SpaceLifeCycleListener listener)Deprecated.Will be removed by 4.0.x.voidunregisterSpaceListenerPlugin(SpaceListenerPlugin spaceListenerPlugin)Unregisters an existing space listener plugin.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.voidupdateSpaceAccessed(String remoteId, Space space)Updates the most recently accessed space of a user to the top of spaces list.SpaceupdateSpaceAvatar(Space existingSpace)Updates a space's avatar.SpaceupdateSpaceBanner(Space existingSpace)Updates a space's avatar.voidvalidateRequest(String spaceId, String userId)Deprecated.voidvalidateRequest(Space space, String userId)Deprecated.
-
-
-
Field Detail
-
SPACES_APP_ID
@Deprecated static final String SPACES_APP_ID
Deprecated.Will be removed by 4.0.x.- See Also:
- Constant Field Values
-
-
Method Detail
-
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
-
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
-
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-Spaceviewer-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.UsegetAllSpacesWithListAccess()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.UsegetSpaceByPrettyName(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
-
getSpacesByFirstCharacterOfName
@Deprecated List<Space> getSpacesByFirstCharacterOfName(String firstCharacterOfName) throws SpaceException
Deprecated.UsegetAllSpacesByFilter(org.exoplatform.social.core.space.SpaceFilter)instead. Will be removed by 4.0.x.Gets all spaces which have the name starting with the input character.- Returns:
- All spaces in which their first characters match with the input string.
- Throws:
SpaceException- with code SpaceException.Code.ERROR_DATASTORE- eXo level API
- Provisional
-
getSpacesBySearchCondition
List<Space> getSpacesBySearchCondition(String condition) throws Exception
Deprecated.UsegetAllSpacesByFilter(org.exoplatform.social.core.space.SpaceFilter)instead. Will be removed by 4.0.x.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.UsegetMemberSpaces(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.UsegetAccessibleSpacesWithListAccess(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.UsegetSettingableSpaces(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.UsegetInvitedSpacesWithListAccess(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.UsegetPublicSpacesWithListAccess(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.UsegetPendingSpacesWithListAccess(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.UsecreateSpace(Space, String, List)instead.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.UseupdateSpace(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.UsedeleteSpace(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.UseaddMember(org.exoplatform.social.core.space.model.Space, String)instead. Will be removed by 4.0.x.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.UseremoveMember(org.exoplatform.social.core.space.model.Space, String)instead. Will be removed by 4.0.x.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.UseSpace.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.UseSpace.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.UsesetManager(org.exoplatform.social.core.space.model.Space, String, boolean)instead. Will be removed by 4.0.x.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.UsesetManager(org.exoplatform.social.core.space.model.Space, String, boolean)instead. Will be removed by 4.0.x.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.UseisManager(org.exoplatform.social.core.space.model.Space, String)instead. Will be removed by 4.0.x.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.UseisManager(org.exoplatform.social.core.space.model.Space, String)instead. Will be removed by 4.0.x.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.UseisOnlyManager(org.exoplatform.social.core.space.model.Space, String)instead. Will be removed by 4.0.x.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.UseisOnlyManager(org.exoplatform.social.core.space.model.Space, String)instead. Will be removed by 4.0.x.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.UseisMember(org.exoplatform.social.core.space.model.Space, String)instead. Will be removed by 4.0.x.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.UsehasAccessPermission(org.exoplatform.social.core.space.model.Space, String)instead. Will be removed by 4.0.x.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.UsehasSettingPermission(org.exoplatform.social.core.space.model.Space, String)instead. Will be removed by 4.0.x.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.UsehasSettingPermission(org.exoplatform.social.core.space.model.Space, String)instead. Will be removed by 4.0.x.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.UseisInvitedUser(org.exoplatform.social.core.space.model.Space, String)instead. Will be removed by 4.0.x.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.UseisInvitedUser(org.exoplatform.social.core.space.model.Space, String)instead. Will be removed by 4.0.x.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.UseisPendingUser(org.exoplatform.social.core.space.model.Space, String)instead. Will be removed by 4.0.x.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.UseisPendingUser(org.exoplatform.social.core.space.model.Space, String)instead. Will be removed by 4.0.x.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
-
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.UseaddPendingUser(org.exoplatform.social.core.space.model.Space, String)instead. Will be removed by 4.0.x.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.UseaddPendingUser(org.exoplatform.social.core.space.model.Space, String)instead. Will be removed by 4.0.x.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.UseremovePendingUser(org.exoplatform.social.core.space.model.Space, String)instead. Will be removed by 4.0.x.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.UseremovePendingUser(org.exoplatform.social.core.space.model.Space, String)instead. Will be removed by 4.0.x.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.UseaddInvitedUser(org.exoplatform.social.core.space.model.Space, String)instead. Will be removed by 4.0.x.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.UseaddInvitedUser(org.exoplatform.social.core.space.model.Space, String)instead. Will be removed by 4.0.x.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.UseremoveInvitedUser(org.exoplatform.social.core.space.model.Space, String)instead. Will be removed by 4.0.x.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.UseremoveInvitedUser(org.exoplatform.social.core.space.model.Space, String)instead. Will be removed by 4.0.x.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.UseaddMember(org.exoplatform.social.core.space.model.Space, String)instead. Will be removed by 4.0.x.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.UseaddMember(org.exoplatform.social.core.space.model.Space, String)instead. Will be removed by 4.0.x.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.UseremoveInvitedUser(org.exoplatform.social.core.space.model.Space, String)instead. Will be removed by 4.0.x.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.UseremoveInvitedUser(org.exoplatform.social.core.space.model.Space, String)instead. Will be removed by 4.0.x.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.UseaddMember(org.exoplatform.social.core.space.model.Space, String)instead. Will be removed by 4.0.x.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.UseaddMember(org.exoplatform.social.core.space.model.Space, String)instead. Will be removed by 4.0.x.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.UseremovePendingUser(org.exoplatform.social.core.space.model.Space, String)instead. Will be removed by 4.0.x.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.UseremovePendingUser(org.exoplatform.social.core.space.model.Space, String)instead. Will be removed by 4.0.x.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.UseSpaceApplicationConfigPlugininstead. 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
-
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:
ListAccessofSpacewith 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 spaceappId- application identifiertransition- how much levels to move up or down an application- Throws:
SpaceException
-
getSpacesApplications
default List<org.exoplatform.application.registry.Application> getSpacesApplications()
- Returns:
ListofApplicationthat 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 typeApplication
-
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 idotherUserId- visited profile user id- Returns:
- list of common spaces between two users in param
-
-