Class AcademyFunctions

java.lang.Object
org.deltava.taglib.functions.AcademyFunctions

public class AcademyFunctions extends Object
A JSP Function Library to define FlightAcademy-related functions.
Since:
1.0
Version:
7.2
Author:
Luke
  • Method Details

    • isFlight

      public static boolean isFlight(CalendarEntry ce)
      Returns whether this object is an Instruction Flight.
      Parameters:
      ce - the CalendarEntry
      Returns:
      TRUE if the entry is an InstructionFlight bean, otherwise FALSE
    • isSession

      public static boolean isSession(CalendarEntry ce)
      Returns whether this object is an Instruction Session.
      Parameters:
      ce - the CalendarEntry
      Returns:
      TRUE if the entry is an InstructionSession bean, otherwise FALSE
    • isBusy

      public static boolean isBusy(CalendarEntry ce)
      Returns whether this object is an Instructor busy time entry.
      Parameters:
      ce - the CalendarEntry
      Returns:
      TRUE if the entry is an InstructionBusy bean, otherwise FALSE
    • isActive

      public static boolean isActive(Course c)
      Returns whether the Course is currently active.
      Parameters:
      c - the Course
      Returns:
      TRUE if the Course status is active, otherwise FALSE
    • filterRatings

      public static Collection<PilotRating> filterRatings(Collection<PilotRating> ratings, Collection<Certification> certs)
      Filters out Pilot Ratings that have been achieved via a Flight Academy course.
      Parameters:
      ratings - a Collection of PilotRatings
      certs - a Collection of Certifications
      Returns:
      a Collection of filtered PilotRatings
    • filterCerts

      public static Collection<Certification> filterCerts(Collection<String> codes, Collection<Certification> allCerts)
      Filters a list of Certifications to only include Certifications obtained by a Pilot.
      Parameters:
      codes - a Collection containing the codes of the Pilot's Ceritification
      allCerts - a Collection containing all Certifications
      Returns:
      a Collection of filtered Certifications