|
||||||||||
| 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(IAffiliationSource affiliationSource)
|
|
| Method Summary | |
|---|---|
boolean |
attendeeMatchesPerson(net.fortuna.ical4j.model.Property attendee,
ICalendarAccount calendarAccount)
|
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.Attendee |
constructAvailableAttendee(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. |
static URI |
emailToURI(String emailAddress)
Convert the String argument to a mailto URI if possible. |
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. |
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. |
static boolean |
isPartStatNeedsAction(net.fortuna.ical4j.model.Property attendee)
|
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. |
| 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 affiliationSource)
affiliationSource - | Method Detail |
|---|
public IAffiliationSource getAffiliationSource()
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
public net.fortuna.ical4j.model.property.Attendee constructAvailableAttendee(ICalendarAccount calendarAccount,
AppointmentRole role)
Attendee property for the specified user and role.
The PARTSTAT parameter will be set to ACCEPTED.
The CUTYPE parameter will be set to INDIVIDUAL.
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.
constructAvailableAttendee in interface IEventUtilscalendarAccount - role -
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 IEventUtilspublic 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 empty
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||