APPT_QUOTA_RULE_EXTENSION

Description: You can use this code extension type to override appointment quota rules.

Abstract Base Class: AbstractApptQuotaRuleExtension

Method:

getSlotsForDate() - used to override internal getSlotsForDate logic of AppointmentQuotaRule

validateTransactionQuota()- used to override internal validateTransactionQuota logic of AppointmentTimeSlot

Interface:EApptQuotaRuleExtension

Module: Road

Version Added: 3.8.14, 3.9

Requires Code Extension Name or Name Pattern:No

Code Extension Name or Name Pattern: N/A

Where to Specify Code Extensions of this Type:

Add/Edit Appointment Rule Form > Quota Rules Tab - select the value from the ‘Quota Rules Extension’ lookup field, pick the extension name from the LOV

System-Seeded Code Extensions Using this Type: None

Click here to view the code example (on page 1) for this extension type.

 

Example: APPT_QUOTA_RULE_EXTENSION

Code example

The following sample code implements a code extension of type APPT_QUOTA_RULE_EXTENSION (on page 1) to override the appointment quota rules in N4.

class ApptQuotaRuleOverride extends AbstractApptQuotaRuleExtension {

    /**

     * Used to override internal getSlotsForDate logic of AppointmentQuotaRule

     *

     * @param inTransType     for which timeslots should be retrieved

     * @param inRequestedDate for which timeslots should be retrieved; not null

     * @param inApg           appointment priority group

     * @param inGateGkey      appointment  gate gkey

     * @param inApptQuotaRule      Appointment Quota Rule

     * @return a Map of all possible (with openings) timeSlots for the given day and transaction type; empty Map if none are available

     */

   public Map<Date, TimeSlotBean> getSlotsForDate(

            TranSubTypeEnum inTransType,

            @NotNull Date inRequestedDate,

            AppointmentPriorityGroup inApg,

            Serializable inGateGkey,

            AppointmentQuotaRule inApptQuotaRule)

{        return inApptQuotaRule.internalGetSlotsForDate(inTransType,inRequestedDate,inApg,inGateGkey);    };

     /**

     * Used to override internal validateTransactionQuota logic of AppointmentTimeSlot

     *

     * @throws BizViolation BizViolation

     * @param inGappt inGappt

     * @param inApptTimeSlot AppointmentTimeSlot

     */

      public void validateTransactionQuota(GateAppointment inGappt, AppointmentTimeSlot inApptTimeSlot)  throws BizViolation {

       inApptTimeSlot.internalValidateTransactionQuota(inGappt);

}