com.silverpeas.blog.control
Class BlogSessionController

java.lang.Object
  extended by com.stratelia.silverpeas.peasCore.AbstractComponentSessionController
      extended by com.silverpeas.blog.control.BlogSessionController
All Implemented Interfaces:
com.stratelia.silverpeas.peasCore.ComponentSessionController

public final class BlogSessionController
extends com.stratelia.silverpeas.peasCore.AbstractComponentSessionController


Field Summary
 
Fields inherited from class com.stratelia.silverpeas.peasCore.AbstractComponentSessionController
CHARACTER_ENCODING, context
 
Constructor Summary
BlogSessionController(com.stratelia.silverpeas.peasCore.MainSessionController mainSessionCtrl, com.stratelia.silverpeas.peasCore.ComponentContext componentContext)
          Standard Session Controller Constructeur
 
Method Summary
 void addUserSubscription()
           
 void checkWriteAccessOnBlogPost()
           
 void createCategory(Category category)
           
 String createPost(String title, String categoryId, Date dateEvent, com.silverpeas.pdc.web.PdcClassificationEntity classification)
           
 void deleteCategory(String categoryId)
           
 void deletePost(String postId)
           
 void draftOutPost(String postId)
           
 Collection<Archive> getAllArchives()
           
 Collection<com.stratelia.webactiv.util.node.model.NodeDetail> getAllCategories()
           
 Collection<com.silverpeas.comment.model.Comment> getAllComments(String postId)
           
 Collection<com.silverpeas.myLinks.model.LinkDetail> getAllLinks()
           
 Category getCategory(String categoryId)
           
 com.silverpeas.comment.model.Comment getComment(String commentId)
           
protected  com.silverpeas.comment.service.CommentService getCommentService()
          Gets a DefaultCommentService instance.
 String getCurrentBeginDateAsString()
           
 String getCurrentEndDateAsString()
           
 Date getDateEvent(String pubId)
           
 String getListNodeJSON(Collection<com.stratelia.webactiv.util.node.model.NodeDetail> listNode)
          Converts the list of Delegated News into its JSON representation.
 com.silverpeas.myLinks.ejb.MyLinksBm getMyLinksBm()
           
 PostDetail getPost(String postId)
           
 Collection<PostDetail> getResultSearch(String word)
           
 String getRSSUrl()
           
 String getServerURL()
           
 StyleSheet getStyleSheet()
          Get the style sheet object.
 WallPaper getWallPaper()
          Get the wallpaper object.
 String initAlertUser(String postId)
           
 Boolean isDraftVisible()
           
 Boolean isPdcUsed()
           
 boolean isUserSubscribed()
           
 Collection<PostDetail> lastPosts()
           
 Collection<PostDetail> lastValidPosts()
           
 void nextMonth()
           
 Collection<PostDetail> postsByArchive(String theBeginDate, String theEndDate)
           
 Collection<PostDetail> postsByCategory(String categoryId)
           
 Collection<PostDetail> postsByDate(String date)
           
 void previousMonth()
           
 void removeStyleSheetFile()
          Remove the actual style sheet file.
 void removeUserSubscription()
           
 void removeWallPaperFile()
          Remove the actual wallpaper file.
 void saveStyleSheetFile(org.apache.commons.fileupload.FileItem fileItemStyleSheet)
          Save the stylesheet file.
 void saveWallPaperFile(org.apache.commons.fileupload.FileItem fileItemWallPaper)
          Save the banner file.
 void setCurrentBeginDate(String beginDate)
           
 void setCurrentEndDate(String endDate)
           
 void setStyleSheet()
          Set the name, URL, size and content of the style sheet file.
 void setWallPaper()
          Set the name, URL and size of the wallpaper file.
 void updateCategory(Category category)
           
 void updatePost(String postId, String title, String content, String categoryId, Date dateEvent)
           
 void updatePostAndDraftOut(String postId, String title, String content, String categoryId, Date dateEvent)
           
 
Methods inherited from class com.stratelia.silverpeas.peasCore.AbstractComponentSessionController
addClipboardSelection, clipboardPasteDone, close, getAlertUser, getClipboardCount, getClipboardErrorMessage, getClipboardExceptionError, getClipboardName, getClipboardObjects, getClipboardSelectedObjects, getClipboardSize, getComponentAccessController, getComponentId, getComponentLabel, getComponentName, getComponentParameters, getComponentParameterValue, getComponentParameterValue, getComponentRootName, getComponentUrl, getFavoriteSpace, getGenericPanel, getHighestSilverpeasUserRole, getIcon, getLanguage, getLastResults, getLook, getMultilang, getOrganisationController, getPersonalization, getSelection, getServerNameAndPort, getSettings, getSilverpeasUserRoles, getSpaceId, getSpaceLabel, getString, getSubscriptionContext, getUrlEncodedParameter, getUserAccessLevel, getUserAvailComponentIds, getUserAvailSpaceIds, getUserDetail, getUserDetail, getUserId, getUserManageableGroupIds, getUserManageableSpaceIds, getUserRoleLevel, getUserRoles, isAppInMaintenance, isGroupManager, isPasswordChangeAllowed, isSpaceInMaintenance, removeClipboardElement, setAppModeMaintenance, setClipboardError, setClipboardSelectedElement, setComponentRootName, setFavoriteSpaceToMainSessionController, setGenericPanel, setIconFileName, setLastResults, setMultilangFileName, setResourceFileName, setSpaceModeMaintenance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlogSessionController

public BlogSessionController(com.stratelia.silverpeas.peasCore.MainSessionController mainSessionCtrl,
                             com.stratelia.silverpeas.peasCore.ComponentContext componentContext)
Standard Session Controller Constructeur

Parameters:
mainSessionCtrl - The user's profile
componentContext - The component's profile
See Also:
Method Detail

checkWriteAccessOnBlogPost

public void checkWriteAccessOnBlogPost()

lastPosts

public Collection<PostDetail> lastPosts()

lastValidPosts

public Collection<PostDetail> lastValidPosts()

postsByCategory

public Collection<PostDetail> postsByCategory(String categoryId)

postsByArchive

public Collection<PostDetail> postsByArchive(String theBeginDate,
                                             String theEndDate)

postsByDate

public Collection<PostDetail> postsByDate(String date)

getPost

public PostDetail getPost(String postId)

createPost

public String createPost(String title,
                         String categoryId,
                         Date dateEvent,
                         com.silverpeas.pdc.web.PdcClassificationEntity classification)

updatePost

public void updatePost(String postId,
                       String title,
                       String content,
                       String categoryId,
                       Date dateEvent)

draftOutPost

public void draftOutPost(String postId)

updatePostAndDraftOut

public void updatePostAndDraftOut(String postId,
                                  String title,
                                  String content,
                                  String categoryId,
                                  Date dateEvent)

initAlertUser

public String initAlertUser(String postId)
                     throws RemoteException
Throws:
RemoteException

deletePost

public void deletePost(String postId)

getAllComments

public Collection<com.silverpeas.comment.model.Comment> getAllComments(String postId)

getComment

public com.silverpeas.comment.model.Comment getComment(String commentId)

getAllCategories

public Collection<com.stratelia.webactiv.util.node.model.NodeDetail> getAllCategories()

getCategory

public Category getCategory(String categoryId)

createCategory

public void createCategory(Category category)

deleteCategory

public void deleteCategory(String categoryId)

updateCategory

public void updateCategory(Category category)

getAllArchives

public Collection<Archive> getAllArchives()

getAllLinks

public Collection<com.silverpeas.myLinks.model.LinkDetail> getAllLinks()

getResultSearch

public Collection<PostDetail> getResultSearch(String word)

addUserSubscription

public void addUserSubscription()
                         throws RemoteException
Throws:
RemoteException

removeUserSubscription

public void removeUserSubscription()
                            throws RemoteException
Throws:
RemoteException

isUserSubscribed

public boolean isUserSubscribed()
                         throws RemoteException
Throws:
RemoteException

getRSSUrl

public String getRSSUrl()
Overrides:
getRSSUrl in class com.stratelia.silverpeas.peasCore.AbstractComponentSessionController

isPdcUsed

public Boolean isPdcUsed()

isDraftVisible

public Boolean isDraftVisible()

getCommentService

protected com.silverpeas.comment.service.CommentService getCommentService()
Gets a DefaultCommentService instance.

Returns:
a DefaultCommentService instance.

getMyLinksBm

public com.silverpeas.myLinks.ejb.MyLinksBm getMyLinksBm()

setCurrentBeginDate

public void setCurrentBeginDate(String beginDate)

setCurrentEndDate

public void setCurrentEndDate(String endDate)

getCurrentBeginDateAsString

public String getCurrentBeginDateAsString()

getCurrentEndDateAsString

public String getCurrentEndDateAsString()

getDateEvent

public Date getDateEvent(String pubId)
                  throws RemoteException
Throws:
RemoteException

nextMonth

public void nextMonth()

previousMonth

public void previousMonth()

getServerURL

public String getServerURL()

getListNodeJSON

public String getListNodeJSON(Collection<com.stratelia.webactiv.util.node.model.NodeDetail> listNode)
                       throws JAXBException
Converts the list of Delegated News into its JSON representation.

Returns:
a JSON representation of the list of Delegated News (as string)
Throws:
JAXBException

setWallPaper

public void setWallPaper()
Set the name, URL and size of the wallpaper file.


getWallPaper

public WallPaper getWallPaper()
Get the wallpaper object.

Returns:
the wallpaper object

saveWallPaperFile

public void saveWallPaperFile(org.apache.commons.fileupload.FileItem fileItemWallPaper)
                       throws BlogRuntimeException
Save the banner file.

Throws:
BlogRuntimeException

removeWallPaperFile

public void removeWallPaperFile()
Remove the actual wallpaper file.


setStyleSheet

public void setStyleSheet()
Set the name, URL, size and content of the style sheet file.


getStyleSheet

public StyleSheet getStyleSheet()
Get the style sheet object.

Returns:
style sheet object

saveStyleSheetFile

public void saveStyleSheetFile(org.apache.commons.fileupload.FileItem fileItemStyleSheet)
                        throws BlogRuntimeException
Save the stylesheet file.

Throws:
BlogRuntimeException

removeStyleSheetFile

public void removeStyleSheetFile()
Remove the actual style sheet file.



Copyright © 2016 Silverpeas. All Rights Reserved.