Package lumis.service.userpost
Class UserPostResource
- java.lang.Object
-
- lumis.service.userpost.UserPostResource
-
-
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(String postContentId)
Deletes an user post by it's contentId and all related activities.void
edit(HttpServletResponse response, String userPostContentId, String pageId)
Redirects to the edit post page.String
getPublishToPrincipals(String serviceInstanceId, String term, Integer maxResults)
Returns a list of options to choose when selecting the publish to principals field, given a term to search for.String
getUrlMetaInformation(String url)
Given a url returns the meta information extracted from the url.String
getUsers(String serviceInstanceId, String query)
Returns a list of user information given a query string.
-
-
-
Method Detail
-
getUrlMetaInformation
@Path("/geturlmetainformation") @GET @Produces("application/json") public String getUrlMetaInformation(@QueryParam("url") @NotNull 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 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 HttpServletResponse response, @QueryParam("userPostContentId") @NotNull String userPostContentId, @QueryParam("pageId") @NotNull String pageId) throws PortalException, 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
IOException
- Since:
- 10.1.1
-
getUsers
@Path("/getusers") @GET @Produces("application/json") public String getUsers(@QueryParam("si") @Size(min=1) String serviceInstanceId, @QueryParam("query") @NotNull String query) throws PortalException, 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
SQLException
- Since:
- 14.1.1
- See Also:
IUserManagerSPI.findUsers(String)
-
getPublishToPrincipals
@Path("/getpublishtoprincipals") @GET @Produces("application/json") public String getPublishToPrincipals(@QueryParam("serviceInstanceId") @Size(min=1) String serviceInstanceId, @QueryParam("term") String term, @QueryParam("maxResults") @DefaultValue("5") @Min(0L) @Max(50L) 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
-
-