Class SpaceRestResourcesV1

java.lang.Object
org.exoplatform.social.rest.impl.space.SpaceRestResourcesV1
All Implemented Interfaces:
org.exoplatform.services.rest.resource.ResourceContainer, SocialRest, SpaceRestResources

public class SpaceRestResourcesV1 extends Object implements SpaceRestResources
  • Constructor Summary

    Constructors
    Constructor
    Description
    SpaceRestResourcesV1(ActivityRestResourcesV1 activityRestResourcesV1, org.exoplatform.social.core.space.spi.SpaceService spaceService, org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.upload.UploadService uploadService, org.exoplatform.social.metadata.thumbnail.ImageThumbnailService imageThumbnailService, io.meeds.portal.security.service.SecuritySettingService securitySettingService)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    javax.ws.rs.core.Response
    createSpace(javax.ws.rs.core.UriInfo uriInfo, String expand, SpaceEntity model)
    Process to create a new space
    javax.ws.rs.core.Response
    declineExternalInvitations(javax.ws.rs.core.UriInfo uriInfo, String invitationId)
     
    javax.ws.rs.core.Response
    deleteSpaceById(javax.ws.rs.core.UriInfo uriInfo, String id, String expand)
    Process to delete a space by id
    javax.ws.rs.core.Response
    getSpaceActivitiesById(javax.ws.rs.core.UriInfo uriInfo, String id, int offset, int limit, String before, String after, boolean returnSize, String expand)
    Deprecated.
    javax.ws.rs.core.Response
    getSpaceAvatarById(javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.Request request, String lastModified, String id, boolean byId, String size, String token)
     
    javax.ws.rs.core.Response
    getSpaceBannerById(javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.Request request, String lastModified, String id, boolean byId, String token)
     
    javax.ws.rs.core.Response
    getSpaceByDisplayName(javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.Request request, String displayName, String expand)
    Process to return a space by display name
    javax.ws.rs.core.Response
    getSpaceByGroupSuffix(javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.Request request, String groupSuffix, String expand)
     
    javax.ws.rs.core.Response
    getSpaceById(javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.Request request, String id, String expand)
    Process to return a space by id
    javax.ws.rs.core.Response
    getSpaceByPrettyName(javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.Request request, String prettyName, String expand)
    Process to return a space by pretty name
    javax.ws.rs.core.Response
    getSpaceExternalInvitations(javax.ws.rs.core.UriInfo uriInfo, String id)
     
    javax.ws.rs.core.Response
    getSpaceMembers(javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.Request request, String id, String q, String role, int offset, int limit, boolean returnSize, String expand)
    Process to return a space by id
    javax.ws.rs.core.Response
    getSpaceNavigations(jakarta.servlet.http.HttpServletRequest httpRequest, javax.ws.rs.core.Request request, String spaceId)
     
    javax.ws.rs.core.Response
    getSpaces(javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.Request request, String q, String filterType, int offset, int limit, String sort, String order, boolean returnSize, boolean favorites, String expand)
    Process to return a list of space in json format
    javax.ws.rs.core.Response
    isSpaceContainsExternals(javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.Request request, String spaceId)
    Checks if a specific space contains external users
    javax.ws.rs.core.Response
    isSpaceMember(javax.ws.rs.core.UriInfo uriInfo, String id, String userId)
    Checks if is the given userId is a space member.
    javax.ws.rs.core.Response
    postActivityOnSpace(javax.ws.rs.core.UriInfo uriInfo, String id, String expand, ActivityEntity model)
    Deprecated.
    javax.ws.rs.core.Response
    restoreSpacePageLayout(javax.ws.rs.core.UriInfo uriInfo, String appId, String spaceId)
     
    javax.ws.rs.core.Response
    updateSpaceById(javax.ws.rs.core.UriInfo uriInfo, String id, String expand, SpaceEntity model)
    Process to update a space by id

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SpaceRestResourcesV1

      public SpaceRestResourcesV1(ActivityRestResourcesV1 activityRestResourcesV1, org.exoplatform.social.core.space.spi.SpaceService spaceService, org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.upload.UploadService uploadService, org.exoplatform.social.metadata.thumbnail.ImageThumbnailService imageThumbnailService, io.meeds.portal.security.service.SecuritySettingService securitySettingService)
  • Method Details

    • getSpaces

      @RolesAllowed("users") public javax.ws.rs.core.Response getSpaces(@Context javax.ws.rs.core.UriInfo uriInfo, @Context javax.ws.rs.core.Request request, String q, String filterType, int offset, int limit, String sort, String order, boolean returnSize, boolean favorites, String expand) throws Exception
      Process to return a list of space in json format
      Specified by:
      getSpaces in interface SpaceRestResources
      Parameters:
      uriInfo -
      request -
      q -
      filterType -
      offset -
      limit -
      sort -
      order -
      returnSize -
      expand -
      Returns:
      Throws:
      Exception
    • createSpace

      @RolesAllowed("users") public javax.ws.rs.core.Response createSpace(@Context javax.ws.rs.core.UriInfo uriInfo, String expand, SpaceEntity model) throws Exception
      Process to create a new space
      Specified by:
      createSpace in interface SpaceRestResources
      Parameters:
      uriInfo -
      Returns:
      Throws:
      Exception
    • isSpaceContainsExternals

      @RolesAllowed("users") public javax.ws.rs.core.Response isSpaceContainsExternals(@Context javax.ws.rs.core.UriInfo uriInfo, @Context javax.ws.rs.core.Request request, String spaceId)
      Description copied from interface: SpaceRestResources
      Checks if a specific space contains external users
      Specified by:
      isSpaceContainsExternals in interface SpaceRestResources
      Parameters:
      uriInfo -
      request -
      spaceId -
      Returns:
      space info of a space contains an external members
    • getSpaceById

      @RolesAllowed("users") public javax.ws.rs.core.Response getSpaceById(@Context javax.ws.rs.core.UriInfo uriInfo, @Context javax.ws.rs.core.Request request, String id, String expand) throws Exception
      Description copied from interface: SpaceRestResources
      Process to return a space by id
      Specified by:
      getSpaceById in interface SpaceRestResources
      Parameters:
      uriInfo -
      Returns:
      Throws:
      Exception
    • getSpaceByPrettyName

      @RolesAllowed("users") public javax.ws.rs.core.Response getSpaceByPrettyName(@Context javax.ws.rs.core.UriInfo uriInfo, @Context javax.ws.rs.core.Request request, String prettyName, String expand) throws Exception
      Description copied from interface: SpaceRestResources
      Process to return a space by pretty name
      Specified by:
      getSpaceByPrettyName in interface SpaceRestResources
      Parameters:
      uriInfo -
      prettyName -
      expand -
      Returns:
      Throws:
      Exception
    • getSpaceByGroupSuffix

      @RolesAllowed("users") public javax.ws.rs.core.Response getSpaceByGroupSuffix(@Context javax.ws.rs.core.UriInfo uriInfo, @Context javax.ws.rs.core.Request request, String groupSuffix, String expand)
    • getSpaceByDisplayName

      @RolesAllowed("users") public javax.ws.rs.core.Response getSpaceByDisplayName(@Context javax.ws.rs.core.UriInfo uriInfo, @Context javax.ws.rs.core.Request request, String displayName, String expand) throws Exception
      Description copied from interface: SpaceRestResources
      Process to return a space by display name
      Specified by:
      getSpaceByDisplayName in interface SpaceRestResources
      Parameters:
      uriInfo -
      displayName -
      expand -
      Returns:
      Throws:
      Exception
    • getSpaceAvatarById

      public javax.ws.rs.core.Response getSpaceAvatarById(@Context javax.ws.rs.core.UriInfo uriInfo, @Context javax.ws.rs.core.Request request, String lastModified, String id, boolean byId, String size, String token) throws IOException
      Throws:
      IOException
    • getSpaceBannerById

      public javax.ws.rs.core.Response getSpaceBannerById(@Context javax.ws.rs.core.UriInfo uriInfo, @Context javax.ws.rs.core.Request request, String lastModified, String id, boolean byId, String token) throws IOException
      Throws:
      IOException
    • updateSpaceById

      @RolesAllowed("users") public javax.ws.rs.core.Response updateSpaceById(@Context javax.ws.rs.core.UriInfo uriInfo, String id, String expand, SpaceEntity model) throws Exception
      Process to update a space by id
      Specified by:
      updateSpaceById in interface SpaceRestResources
      Parameters:
      uriInfo -
      Returns:
      Throws:
      Exception
    • deleteSpaceById

      @RolesAllowed("users") public javax.ws.rs.core.Response deleteSpaceById(@Context javax.ws.rs.core.UriInfo uriInfo, String id, String expand) throws Exception
      Process to delete a space by id
      Specified by:
      deleteSpaceById in interface SpaceRestResources
      Parameters:
      uriInfo -
      Returns:
      Throws:
      Exception
    • getSpaceMembers

      @RolesAllowed("users") public javax.ws.rs.core.Response getSpaceMembers(@Context javax.ws.rs.core.UriInfo uriInfo, @Context javax.ws.rs.core.Request request, String id, String q, String role, int offset, int limit, boolean returnSize, String expand) throws Exception
      Process to return a space by id
      Specified by:
      getSpaceMembers in interface SpaceRestResources
      Parameters:
      uriInfo -
      Returns:
      Throws:
      Exception
    • isSpaceMember

      @RolesAllowed("users") public javax.ws.rs.core.Response isSpaceMember(@Context javax.ws.rs.core.UriInfo uriInfo, String id, String userId)
      Checks if is the given userId is a space member.
      Parameters:
      uriInfo - the uri info
      id - the space id
      userId - the user id
      Returns:
      the response
    • getSpaceNavigations

      @RolesAllowed("users") public javax.ws.rs.core.Response getSpaceNavigations(@Context jakarta.servlet.http.HttpServletRequest httpRequest, @Context javax.ws.rs.core.Request request, String spaceId)
    • restoreSpacePageLayout

      @RolesAllowed("users") public javax.ws.rs.core.Response restoreSpacePageLayout(@Context javax.ws.rs.core.UriInfo uriInfo, String appId, String spaceId)
    • getSpaceActivitiesById

      @RolesAllowed("users") @Deprecated public javax.ws.rs.core.Response getSpaceActivitiesById(@Context javax.ws.rs.core.UriInfo uriInfo, String id, int offset, int limit, String before, String after, boolean returnSize, String expand)
      Deprecated.
    • postActivityOnSpace

      @RolesAllowed("users") @Deprecated public javax.ws.rs.core.Response postActivityOnSpace(@Context javax.ws.rs.core.UriInfo uriInfo, String id, String expand, ActivityEntity model)
      Deprecated.
    • getSpaceExternalInvitations

      @RolesAllowed("users") public javax.ws.rs.core.Response getSpaceExternalInvitations(@Context javax.ws.rs.core.UriInfo uriInfo, String id)
    • declineExternalInvitations

      @RolesAllowed("users") public javax.ws.rs.core.Response declineExternalInvitations(@Context javax.ws.rs.core.UriInfo uriInfo, String invitationId)