Class SpaceRestResourcesV1

    • Constructor Detail

      • 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)
    • Method Detail

      • 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,
                                                   String expand)
                                            throws Exception
        Process to return a list of space in json format
        Specified by:
        getSpaces in interface SpaceRestResources
        Returns:
        Throws:
        Exception
      • 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 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
      • 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 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)
      • 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
      • 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)