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 id, String instanceId)voiddeletePost(String postId, String instanceId)voiddraftOutPost(PostDetail post)Collection<Archive>getAllArchives(String instanceId)Collection<org.silverpeas.core.node.model.NodeDetail>getAllCategories(String instanceId)Collection<PostDetail>getAllPosts(String instanceId)Collection<PostDetail>getAllValidPosts(String instanceId, int nbReturned)CategorygetCategory(org.silverpeas.core.node.model.NodePK pk)protected org.silverpeas.core.comment.service.CommentServicegetCommentService()Gets a DefaultCommentService instance.org.silverpeas.core.util.LocalizationBundlegetComponentMessages(String language)org.silverpeas.core.util.SettingBundlegetComponentSettings()Optional<PostDetail>getContributionById(org.silverpeas.core.contribution.model.ContributionIdentifier contributionId)DategetDateEvent(String pubId)Collection<PostDetail>getPostsByArchive(String beginDate, String endDate, String instanceId)Collection<PostDetail>getPostsByCategory(String categoryId, String instanceId)Collection<PostDetail>getPostsByDate(String date, String instanceId)Collection<PostDetail>getResultSearch(String word, String userId, String instanceId)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.core.util.SettingBundle getComponentSettings()
- Specified by:
getComponentSettingsin interfaceorg.silverpeas.core.ApplicationService
-
getComponentMessages
public org.silverpeas.core.util.LocalizationBundle getComponentMessages(String language)
- Specified by:
getComponentMessagesin interfaceorg.silverpeas.core.ApplicationService
-
isRelatedTo
public boolean isRelatedTo(String instanceId)
- Specified by:
isRelatedToin interfaceorg.silverpeas.core.ApplicationService
-
getDateEvent
public Date getDateEvent(String pubId)
- Specified by:
getDateEventin interfaceBlogService
-
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 postId, String instanceId)
- Specified by:
deletePostin interfaceBlogService
-
getAllPosts
public Collection<PostDetail> getAllPosts(String instanceId)
- Specified by:
getAllPostsin interfaceBlogService
-
getAllValidPosts
public Collection<PostDetail> getAllValidPosts(String instanceId, int nbReturned)
- Specified by:
getAllValidPostsin interfaceBlogService
-
getPostsByCategory
public Collection<PostDetail> getPostsByCategory(String categoryId, String instanceId)
- Specified by:
getPostsByCategoryin interfaceBlogService
-
getPostsByDate
public Collection<PostDetail> getPostsByDate(String date, String instanceId)
- Specified by:
getPostsByDatein interfaceBlogService
-
getPostsByArchive
public Collection<PostDetail> getPostsByArchive(String beginDate, String endDate, String instanceId)
- Specified by:
getPostsByArchivein interfaceBlogService
-
getResultSearch
public Collection<PostDetail> getResultSearch(String word, String userId, String instanceId)
- 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 id, String instanceId)
- 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.
-
-