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 instanceId, String id)
void
deletePost(String instanceId, String postId)
void
draftOutPost(PostDetail post)
Collection<Archive>
getAllArchives(String instanceId)
Collection<org.silverpeas.core.node.model.NodeDetail>
getAllCategories(String instanceId)
Collection<PostDetail>
getAllPosts(String instanceId)
Category
getCategory(org.silverpeas.core.node.model.NodePK pk)
protected org.silverpeas.core.comment.service.CommentService
getCommentService()
Gets a DefaultCommentService instance.org.silverpeas.kernel.bundle.LocalizationBundle
getComponentMessages(String language)
org.silverpeas.kernel.bundle.SettingBundle
getComponentSettings()
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)
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, org.silverpeas.core.pdc.pdc.model.PdcClassification classification)
-
-
-
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.kernel.bundle.SettingBundle getComponentSettings()
- Specified by:
getComponentSettings
in interfaceorg.silverpeas.core.ApplicationService
-
getComponentMessages
public org.silverpeas.kernel.bundle.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
-
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, org.silverpeas.core.pdc.pdc.model.PdcClassification classification)
- Specified by:
updatePost
in interfaceBlogService
-
deletePost
public void deletePost(String instanceId, String postId)
- Specified by:
deletePost
in interfaceBlogService
-
getLastPosts
public Collection<PostDetail> getLastPosts(String instanceId, BlogFilters filters)
- Specified by:
getLastPosts
in interfaceBlogService
-
getAllPosts
public Collection<PostDetail> getAllPosts(String instanceId)
- Specified by:
getAllPosts
in interfaceBlogService
-
getLastValidPosts
public Collection<PostDetail> getLastValidPosts(String instanceId, BlogFilters filters)
- Specified by:
getLastValidPosts
in interfaceBlogService
-
getPostsByCategory
public Collection<PostDetail> getPostsByCategory(String instanceId, String categoryId, BlogFilters filters)
- Specified by:
getPostsByCategory
in interfaceBlogService
-
getPostsByEventDate
public Collection<PostDetail> getPostsByEventDate(String instanceId, String date, BlogFilters filters)
- Specified by:
getPostsByEventDate
in interfaceBlogService
-
getPostsByArchive
public Collection<PostDetail> getPostsByArchive(String instanceId, String beginDate, String endDate, BlogFilters filters)
- Specified by:
getPostsByArchive
in interfaceBlogService
-
getResultSearch
public Collection<PostDetail> getResultSearch(String instanceId, String word, String userId, BlogFilters filters)
- 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 instanceId, String id)
- 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.
-
-