Search in sources :

Example 1 with GetBlogPostsCannedQuery

use of org.alfresco.repo.blog.cannedqueries.GetBlogPostsCannedQuery in project alfresco-repository by Alfresco.

the class BlogServiceImpl method getPublished.

@Override
public PagingResults<BlogPostInfo> getPublished(NodeRef blogContainerNode, Date fromDate, Date toDate, String byUser, PagingRequest pagingReq) {
    ParameterCheck.mandatory("blogContainerNode", blogContainerNode);
    ParameterCheck.mandatory("pagingReq", pagingReq);
    // get canned query
    GetBlogPostsCannedQuery cq = (GetBlogPostsCannedQuery) publishedPostsCannedQueryFactory.getGetPublishedCannedQuery(blogContainerNode, fromDate, toDate, byUser, pagingReq);
    // execute canned query
    CannedQueryResults<BlogEntity> results = cq.execute();
    return wrap(results, blogContainerNode);
}
Also used : BlogEntity(org.alfresco.repo.blog.cannedqueries.BlogEntity) GetBlogPostsCannedQuery(org.alfresco.repo.blog.cannedqueries.GetBlogPostsCannedQuery)

Example 2 with GetBlogPostsCannedQuery

use of org.alfresco.repo.blog.cannedqueries.GetBlogPostsCannedQuery in project alfresco-repository by Alfresco.

the class BlogServiceImpl method getDrafts.

@Override
public PagingResults<BlogPostInfo> getDrafts(NodeRef blogContainerNode, String username, PagingRequest pagingReq) {
    ParameterCheck.mandatory("blogContainerNode", blogContainerNode);
    ParameterCheck.mandatory("pagingReq", pagingReq);
    // get canned query
    GetBlogPostsCannedQuery cq = (GetBlogPostsCannedQuery) draftPostsCannedQueryFactory.getGetDraftsCannedQuery(blogContainerNode, username, pagingReq);
    // execute canned query
    CannedQueryResults<BlogEntity> results = cq.execute();
    return wrap(results, blogContainerNode);
}
Also used : BlogEntity(org.alfresco.repo.blog.cannedqueries.BlogEntity) GetBlogPostsCannedQuery(org.alfresco.repo.blog.cannedqueries.GetBlogPostsCannedQuery)

Aggregations

BlogEntity (org.alfresco.repo.blog.cannedqueries.BlogEntity)2 GetBlogPostsCannedQuery (org.alfresco.repo.blog.cannedqueries.GetBlogPostsCannedQuery)2