org.jasig.schedassist.portlet
Class PortletSchedulingAssistantServiceImpl

java.lang.Object
  extended by org.jasig.schedassist.portlet.WebServicesDaoSupport
      extended by org.jasig.schedassist.portlet.PortletSchedulingAssistantServiceImpl
All Implemented Interfaces:
PortletSchedulingAssistantService

public final class PortletSchedulingAssistantServiceImpl
extends WebServicesDaoSupport
implements PortletSchedulingAssistantService

Mimics SchedulingAssistantService and RelationshipDao, however IScheduleOwner and IScheduleVisitor arguments are replaced with Strings containing solely the username.

Version:
$Id: PortletAvailableServiceImpl.java 3024 2011-02-01 19:25:08Z npblair $
Author:
Nicholas Blair, nblair@doit.wisc.edu

Field Summary
static String CANCEL_FAILED_MESSAGE
           
static String CONFLICT_MESSAGE
           
static String TIME_NOT_AVAILABLE_MESSAGE
           
 
Fields inherited from class org.jasig.schedassist.portlet.WebServicesDaoSupport
INELIGIBLE_MESSAGE, SERVICE_UNAVAILABLE_MESSAGE
 
Constructor Summary
PortletSchedulingAssistantServiceImpl()
           
 
Method Summary
 List<AvailableBlock> calculateVisitorConflicts(String visitorUsername, long ownerId, int weekStart)
           
 EventCancellation cancelAppointment(String visitorUsername, long ownerId, AvailableBlock block, String cancelReason)
           
protected static AvailableBlock convertAvailableBlockElement(AvailableBlockElement element)
          Convert a AvailableBlockElement into a AvailableBlock.
protected static IScheduleOwner convertOwnerElement(ScheduleOwnerElement element)
          Convert a ScheduleOwnerElement into an IScheduleOwner.
 AvailableBlock getTargetBlock(IScheduleOwner owner, Date startTime)
           
protected  AvailableBlock getTargetBlockInternal(IScheduleOwner owner, Date startTime, boolean doubleLength)
           
 AvailableBlock getTargetDoubleLengthBlock(IScheduleOwner owner, Date startTime)
           
 VisibleSchedule getVisibleSchedule(String visitorUsername, long ownerId)
           
 VisibleSchedule getVisibleSchedule(String visitorUsername, long ownerId, int weekStart)
           
 boolean isEligible(String visitorUsername)
           
 List<Relationship> relationshipsForVisitor(String visitorUsername)
           
 net.fortuna.ical4j.model.component.VEvent scheduleAppointment(String visitorUsername, long ownerId, AvailableBlock block, String eventDescription)
           
 
Methods inherited from class org.jasig.schedassist.portlet.WebServicesDaoSupport
doSendAndReceive, setWebServiceTemplate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONFLICT_MESSAGE

public static final String CONFLICT_MESSAGE
See Also:
Constant Field Values

TIME_NOT_AVAILABLE_MESSAGE

public static final String TIME_NOT_AVAILABLE_MESSAGE
See Also:
Constant Field Values

CANCEL_FAILED_MESSAGE

public static final String CANCEL_FAILED_MESSAGE
See Also:
Constant Field Values
Constructor Detail

PortletSchedulingAssistantServiceImpl

public PortletSchedulingAssistantServiceImpl()
Method Detail

isEligible

public boolean isEligible(String visitorUsername)
Specified by:
isEligible in interface PortletSchedulingAssistantService
Returns:
true if the customer account specified by visitorUsername is eligible for service

cancelAppointment

public EventCancellation cancelAppointment(String visitorUsername,
                                           long ownerId,
                                           AvailableBlock block,
                                           String cancelReason)
                                    throws SchedulingException
Specified by:
cancelAppointment in interface PortletSchedulingAssistantService
Returns:
the event that was canceled
Throws:
SchedulingException
See Also:
SchedulingAssistantService.cancelAppointment(org.jasig.schedassist.model.IScheduleVisitor, IScheduleOwner, VEvent, AvailableBlock, String)

getVisibleSchedule

public VisibleSchedule getVisibleSchedule(String visitorUsername,
                                          long ownerId)
Specified by:
getVisibleSchedule in interface PortletSchedulingAssistantService
Returns:
See Also:
SchedulingAssistantService.getVisibleSchedule(org.jasig.schedassist.model.IScheduleVisitor, IScheduleOwner)

getVisibleSchedule

public VisibleSchedule getVisibleSchedule(String visitorUsername,
                                          long ownerId,
                                          int weekStart)
Specified by:
getVisibleSchedule in interface PortletSchedulingAssistantService
Returns:
See Also:
SchedulingAssistantService.getVisibleSchedule(org.jasig.schedassist.model.IScheduleVisitor, IScheduleOwner, Date, Date)

calculateVisitorConflicts

public List<AvailableBlock> calculateVisitorConflicts(String visitorUsername,
                                                      long ownerId,
                                                      int weekStart)
Specified by:
calculateVisitorConflicts in interface PortletSchedulingAssistantService
Returns:
See Also:
SchedulingAssistantService.calculateVisitorConflicts(org.jasig.schedassist.model.IScheduleVisitor, IScheduleOwner, Date, Date)

getTargetBlock

public AvailableBlock getTargetBlock(IScheduleOwner owner,
                                     Date startTime)
Specified by:
getTargetBlock in interface PortletSchedulingAssistantService
Returns:
See Also:
AvailableScheduleDao#retrieveTargetBlock(IScheduleOwner, Date)

getTargetDoubleLengthBlock

public AvailableBlock getTargetDoubleLengthBlock(IScheduleOwner owner,
                                                 Date startTime)
Specified by:
getTargetDoubleLengthBlock in interface PortletSchedulingAssistantService
Returns:
See Also:
AvailableScheduleDao#retrieveTargetDoubleLengthBlock(IScheduleOwner, Date)

getTargetBlockInternal

protected AvailableBlock getTargetBlockInternal(IScheduleOwner owner,
                                                Date startTime,
                                                boolean doubleLength)
Parameters:
owner -
startTime -
doubleLength -
Returns:

scheduleAppointment

public net.fortuna.ical4j.model.component.VEvent scheduleAppointment(String visitorUsername,
                                                                     long ownerId,
                                                                     AvailableBlock block,
                                                                     String eventDescription)
                                                              throws SchedulingException
Specified by:
scheduleAppointment in interface PortletSchedulingAssistantService
Returns:
Throws:
SchedulingException
See Also:
SchedulingAssistantService.scheduleAppointment(org.jasig.schedassist.model.IScheduleVisitor, IScheduleOwner, AvailableBlock, String)

relationshipsForVisitor

public List<Relationship> relationshipsForVisitor(String visitorUsername)
Specified by:
relationshipsForVisitor in interface PortletSchedulingAssistantService
Returns:
See Also:
RelationshipDao.forVisitor(org.jasig.schedassist.model.IScheduleVisitor)

convertOwnerElement

protected static IScheduleOwner convertOwnerElement(ScheduleOwnerElement element)
Convert a ScheduleOwnerElement into an IScheduleOwner.

Parameters:
element -
Returns:

convertAvailableBlockElement

protected static AvailableBlock convertAvailableBlockElement(AvailableBlockElement element)
Convert a AvailableBlockElement into a AvailableBlock.

Parameters:
element -
Returns:


Copyright © 2012 Jasig. All Rights Reserved.