|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.stratelia.silverpeas.peasCore.AbstractComponentSessionController
com.stratelia.webactiv.almanach.control.AlmanachSessionController
public class AlmanachSessionController
The AlmanachSessionController provides features to handle almanachs and theirs events. A such object wraps in fact the current almanach in the user session; in others words, the almanach on which the user works currently. As the almanach is displayed in a given window time, the AlmanachSessionController instance maintains the current opened window time and provides a way to move this window front or back in the time. The window time depends on the view mode choosen by the user: it can be a monthly view, a weekly view, and so on.
Field Summary |
---|
Fields inherited from class com.stratelia.silverpeas.peasCore.AbstractComponentSessionController |
---|
CHARACTER_ENCODING, context |
Constructor Summary | |
---|---|
AlmanachSessionController(com.stratelia.silverpeas.peasCore.MainSessionController mainSessionCtrl,
com.stratelia.silverpeas.peasCore.ComponentContext context)
Constructs a new AlmanachSessionController instance. |
Method Summary | |
---|---|
EventPK |
addEvent(EventDetail eventDetail,
Collection<org.silverpeas.upload.UploadedFile> uploadedFiles)
Adds the specified event into the underlying almanach. |
EventPK |
addEvent(EventDetail eventDetail,
Collection<org.silverpeas.upload.UploadedFile> uploadedFiles,
com.silverpeas.pdc.web.PdcClassificationEntity classification)
Adds the specified event into the underlying almanach. |
String |
buildPdf(String mode)
Builds a PDF document with the events of the underlying almanach and that satisfy the specified criteria key. |
void |
close()
|
String |
exportToICal()
Exports the current almanach in iCal format. |
List<AlmanachDTO> |
getAccessibleInstances()
Gets the others almanach instances that are accessible from the current underlying almanach instance. |
List<AlmanachDTO> |
getAggregatedAlmanachs()
Gets the almanachs that can be aggregated with the curren t underlying one. |
int |
getAgregatedAlmanachsCount()
Gets the count of almanachs agregated with the undermying one. |
protected List<EventDetail> |
getAllAgregationEvents()
Gets all events resulting of the agregation of the current almanach with others'. |
List<EventDetail> |
getAllEvents()
Gets all events of the underlying almanach. |
protected AlmanachBm |
getAlmanachBm()
Gets the remote business object for handling almanachs and events. |
AlmanachCalendarView |
getAlmanachCalendarView()
Gets a view in time of the current underlying almanach. |
AlmanachCalendarView |
getAlmanachCalendarViewOnTheNextEvents(boolean aggregated)
Gets a view on the next events that will occur and that are defined in the current underlying almanach. |
String |
getAlmanachColor(String instanceId)
Get the color of the almanach |
String |
getAlmanachICSURL()
Gets the URL of the ICS representation of the current almamach. |
Date |
getCurrentDay()
Gets the current day in the current window in time. |
EventDetail |
getCurrentEvent()
Gets the current event, selected by the user. |
EventDetail |
getEventDetail(String id)
Gets the detail of the event identified by the specified identifier. |
AlmanachCalendarView |
getMonthlyAlmanachCalendarView()
Gets a view in the current month of the current underlying almanach. |
String |
getRSSUrl()
|
int |
getSilverObjectId(String eventId)
Gets the identifier of the specified event as a Silverpeas object (an object that have a content that can be managed in Silverpeas). |
AlmanachCalendarView |
getWeekyAlmanachCalendarView()
Gets a view in the current week of the current underlying almanach. |
AlmanachCalendarView |
getYearlyAlmanachCalendarView()
Gets a view in the current year of the current underlying almanach. |
void |
indexEvent(EventDetail event)
Indexes the specified event for the Silverpeas search engine. |
String |
initAlertUser(String eventId)
|
boolean |
isAgregationUsed()
Is the agregation is activated for the current underlying almanach? |
boolean |
isAlmanachAgregated(String almanachId)
Is the specified almanach is agregated with the current underlying one. |
boolean |
isPdcUsed()
Is this almanach instance is parameterized to use the classification plan (PdC) to classify the events on it. |
boolean |
isWeekendNotVisible()
Is the weekend is taken in charge by the current underlying almanach? |
void |
nextView()
Moves the window in time to the next calendar view according to the current view mode. |
void |
prepareNewEvent(EventDetail event)
|
void |
previousView()
Moves the window in time to the previous calendar view according to the current view mode. |
void |
removeEvent(String id)
Removes the event identified by the specified identifier. |
void |
removeOccurenceEvent(EventDetail eventDetail,
String startDate)
Removes just an occurrence of the specified event. |
protected void |
setAlmanachBm(AlmanachBm anAlmanachBm)
Sets a specific reference to a remote Almanach business object |
void |
setCurrentDay(Date date)
Sets explicitly the new current day. |
void |
setCurrentEvent(EventDetail event)
Sets the current event the user has selected. |
void |
setViewMode(org.silverpeas.calendar.CalendarViewType viewMode)
Sets the current view mode of the almanach rendering. |
void |
today()
Moves the window in time in a such way the current day is now today. |
void |
updateAgregatedAlmanachs(String[] instanceIds)
Updates the list of the agregated almanachs with the specified ones. |
void |
updateEvent(EventDetail eventDetail)
Updates the specified event into the underlying almanach. |
void |
updateEventOccurence(EventDetail event,
String dateDebutIteration,
String dateFinIteration)
Update event occurence (cas particulier de modification d'une occurence d'événement périodique) |
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, 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 |
---|
public AlmanachSessionController(com.stratelia.silverpeas.peasCore.MainSessionController mainSessionCtrl, com.stratelia.silverpeas.peasCore.ComponentContext context)
mainSessionCtrl
- the main session controller of the user.context
- the context of the almanach component.Method Detail |
---|
public Date getCurrentDay()
public void setCurrentDay(Date date)
date
- the date of the new current day.public EventDetail getCurrentEvent()
public void setCurrentEvent(EventDetail event)
event
- the detail of the current selected event.public void nextView()
public void previousView()
public void today()
public void setViewMode(org.silverpeas.calendar.CalendarViewType viewMode)
viewMode
- the view mode (monthly, weekly, ...).public List<EventDetail> getAllEvents() throws AlmanachException
AlmanachException
- if an error occurs while getting the list of events.protected List<EventDetail> getAllAgregationEvents() throws AlmanachException
AlmanachException
- if an error occurs while getting the list of events.public int getAgregatedAlmanachsCount()
public EventDetail getEventDetail(String id) throws AlmanachException, AlmanachNoSuchFindEventException
id
- the unique identifier of the event to get.
AlmanachException
- if an error occurs while getting the detail of the event.
AlmanachNoSuchFindEventException
- if no event exists with a such identifier.public void removeEvent(String id) throws AlmanachException, com.stratelia.webactiv.util.exception.UtilException, org.silverpeas.wysiwyg.WysiwygException
id
- the identifier of the event to remove.
AlmanachException
- if an error occurs while removing the event.
com.stratelia.webactiv.util.exception.UtilException
- if an error occurs while getting the WYSIWYG content of the event.
org.silverpeas.wysiwyg.WysiwygException
public void removeOccurenceEvent(EventDetail eventDetail, String startDate) throws ParseException, AlmanachException
eventDetail
- the detail of the event to which the occurrence belongs.startDate
- the start date of the event occurrence.
ParseException
- if an error occurs while parsing date infomation.
AlmanachException
- if an error occurs while removing the occurrence of the event.public void prepareNewEvent(EventDetail event)
public EventPK addEvent(EventDetail eventDetail, Collection<org.silverpeas.upload.UploadedFile> uploadedFiles) throws AlmanachBadParamException, AlmanachException, org.silverpeas.wysiwyg.WysiwygException
eventDetail
- the detail of the event to add.uploadedFiles
- the files uploaded in the aim to be attached to the event.
AlmanachBadParamException
- if the event detail isn't well defined.
AlmanachException
- if an error occurs while adding the event.
org.silverpeas.wysiwyg.WysiwygException
- if an error occurs while parsing the WYSIWYG content of the event.public EventPK addEvent(EventDetail eventDetail, Collection<org.silverpeas.upload.UploadedFile> uploadedFiles, com.silverpeas.pdc.web.PdcClassificationEntity classification) throws AlmanachBadParamException, AlmanachException, org.silverpeas.wysiwyg.WysiwygException
eventDetail
- the detail of the event to add.uploadedFiles
- the files uploaded in the aim to be attached to the event.
AlmanachBadParamException
- if the event detail isn't well defined.
AlmanachException
- if an error occurs while adding the event.
org.silverpeas.wysiwyg.WysiwygException
- if an error occurs while parsing the WYSIWYG content of the event.public void updateEvent(EventDetail eventDetail) throws AlmanachBadParamException, AlmanachException, org.silverpeas.wysiwyg.WysiwygException
eventDetail
- the detail of the event to update.
AlmanachBadParamException
- if the event detail isn't well defined.
AlmanachException
- if an error occurs while updating the event.
org.silverpeas.wysiwyg.WysiwygException
- if an error occurs while parsing the WYSIWYG content of the event.public void indexEvent(EventDetail event) throws AlmanachException
event
- the detail of the event to index.
AlmanachException
- if an error occurs while indexing the event.protected AlmanachBm getAlmanachBm() throws AlmanachException
AlmanachException
- if an error occurs while getting the remote object.protected void setAlmanachBm(AlmanachBm anAlmanachBm)
anAlmanachBm
- the reference to a remote business object.public String buildPdf(String mode)
mode
- the criteria key.
public boolean isPdcUsed()
public boolean isWeekendNotVisible()
public String getRSSUrl()
getRSSUrl
in class com.stratelia.silverpeas.peasCore.AbstractComponentSessionController
public boolean isAgregationUsed()
public List<AlmanachDTO> getAccessibleInstances()
public int getSilverObjectId(String eventId) throws AlmanachBadParamException, AlmanachException
eventId
- the identifier of the event.
AlmanachBadParamException
- if parameter is invalid; it doesn't represent an event
identifier.
AlmanachException
- if the operation fail.public String getAlmanachColor(String instanceId)
instanceId
-
public List<AlmanachDTO> getAggregatedAlmanachs()
public boolean isAlmanachAgregated(String almanachId)
almanachId
- the unique identifier of the almanach instance.
public void updateAgregatedAlmanachs(String[] instanceIds)
instanceIds
- the identifier of the new agregated almanachs.public String initAlertUser(String eventId) throws AlmanachException, AlmanachNoSuchFindEventException
eventId
-
AlmanachException
AlmanachNoSuchFindEventException
public void close()
close
in class com.stratelia.silverpeas.peasCore.AbstractComponentSessionController
public void updateEventOccurence(EventDetail event, String dateDebutIteration, String dateFinIteration) throws AlmanachBadParamException, AlmanachException, org.silverpeas.wysiwyg.WysiwygException, ParseException
event
- dateDebutIteration
- dateFinIteration
-
AlmanachBadParamException
AlmanachException
org.silverpeas.wysiwyg.WysiwygException
ParseException
public AlmanachCalendarView getAlmanachCalendarView() throws AlmanachException, AlmanachNoSuchFindEventException
AlmanachException
- if an error occurs while getting the calendar view.
AlmanachNoSuchFindEventException
- if a detail about an event in the almanach cannot be
found.public AlmanachCalendarView getYearlyAlmanachCalendarView() throws AlmanachException, AlmanachNoSuchFindEventException
AlmanachException
- if an error occurs while getting the calendar view.
AlmanachNoSuchFindEventException
- if a detail about an event in the almanach cannot be
found.public AlmanachCalendarView getMonthlyAlmanachCalendarView() throws AlmanachException, AlmanachNoSuchFindEventException
AlmanachException
- if an error occurs while getting the calendar view.
AlmanachNoSuchFindEventException
- if a detail about an event in the almanach cannot be
found.public AlmanachCalendarView getWeekyAlmanachCalendarView() throws AlmanachException, AlmanachNoSuchFindEventException
AlmanachException
- if an error occurs while getting the calendar view.
AlmanachNoSuchFindEventException
- if a detail about an event in the almanach cannot be
found.public AlmanachCalendarView getAlmanachCalendarViewOnTheNextEvents(boolean aggregated) throws AlmanachException, AlmanachNoSuchFindEventException
aggregated
- is the calendar view should contains also the events of aggregated almanachs?
AlmanachException
- if an error occurs while getting the calendar view.
AlmanachNoSuchFindEventException
- if a detail about an event in the almanach cannot be
found.public String getAlmanachICSURL()
public String exportToICal() throws com.silverpeas.export.ExportException, IOException
com.silverpeas.export.ExportException
- if an error occurs while exporting the almanach in iCal format. The
errors can come from a failure on getting the events to export, the fact there is no events to
export (empty almanach) or the failure of the export process itself.
IOException
- if an error occurs while creating or opening the file into which the export
will be done. Such errors can be come from a forbidden write granting, and so on.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |