Package lumis.service.userpost
Class UserPostResource
- java.lang.Object
-
- lumis.service.userpost.UserPostResource
-
@Path("/lumis/service/userpost/rest") public class UserPostResource extends java.lang.Object
Supports post ajax calls.- Since:
- 10.1.0
- Version:
- $Revision$ $Date$
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
UserPostResource.UserPermissions
-
Constructor Summary
Constructors Constructor Description UserPostResource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deletePost(@NotNull java.lang.String postContentId)
Deletes an user post by it's contentId and all related activities.void
edit(javax.servlet.http.HttpServletResponse response, @NotNull java.lang.String userPostContentId, @NotNull java.lang.String pageId)
Redirects to the edit post page.java.lang.String
getPublishToPrincipals(@Size(min=1) java.lang.String serviceInstanceId, java.lang.String term, @Min(0L) @Max(50L) java.lang.Integer maxResults)
Returns a list of options to choose when selecting the publish to principals field, given a term to search for.java.lang.String
getUrlMetaInformation(@NotNull java.lang.String url)
Given a url returns the meta information extracted from the url.java.lang.String
getUsers(@Size(min=1) java.lang.String serviceInstanceId, @NotNull java.lang.String query)
Returns a list of user information given a query string.
-
-
-
Method Detail
-
getUrlMetaInformation
@Path("/geturlmetainformation") @GET @Produces("application/json") public java.lang.String getUrlMetaInformation(@QueryParam("url") @NotNull @NotNull java.lang.String url) throws PortalException
Given a url returns the meta information extracted from the url.- Parameters:
url
- the url to retrieve meta information from- Returns:
- a json object with meta information
- Throws:
PortalException
- Since:
- 10.1.0
-
deletePost
@DELETE @Path("/posts/{postContentId:[A-F0-9]{32}}") public void deletePost(@PathParam("postContentId") @NotNull @NotNull java.lang.String postContentId) throws PortalException
Deletes an user post by it's contentId and all related activities.- Parameters:
postContentId
- user post's contentId.- Throws:
PortalException
- Since:
- 10.1.0
-
edit
@Path("/edit") @GET public void edit(@Context javax.servlet.http.HttpServletResponse response, @QueryParam("userPostContentId") @NotNull @NotNull java.lang.String userPostContentId, @QueryParam("pageId") @NotNull @NotNull java.lang.String pageId) throws PortalException, java.io.IOException
Redirects to the edit post page.- Parameters:
response
- the http response.userPostContentId
- the content identifier of the post to be edited.pageId
- the page identifier from where the edit is being called.- Throws:
PortalException
java.io.IOException
- Since:
- 10.1.1
-
getUsers
@Path("/getusers") @GET @Produces("application/json") public java.lang.String getUsers(@QueryParam("si") @Size(min=1) @Size(min=1) java.lang.String serviceInstanceId, @QueryParam("query") @NotNull @NotNull java.lang.String query) throws PortalException, java.sql.SQLException
Returns a list of user information given a query string. The search is applied to the user login and user name.- Parameters:
query
- query used to search users.- Returns:
- List of users which matches the search query.
- Throws:
PortalException
java.sql.SQLException
- Since:
- 14.1.1
- See Also:
IUserManagerSPI.findUsers(String)
-
getPublishToPrincipals
@Path("/getpublishtoprincipals") @GET @Produces("application/json") public java.lang.String getPublishToPrincipals(@QueryParam("serviceInstanceId") @Size(min=1) @Size(min=1) java.lang.String serviceInstanceId, @QueryParam("term") java.lang.String term, @QueryParam("maxResults") @DefaultValue("5") @Min(0L) @Max(50L) @Min(0L) @Max(50L) java.lang.Integer maxResults) throws PortalException
Returns a list of options to choose when selecting the publish to principals field, given a term to search for.- Parameters:
term
- term used to search for principals.- Returns:
- List of principals which matches the search term.
- Throws:
PortalException
- Since:
- 14.1.1
-
-