Class DefaultCalendarService
- java.lang.Object
-
- org.silverpeas.core.personalorganizer.service.DefaultCalendarService
-
- All Implemented Interfaces:
ComponentInstanceDeletion
,SilverpeasCalendar
@Service public class DefaultCalendarService extends Object implements SilverpeasCalendar, ComponentInstanceDeletion
Calendar service layer to manager calendars in Silverpeas
-
-
Constructor Summary
Constructors Constructor Description DefaultCalendarService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addHolidayDate(HolidayDetail holiday)
void
addHolidayDates(List<HolidayDetail> holidayDates)
String
addJournal(JournalHeader journal)
methods for journalvoid
addJournalAttendee(String journalId, Attendee attendee)
methods for attendeesvoid
addJournalCategory(String journalId, String categoryId)
String
addToDo(TodoDetail todo)
String
addToDo(ToDoHeader todo)
addToDo() add a todo entry in the databasevoid
addToDoAttendee(String todoId, Attendee attendee)
Collection<SchedulableCount>
countMonthSchedulablesForUser(String month, String userId, String categoryId, String participation)
countMonthSchedulablesForUser() for a particular user, counts the number of schedules for each day in the monthvoid
delete(String componentInstanceId)
Deletes the resources belonging to the specified component instance.Collection<Category>
getAllCategories()
methods for categoriesList<String>
getAllToDoForUser(String userId)
Category
getCategory(String categoryId)
SilverpeasList<ToDoHeader>
getClosedToDos(String organizerId)
Collection<JournalHeader>
getDaySchedulablesForUser(String day, String userId, String categoryId, String participation)
getDaySchedulablesForUser() for a particular user returns all the events scheduled on a particular day.Collection<JournalHeader>
getExternalJournalHeadersForUser(String userId)
getOutlookJournalHeadersForUser() returns the journalHeaders for user represented by the userIdCollection<JournalHeader>
getExternalJournalHeadersForUserAfterDate(String userId, Date startDate)
getExternalJournalHeadersForUserAfterDate() returns the journalHeaders for user represented by the userId for which start date after given dateCollection<ToDoHeader>
getExternalTodos(String spaceId, String componentId, String externalId)
List<String>
getHolidayDates(String userId)
******************************************************************************* Gestion du calendrier des jours non travailles ********************************************************************************List<String>
getHolidayDates(String userId, Date beginDate, Date endDate)
Collection<Attendee>
getJournalAttendees(String journalId)
Collection<Category>
getJournalCategories(String journalId)
JournalHeader
getJournalHeader(String journalId)
getJournalHeader() returns the journalHeader represented by the journalIdCollection<JournalHeader>
getJournalHeadersForUserAfterDate(String userId, Date startDate, int nbReturned)
getJournalHeadersForUserAfterDate() returns the journalHeaders for user represented by the userId for which start date after given dateList<SocialInformationEvent>
getLastEventsForMyContacts(String day, String myId, List<String> myContactsIds, Date begin, Date end)
get Last Social Events for a given list of my Contacts .List<SocialInformationEvent>
getMyLastEvents(String day, String myId, Date begin, Date end)
get the my last Events of information and number of Item and the first IndexCollection<JournalHeader>
getNextDaySchedulablesForUser(String day, String userId, String categoryId, String participation)
getNextDaySchedulablesForUser() for a particular user returns the next events scheduled.List<SocialInformationEvent>
getNextEventsForMyContacts(String day, String myId, List<String> myContactsIds, Date begin, Date end)
get Next Social Events for a given list of my Contacts .List<JournalHeader>
getNextEventsForUser(String day, String userId, String classification, Date begin, Date end)
Method for getting the next events of userId ,the result is limitedSilverpeasList<ToDoHeader>
getNotCompletedToDosForUser(String userId)
SilverpeasList<ToDoHeader>
getOrganizerToDos(String organizerId)
Collection<JournalHeader>
getPeriodSchedulablesForUser(String begin, String end, String userId, String categoryId, String participation)
getPeriodSchedulablesForUser() for a particular user returns all the events scheduled during a particular period.Collection<JournalHeader>
getTentativeSchedulablesForUser(String userId)
List<Attendee>
getToDoAttendees(String todoId)
Map<String,List<Attendee>>
getToDoAttendees(Collection<String> todoIds)
TodoDetail
getTodoDetail(String id)
ToDoHeader
getToDoHeader(String todoId)
getToDoHeader() returns the ToDoHeader represented by the todoIdboolean
hasTentativeSchedulablesForUser(String userId)
methods for unresponded messagesvoid
indexAllJournal()
Reindex all journalvoid
indexAllTodo()
boolean
isHolidayDate(HolidayDetail date)
void
removeAttendeeInToDoFromExternal(String componentId, String externalId, String userId)
void
removeHolidayDate(HolidayDetail holiday)
void
removeHolidayDates(List<HolidayDetail> holidayDates)
void
removeJournal(String journalId)
removeJournal() remove the journal entry specified by the idvoid
removeJournalAttendee(String journalId, Attendee attendee)
void
removeJournalCategory(String journalId, String categoryId)
void
removeToDo(String id)
removeToDo() remove the todo entry specified by the idvoid
removeToDoAttendee(String todoId, Attendee attendee)
void
removeToDoFromExternal(String spaceId, String componentId, String externalId)
void
setJournalAttendees(String journalId, String[] userIds)
void
setJournalCategories(String journalId, String[] categoryIds)
void
setJournalParticipationStatus(String journalId, String userId, String participation)
void
setToDoAttendees(String todoId, String[] userIds)
void
updateJournal(JournalHeader journal)
updateJournal() update the journal entry, specified by the id, in the databasevoid
updateToDo(ToDoHeader todo)
updateToDo() update the todo entry, specified by the id, in the database
-
-
-
Method Detail
-
hasTentativeSchedulablesForUser
public boolean hasTentativeSchedulablesForUser(String userId)
methods for unresponded messages- Specified by:
hasTentativeSchedulablesForUser
in interfaceSilverpeasCalendar
- Parameters:
userId
- the user identifier- Returns:
-
getTentativeSchedulablesForUser
public Collection<JournalHeader> getTentativeSchedulablesForUser(String userId)
- Specified by:
getTentativeSchedulablesForUser
in interfaceSilverpeasCalendar
-
getNotCompletedToDosForUser
public SilverpeasList<ToDoHeader> getNotCompletedToDosForUser(String userId)
- Specified by:
getNotCompletedToDosForUser
in interfaceSilverpeasCalendar
- Parameters:
userId
- the user identifier- Returns:
-
getAllToDoForUser
public List<String> getAllToDoForUser(String userId)
- Specified by:
getAllToDoForUser
in interfaceSilverpeasCalendar
-
getOrganizerToDos
public SilverpeasList<ToDoHeader> getOrganizerToDos(String organizerId)
- Specified by:
getOrganizerToDos
in interfaceSilverpeasCalendar
-
getClosedToDos
public SilverpeasList<ToDoHeader> getClosedToDos(String organizerId)
- Specified by:
getClosedToDos
in interfaceSilverpeasCalendar
-
getExternalTodos
public Collection<ToDoHeader> getExternalTodos(String spaceId, String componentId, String externalId)
- Specified by:
getExternalTodos
in interfaceSilverpeasCalendar
-
getToDoHeader
public ToDoHeader getToDoHeader(String todoId)
Description copied from interface:SilverpeasCalendar
getToDoHeader() returns the ToDoHeader represented by the todoId- Specified by:
getToDoHeader
in interfaceSilverpeasCalendar
-
getTodoDetail
public TodoDetail getTodoDetail(String id)
- Specified by:
getTodoDetail
in interfaceSilverpeasCalendar
-
updateToDo
public void updateToDo(ToDoHeader todo)
Description copied from interface:SilverpeasCalendar
updateToDo() update the todo entry, specified by the id, in the database- Specified by:
updateToDo
in interfaceSilverpeasCalendar
-
addToDo
public String addToDo(ToDoHeader todo)
Description copied from interface:SilverpeasCalendar
addToDo() add a todo entry in the database- Specified by:
addToDo
in interfaceSilverpeasCalendar
-
addToDo
public String addToDo(TodoDetail todo)
- Specified by:
addToDo
in interfaceSilverpeasCalendar
-
removeToDo
public void removeToDo(String id)
Description copied from interface:SilverpeasCalendar
removeToDo() remove the todo entry specified by the id- Specified by:
removeToDo
in interfaceSilverpeasCalendar
-
removeToDoFromExternal
public void removeToDoFromExternal(String spaceId, String componentId, String externalId)
- Specified by:
removeToDoFromExternal
in interfaceSilverpeasCalendar
-
removeAttendeeInToDoFromExternal
public void removeAttendeeInToDoFromExternal(String componentId, String externalId, String userId)
- Specified by:
removeAttendeeInToDoFromExternal
in interfaceSilverpeasCalendar
-
getDaySchedulablesForUser
public Collection<JournalHeader> getDaySchedulablesForUser(String day, String userId, String categoryId, String participation)
Description copied from interface:SilverpeasCalendar
getDaySchedulablesForUser() for a particular user returns all the events scheduled on a particular day. This includes all kinds of events- Specified by:
getDaySchedulablesForUser
in interfaceSilverpeasCalendar
- Parameters:
day
-userId
- the user identifiercategoryId
- the category identifierparticipation
-- Returns:
-
getNextDaySchedulablesForUser
public Collection<JournalHeader> getNextDaySchedulablesForUser(String day, String userId, String categoryId, String participation)
Description copied from interface:SilverpeasCalendar
getNextDaySchedulablesForUser() for a particular user returns the next events scheduled. This includes all kinds of events- Specified by:
getNextDaySchedulablesForUser
in interfaceSilverpeasCalendar
-
getPeriodSchedulablesForUser
public Collection<JournalHeader> getPeriodSchedulablesForUser(String begin, String end, String userId, String categoryId, String participation)
Description copied from interface:SilverpeasCalendar
getPeriodSchedulablesForUser() for a particular user returns all the events scheduled during a particular period. This includes all kinds of events- Specified by:
getPeriodSchedulablesForUser
in interfaceSilverpeasCalendar
-
countMonthSchedulablesForUser
public Collection<SchedulableCount> countMonthSchedulablesForUser(String month, String userId, String categoryId, String participation)
Description copied from interface:SilverpeasCalendar
countMonthSchedulablesForUser() for a particular user, counts the number of schedules for each day in the month- Specified by:
countMonthSchedulablesForUser
in interfaceSilverpeasCalendar
-
addJournal
public String addJournal(JournalHeader journal)
methods for journal- Specified by:
addJournal
in interfaceSilverpeasCalendar
-
updateJournal
public void updateJournal(JournalHeader journal)
Description copied from interface:SilverpeasCalendar
updateJournal() update the journal entry, specified by the id, in the database- Specified by:
updateJournal
in interfaceSilverpeasCalendar
-
removeJournal
public void removeJournal(String journalId)
Description copied from interface:SilverpeasCalendar
removeJournal() remove the journal entry specified by the id- Specified by:
removeJournal
in interfaceSilverpeasCalendar
-
getJournalHeader
public JournalHeader getJournalHeader(String journalId)
Description copied from interface:SilverpeasCalendar
getJournalHeader() returns the journalHeader represented by the journalId- Specified by:
getJournalHeader
in interfaceSilverpeasCalendar
-
getExternalJournalHeadersForUser
public Collection<JournalHeader> getExternalJournalHeadersForUser(String userId)
Description copied from interface:SilverpeasCalendar
getOutlookJournalHeadersForUser() returns the journalHeaders for user represented by the userId- Specified by:
getExternalJournalHeadersForUser
in interfaceSilverpeasCalendar
-
getExternalJournalHeadersForUserAfterDate
public Collection<JournalHeader> getExternalJournalHeadersForUserAfterDate(String userId, Date startDate)
Description copied from interface:SilverpeasCalendar
getExternalJournalHeadersForUserAfterDate() returns the journalHeaders for user represented by the userId for which start date after given date- Specified by:
getExternalJournalHeadersForUserAfterDate
in interfaceSilverpeasCalendar
-
getJournalHeadersForUserAfterDate
public Collection<JournalHeader> getJournalHeadersForUserAfterDate(String userId, Date startDate, int nbReturned)
Description copied from interface:SilverpeasCalendar
getJournalHeadersForUserAfterDate() returns the journalHeaders for user represented by the userId for which start date after given date- Specified by:
getJournalHeadersForUserAfterDate
in interfaceSilverpeasCalendar
-
addJournalAttendee
public void addJournalAttendee(String journalId, Attendee attendee)
methods for attendees- Specified by:
addJournalAttendee
in interfaceSilverpeasCalendar
-
removeJournalAttendee
public void removeJournalAttendee(String journalId, Attendee attendee)
- Specified by:
removeJournalAttendee
in interfaceSilverpeasCalendar
-
getJournalAttendees
public Collection<Attendee> getJournalAttendees(String journalId)
- Specified by:
getJournalAttendees
in interfaceSilverpeasCalendar
-
setJournalAttendees
public void setJournalAttendees(String journalId, String[] userIds)
- Specified by:
setJournalAttendees
in interfaceSilverpeasCalendar
-
setJournalParticipationStatus
public void setJournalParticipationStatus(String journalId, String userId, String participation)
- Specified by:
setJournalParticipationStatus
in interfaceSilverpeasCalendar
-
addToDoAttendee
public void addToDoAttendee(String todoId, Attendee attendee)
- Specified by:
addToDoAttendee
in interfaceSilverpeasCalendar
-
removeToDoAttendee
public void removeToDoAttendee(String todoId, Attendee attendee)
- Specified by:
removeToDoAttendee
in interfaceSilverpeasCalendar
-
getToDoAttendees
public List<Attendee> getToDoAttendees(String todoId)
- Specified by:
getToDoAttendees
in interfaceSilverpeasCalendar
-
getToDoAttendees
public Map<String,List<Attendee>> getToDoAttendees(Collection<String> todoIds)
- Specified by:
getToDoAttendees
in interfaceSilverpeasCalendar
-
setToDoAttendees
public void setToDoAttendees(String todoId, String[] userIds)
- Specified by:
setToDoAttendees
in interfaceSilverpeasCalendar
-
getAllCategories
public Collection<Category> getAllCategories()
methods for categories- Specified by:
getAllCategories
in interfaceSilverpeasCalendar
-
getCategory
public Category getCategory(String categoryId)
- Specified by:
getCategory
in interfaceSilverpeasCalendar
-
addJournalCategory
public void addJournalCategory(String journalId, String categoryId)
- Specified by:
addJournalCategory
in interfaceSilverpeasCalendar
-
removeJournalCategory
public void removeJournalCategory(String journalId, String categoryId)
- Specified by:
removeJournalCategory
in interfaceSilverpeasCalendar
-
getJournalCategories
public Collection<Category> getJournalCategories(String journalId)
- Specified by:
getJournalCategories
in interfaceSilverpeasCalendar
-
setJournalCategories
public void setJournalCategories(String journalId, String[] categoryIds)
- Specified by:
setJournalCategories
in interfaceSilverpeasCalendar
-
indexAllTodo
public void indexAllTodo()
- Specified by:
indexAllTodo
in interfaceSilverpeasCalendar
-
getHolidayDates
public List<String> getHolidayDates(String userId)
******************************************************************************* Gestion du calendrier des jours non travailles ********************************************************************************- Specified by:
getHolidayDates
in interfaceSilverpeasCalendar
-
getHolidayDates
public List<String> getHolidayDates(String userId, Date beginDate, Date endDate)
- Specified by:
getHolidayDates
in interfaceSilverpeasCalendar
-
addHolidayDate
public void addHolidayDate(HolidayDetail holiday)
- Specified by:
addHolidayDate
in interfaceSilverpeasCalendar
-
addHolidayDates
public void addHolidayDates(List<HolidayDetail> holidayDates)
- Specified by:
addHolidayDates
in interfaceSilverpeasCalendar
-
removeHolidayDate
public void removeHolidayDate(HolidayDetail holiday)
- Specified by:
removeHolidayDate
in interfaceSilverpeasCalendar
-
removeHolidayDates
public void removeHolidayDates(List<HolidayDetail> holidayDates)
- Specified by:
removeHolidayDates
in interfaceSilverpeasCalendar
-
isHolidayDate
public boolean isHolidayDate(HolidayDetail date)
- Specified by:
isHolidayDate
in interfaceSilverpeasCalendar
-
indexAllJournal
public void indexAllJournal()
Reindex all journal- Specified by:
indexAllJournal
in interfaceSilverpeasCalendar
-
getNextEventsForUser
public List<JournalHeader> getNextEventsForUser(String day, String userId, String classification, Date begin, Date end)
Method for getting the next events of userId ,the result is limited- Specified by:
getNextEventsForUser
in interfaceSilverpeasCalendar
- Parameters:
day
-userId
- the user identifierclassification
-begin
- the begin dateend
- the end date- Returns:
- List
-
getNextEventsForMyContacts
public List<SocialInformationEvent> getNextEventsForMyContacts(String day, String myId, List<String> myContactsIds, Date begin, Date end)
get Next Social Events for a given list of my Contacts . This includes all kinds of events- Specified by:
getNextEventsForMyContacts
in interfaceSilverpeasCalendar
- Parameters:
day
-myId
-myContactsIds
-begin
-end
-- Returns:
- List
-
getLastEventsForMyContacts
public List<SocialInformationEvent> getLastEventsForMyContacts(String day, String myId, List<String> myContactsIds, Date begin, Date end)
get Last Social Events for a given list of my Contacts . This includes all kinds of events- Specified by:
getLastEventsForMyContacts
in interfaceSilverpeasCalendar
- Parameters:
day
-myId
-myContactsIds
-begin
-end
-- Returns:
- List
-
getMyLastEvents
public List<SocialInformationEvent> getMyLastEvents(String day, String myId, Date begin, Date end)
get the my last Events of information and number of Item and the first Index- Specified by:
getMyLastEvents
in interfaceSilverpeasCalendar
- Parameters:
day
-myId
-begin
-end
-- Returns:
- List
-
delete
public void delete(String componentInstanceId)
Deletes the resources belonging to the specified component instance. This method is invoked by Silverpeas when a component instance is in deletion.- Specified by:
delete
in interfaceComponentInstanceDeletion
- Parameters:
componentInstanceId
- the unique identifier of a component instance.
-
-