com.silverpeas.blog.control
Class DefaultBlogService
java.lang.Object
  
com.silverpeas.blog.control.DefaultBlogService
- All Implemented Interfaces: 
 - BlogService, com.silverpeas.SilverpeasComponentService<PostDetail>
 
@Named(value="blogService")
public class DefaultBlogService
- extends Object
- implements BlogService
  
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.
 
 
| 
Method Summary | 
 void | 
addSubscription(String userId,
                String instanceId)
 
            | 
 String | 
createCategory(Category category)
 
            | 
 String | 
createPost(PostDetail post)
 
            | 
 String | 
createPost(PostDetail post,
           com.silverpeas.pdc.model.PdcClassification classification)
 
            | 
 void | 
deleteCategory(String id,
               String instanceId)
 
            | 
 void | 
deletePost(String postId,
           String instanceId)
 
            | 
 void | 
draftOutPost(PostDetail post)
 
            | 
 void | 
externalElementsOfPublicationHaveChanged(com.stratelia.webactiv.util.publication.model.PublicationPK pubPK,
                                         String userId)
 
            | 
 Collection<Archive> | 
getAllArchives(String instanceId)
 
            | 
 Collection<com.stratelia.webactiv.util.node.model.NodeDetail> | 
getAllCategories(String instanceId)
 
            | 
 Collection<PostDetail> | 
getAllPosts(String instanceId)
 
            | 
 Collection<PostDetail> | 
getAllValidPosts(String instanceId,
                 int nbReturned)
 
            | 
 Category | 
getCategory(com.stratelia.webactiv.util.node.model.NodePK pk)
 
            | 
protected  com.silverpeas.comment.service.CommentService | 
getCommentService()
 
          Gets a DefaultCommentService instance. | 
 com.stratelia.webactiv.util.ResourceLocator | 
getComponentMessages(String language)
 
            | 
 com.stratelia.webactiv.util.ResourceLocator | 
getComponentSettings()
 
            | 
 PostDetail | 
getContentById(String contentId)
 
            | 
 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 spaceId,
                String instanceId)
 
            | 
 void | 
indexBlog(String componentId)
 
            | 
 void | 
initialize()
 
          Initializes this service by registering itself among Silverpeas core services as interested by
 events. | 
 boolean | 
isSubscribed(String userId,
             String instanceId)
 
            | 
 void | 
release()
 
          Releases all the resources required by this service. | 
 void | 
removeSubscription(String userId,
                   String instanceId)
 
            | 
 void | 
sendSubscriptionsNotification(com.stratelia.webactiv.util.node.model.NodePK fatherPK,
                              PostDetail post,
                              com.silverpeas.comment.model.Comment comment,
                              String type,
                              String senderId)
 
            | 
 void | 
updateCategory(Category category)
 
            | 
 void | 
updatePost(PostDetail post)
 
            | 
 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
COMPONENT_NAME
public static final String COMPONENT_NAME
- See Also:
 - Constant Field Values
 
DefaultBlogService
public DefaultBlogService()
initialize
@PostConstruct
public void initialize()
- Initializes this service by registering itself among Silverpeas core services as interested by
 events.
 
 
 
release
@PreDestroy
public void release()
- Releases all the resources required by this service. For instance, it unregisters from the
 Silverpeas core services.
 
 
 
getContentById
public PostDetail getContentById(String contentId)
- Specified by:
 getContentById in interface com.silverpeas.SilverpeasComponentService<PostDetail>
 
 
getComponentSettings
public com.stratelia.webactiv.util.ResourceLocator getComponentSettings()
- Specified by:
 getComponentSettings in interface com.silverpeas.SilverpeasComponentService<PostDetail>
 
 
getComponentMessages
public com.stratelia.webactiv.util.ResourceLocator getComponentMessages(String language)
- Specified by:
 getComponentMessages in interface com.silverpeas.SilverpeasComponentService<PostDetail>
 
 
getDateEvent
public Date getDateEvent(String pubId)
- Specified by:
 getDateEvent in interface BlogService
 
 
createPost
public String createPost(PostDetail post)
- Specified by:
 createPost in interface BlogService
 
 
createPost
public String createPost(PostDetail post,
                         com.silverpeas.pdc.model.PdcClassification classification)
- Specified by:
 createPost in interface BlogService
 
 
sendSubscriptionsNotification
public void sendSubscriptionsNotification(com.stratelia.webactiv.util.node.model.NodePK fatherPK,
                                          PostDetail post,
                                          com.silverpeas.comment.model.Comment comment,
                                          String type,
                                          String senderId)
- Specified by:
 sendSubscriptionsNotification in interface BlogService
 
 
updatePost
public void updatePost(PostDetail post)
- Specified by:
 updatePost in interface BlogService
 
 
deletePost
public void deletePost(String postId,
                       String instanceId)
- Specified by:
 deletePost in interface BlogService
 
 
getAllPosts
public Collection<PostDetail> getAllPosts(String instanceId)
- Specified by:
 getAllPosts in interface BlogService
 
 
getAllValidPosts
public Collection<PostDetail> getAllValidPosts(String instanceId,
                                               int nbReturned)
- Specified by:
 getAllValidPosts in interface BlogService
 
 
getPostsByCategory
public Collection<PostDetail> getPostsByCategory(String categoryId,
                                                 String instanceId)
- Specified by:
 getPostsByCategory in interface BlogService
 
 
getPostsByDate
public Collection<PostDetail> getPostsByDate(String date,
                                             String instanceId)
- Specified by:
 getPostsByDate in interface BlogService
 
 
getPostsByArchive
public Collection<PostDetail> getPostsByArchive(String beginDate,
                                                String endDate,
                                                String instanceId)
- Specified by:
 getPostsByArchive in interface BlogService
 
 
getResultSearch
public Collection<PostDetail> getResultSearch(String word,
                                              String userId,
                                              String spaceId,
                                              String instanceId)
- Specified by:
 getResultSearch in interface BlogService
 
 
createCategory
public String createCategory(Category category)
- Specified by:
 createCategory in interface BlogService
 
 
updateCategory
public void updateCategory(Category category)
- Specified by:
 updateCategory in interface BlogService
 
 
deleteCategory
public void deleteCategory(String id,
                           String instanceId)
- Specified by:
 deleteCategory in interface BlogService
 
 
getCategory
public Category getCategory(com.stratelia.webactiv.util.node.model.NodePK pk)
- Specified by:
 getCategory in interface BlogService
 
 
getAllCategories
public Collection<com.stratelia.webactiv.util.node.model.NodeDetail> getAllCategories(String instanceId)
- Specified by:
 getAllCategories in interface BlogService
 
 
getAllArchives
public Collection<Archive> getAllArchives(String instanceId)
- Specified by:
 getAllArchives in interface BlogService
 
 
indexBlog
public void indexBlog(String componentId)
- Specified by:
 indexBlog in interface BlogService
 
 
addSubscription
public void addSubscription(String userId,
                            String instanceId)
- Specified by:
 addSubscription in interface BlogService
 
 
removeSubscription
public void removeSubscription(String userId,
                               String instanceId)
- Specified by:
 removeSubscription in interface BlogService
 
 
isSubscribed
public boolean isSubscribed(String userId,
                            String instanceId)
- Specified by:
 isSubscribed in interface BlogService
 
 
externalElementsOfPublicationHaveChanged
public void externalElementsOfPublicationHaveChanged(com.stratelia.webactiv.util.publication.model.PublicationPK pubPK,
                                                     String userId)
- Specified by:
 externalElementsOfPublicationHaveChanged in interface BlogService
 
 
draftOutPost
public void draftOutPost(PostDetail post)
- Specified by:
 draftOutPost in interface BlogService
 
 
getCommentService
protected com.silverpeas.comment.service.CommentService getCommentService()
- Gets a DefaultCommentService instance.
 
- Returns:
 - a DefaultCommentService instance.
 
 
 
Copyright © 2016 Silverpeas. All Rights Reserved.