Class SpaceServiceImpl

java.lang.Object
org.exoplatform.social.core.space.impl.SpaceServiceImpl
All Implemented Interfaces:
org.exoplatform.social.core.space.spi.SpaceService

public class SpaceServiceImpl extends Object implements org.exoplatform.social.core.space.spi.SpaceService
SpaceService implementation.
Since:
August 29, 2008
Author:
dang.tung
  • Field Details

  • Constructor Details

    • SpaceServiceImpl

      public SpaceServiceImpl(org.exoplatform.social.core.storage.api.SpaceStorage spaceStorage, SpaceSearchConnector spaceSearchConnector, org.exoplatform.social.core.storage.api.GroupSpaceBindingStorage groupSpaceBindingStorage, org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.portal.config.UserACL userACL, org.exoplatform.services.security.IdentityRegistry identityRegistry, org.exoplatform.services.security.Authenticator authenticator, org.exoplatform.social.core.space.SpacesAdministrationService spacesAdministrationService, org.exoplatform.social.core.space.spi.SpaceTemplateService spaceTemplateService, org.exoplatform.portal.mop.service.LayoutService layoutService)
  • Method Details

    • getAllSpacesWithListAccess

      public org.exoplatform.commons.utils.ListAccess<org.exoplatform.social.core.space.model.Space> getAllSpacesWithListAccess()
      Specified by:
      getAllSpacesWithListAccess in interface org.exoplatform.social.core.space.spi.SpaceService
    • getSpaceByDisplayName

      public org.exoplatform.social.core.space.model.Space getSpaceByDisplayName(String spaceDisplayName)
      Specified by:
      getSpaceByDisplayName in interface org.exoplatform.social.core.space.spi.SpaceService
    • getSpaceByPrettyName

      public org.exoplatform.social.core.space.model.Space getSpaceByPrettyName(String spacePrettyName)
      Specified by:
      getSpaceByPrettyName in interface org.exoplatform.social.core.space.spi.SpaceService
    • getSpaceMembershipDate

      public Instant getSpaceMembershipDate(long spaceId, String username)
      Specified by:
      getSpaceMembershipDate in interface org.exoplatform.social.core.space.spi.SpaceService
    • getSpaceByGroupId

      public org.exoplatform.social.core.space.model.Space getSpaceByGroupId(String groupId)
      Specified by:
      getSpaceByGroupId in interface org.exoplatform.social.core.space.spi.SpaceService
    • getSpaceById

      public org.exoplatform.social.core.space.model.Space getSpaceById(String id)
      Specified by:
      getSpaceById in interface org.exoplatform.social.core.space.spi.SpaceService
    • getSpaceByUrl

      public org.exoplatform.social.core.space.model.Space getSpaceByUrl(String url)
      Specified by:
      getSpaceByUrl in interface org.exoplatform.social.core.space.spi.SpaceService
    • getAccessibleSpacesWithListAccess

      public SpaceListAccess getAccessibleSpacesWithListAccess(String username)
      Specified by:
      getAccessibleSpacesWithListAccess in interface org.exoplatform.social.core.space.spi.SpaceService
    • getVisibleSpacesWithListAccess

      public SpaceListAccess getVisibleSpacesWithListAccess(String username, org.exoplatform.social.core.space.SpaceFilter spaceFilter)
      Specified by:
      getVisibleSpacesWithListAccess in interface org.exoplatform.social.core.space.spi.SpaceService
    • getPendingSpacesWithListAccess

      public SpaceListAccess getPendingSpacesWithListAccess(String username)
      Specified by:
      getPendingSpacesWithListAccess in interface org.exoplatform.social.core.space.spi.SpaceService
    • createSpace

      public org.exoplatform.social.core.space.model.Space createSpace(org.exoplatform.social.core.space.model.Space space, String creator)
      Specified by:
      createSpace in interface org.exoplatform.social.core.space.spi.SpaceService
    • createSpace

      public org.exoplatform.social.core.space.model.Space createSpace(org.exoplatform.social.core.space.model.Space space, String username, List<org.exoplatform.social.core.identity.model.Identity> identitiesToInvite) throws org.exoplatform.social.core.space.SpaceException
      Specified by:
      createSpace in interface org.exoplatform.social.core.space.spi.SpaceService
      Throws:
      org.exoplatform.social.core.space.SpaceException
    • inviteIdentities

      public void inviteIdentities(org.exoplatform.social.core.space.model.Space space, List<org.exoplatform.social.core.identity.model.Identity> identitiesToInvite)
      Specified by:
      inviteIdentities in interface org.exoplatform.social.core.space.spi.SpaceService
    • isSpaceContainsExternals

      public boolean isSpaceContainsExternals(Long spaceId)
      Specified by:
      isSpaceContainsExternals in interface org.exoplatform.social.core.space.spi.SpaceService
    • createSpace

      public void createSpace(org.exoplatform.social.core.space.model.Space space)
      Specified by:
      createSpace in interface org.exoplatform.social.core.space.spi.SpaceService
    • renameSpace

      public void renameSpace(org.exoplatform.social.core.space.model.Space space, String newDisplayName)
      Specified by:
      renameSpace in interface org.exoplatform.social.core.space.spi.SpaceService
    • renameSpace

      public void renameSpace(org.exoplatform.social.core.space.model.Space space, String newDisplayName, String username) throws org.exoplatform.social.core.space.SpaceException
      Specified by:
      renameSpace in interface org.exoplatform.social.core.space.spi.SpaceService
      Throws:
      org.exoplatform.social.core.space.SpaceException
    • deleteSpace

      public void deleteSpace(org.exoplatform.social.core.space.model.Space space) throws org.exoplatform.social.core.space.SpaceException
      Specified by:
      deleteSpace in interface org.exoplatform.social.core.space.spi.SpaceService
      Throws:
      org.exoplatform.social.core.space.SpaceException
    • deleteSpace

      public void deleteSpace(org.exoplatform.social.core.space.model.Space space, boolean deleteGroup) throws org.exoplatform.social.core.space.SpaceException
      Specified by:
      deleteSpace in interface org.exoplatform.social.core.space.spi.SpaceService
      Throws:
      org.exoplatform.social.core.space.SpaceException
    • addMember

      public void addMember(org.exoplatform.social.core.space.model.Space space, String username)
      Specified by:
      addMember in interface org.exoplatform.social.core.space.spi.SpaceService
    • removeMember

      public void removeMember(org.exoplatform.social.core.space.model.Space space, String username)
      Specified by:
      removeMember in interface org.exoplatform.social.core.space.spi.SpaceService
    • isMember

      public boolean isMember(org.exoplatform.social.core.space.model.Space space, String username)
      Specified by:
      isMember in interface org.exoplatform.social.core.space.spi.SpaceService
    • isIgnored

      public boolean isIgnored(org.exoplatform.social.core.space.model.Space space, String username)
      Specified by:
      isIgnored in interface org.exoplatform.social.core.space.spi.SpaceService
    • setIgnored

      public void setIgnored(String spaceId, String username)
      Specified by:
      setIgnored in interface org.exoplatform.social.core.space.spi.SpaceService
    • restoreSpacePageLayout

      public void restoreSpacePageLayout(String spaceId, String appId, org.exoplatform.services.security.Identity identity) throws IllegalAccessException, org.exoplatform.social.core.space.SpaceException
      Specified by:
      restoreSpacePageLayout in interface org.exoplatform.social.core.space.spi.SpaceService
      Throws:
      IllegalAccessException
      org.exoplatform.social.core.space.SpaceException
    • moveApplication

      public void moveApplication(String spaceId, String appId, int transition) throws org.exoplatform.social.core.space.SpaceException
      Specified by:
      moveApplication in interface org.exoplatform.social.core.space.spi.SpaceService
      Throws:
      org.exoplatform.social.core.space.SpaceException
    • installApplication

      public void installApplication(org.exoplatform.social.core.space.model.Space space, String appId)
      Specified by:
      installApplication in interface org.exoplatform.social.core.space.spi.SpaceService
    • activateApplication

      public void activateApplication(org.exoplatform.social.core.space.model.Space space, String appId) throws org.exoplatform.social.core.space.SpaceException
      Specified by:
      activateApplication in interface org.exoplatform.social.core.space.spi.SpaceService
      Throws:
      org.exoplatform.social.core.space.SpaceException
    • deactivateApplication

      public void deactivateApplication(org.exoplatform.social.core.space.model.Space space, String appId) throws org.exoplatform.social.core.space.SpaceException
      Specified by:
      deactivateApplication in interface org.exoplatform.social.core.space.spi.SpaceService
      Throws:
      org.exoplatform.social.core.space.SpaceException
    • removeApplication

      public void removeApplication(org.exoplatform.social.core.space.model.Space space, String appId, String appName) throws org.exoplatform.social.core.space.SpaceException
      Specified by:
      removeApplication in interface org.exoplatform.social.core.space.spi.SpaceService
      Throws:
      org.exoplatform.social.core.space.SpaceException
    • registerSpaceLifeCycleListener

      public void registerSpaceLifeCycleListener(org.exoplatform.social.core.space.spi.SpaceLifeCycleListener listener)
      Specified by:
      registerSpaceLifeCycleListener in interface org.exoplatform.social.core.space.spi.SpaceService
    • unregisterSpaceLifeCycleListener

      public void unregisterSpaceLifeCycleListener(org.exoplatform.social.core.space.spi.SpaceLifeCycleListener listener)
      Specified by:
      unregisterSpaceLifeCycleListener in interface org.exoplatform.social.core.space.spi.SpaceService
    • addInvitedUser

      public void addInvitedUser(org.exoplatform.social.core.space.model.Space space, String username)
      Specified by:
      addInvitedUser in interface org.exoplatform.social.core.space.spi.SpaceService
    • addPendingUser

      public void addPendingUser(org.exoplatform.social.core.space.model.Space space, String username)
      Specified by:
      addPendingUser in interface org.exoplatform.social.core.space.spi.SpaceService
    • getAccessibleSpacesByFilter

      public org.exoplatform.commons.utils.ListAccess<org.exoplatform.social.core.space.model.Space> getAccessibleSpacesByFilter(String username, org.exoplatform.social.core.space.SpaceFilter spaceFilter)
      Specified by:
      getAccessibleSpacesByFilter in interface org.exoplatform.social.core.space.spi.SpaceService
    • getAllSpacesByFilter

      public org.exoplatform.commons.utils.ListAccess<org.exoplatform.social.core.space.model.Space> getAllSpacesByFilter(org.exoplatform.social.core.space.SpaceFilter spaceFilter)
      Specified by:
      getAllSpacesByFilter in interface org.exoplatform.social.core.space.spi.SpaceService
    • getInvitedSpacesByFilter

      public org.exoplatform.commons.utils.ListAccess<org.exoplatform.social.core.space.model.Space> getInvitedSpacesByFilter(String username, org.exoplatform.social.core.space.SpaceFilter spaceFilter)
      Specified by:
      getInvitedSpacesByFilter in interface org.exoplatform.social.core.space.spi.SpaceService
    • getMemberSpaces

      public org.exoplatform.commons.utils.ListAccess<org.exoplatform.social.core.space.model.Space> getMemberSpaces(String username)
      Specified by:
      getMemberSpaces in interface org.exoplatform.social.core.space.spi.SpaceService
    • getMemberSpacesIds

      public List<String> getMemberSpacesIds(String username, int offset, int limit)
      Specified by:
      getMemberSpacesIds in interface org.exoplatform.social.core.space.spi.SpaceService
    • getManagerSpacesIds

      public List<String> getManagerSpacesIds(String username, int offset, int limit)
      Specified by:
      getManagerSpacesIds in interface org.exoplatform.social.core.space.spi.SpaceService
    • getManagerSpacesByFilter

      public org.exoplatform.commons.utils.ListAccess<org.exoplatform.social.core.space.model.Space> getManagerSpacesByFilter(String username, org.exoplatform.social.core.space.SpaceFilter spaceFilter)
      Specified by:
      getManagerSpacesByFilter in interface org.exoplatform.social.core.space.spi.SpaceService
    • getManagerSpaces

      public org.exoplatform.commons.utils.ListAccess<org.exoplatform.social.core.space.model.Space> getManagerSpaces(String username)
      Specified by:
      getManagerSpaces in interface org.exoplatform.social.core.space.spi.SpaceService
    • getMemberSpacesByFilter

      public org.exoplatform.commons.utils.ListAccess<org.exoplatform.social.core.space.model.Space> getMemberSpacesByFilter(String username, org.exoplatform.social.core.space.SpaceFilter spaceFilter)
      Specified by:
      getMemberSpacesByFilter in interface org.exoplatform.social.core.space.spi.SpaceService
    • getFavoriteSpacesByFilter

      public org.exoplatform.commons.utils.ListAccess<org.exoplatform.social.core.space.model.Space> getFavoriteSpacesByFilter(String username, org.exoplatform.social.core.space.SpaceFilter spaceFilter)
      Specified by:
      getFavoriteSpacesByFilter in interface org.exoplatform.social.core.space.spi.SpaceService
    • getPendingSpacesByFilter

      public org.exoplatform.commons.utils.ListAccess<org.exoplatform.social.core.space.model.Space> getPendingSpacesByFilter(String username, org.exoplatform.social.core.space.SpaceFilter spaceFilter)
      Specified by:
      getPendingSpacesByFilter in interface org.exoplatform.social.core.space.spi.SpaceService
    • hasSettingPermission

      public boolean hasSettingPermission(org.exoplatform.social.core.space.model.Space space, String username)
      Specified by:
      hasSettingPermission in interface org.exoplatform.social.core.space.spi.SpaceService
    • canAccessSpacePublicSite

      public boolean canAccessSpacePublicSite(org.exoplatform.social.core.space.model.Space space, String username)
      Specified by:
      canAccessSpacePublicSite in interface org.exoplatform.social.core.space.spi.SpaceService
    • getSpacePublicSiteName

      public String getSpacePublicSiteName(org.exoplatform.social.core.space.model.Space space)
      Specified by:
      getSpacePublicSiteName in interface org.exoplatform.social.core.space.spi.SpaceService
    • isInvitedUser

      public boolean isInvitedUser(org.exoplatform.social.core.space.model.Space space, String username)
      Specified by:
      isInvitedUser in interface org.exoplatform.social.core.space.spi.SpaceService
    • isManager

      public boolean isManager(org.exoplatform.social.core.space.model.Space space, String username)
      Specified by:
      isManager in interface org.exoplatform.social.core.space.spi.SpaceService
    • isRedactor

      public boolean isRedactor(org.exoplatform.social.core.space.model.Space space, String username)
      Specified by:
      isRedactor in interface org.exoplatform.social.core.space.spi.SpaceService
    • isPublisher

      public boolean isPublisher(org.exoplatform.social.core.space.model.Space space, String username)
      Specified by:
      isPublisher in interface org.exoplatform.social.core.space.spi.SpaceService
    • hasRedactor

      public boolean hasRedactor(org.exoplatform.social.core.space.model.Space space)
      Specified by:
      hasRedactor in interface org.exoplatform.social.core.space.spi.SpaceService
    • isOnlyManager

      public boolean isOnlyManager(org.exoplatform.social.core.space.model.Space space, String username)
      Specified by:
      isOnlyManager in interface org.exoplatform.social.core.space.spi.SpaceService
    • isPendingUser

      public boolean isPendingUser(org.exoplatform.social.core.space.model.Space space, String username)
      Specified by:
      isPendingUser in interface org.exoplatform.social.core.space.spi.SpaceService
    • registerSpaceListenerPlugin

      public void registerSpaceListenerPlugin(org.exoplatform.social.core.space.SpaceListenerPlugin spaceListenerPlugin)
      Specified by:
      registerSpaceListenerPlugin in interface org.exoplatform.social.core.space.spi.SpaceService
    • removeInvitedUser

      public void removeInvitedUser(org.exoplatform.social.core.space.model.Space space, String username)
      Specified by:
      removeInvitedUser in interface org.exoplatform.social.core.space.spi.SpaceService
    • removePendingUser

      public void removePendingUser(org.exoplatform.social.core.space.model.Space space, String username)
      Specified by:
      removePendingUser in interface org.exoplatform.social.core.space.spi.SpaceService
    • addRedactor

      public void addRedactor(org.exoplatform.social.core.space.model.Space space, String username)
      Specified by:
      addRedactor in interface org.exoplatform.social.core.space.spi.SpaceService
    • removeRedactor

      public void removeRedactor(org.exoplatform.social.core.space.model.Space space, String username)
      Specified by:
      removeRedactor in interface org.exoplatform.social.core.space.spi.SpaceService
    • addPublisher

      public void addPublisher(org.exoplatform.social.core.space.model.Space space, String username)
      Specified by:
      addPublisher in interface org.exoplatform.social.core.space.spi.SpaceService
    • removePublisher

      public void removePublisher(org.exoplatform.social.core.space.model.Space space, String username)
      Specified by:
      removePublisher in interface org.exoplatform.social.core.space.spi.SpaceService
    • setManager

      public void setManager(org.exoplatform.social.core.space.model.Space space, String username, boolean isManager)
      Specified by:
      setManager in interface org.exoplatform.social.core.space.spi.SpaceService
    • unregisterSpaceListenerPlugin

      public void unregisterSpaceListenerPlugin(org.exoplatform.social.core.space.SpaceListenerPlugin spaceListenerPlugin)
      Specified by:
      unregisterSpaceListenerPlugin in interface org.exoplatform.social.core.space.spi.SpaceService
    • updateSpace

      public org.exoplatform.social.core.space.model.Space updateSpace(org.exoplatform.social.core.space.model.Space space, List<org.exoplatform.social.core.identity.model.Identity> identitiesToInvite)
      Specified by:
      updateSpace in interface org.exoplatform.social.core.space.spi.SpaceService
    • updateSpace

      public org.exoplatform.social.core.space.model.Space updateSpace(org.exoplatform.social.core.space.model.Space existingSpace)
      Specified by:
      updateSpace in interface org.exoplatform.social.core.space.spi.SpaceService
    • updateSpaceAvatar

      public org.exoplatform.social.core.space.model.Space updateSpaceAvatar(org.exoplatform.social.core.space.model.Space existingSpace, String username)
      Specified by:
      updateSpaceAvatar in interface org.exoplatform.social.core.space.spi.SpaceService
    • updateSpaceBanner

      public org.exoplatform.social.core.space.model.Space updateSpaceBanner(org.exoplatform.social.core.space.model.Space existingSpace, String username)
      Specified by:
      updateSpaceBanner in interface org.exoplatform.social.core.space.spi.SpaceService
    • getInvitedSpacesWithListAccess

      public org.exoplatform.commons.utils.ListAccess<org.exoplatform.social.core.space.model.Space> getInvitedSpacesWithListAccess(String username)
      Specified by:
      getInvitedSpacesWithListAccess in interface org.exoplatform.social.core.space.spi.SpaceService
    • updateSpaceAccessed

      public void updateSpaceAccessed(String remoteId, org.exoplatform.social.core.space.model.Space space)
      Specified by:
      updateSpaceAccessed in interface org.exoplatform.social.core.space.spi.SpaceService
    • getLastSpaces

      public List<org.exoplatform.social.core.space.model.Space> getLastSpaces(int limit)
      Specified by:
      getLastSpaces in interface org.exoplatform.social.core.space.spi.SpaceService
    • getLastAccessedSpace

      public org.exoplatform.commons.utils.ListAccess<org.exoplatform.social.core.space.model.Space> getLastAccessedSpace(String remoteId)
      Specified by:
      getLastAccessedSpace in interface org.exoplatform.social.core.space.spi.SpaceService
    • getVisitedSpaces

      public org.exoplatform.commons.utils.ListAccess<org.exoplatform.social.core.space.model.Space> getVisitedSpaces(String remoteId)
      Specified by:
      getVisitedSpaces in interface org.exoplatform.social.core.space.spi.SpaceService
    • getPendingSpaceRequestsToManage

      public org.exoplatform.commons.utils.ListAccess<org.exoplatform.social.core.space.model.Space> getPendingSpaceRequestsToManage(String remoteId)
      Specified by:
      getPendingSpaceRequestsToManage in interface org.exoplatform.social.core.space.spi.SpaceService
    • findSpaceExternalInvitationsBySpaceId

      public List<org.exoplatform.social.core.model.SpaceExternalInvitation> findSpaceExternalInvitationsBySpaceId(String spaceId)
      Specified by:
      findSpaceExternalInvitationsBySpaceId in interface org.exoplatform.social.core.space.spi.SpaceService
    • saveSpaceExternalInvitation

      public void saveSpaceExternalInvitation(String spaceId, String email, String tokenId)
      Specified by:
      saveSpaceExternalInvitation in interface org.exoplatform.social.core.space.spi.SpaceService
    • saveSpacePublicSite

      public void saveSpacePublicSite(String spaceId, String publicSiteVisibility, String authenticatedUser) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException
      Specified by:
      saveSpacePublicSite in interface org.exoplatform.social.core.space.spi.SpaceService
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException
      IllegalAccessException
    • saveSpacePublicSite

      public void saveSpacePublicSite(org.exoplatform.social.core.space.model.Space space, String publicSiteVisibility)
      Specified by:
      saveSpacePublicSite in interface org.exoplatform.social.core.space.spi.SpaceService
    • getSpaceExternalInvitationById

      public org.exoplatform.social.core.model.SpaceExternalInvitation getSpaceExternalInvitationById(String invitationId)
      Specified by:
      getSpaceExternalInvitationById in interface org.exoplatform.social.core.space.spi.SpaceService
    • deleteSpaceExternalInvitation

      public void deleteSpaceExternalInvitation(String invitationId)
      Specified by:
      deleteSpaceExternalInvitation in interface org.exoplatform.social.core.space.spi.SpaceService
    • findExternalInvitationsSpacesByEmail

      public List<String> findExternalInvitationsSpacesByEmail(String email)
      Specified by:
      findExternalInvitationsSpacesByEmail in interface org.exoplatform.social.core.space.spi.SpaceService
    • deleteExternalUserInvitations

      public void deleteExternalUserInvitations(String email)
      Specified by:
      deleteExternalUserInvitations in interface org.exoplatform.social.core.space.spi.SpaceService
    • isSuperManager

      public boolean isSuperManager(String username)
      Specified by:
      isSuperManager in interface org.exoplatform.social.core.space.spi.SpaceService
    • isContentManager

      public boolean isContentManager(String username)
      Specified by:
      isContentManager in interface org.exoplatform.social.core.space.spi.SpaceService
    • isContentPublisher

      public boolean isContentPublisher(String username)
      Specified by:
      isContentPublisher in interface org.exoplatform.social.core.space.spi.SpaceService
    • getCommonSpaces

      public org.exoplatform.commons.utils.ListAccess<org.exoplatform.social.core.space.model.Space> getCommonSpaces(String username, String otherUserId)
      Specified by:
      getCommonSpaces in interface org.exoplatform.social.core.space.spi.SpaceService
    • addSpaceListener

      public void addSpaceListener(org.exoplatform.social.core.space.SpaceListenerPlugin plugin)