Class DefaultBlogService
- java.lang.Object
-
- org.silverpeas.components.blog.service.DefaultBlogService
-
- All Implemented Interfaces:
BlogService,org.silverpeas.core.ApplicationService,org.silverpeas.core.initialization.Initialization
@Service @Named("blogService") public class DefaultBlogService extends Object implements BlogService, org.silverpeas.core.initialization.InitializationDefault implementation of the services provided by the Blog component. It is managed by the underlying IoC container. At initialization by the IoC container, it registers itself among different services for which it is interested.
-
-
Constructor Summary
Constructors Constructor Description DefaultBlogService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreateCategory(Category category)StringcreatePost(PostDetail post)StringcreatePost(PostDetail post, org.silverpeas.core.pdc.pdc.model.PdcClassification classification)voiddeleteCategory(String instanceId, String id)voiddeletePost(String instanceId, String postId)voiddraftOutPost(PostDetail post)Collection<Archive>getAllArchives(String instanceId)Collection<org.silverpeas.core.node.model.NodeDetail>getAllCategories(String instanceId)Collection<PostDetail>getAllPosts(String instanceId)CategorygetCategory(org.silverpeas.core.node.model.NodePK pk)protected org.silverpeas.core.comment.service.CommentServicegetCommentService()Gets a DefaultCommentService instance.org.silverpeas.kernel.bundle.LocalizationBundlegetComponentMessages(String language)org.silverpeas.kernel.bundle.SettingBundlegetComponentSettings()Optional<PostDetail>getContributionById(org.silverpeas.core.contribution.model.ContributionIdentifier contributionId)Collection<PostDetail>getLastPosts(String instanceId, BlogFilters filters)Collection<PostDetail>getLastValidPosts(String instanceId, BlogFilters filters)Collection<PostDetail>getPostsByArchive(String instanceId, String beginDate, String endDate, BlogFilters filters)Collection<PostDetail>getPostsByCategory(String instanceId, String categoryId, BlogFilters filters)Collection<PostDetail>getPostsByEventDate(String instanceId, String date, BlogFilters filters)Collection<PostDetail>getResultSearch(String instanceId, String word, String userId, BlogFilters filters)voidindexBlog(String componentId)voidinit()booleanisRelatedTo(String instanceId)booleanisSubscribed(String userId, String instanceId)voidsendSubscriptionsNotification(org.silverpeas.core.node.model.NodePK fatherPK, PostDetail post, org.silverpeas.core.comment.model.Comment comment, String type, String senderId)voidupdateCategory(Category category)voidupdatePost(PostDetail post, org.silverpeas.core.pdc.pdc.model.PdcClassification classification)
-
-
-
Method Detail
-
init
public void init()
- Specified by:
initin interfaceorg.silverpeas.core.initialization.Initialization
-
getContributionById
public Optional<PostDetail> getContributionById(org.silverpeas.core.contribution.model.ContributionIdentifier contributionId)
- Specified by:
getContributionByIdin interfaceorg.silverpeas.core.ApplicationService- Specified by:
getContributionByIdin interfaceBlogService
-
getComponentSettings
public org.silverpeas.kernel.bundle.SettingBundle getComponentSettings()
- Specified by:
getComponentSettingsin interfaceorg.silverpeas.core.ApplicationService
-
getComponentMessages
public org.silverpeas.kernel.bundle.LocalizationBundle getComponentMessages(String language)
- Specified by:
getComponentMessagesin interfaceorg.silverpeas.core.ApplicationService
-
isRelatedTo
public boolean isRelatedTo(String instanceId)
- Specified by:
isRelatedToin interfaceorg.silverpeas.core.ApplicationService
-
createPost
public String createPost(PostDetail post)
- Specified by:
createPostin interfaceBlogService
-
createPost
public String createPost(PostDetail post, org.silverpeas.core.pdc.pdc.model.PdcClassification classification)
- Specified by:
createPostin interfaceBlogService
-
sendSubscriptionsNotification
public void sendSubscriptionsNotification(org.silverpeas.core.node.model.NodePK fatherPK, PostDetail post, org.silverpeas.core.comment.model.Comment comment, String type, String senderId)- Specified by:
sendSubscriptionsNotificationin interfaceBlogService
-
updatePost
public void updatePost(PostDetail post, org.silverpeas.core.pdc.pdc.model.PdcClassification classification)
- Specified by:
updatePostin interfaceBlogService
-
deletePost
public void deletePost(String instanceId, String postId)
- Specified by:
deletePostin interfaceBlogService
-
getLastPosts
public Collection<PostDetail> getLastPosts(String instanceId, BlogFilters filters)
- Specified by:
getLastPostsin interfaceBlogService
-
getAllPosts
public Collection<PostDetail> getAllPosts(String instanceId)
- Specified by:
getAllPostsin interfaceBlogService
-
getLastValidPosts
public Collection<PostDetail> getLastValidPosts(String instanceId, BlogFilters filters)
- Specified by:
getLastValidPostsin interfaceBlogService
-
getPostsByCategory
public Collection<PostDetail> getPostsByCategory(String instanceId, String categoryId, BlogFilters filters)
- Specified by:
getPostsByCategoryin interfaceBlogService
-
getPostsByEventDate
public Collection<PostDetail> getPostsByEventDate(String instanceId, String date, BlogFilters filters)
- Specified by:
getPostsByEventDatein interfaceBlogService
-
getPostsByArchive
public Collection<PostDetail> getPostsByArchive(String instanceId, String beginDate, String endDate, BlogFilters filters)
- Specified by:
getPostsByArchivein interfaceBlogService
-
getResultSearch
public Collection<PostDetail> getResultSearch(String instanceId, String word, String userId, BlogFilters filters)
- Specified by:
getResultSearchin interfaceBlogService
-
createCategory
public void createCategory(Category category)
- Specified by:
createCategoryin interfaceBlogService
-
updateCategory
public void updateCategory(Category category)
- Specified by:
updateCategoryin interfaceBlogService
-
deleteCategory
public void deleteCategory(String instanceId, String id)
- Specified by:
deleteCategoryin interfaceBlogService
-
getCategory
public Category getCategory(org.silverpeas.core.node.model.NodePK pk)
- Specified by:
getCategoryin interfaceBlogService
-
getAllCategories
public Collection<org.silverpeas.core.node.model.NodeDetail> getAllCategories(String instanceId)
- Specified by:
getAllCategoriesin interfaceBlogService
-
getAllArchives
public Collection<Archive> getAllArchives(String instanceId)
- Specified by:
getAllArchivesin interfaceBlogService
-
indexBlog
public void indexBlog(String componentId)
- Specified by:
indexBlogin interfaceBlogService
-
isSubscribed
public boolean isSubscribed(String userId, String instanceId)
- Specified by:
isSubscribedin interfaceBlogService
-
draftOutPost
public void draftOutPost(PostDetail post)
- Specified by:
draftOutPostin interfaceBlogService
-
getCommentService
protected org.silverpeas.core.comment.service.CommentService getCommentService()
Gets a DefaultCommentService instance.- Returns:
- a DefaultCommentService instance.
-
-