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.Initialization
Default 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 void
createCategory(Category category)
String
createPost(PostDetail post)
String
createPost(PostDetail post, org.silverpeas.core.pdc.pdc.model.PdcClassification classification)
void
deleteCategory(String id, String instanceId)
void
deletePost(String postId, String instanceId)
void
draftOutPost(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)
Category
getCategory(org.silverpeas.core.node.model.NodePK pk)
protected org.silverpeas.core.comment.service.CommentService
getCommentService()
Gets a DefaultCommentService instance.org.silverpeas.core.util.LocalizationBundle
getComponentMessages(String language)
org.silverpeas.core.util.SettingBundle
getComponentSettings()
Optional<PostDetail>
getContributionById(org.silverpeas.core.contribution.model.ContributionIdentifier contributionId)
Date
getDateEvent(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)
void
indexBlog(String componentId)
void
init()
boolean
isRelatedTo(String instanceId)
boolean
isSubscribed(String userId, String instanceId)
void
sendSubscriptionsNotification(org.silverpeas.core.node.model.NodePK fatherPK, PostDetail post, org.silverpeas.core.comment.model.Comment comment, String type, String senderId)
void
updateCategory(Category category)
void
updatePost(PostDetail post)
-
-
-
Method Detail
-
init
public void init()
- Specified by:
init
in interfaceorg.silverpeas.core.initialization.Initialization
-
getContributionById
public Optional<PostDetail> getContributionById(org.silverpeas.core.contribution.model.ContributionIdentifier contributionId)
- Specified by:
getContributionById
in interfaceorg.silverpeas.core.ApplicationService
- Specified by:
getContributionById
in interfaceBlogService
-
getComponentSettings
public org.silverpeas.core.util.SettingBundle getComponentSettings()
- Specified by:
getComponentSettings
in interfaceorg.silverpeas.core.ApplicationService
-
getComponentMessages
public org.silverpeas.core.util.LocalizationBundle getComponentMessages(String language)
- Specified by:
getComponentMessages
in interfaceorg.silverpeas.core.ApplicationService
-
isRelatedTo
public boolean isRelatedTo(String instanceId)
- Specified by:
isRelatedTo
in interfaceorg.silverpeas.core.ApplicationService
-
getDateEvent
public Date getDateEvent(String pubId)
- Specified by:
getDateEvent
in interfaceBlogService
-
createPost
public String createPost(PostDetail post)
- Specified by:
createPost
in interfaceBlogService
-
createPost
public String createPost(PostDetail post, org.silverpeas.core.pdc.pdc.model.PdcClassification classification)
- Specified by:
createPost
in 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:
sendSubscriptionsNotification
in interfaceBlogService
-
updatePost
public void updatePost(PostDetail post)
- Specified by:
updatePost
in interfaceBlogService
-
deletePost
public void deletePost(String postId, String instanceId)
- Specified by:
deletePost
in interfaceBlogService
-
getAllPosts
public Collection<PostDetail> getAllPosts(String instanceId)
- Specified by:
getAllPosts
in interfaceBlogService
-
getAllValidPosts
public Collection<PostDetail> getAllValidPosts(String instanceId, int nbReturned)
- Specified by:
getAllValidPosts
in interfaceBlogService
-
getPostsByCategory
public Collection<PostDetail> getPostsByCategory(String categoryId, String instanceId)
- Specified by:
getPostsByCategory
in interfaceBlogService
-
getPostsByDate
public Collection<PostDetail> getPostsByDate(String date, String instanceId)
- Specified by:
getPostsByDate
in interfaceBlogService
-
getPostsByArchive
public Collection<PostDetail> getPostsByArchive(String beginDate, String endDate, String instanceId)
- Specified by:
getPostsByArchive
in interfaceBlogService
-
getResultSearch
public Collection<PostDetail> getResultSearch(String word, String userId, String instanceId)
- Specified by:
getResultSearch
in interfaceBlogService
-
createCategory
public void createCategory(Category category)
- Specified by:
createCategory
in interfaceBlogService
-
updateCategory
public void updateCategory(Category category)
- Specified by:
updateCategory
in interfaceBlogService
-
deleteCategory
public void deleteCategory(String id, String instanceId)
- Specified by:
deleteCategory
in interfaceBlogService
-
getCategory
public Category getCategory(org.silverpeas.core.node.model.NodePK pk)
- Specified by:
getCategory
in interfaceBlogService
-
getAllCategories
public Collection<org.silverpeas.core.node.model.NodeDetail> getAllCategories(String instanceId)
- Specified by:
getAllCategories
in interfaceBlogService
-
getAllArchives
public Collection<Archive> getAllArchives(String instanceId)
- Specified by:
getAllArchives
in interfaceBlogService
-
indexBlog
public void indexBlog(String componentId)
- Specified by:
indexBlog
in interfaceBlogService
-
isSubscribed
public boolean isSubscribed(String userId, String instanceId)
- Specified by:
isSubscribed
in interfaceBlogService
-
draftOutPost
public void draftOutPost(PostDetail post)
- Specified by:
draftOutPost
in interfaceBlogService
-
getCommentService
protected org.silverpeas.core.comment.service.CommentService getCommentService()
Gets a DefaultCommentService instance.- Returns:
- a DefaultCommentService instance.
-
-