org.jasig.schedassist.model
Class AbstractScheduleOwner

java.lang.Object
  extended by org.jasig.schedassist.model.AbstractScheduleOwner
All Implemented Interfaces:
Serializable, IScheduleOwner

public abstract class AbstractScheduleOwner
extends Object
implements IScheduleOwner

Abstract IScheduleOwner implementation. All ICalendarAccount methods are implemented by delegating to the internal ICalendarAccount required by the sole constructor.

Version:
$Id: AbstractScheduleOwner.java 2983 2011-01-26 21:52:38Z npblair $
Author:
Nicholas Blair, nblair@doit.wisc.edu
See Also:
Serialized Form

Constructor Summary
AbstractScheduleOwner(ICalendarAccount calendarAccount)
           
 
Method Summary
 boolean equals(Object obj)
           
 ICalendarAccount getCalendarAccount()
           
abstract  long getId()
          Internal identifier within the Scheduling Assistant for an IScheduleOwner.
abstract  String getPreference(Preferences preference)
           
abstract  Map<Preferences,String> getPreferences()
           
 int getPreferredDefaultVisitorLimit()
           
 String getPreferredLocation()
          Short cut method to return the owner's value for Preferences.LOCATION.
 MeetingDurations getPreferredMeetingDurations()
          Short cut method to return the owner's value for Preferences.DURATIONS.
 int getPreferredMinimumDuration()
          Short cut method to return the owner's min value for Preferences.DURATIONS as an integer.
 VisibleWindow getPreferredVisibleWindow()
          Short cut method to return the owner's value for Preferences.VISIBLE_WINDOW.
 Reminders getRemindersPreference()
          Short cut method to return the owner's value for Preferences.REMINDERS.
 int hashCode()
           
 boolean hasMeetingLimit()
          Short cut method to determine whether this owner restricts the number of appointments that a visitor can create within a visible window.
 boolean isExceedingMeetingLimit(int visibleScheduleAttendingCount)
          Short cut method to check if an attendee count for an event exceeds the owner's preferences.
 boolean isReflectSchedule()
          Short cut method backed by Preferences.REFLECT_SCHEDULE.
 boolean isSamePerson(IScheduleVisitor visitor)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractScheduleOwner

public AbstractScheduleOwner(ICalendarAccount calendarAccount)
Parameters:
calendarAccount -
Method Detail

getId

public abstract long getId()
Description copied from interface: IScheduleOwner
Internal identifier within the Scheduling Assistant for an IScheduleOwner.

Specified by:
getId in interface IScheduleOwner
Returns:
the owner's id value

getPreference

public abstract String getPreference(Preferences preference)
Specified by:
getPreference in interface IScheduleOwner
Returns:
the owner's String value for the specified Preferences

getPreferences

public abstract Map<Preferences,String> getPreferences()
Specified by:
getPreferences in interface IScheduleOwner
Returns:
a map of the owner's String values for their chosen Preferences

getCalendarAccount

public ICalendarAccount getCalendarAccount()
Specified by:
getCalendarAccount in interface IScheduleOwner
Returns:
the ICalendarAccount that registered this account

getPreferredLocation

public final String getPreferredLocation()
Description copied from interface: IScheduleOwner
Short cut method to return the owner's value for Preferences.LOCATION.

Specified by:
getPreferredLocation in interface IScheduleOwner
Returns:
the owner's preferred location preference

getRemindersPreference

public final Reminders getRemindersPreference()
Description copied from interface: IScheduleOwner
Short cut method to return the owner's value for Preferences.REMINDERS.

Specified by:
getRemindersPreference in interface IScheduleOwner
Returns:
the owner's preferred Reminders

getPreferredMeetingDurations

public final MeetingDurations getPreferredMeetingDurations()
Description copied from interface: IScheduleOwner
Short cut method to return the owner's value for Preferences.DURATIONS.

Specified by:
getPreferredMeetingDurations in interface IScheduleOwner
Returns:
the owner's preferred MeetingDurations

getPreferredVisibleWindow

public final VisibleWindow getPreferredVisibleWindow()
Description copied from interface: IScheduleOwner
Short cut method to return the owner's value for Preferences.VISIBLE_WINDOW.

Specified by:
getPreferredVisibleWindow in interface IScheduleOwner
Returns:
the owner's preferred VisibleWindow

getPreferredMinimumDuration

public final int getPreferredMinimumDuration()
Description copied from interface: IScheduleOwner
Short cut method to return the owner's min value for Preferences.DURATIONS as an integer.

Specified by:
getPreferredMinimumDuration in interface IScheduleOwner
Returns:
the owner's min value for Preferences.DURATIONS as an integer.

isSamePerson

public final boolean isSamePerson(IScheduleVisitor visitor)
Specified by:
isSamePerson in interface IScheduleOwner
Returns:
true if this instance and the IScheduleVisitor represent the same ICalendarAccount

hasMeetingLimit

public final boolean hasMeetingLimit()
Description copied from interface: IScheduleOwner
Short cut method to determine whether this owner restricts the number of appointments that a visitor can create within a visible window.

Specified by:
hasMeetingLimit in interface IScheduleOwner
Returns:
true if the owner's value for Preferences.MEETING_LIMIT is not equal to -1
See Also:
Preferences.MEETING_LIMIT

isExceedingMeetingLimit

public final boolean isExceedingMeetingLimit(int visibleScheduleAttendingCount)
Description copied from interface: IScheduleOwner
Short cut method to check if an attendee count for an event exceeds the owner's preferences.

Specified by:
isExceedingMeetingLimit in interface IScheduleOwner
Parameters:
visibleScheduleAttendingCount - the number of available attendees for an event
Returns:
true if the arguments equals or exceeds this owner's value for Preferences.MEETING_LIMIT

getPreferredDefaultVisitorLimit

public final int getPreferredDefaultVisitorLimit()
Specified by:
getPreferredDefaultVisitorLimit in interface IScheduleOwner
Returns:
this owner's preference for Preferences.DEFAULT_VISITOR_LIMIT.

isReflectSchedule

public final boolean isReflectSchedule()
Description copied from interface: IScheduleOwner
Short cut method backed by Preferences.REFLECT_SCHEDULE.

Specified by:
isReflectSchedule in interface IScheduleOwner
Returns:
true if the owner has enabled the schedule reflection preference.

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2011 Jasig. All Rights Reserved.