mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ALF-9385. Separation of taggingService from Blog CannedQueries.
Initial implementation provides separate 'findTaggedBlogPosts' method and removes taggingService from the CQs. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@28816 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -56,17 +56,14 @@ public class DraftsAndPublishedBlogPostsCannedQuery extends AbstractCannedQueryP
|
||||
private static final String QUERY_SELECT_GET_BLOGS = "select_GetBlogsCannedQuery";
|
||||
|
||||
private final CannedQueryDAO cannedQueryDAO;
|
||||
private final TaggingService taggingService;
|
||||
|
||||
public DraftsAndPublishedBlogPostsCannedQuery(
|
||||
CannedQueryDAO cannedQueryDAO,
|
||||
TaggingService taggingService,
|
||||
MethodSecurityBean<BlogPostInfo> methodSecurity,
|
||||
CannedQueryParameters params)
|
||||
{
|
||||
super(params, methodSecurity);
|
||||
this.cannedQueryDAO = cannedQueryDAO;
|
||||
this.taggingService = taggingService;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -80,7 +77,6 @@ public class DraftsAndPublishedBlogPostsCannedQuery extends AbstractCannedQueryP
|
||||
|
||||
DraftsAndPublishedBlogPostsCannedQueryParams paramBean = (DraftsAndPublishedBlogPostsCannedQueryParams) paramBeanObj;
|
||||
String requestedCreator = paramBean.getCmCreator();
|
||||
String requestedTag = paramBean.getTag();
|
||||
Date createdFromDate = paramBean.getCreatedFromDate();
|
||||
Date createdToDate = paramBean.getCreatedToDate();
|
||||
|
||||
@@ -135,13 +131,6 @@ public class DraftsAndPublishedBlogPostsCannedQuery extends AbstractCannedQueryP
|
||||
}
|
||||
}
|
||||
|
||||
// TODO review use-case and either remove or push-down
|
||||
// Only return blog posts tagged with the specified tag string.
|
||||
if (requestedTag != null && !taggingService.getTags(result.getNode().getNodeRef()).contains(requestedTag))
|
||||
{
|
||||
nextNodeIsAcceptable = false;
|
||||
}
|
||||
|
||||
if (nextNodeIsAcceptable)
|
||||
{
|
||||
filtered.add(result);
|
||||
|
Reference in New Issue
Block a user