public class BlogServiceImpl extends Object implements BlogService
BlogService.RangedDateProperty
Modifier and Type | Field and Description |
---|---|
static String |
BLOG_COMPONENT |
Constructor and Description |
---|
BlogServiceImpl() |
Modifier and Type | Method and Description |
---|---|
BlogPostInfo |
createBlogPost(org.alfresco.service.cmr.repository.NodeRef blogContainerNode,
String blogTitle,
String blogContent,
boolean isDraft)
Creates a new blog post within the specified container node.
|
BlogPostInfo |
createBlogPost(String siteShortName,
String blogTitle,
String blogContent,
boolean isDraft)
Creates a new blog post in the specified site
|
void |
deleteBlogPost(BlogPostInfo post)
Deletes an existing
BlogPostInfo from the repository. |
org.alfresco.query.PagingResults<BlogPostInfo> |
findBlogPosts(org.alfresco.service.cmr.repository.NodeRef blogContainerNode,
BlogService.RangedDateProperty dateRange,
String tag,
org.alfresco.query.PagingRequest pagingReq)
Finds blog posts by the specified user tagged with the given tag string.
|
org.alfresco.query.PagingResults<BlogPostInfo> |
findBlogPosts(String siteShortName,
BlogService.RangedDateProperty dateRange,
String tag,
org.alfresco.query.PagingRequest pagingReq)
Finds blog posts by the specified user tagged with the given tag string.
|
BlogPostInfo |
getBlogPost(org.alfresco.service.cmr.repository.NodeRef parentNodeRef,
String postName)
Retrieves an existing
BlogPostInfo from the repository,
which is attached to the specified Node. |
BlogPostInfo |
getBlogPost(String siteShortName,
String postName)
Retrieves an existing
BlogPostInfo from the repository,
which is within a site |
org.alfresco.query.PagingResults<BlogPostInfo> |
getDrafts(org.alfresco.service.cmr.repository.NodeRef blogContainerNode,
String username,
org.alfresco.query.PagingRequest pagingReq)
Gets the draft blog posts created by the specified user.
|
org.alfresco.query.PagingResults<BlogPostInfo> |
getDrafts(String siteShortName,
String username,
org.alfresco.query.PagingRequest pagingReq)
Gets the draft blog posts created by the specified user.
|
BlogPostInfo |
getForNodeRef(org.alfresco.service.cmr.repository.NodeRef nodeRef)
For a given NodeRef corresponding to a
BlogPostInfo ,
returns the object wrapping the Node. |
org.alfresco.query.PagingResults<BlogPostInfo> |
getMyDraftsAndAllPublished(org.alfresco.service.cmr.repository.NodeRef blogContainerNode,
Date createdFrom,
Date createdTo,
org.alfresco.query.PagingRequest pagingReq)
Deprecated.
|
org.alfresco.query.PagingResults<BlogPostInfo> |
getPublished(org.alfresco.service.cmr.repository.NodeRef blogContainerNode,
Date fromDate,
Date toDate,
String byUser,
org.alfresco.query.PagingRequest pagingReq)
Gets the (internally, Alfresco-) published blog posts.
|
org.alfresco.query.PagingResults<BlogPostInfo> |
getPublished(String siteShortName,
Date fromDate,
Date toDate,
String byUser,
org.alfresco.query.PagingRequest pagingReq)
Gets the (internally, Alfresco-) published blog posts.
|
org.alfresco.query.PagingResults<BlogPostInfo> |
getPublishedExternally(org.alfresco.service.cmr.repository.NodeRef blogContainerNode,
org.alfresco.query.PagingRequest pagingReq)
Gets blog posts published externally (i.e.
|
org.alfresco.query.PagingResults<BlogPostInfo> |
getPublishedExternally(String siteShortName,
org.alfresco.query.PagingRequest pagingReq)
Gets blog posts published externally (i.e.
|
protected org.alfresco.service.cmr.repository.NodeRef |
getSiteBlogContainer(String siteShortName,
boolean create)
Fetches the Blogs Container on a site, creating as required if requested.
|
boolean |
isDraftBlogPost(org.alfresco.service.cmr.repository.NodeRef blogPostNode)
Returns true if the specified blog-post node is a 'draft' blog post.
|
void |
setCannedQueryRegistry(org.alfresco.util.registry.NamedObjectRegistry<org.alfresco.query.CannedQueryFactory<BlogPostInfo>> cannedQueryRegistry) |
void |
setContentService(ContentService contentService) |
void |
setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService) |
void |
setDraftBlogPostsCannedQueryFactory(GetBlogPostsCannedQueryFactory cannedQueryFactory) |
void |
setDraftsAndPublishedBlogPostsCannedQueryFactory(DraftsAndPublishedBlogPostsCannedQueryFactory cannedQueryFactory) |
void |
setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService) |
void |
setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService) |
void |
setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService) |
void |
setPublishedBlogPostsCannedQueryFactory(GetBlogPostsCannedQueryFactory cannedQueryFactory) |
void |
setPublishedExternallyBlogPostsCannedQueryFactory(GetBlogPostsCannedQueryFactory cannedQueryFactory) |
void |
setSearchService(org.alfresco.service.cmr.search.SearchService searchService) |
void |
setSiteService(SiteService siteService) |
void |
setTaggingService(TaggingService taggingService) |
void |
setTransactionService(TransactionService transactionService) |
BlogPostInfo |
updateBlogPost(BlogPostInfo post)
Updates an existing
BlogPostInfo in the repository. |
public static final String BLOG_COMPONENT
public void setCannedQueryRegistry(org.alfresco.util.registry.NamedObjectRegistry<org.alfresco.query.CannedQueryFactory<BlogPostInfo>> cannedQueryRegistry)
public void setDraftBlogPostsCannedQueryFactory(GetBlogPostsCannedQueryFactory cannedQueryFactory)
public void setPublishedBlogPostsCannedQueryFactory(GetBlogPostsCannedQueryFactory cannedQueryFactory)
public void setPublishedExternallyBlogPostsCannedQueryFactory(GetBlogPostsCannedQueryFactory cannedQueryFactory)
public void setDraftsAndPublishedBlogPostsCannedQueryFactory(DraftsAndPublishedBlogPostsCannedQueryFactory cannedQueryFactory)
public void setContentService(ContentService contentService)
public void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
public void setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)
public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
public void setSiteService(SiteService siteService)
public void setTransactionService(TransactionService transactionService)
public void setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService)
public void setTaggingService(TaggingService taggingService)
public void setSearchService(org.alfresco.service.cmr.search.SearchService searchService)
protected org.alfresco.service.cmr.repository.NodeRef getSiteBlogContainer(String siteShortName, boolean create)
public boolean isDraftBlogPost(org.alfresco.service.cmr.repository.NodeRef blogPostNode)
BlogService
isDraftBlogPost
in interface BlogService
blogPostNode
- a NodeRef representing a blog-post.public BlogPostInfo createBlogPost(String siteShortName, String blogTitle, String blogContent, boolean isDraft)
BlogService
createBlogPost
in interface BlogService
siteShortName
- the name of the site to add the post to.blogTitle
- the title of the blog post.blogContent
- text/html content of the blog post.isDraft
- true if the blog post is a draft post, else false.BlogPostInfo
of the newly created blog post.to retrieve the blogContainerNode
public BlogPostInfo createBlogPost(org.alfresco.service.cmr.repository.NodeRef blogContainerNode, String blogTitle, String blogContent, boolean isDraft)
BlogService
createBlogPost
in interface BlogService
blogContainerNode
- the container node for blog posts (under the site).blogTitle
- the title of the blog post.blogContent
- text/html content of the blog post.isDraft
- true if the blog post is a draft post, else false.BlogPostInfo
of the newly created blog post.to retrieve the blogContainerNode
public BlogPostInfo updateBlogPost(BlogPostInfo post)
BlogService
BlogPostInfo
in the repository.updateBlogPost
in interface BlogService
BlogPostInfo
public void deleteBlogPost(BlogPostInfo post)
BlogService
BlogPostInfo
from the repository.deleteBlogPost
in interface BlogService
public BlogPostInfo getForNodeRef(org.alfresco.service.cmr.repository.NodeRef nodeRef)
BlogService
BlogPostInfo
,
returns the object wrapping the Node.
For anything else, the response is null.getForNodeRef
in interface BlogService
public BlogPostInfo getBlogPost(String siteShortName, String postName)
BlogService
BlogPostInfo
from the repository,
which is within a sitegetBlogPost
in interface BlogService
public BlogPostInfo getBlogPost(org.alfresco.service.cmr.repository.NodeRef parentNodeRef, String postName)
BlogService
BlogPostInfo
from the repository,
which is attached to the specified Node.
The parent Node should normally be a Site ContainergetBlogPost
in interface BlogService
public org.alfresco.query.PagingResults<BlogPostInfo> getDrafts(String siteShortName, String username, org.alfresco.query.PagingRequest pagingReq)
BlogService
getDrafts
in interface BlogService
siteShortName
- the name of the site to add the post to.username
- to limit results to blogs with this cm:creator. null means all users.pagingReq
- an object defining the paging parameters for the result set.PagingResults
object containing some or all of the results (subject to paging).to retrieve the blogContainerNode
public org.alfresco.query.PagingResults<BlogPostInfo> getDrafts(org.alfresco.service.cmr.repository.NodeRef blogContainerNode, String username, org.alfresco.query.PagingRequest pagingReq)
BlogService
getDrafts
in interface BlogService
blogContainerNode
- the container node for blog posts (under the site).username
- to limit results to blogs with this cm:creator. null means all users.pagingReq
- an object defining the paging parameters for the result set.PagingResults
object containing some or all of the results (subject to paging).to retrieve the blogContainerNode
public org.alfresco.query.PagingResults<BlogPostInfo> getPublishedExternally(String siteShortName, org.alfresco.query.PagingRequest pagingReq)
BlogService
getPublishedExternally
in interface BlogService
siteShortName
- the name of the site to add the post to.pagingReq
- an object defining the paging parameters for the result set.PagingResults
object containing some or all of the results (subject to paging).to retrieve the blogContainerNode
public org.alfresco.query.PagingResults<BlogPostInfo> getPublishedExternally(org.alfresco.service.cmr.repository.NodeRef blogContainerNode, org.alfresco.query.PagingRequest pagingReq)
BlogService
getPublishedExternally
in interface BlogService
blogContainerNode
- the container node for blog posts (under the site).pagingReq
- an object defining the paging parameters for the result set.PagingResults
object containing some or all of the results (subject to paging).to retrieve the blogContainerNode
public org.alfresco.query.PagingResults<BlogPostInfo> getPublished(String siteShortName, Date fromDate, Date toDate, String byUser, org.alfresco.query.PagingRequest pagingReq)
BlogService
getPublished
in interface BlogService
siteShortName
- the name of the site to add the post to.fromDate
- an inclusive date limit for the results (more recent than).toDate
- an inclusive date limit for the results (before).byUser
- if not null limits results to posts by the specified user.
if null results will be by all users.pagingReq
- an object defining the paging parameters for the result set.PagingResults
object containing some or all of the results (subject to paging).to retrieve the blogContainerNode
public org.alfresco.query.PagingResults<BlogPostInfo> getPublished(org.alfresco.service.cmr.repository.NodeRef blogContainerNode, Date fromDate, Date toDate, String byUser, org.alfresco.query.PagingRequest pagingReq)
BlogService
getPublished
in interface BlogService
blogContainerNode
- the container node for blog posts (under the site).fromDate
- an inclusive date limit for the results (more recent than).toDate
- an inclusive date limit for the results (before).byUser
- if not null limits results to posts by the specified user.
if null results will be by all users.pagingReq
- an object defining the paging parameters for the result set.PagingResults
object containing some or all of the results (subject to paging).to retrieve the blogContainerNode
public org.alfresco.query.PagingResults<BlogPostInfo> getMyDraftsAndAllPublished(org.alfresco.service.cmr.repository.NodeRef blogContainerNode, Date createdFrom, Date createdTo, org.alfresco.query.PagingRequest pagingReq)
BlogService
getMyDraftsAndAllPublished
in interface BlogService
blogContainerNode
- the container node for blog posts (under the site).createdFrom
- an inclusive date limit for the results (more recent than).createdTo
- an inclusive date limit for the results (before).pagingReq
- an object defining the paging parameters for the result set.PagingResults
object containing some or all of the results (subject to paging).to retrieve the blogContainerNode
public org.alfresco.query.PagingResults<BlogPostInfo> findBlogPosts(String siteShortName, BlogService.RangedDateProperty dateRange, String tag, org.alfresco.query.PagingRequest pagingReq)
BlogService
DataTypeDefinition.DATE
or DataTypeDefinition.DATETIME
property. Examples include ContentModel.PROP_CREATED
or
ContentModel.PROP_PUBLISHED
.findBlogPosts
in interface BlogService
siteShortName
- the name of the site to add the post to.dateRange
- a BlogService.RangedDateProperty
parameter object. Can be null.tag
- tag string.pagingReq
- an object defining the paging parameters for the result set.PagingResults
object containing some or all of the results (subject to paging).to retrieve the blogContainerNode
public org.alfresco.query.PagingResults<BlogPostInfo> findBlogPosts(org.alfresco.service.cmr.repository.NodeRef blogContainerNode, BlogService.RangedDateProperty dateRange, String tag, org.alfresco.query.PagingRequest pagingReq)
BlogService
DataTypeDefinition.DATE
or DataTypeDefinition.DATETIME
property. Examples include ContentModel.PROP_CREATED
or
ContentModel.PROP_PUBLISHED
.findBlogPosts
in interface BlogService
blogContainerNode
- the container node for blog posts (under the site).dateRange
- a BlogService.RangedDateProperty
parameter object. Can be null.tag
- tag string.pagingReq
- an object defining the paging parameters for the result set.PagingResults
object containing some or all of the results (subject to paging).to retrieve the blogContainerNode
Copyright © 2005–2017 Alfresco Software. All rights reserved.