com.stratelia.webactiv.quickinfo.control
Class QuickInfoSessionController

java.lang.Object
  extended by com.stratelia.silverpeas.peasCore.AbstractComponentSessionController
      extended by com.stratelia.webactiv.quickinfo.control.QuickInfoSessionController
All Implemented Interfaces:
com.stratelia.silverpeas.peasCore.ComponentSessionController

public class QuickInfoSessionController
extends com.stratelia.silverpeas.peasCore.AbstractComponentSessionController

Version:
Author:
squere

Field Summary
 
Fields inherited from class com.stratelia.silverpeas.peasCore.AbstractComponentSessionController
CHARACTER_ENCODING, context
 
Constructor Summary
QuickInfoSessionController(com.stratelia.silverpeas.peasCore.MainSessionController mainSessionCtrl, com.stratelia.silverpeas.peasCore.ComponentContext componentContext)
          Creates new QuickInfoSessionController
 
Method Summary
 void close()
           
 void create(News news)
          Creates into persistence the news with minimal data.
 QuickInfoComponentSettings getInstanceSettings()
           
 News getNews(String id, boolean statVisit)
           
 News getNewsByForeignId(String foreignId)
           
 NewsByStatus getQuickInfos()
           
 com.silverpeas.thumbnail.ThumbnailSettings getThumbnailSettings()
           
 List<News> getVisibleQuickInfos()
           
 void index()
           
 boolean isNewsIdentifierFromMemory(String newsId)
          Indicates if the given news identifier is one that indicates the news is in memory only.
 boolean isPdcUsed()
           
 Boolean isSubscriberUser()
           
 String notify(String newsId)
           
 News prepareEmptyNews()
          Prepare an instance of a news that will exists only in memory if no action persistence will be applied on.
 void publish(String id)
          Publish a news represented by the given identifier.
 void remove(String id)
          Removes from persistence the news which the identifier is the one given.
 void submitNewsOnHomepage(String id)
           
 void update(String id, News updatedNews, String pdcPositions, Collection<org.silverpeas.upload.UploadedFile> uploadedFiles, boolean forcePublish)
          Updates all the data of a news.
 
Methods inherited from class com.stratelia.silverpeas.peasCore.AbstractComponentSessionController
addClipboardSelection, clipboardPasteDone, 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, getRSSUrl, 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

QuickInfoSessionController

public QuickInfoSessionController(com.stratelia.silverpeas.peasCore.MainSessionController mainSessionCtrl,
                                  com.stratelia.silverpeas.peasCore.ComponentContext componentContext)
Creates new QuickInfoSessionController

Parameters:
mainSessionCtrl -
componentContext -
Method Detail

getInstanceSettings

public QuickInfoComponentSettings getInstanceSettings()

getQuickInfos

public NewsByStatus getQuickInfos()

getVisibleQuickInfos

public List<News> getVisibleQuickInfos()

getNews

public News getNews(String id,
                    boolean statVisit)

getNewsByForeignId

public News getNewsByForeignId(String foreignId)

publish

public void publish(String id)
Publish a news represented by the given identifier.

Parameters:
id - the identifier of the news that must be published.

prepareEmptyNews

public News prepareEmptyNews()
Prepare an instance of a news that will exists only in memory if no action persistence will be applied on.

Returns:
an in memory instance of a news.

isNewsIdentifierFromMemory

public boolean isNewsIdentifierFromMemory(String newsId)
Indicates if the given news identifier is one that indicates the news is in memory only.

Parameters:
newsId - the news identifier to verify.
Returns:
true if the news identifier is one for memory use, false otherwise (id is one of persisted news).

create

public void create(News news)
Creates into persistence the news with minimal data.

Parameters:
news - the news to persist.

update

public void update(String id,
                   News updatedNews,
                   String pdcPositions,
                   Collection<org.silverpeas.upload.UploadedFile> uploadedFiles,
                   boolean forcePublish)
Updates all the data of a news.

Parameters:
id - the identifier of the news (used to load previous data).
updatedNews - the data to save.
pdcPositions - the pdc positions.
uploadedFiles - the files uploaded in the aim to be attached to the news.
forcePublish - true to indicate a publish action, false otherwise.

remove

public void remove(String id)
Removes from persistence the news which the identifier is the one given. If the given identifier corresponds to a volatile one, nothing is done.

Parameters:
id - the identifier of the news to remove from the persistence.

isPdcUsed

public boolean isPdcUsed()

close

public void close()
Overrides:
close in class com.stratelia.silverpeas.peasCore.AbstractComponentSessionController

index

public void index()
           throws RemoteException
Throws:
RemoteException

getThumbnailSettings

public com.silverpeas.thumbnail.ThumbnailSettings getThumbnailSettings()

isSubscriberUser

public Boolean isSubscriberUser()

notify

public String notify(String newsId)

submitNewsOnHomepage

public void submitNewsOnHomepage(String id)


Copyright © 2016 Silverpeas. All Rights Reserved.