public class BlogSearchHelper extends Object
Modifier and Type | Method and Description |
---|---|
static org.codehaus.jackson.node.ArrayNode |
createBlogSearchJSONResult(Collection<BlogData> list,
boolean includeDescription,
boolean includeImagePath)
Creates a JSON array with JSON objects of the blog list items.
|
static org.codehaus.jackson.node.ObjectNode |
createBlogSearchJSONResult(Long blogId,
String nameIdentifier,
String title,
boolean includeImagePath)
Creates a JSON object describing a blog by its id, nameId and title
|
static org.codehaus.jackson.node.ObjectNode |
createBlogSearchJSONResult(Long blogId,
String nameIdentifier,
String title,
String description,
boolean includeImagePath)
Creates a JSON object describing a blog by its id, nameId and title
|
static org.codehaus.jackson.node.ArrayNode |
createBlogSearchJSONResult(PageableList<BlogData> list,
boolean writeSummary,
boolean includeDescription,
boolean includeImagePath)
Creates a JSON array with JSON objects of the blog list items.
|
static <E extends QueryParameters> |
findBlogs(Query<BlogData,E> query,
E queryParameters,
boolean sortAndLocalizeResult)
runs a query for blogs
|
public static org.codehaus.jackson.node.ArrayNode createBlogSearchJSONResult(Collection<BlogData> list, boolean includeDescription, boolean includeImagePath)
list
- list to processincludeDescription
- whether to include the descriptionincludeImagePath
- whether to include the path to the imagepublic static org.codehaus.jackson.node.ObjectNode createBlogSearchJSONResult(Long blogId, String nameIdentifier, String title, boolean includeImagePath)
blogId
- the blog idnameIdentifier
- the aliastitle
- the titleincludeImagePath
- whether to include the path to the imagepublic static org.codehaus.jackson.node.ObjectNode createBlogSearchJSONResult(Long blogId, String nameIdentifier, String title, String description, boolean includeImagePath)
blogId
- the blog idnameIdentifier
- the aliastitle
- the titledescription
- the blog descriptionincludeImagePath
- whether to include the path to the imagepublic static org.codehaus.jackson.node.ArrayNode createBlogSearchJSONResult(PageableList<BlogData> list, boolean writeSummary, boolean includeDescription, boolean includeImagePath)
list
- list to processwriteSummary
- whether to include a summary about the number of items in the list. The summary
will be the first item in the list.includeDescription
- whether to include the descriptionincludeImagePath
- whether to include the path to the imagepublic static <E extends QueryParameters> PageableList<BlogData> findBlogs(Query<BlogData,E> query, E queryParameters, boolean sortAndLocalizeResult)
query
- The query to use.queryParameters
- the query parameters to usesortAndLocalizeResult
- whether to localize blog titles and sort the found blogs by titleCopyright © 2019 Communote team. All rights reserved.