|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jasig.schedassist.model.DefaultEventUtilsImpl
public class DefaultEventUtilsImpl
Default IEventUtils implementation.
| Field Summary | |
|---|---|
static String |
ICAL_DATETIME_FORMAT
Date/time format for iCalendar. |
protected org.apache.commons.logging.Log |
LOG
|
static net.fortuna.ical4j.model.property.ProdId |
PROD_ID
ProdId attached to Calendars sent to the CalDAV server by the Scheduling Assistant. |
| Constructor Summary | |
|---|---|
DefaultEventUtilsImpl()
Default constructor, sets the IAffiliationSource to the
NullAffiliationSourceImpl implementation. |
|
DefaultEventUtilsImpl(IAffiliationSource affiliationSource)
|
|
| Method Summary | |
|---|---|
boolean |
attendeeMatchesPerson(net.fortuna.ical4j.model.Property attendee,
ICalendarAccount calendarAccount)
|
net.fortuna.ical4j.model.PeriodList |
calculateRecurrence(net.fortuna.ical4j.model.component.VEvent event,
Date startBoundary,
Date endBoundary)
Calculate recurrence dates for the specified events between the 2 date boundaries. |
net.fortuna.ical4j.model.component.VEvent |
constructAvailableAppointment(AvailableBlock block,
IScheduleOwner owner,
IScheduleVisitor visitor,
String eventDescription)
Construct an iCalendar EVENT for the Scheduling Assistant system. |
net.fortuna.ical4j.model.property.Organizer |
constructOrganizer(ICalendarAccount calendarAccount)
Construct an Organizer property for the specified ICalendarAccount. |
net.fortuna.ical4j.model.property.Attendee |
constructSchedulingAssistantAttendee(ICalendarAccount calendarAccount,
AppointmentRole role)
Construct an Attendee property for the specified user and role. |
protected String |
constructSummaryValueForReflectionEvent(AvailableBlock block)
|
protected net.fortuna.ical4j.model.component.VEvent |
convertBlockToReflectionEvent(AvailableBlock block)
Convert the AvailableBlock into a VEvent that can be stored in the
calendar system to represent that same block. |
List<net.fortuna.ical4j.model.Calendar> |
convertScheduleForReflection(AvailableSchedule availableSchedule)
Convert the AvailableSchedule into an iCalendar Calendar
for the purposes of reflection back into the calendar system. |
static String |
convertToICalendarFormat(Date date)
Helper method to convert the Date into the
String representation required for iCalendar. |
protected net.fortuna.ical4j.model.property.Clazz |
determineAppropriateClassProperty(ICalendarAccount calendarAccount)
Called by constructAvailableAppointment(AvailableBlock, IScheduleOwner, IScheduleVisitor, String);
returns an appropriate Clazz depending on whether or not the ICalendarAccount is a resource account. |
static URI |
emailToURI(String emailAddress)
Convert the String argument to a mailto URI if possible. |
net.fortuna.ical4j.model.property.Uid |
extractUid(net.fortuna.ical4j.model.Calendar calendar)
If the Calendar contains one and only one event (series), return the Uid. |
net.fortuna.ical4j.model.property.Uid |
generateNewUid()
Generate a new Uid, intended for use with Scheduling Assistant VEvents. |
IAffiliationSource |
getAffiliationSource()
|
net.fortuna.ical4j.model.Property |
getAttendeeForUserFromEvent(net.fortuna.ical4j.model.component.VEvent event,
ICalendarAccount calendarUser)
Walk through the attendee list in the VEvent argument. |
net.fortuna.ical4j.model.PropertyList |
getAttendeeListFromEvent(net.fortuna.ical4j.model.component.VEvent event)
If the event is a Scheduling Assistant event, retrieve only the attendees on the event set by the Available system. |
String |
getEventClassForPersonOwners()
|
String |
getEventClassForResourceOwners()
|
Integer |
getEventVisitorLimit(net.fortuna.ical4j.model.component.VEvent event)
If the event argument is an event created by the Scheduling Assistant, return the value of it's VisitorLimit property. |
int |
getScheduleVisitorCount(net.fortuna.ical4j.model.component.VEvent event)
Return the number of Attendees in the event
that have the role AppointmentRole.VISITOR. |
boolean |
isAttendingAsOwner(net.fortuna.ical4j.model.component.VEvent event,
ICalendarAccount proposedOwner)
|
boolean |
isAttendingAsVisitor(net.fortuna.ical4j.model.component.VEvent event,
ICalendarAccount proposedVisitor)
|
boolean |
isAttendingMatch(net.fortuna.ical4j.model.component.VEvent event,
IScheduleVisitor visitor,
IScheduleOwner owner)
Check the event to see if this event represents an existing available appointment that the visitor is "visiting" and the owner is "owning" (including the special case when visitor and owner are the same person) Will return true if the event's attendees match the roles passed in. |
boolean |
isEventRecurring(net.fortuna.ical4j.model.component.VEvent event)
|
static boolean |
isPartStatNeedsAction(net.fortuna.ical4j.model.Property attendee)
|
void |
setEventClassForPersonOwners(String eventClassForPersonOwners)
|
void |
setEventClassForResourceOwners(String eventClassForResourceOwners)
|
boolean |
willEventCauseConflict(ICalendarAccount calendarAccount,
net.fortuna.ical4j.model.component.VEvent event)
This method defines our criteria for which VEvents will cause a conflict
(either a red/busy block in the visible schedule or cause ConflictExistsExceptions). |
net.fortuna.ical4j.model.Calendar |
wrapEventInCalendar(net.fortuna.ical4j.model.component.VEvent event)
Wrap the VEvent argument in a Calendar. |
protected net.fortuna.ical4j.model.Calendar |
wrapInternal(net.fortuna.ical4j.model.ComponentList components)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String ICAL_DATETIME_FORMAT
public static final net.fortuna.ical4j.model.property.ProdId PROD_ID
ProdId attached to Calendars sent to the CalDAV server by the Scheduling Assistant.
protected final org.apache.commons.logging.Log LOG
| Constructor Detail |
|---|
public DefaultEventUtilsImpl()
IAffiliationSource to the
NullAffiliationSourceImpl implementation.
public DefaultEventUtilsImpl(IAffiliationSource affiliationSource)
affiliationSource - | Method Detail |
|---|
public IAffiliationSource getAffiliationSource()
public String getEventClassForPersonOwners()
public String getEventClassForResourceOwners()
public void setEventClassForPersonOwners(String eventClassForPersonOwners)
eventClassForPersonOwners - the eventClassForPersonOwners to setpublic void setEventClassForResourceOwners(String eventClassForResourceOwners)
eventClassForResourceOwners - the eventClassForResourceOwners to set
public boolean attendeeMatchesPerson(net.fortuna.ical4j.model.Property attendee,
ICalendarAccount calendarAccount)
attendeeMatchesPerson in interface IEventUtilsProperty is an attendee that matches the ICalendarAccount
public net.fortuna.ical4j.model.component.VEvent constructAvailableAppointment(AvailableBlock block,
IScheduleOwner owner,
IScheduleVisitor visitor,
String eventDescription)
IEventUtilsAppointmentRole#BOTH.
Otherwise, owner and visitor will be added as ATTENDEEs with the corresponding AppointmentRole.
The eventDescription argument will be added to the DESCRIPTION of the event. If the owner is detected as an academic advisor, and
the visitor is a student, the student's "wiscedustudentid" value will be appended to the DESCRIPTION.
constructAvailableAppointment in interface IEventUtilsblock - the selected AvailableBlockowner - the owner of the appointmentvisitor - the visitor to the appointmenteventDescription - text to enter into the DESCRIPTION property for the appointment
protected net.fortuna.ical4j.model.property.Clazz determineAppropriateClassProperty(ICalendarAccount calendarAccount)
constructAvailableAppointment(AvailableBlock, IScheduleOwner, IScheduleVisitor, String);
returns an appropriate Clazz depending on whether or not the ICalendarAccount is a resource account.
calendarAccount -
Clazz property to attach to the event
public net.fortuna.ical4j.model.property.Attendee constructSchedulingAssistantAttendee(ICalendarAccount calendarAccount,
AppointmentRole role)
Attendee property for the specified user and role.
The PARTSTAT parameter will be set to ACCEPTED.
The RSVP parameter will be set to FALSE.
The X-UW-AVAILABLE-APPOINTMENT-ROLE parameter will be set according to the role argument.
The CN parameter will be set to the ICalendarAccount's display name.
The value will be a mailto address for the ICalendarAccount's email address.
constructSchedulingAssistantAttendee in interface IEventUtilsIEventUtils.constructSchedulingAssistantAttendee(org.jasig.schedassist.model.ICalendarAccount, org.jasig.schedassist.model.AppointmentRole)public net.fortuna.ical4j.model.property.Organizer constructOrganizer(ICalendarAccount calendarAccount)
Organizer property for the specified ICalendarAccount.
calendarAccount -
Organizer property for the ICalendarAccount
public net.fortuna.ical4j.model.Property getAttendeeForUserFromEvent(net.fortuna.ical4j.model.component.VEvent event,
ICalendarAccount calendarUser)
VEvent argument.
Return the matching Attendee for the ICalendarAccount argument, or null
if the ICalendarAccount is not in the attendee list.
getAttendeeForUserFromEvent in interface IEventUtilsIEventUtils.attendeeMatchesPerson(Property, ICalendarAccount)public net.fortuna.ical4j.model.PropertyList getAttendeeListFromEvent(net.fortuna.ical4j.model.component.VEvent event)
IEventUtilsPropertyList.
getAttendeeListFromEvent in interface IEventUtilspublic int getScheduleVisitorCount(net.fortuna.ical4j.model.component.VEvent event)
IEventUtilsAttendees in the event
that have the role AppointmentRole.VISITOR.
getScheduleVisitorCount in interface IEventUtils
public boolean willEventCauseConflict(ICalendarAccount calendarAccount,
net.fortuna.ical4j.model.component.VEvent event)
IEventUtilsVEvents will cause a conflict
(either a red/busy block in the visible schedule or cause ConflictExistsExceptions).
willEventCauseConflict in interface IEventUtilsevent - an VEvent, including non-scheduling assistant appointments
VEvent will cause a conflict for the ICalendarAccount
public boolean isAttendingMatch(net.fortuna.ical4j.model.component.VEvent event,
IScheduleVisitor visitor,
IScheduleOwner owner)
isAttendingMatch in interface IEventUtilsevent - visitor - owner -
public boolean isAttendingAsVisitor(net.fortuna.ical4j.model.component.VEvent event,
ICalendarAccount proposedVisitor)
isAttendingAsVisitor in interface IEventUtilsVEvent's attendee list as an IScheduleVisitor
public boolean isAttendingAsOwner(net.fortuna.ical4j.model.component.VEvent event,
ICalendarAccount proposedOwner)
isAttendingAsOwner in interface IEventUtilsVEvent's attendee list as an IScheduleOwnerpublic List<net.fortuna.ical4j.model.Calendar> convertScheduleForReflection(AvailableSchedule availableSchedule)
IEventUtilsAvailableSchedule into an iCalendar Calendar
for the purposes of reflection back into the calendar system.
convertScheduleForReflection in interface IEventUtilsICalendarDataDao.reflectAvailableSchedule(IScheduleOwner, AvailableSchedule)public net.fortuna.ical4j.model.Calendar wrapEventInCalendar(net.fortuna.ical4j.model.component.VEvent event)
IEventUtilsVEvent argument in a Calendar.
wrapEventInCalendar in interface IEventUtilsprotected net.fortuna.ical4j.model.Calendar wrapInternal(net.fortuna.ical4j.model.ComponentList components)
components -
public net.fortuna.ical4j.model.property.Uid generateNewUid()
IEventUtilsUid, intended for use with Scheduling Assistant VEvents.
generateNewUid in interface IEventUtilsUidprotected net.fortuna.ical4j.model.component.VEvent convertBlockToReflectionEvent(AvailableBlock block)
AvailableBlock into a VEvent that can be stored in the
calendar system to represent that same block.
This event MUST not cause conflicts.
block -
protected String constructSummaryValueForReflectionEvent(AvailableBlock block)
block -
public static String convertToICalendarFormat(Date date)
Date into the
String representation required for iCalendar.
The returned date/time will be in the UTC timezone.
date -
IllegalArgumentException - if the date argument was nullpublic static boolean isPartStatNeedsAction(net.fortuna.ical4j.model.Property attendee)
attendee -
public static URI emailToURI(String emailAddress)
String argument to a mailto URI if possible.
emailAddress -
IllegalArgumentException - if conversion failed, or if the argument was emptypublic Integer getEventVisitorLimit(net.fortuna.ical4j.model.component.VEvent event)
IEventUtilsVisitorLimit property.
If the event argument is not a Scheduling Assistant event, this method returns null.
getEventVisitorLimit in interface IEventUtilsVisitorLimit if the event is a scheduling assistant appointment; if not return nullpublic boolean isEventRecurring(net.fortuna.ical4j.model.component.VEvent event)
isEventRecurring in interface IEventUtils
public net.fortuna.ical4j.model.PeriodList calculateRecurrence(net.fortuna.ical4j.model.component.VEvent event,
Date startBoundary,
Date endBoundary)
IEventUtils
calculateRecurrence in interface IEventUtilsPeriodListpublic net.fortuna.ical4j.model.property.Uid extractUid(net.fortuna.ical4j.model.Calendar calendar)
IEventUtilsCalendar contains one and only one event (series), return the Uid.
extractUid in interface IEventUtilsUid contains by the event in this calendar
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||