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 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)
  • 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
      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
      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)
      Checks if a specific space contains external users
      Specified by:
      isSpaceContainsExternals in interface SpaceRestResources
      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
      Process to return a space by id
      Specified by:
      getSpaceById in interface SpaceRestResources
      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
      Process to return a space by pretty name
      Specified by:
      getSpaceByPrettyName in interface SpaceRestResources
      Returns:
      Throws:
      Exception
    • 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
      Process to return a space by display name
      Specified by:
      getSpaceByDisplayName in interface SpaceRestResources
      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, 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, 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
      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
      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
      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 javax.servlet.http.HttpServletRequest httpRequest, @Context javax.ws.rs.core.Request request, String spaceId)
    • getSpaceApplicationsChoices

      @RolesAllowed("users") public javax.ws.rs.core.Response getSpaceApplicationsChoices()
    • addSpaceApplication

      @RolesAllowed("administrators") public javax.ws.rs.core.Response addSpaceApplication(org.exoplatform.application.registry.Application application)
    • deleteSpaceApplication

      @RolesAllowed("administrators") public javax.ws.rs.core.Response deleteSpaceApplication(String applicationName)
    • getSpaceApplications

      @RolesAllowed("users") public javax.ws.rs.core.Response getSpaceApplications(String spaceId)
    • deleteSpaceApplication

      @RolesAllowed("users") public javax.ws.rs.core.Response deleteSpaceApplication(String spaceId, String appId)
    • addSpaceApplication

      @RolesAllowed("users") public javax.ws.rs.core.Response addSpaceApplication(String spaceId, String appId)
    • moveSpaceApplicationOrder

      @RolesAllowed("users") public javax.ws.rs.core.Response moveSpaceApplicationOrder(String spaceId, String appId, int transition)
    • 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) throws Exception
      Deprecated.
      Throws:
      Exception
    • postActivityOnSpace

      @RolesAllowed("users") @Deprecated public javax.ws.rs.core.Response postActivityOnSpace(@Context javax.ws.rs.core.UriInfo uriInfo, String id, String expand, ActivityEntity model) throws Exception
      Deprecated.
      Throws:
      Exception
    • 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)