com.stratelia.webactiv.almanach.control.ejb
Class AlmanachBmEJB

java.lang.Object
  extended by com.stratelia.webactiv.almanach.control.ejb.AlmanachBmEJB
All Implemented Interfaces:
AlmanachBm

public class AlmanachBmEJB
extends Object
implements AlmanachBm


Constructor Summary
AlmanachBmEJB()
           
 
Method Summary
 String addEvent(EventDetail event, Collection<org.silverpeas.upload.UploadedFile> uploadedFiles)
          addEvent() add an event entry in the database.
 String addEvent(EventDetail event, Collection<org.silverpeas.upload.UploadedFile> uploadedFiles, com.silverpeas.pdc.model.PdcClassification classification)
          Adds the event in the almanach with the specified classification on the PdC.
 void addPeriodicityException(PeriodicityException periodicityException)
           
 void createIndex(EventDetail detail)
           
 net.fortuna.ical4j.model.property.ExDate generateExceptionDate(Periodicity periodicity)
           
 net.fortuna.ical4j.model.property.RRule generateRecurrenceRule(Periodicity periodicity)
           
 Collection<EventDetail> getAllEvents(EventPK pk)
          this method provide a collection of event
 Collection<EventDetail> getAllEvents(EventPK pk, String[] instanceIds)
          Get all events
 Collection<org.silverpeas.attachment.model.SimpleDocument> getAttachments(EventPK eventPK)
          ***********************************************************************************
protected  EventDAO getEventDAO()
           
 EventDetail getEventDetail(EventPK pk)
          Get Event Detail
 List<EventOccurrence> getEventOccurrencesInPeriod(org.silverpeas.date.Period period, String... almanachIds)
          Gets the event occurrences that occur in the specified period and that are defined in the specified almanachs.
 Collection<EventDetail> getEvents(Collection<EventPK> pks)
           
 String getHTMLPath(EventPK eventPK)
           
 net.fortuna.ical4j.model.Calendar getICal4jCalendar(Collection<EventDetail> events, String language)
           
 Collection<PeriodicityException> getListPeriodicityException(String periodicityId)
           
 Collection<EventDetail> getListRecurrentEvent(net.fortuna.ical4j.model.Calendar calendarAlmanach, Calendar currentDay, String spaceId, String instanceId, boolean yearScope)
           
 List<EventOccurrence> getNextEventOccurrences(String... almanachIds)
          Gets the next event occurrences that will occur andd that are defined in the specified almanachs.
 int getSilverObjectId(EventPK eventPK)
          **************************************************************************************************************
 void removeAllPeriodicityException(String periodicityId)
           
 void removeEvent(EventPK pk)
          removeEvent() remove the Event entry specified by the pk
protected  com.silverpeas.calendar.Date today()
           
 void updateEvent(EventDetail event)
          updateEvent() update the event entry, specified by the pk, in the database
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AlmanachBmEJB

public AlmanachBmEJB()
Method Detail

getAllEvents

public Collection<EventDetail> getAllEvents(EventPK pk)
Description copied from interface: AlmanachBm
this method provide a collection of event

Specified by:
getAllEvents in interface AlmanachBm

getAllEvents

public Collection<EventDetail> getAllEvents(EventPK pk,
                                            String[] instanceIds)
Get all events

Specified by:
getAllEvents in interface AlmanachBm
Parameters:
pk -
instanceIds - array of instanceId
Returns:
Collection of Events

getEvents

public Collection<EventDetail> getEvents(Collection<EventPK> pks)
Specified by:
getEvents in interface AlmanachBm

getEventDetail

public EventDetail getEventDetail(EventPK pk)
Get Event Detail

Specified by:
getEventDetail in interface AlmanachBm
Parameters:
pk -
Returns:
the corresponding event.

addEvent

public String addEvent(EventDetail event,
                       Collection<org.silverpeas.upload.UploadedFile> uploadedFiles)
Description copied from interface: AlmanachBm
addEvent() add an event entry in the database.

Specified by:
addEvent in interface AlmanachBm
Parameters:
event - detail about the event to add in Silverpeas.
uploadedFiles - attached files.
Returns:
the unique identifier of the added event.

addEvent

public String addEvent(EventDetail event,
                       Collection<org.silverpeas.upload.UploadedFile> uploadedFiles,
                       com.silverpeas.pdc.model.PdcClassification classification)
Description copied from interface: AlmanachBm
Adds the event in the almanach with the specified classification on the PdC.

Specified by:
addEvent in interface AlmanachBm
Parameters:
event - detail about the event to add in Silverpeas.
uploadedFiles - attached files.
classification - the classificationwith which the event will be classified on the PdC.
Returns:
the unique identifier of the added event.

updateEvent

public void updateEvent(EventDetail event)
updateEvent() update the event entry, specified by the pk, in the database

Specified by:
updateEvent in interface AlmanachBm

removeEvent

public void removeEvent(EventPK pk)
removeEvent() remove the Event entry specified by the pk

Specified by:
removeEvent in interface AlmanachBm

createIndex

public void createIndex(EventDetail detail)
Specified by:
createIndex in interface AlmanachBm

addPeriodicityException

public void addPeriodicityException(PeriodicityException periodicityException)
Specified by:
addPeriodicityException in interface AlmanachBm

getListPeriodicityException

public Collection<PeriodicityException> getListPeriodicityException(String periodicityId)
Parameters:
periodicityId -
Returns:

removeAllPeriodicityException

public void removeAllPeriodicityException(String periodicityId)
Parameters:
periodicityId -

getICal4jCalendar

public net.fortuna.ical4j.model.Calendar getICal4jCalendar(Collection<EventDetail> events,
                                                           String language)
Specified by:
getICal4jCalendar in interface AlmanachBm

generateRecurrenceRule

public net.fortuna.ical4j.model.property.RRule generateRecurrenceRule(Periodicity periodicity)

generateExceptionDate

public net.fortuna.ical4j.model.property.ExDate generateExceptionDate(Periodicity periodicity)

getListRecurrentEvent

public Collection<EventDetail> getListRecurrentEvent(net.fortuna.ical4j.model.Calendar calendarAlmanach,
                                                     Calendar currentDay,
                                                     String spaceId,
                                                     String instanceId,
                                                     boolean yearScope)
Specified by:
getListRecurrentEvent in interface AlmanachBm
Parameters:
calendarAlmanach -
currentDay -
spaceId -
instanceId -
Returns:

getSilverObjectId

public int getSilverObjectId(EventPK eventPK)
**************************************************************************************************************

Specified by:
getSilverObjectId in interface AlmanachBm

getAttachments

public Collection<org.silverpeas.attachment.model.SimpleDocument> getAttachments(EventPK eventPK)
***********************************************************************************

Specified by:
getAttachments in interface AlmanachBm

getHTMLPath

public String getHTMLPath(EventPK eventPK)
Specified by:
getHTMLPath in interface AlmanachBm

getEventOccurrencesInPeriod

public List<EventOccurrence> getEventOccurrencesInPeriod(org.silverpeas.date.Period period,
                                                         String... almanachIds)
Description copied from interface: AlmanachBm
Gets the event occurrences that occur in the specified period and that are defined in the specified almanachs.

Specified by:
getEventOccurrencesInPeriod in interface AlmanachBm
Parameters:
period - the period in which the events occur.
almanachIds - the identifier of the almanachs in which the events are defined.
Returns:
a list of event occurrences.

getNextEventOccurrences

public List<EventOccurrence> getNextEventOccurrences(String... almanachIds)
Description copied from interface: AlmanachBm
Gets the next event occurrences that will occur andd that are defined in the specified almanachs.

Specified by:
getNextEventOccurrences in interface AlmanachBm
Parameters:
almanachIds - the identifier of the almanachs in which the events are defined.
Returns:
a list of event occurrences that will occur in the future.

getEventDAO

protected EventDAO getEventDAO()

today

protected com.silverpeas.calendar.Date today()


Copyright © 2016 Silverpeas. All Rights Reserved.