Class PIREPAccessControl

java.lang.Object
org.deltava.security.command.AccessControl
org.deltava.security.command.PIREPAccessControl
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
CrossAppPIREPAccessControl

public class PIREPAccessControl extends AccessControl
An access controller for Flight Report operations.
Since:
1.0
Version:
11.6
Author:
Luke
See Also:
  • Field Details

  • Constructor Details

    • PIREPAccessControl

      public PIREPAccessControl(SecurityContext ctx, FlightReport fr)
      Initializes the controller.
      Parameters:
      ctx - the Command Context
      fr - the Flight Report to be operated on
  • Method Details

    • validate

      public void validate()
      Description copied from class: AccessControl
      Calculates access control rights
      Specified by:
      validate in class AccessControl
    • getCanCreate

      public boolean getCanCreate()
      Returns if a new PIREP can be created.
      Returns:
      TRUE if it can be created, otherwise FALSE
    • getCanEdit

      public boolean getCanEdit()
      Returns if the PIREP can be edited.
      Returns:
      TRUE if it can be edited, otherwise FALSE
    • getCanEditCore

      public boolean getCanEditCore()
      Returns if core flight data (airports, airline, date, equipment) can be modified.
      Returns:
      TRUE if core fields can be modified, otherwise FALSE
    • getCanSubmit

      public boolean getCanSubmit()
      Returns if the PIREP can be submitted.
      Returns:
      TRUE if it can be submitted and the length is non-zero, otherwise FALSE
      See Also:
    • getCanWithdraw

      public boolean getCanWithdraw()
      Returns if the PIREP can be withdrawn.
      Returns:
      TRUE if the PIREP can be withdrawan, otherwise FALSE
    • getCanSubmitIfEdit

      public boolean getCanSubmitIfEdit()
      Returns if the PIREP can be submitted when editing. This returns the same value as canSubmit, except it does not check if the PIREP time is greater than zero. This allows us to edit a draft 0 length PIREP, and still have the submit button available.
      Returns:
      TRUE if it can be submitted, otherwise FALSE
      See Also:
    • getCanCalculateLoad

      public boolean getCanCalculateLoad()
      Returns if the load factor for this PIREP can be calculated in advance.
      Returns:
      TRUE if can be calculated (draft, ours, load factor not set), otherwise FALSE
    • getCanHold

      public boolean getCanHold()
      Returns if the PIREP can be held.
      Returns:
      TRUE if it can be held, otherwise FALSE
    • getCanRelease

      public boolean getCanRelease()
      Returns if the PIREP can be released from hold status.
      Returns:
      TRUE if it can be released, otherwise FALSE
    • getCanApprove

      public boolean getCanApprove()
      Returns if the PIREP can be approved.
      Returns:
      TRUE if it can be approved, otherwise FALSE
    • getCanReject

      public boolean getCanReject()
      Returns if the PIREP can be rejected.
      Returns:
      TRUE if it can be rejected, otherwise FALSE
    • getCanDelete

      public boolean getCanDelete()
      Returns if the PIREP can be deleted.
      Returns:
      TRUE if it can be deleted, otherwise FALSE
    • getCanViewComments

      public boolean getCanViewComments()
      Returns whether the disposition comments can be viewed.
      Returns:
      TRUE if the comments can be viewed, otherwise FALSE
    • getCanUpdateComments

      public boolean getCanUpdateComments()
      Returns whether the disposition comments can be updated.
      Returns:
      TRUE if the comments can be updated, otherwise FALSE
    • getCanViewDiagnosticData

      public boolean getCanViewDiagnosticData()
      Returns whether the ACARS diagnostic data can be viewed.
      Returns:
      TRUE if the diagnostic data can eb viewed, otherwise FALSE
    • getOurFlight

      public boolean getOurFlight()
      Returns if the PIREP was submitted by the current user.
      Returns:
      TRUE if it the current created this PIREP, otherwise FALSE
    • getCanDispose

      public boolean getCanDispose()
      Returns if the PIREP can be disposed of in any way (approved/rejected/held) by the current user.
      Returns:
      TRUE if the PIREP can be approved, rejected or held, otherwise FALSE
      See Also:
    • getCanPreApprove

      public boolean getCanPreApprove()
      Returns if the user can pre-approve a Charter Flight.
      Returns:
      TRUE if a flight can be pre-approved, otherwise FALSE
    • getCanProxySubmit

      public boolean getCanProxySubmit()
      Returns if the user can submit a Flight Report on behalf of another user.
      Returns:
      TRUE if the flight can be submitted on their behalf, otherwise FALSE
    • getCanOverrideDateRange

      public boolean getCanOverrideDateRange()
      Returns if the user can override date range limitations for PIREP submission.
      Returns:
      TRUE if the flight can be submitted outside the allowed date range, otherwise FALSE
    • getCanAdjustEvents

      public boolean getCanAdjustEvents()
      Returns if the user can adjust Tour/Online Event flags for this PIREP.
      Returns:
      TRUE if Event/Tour credit can be adjusted, otherwise FALSE
    • getCanUseSimBrief

      public boolean getCanUseSimBrief()
      Returns if the user can plot this flight using SimBrief.
      Returns:
      TRUE if SimBrief can be invoked, otherwise FALSE
    • getCanViewSimBrief

      public boolean getCanViewSimBrief()
      Returns if the user can view the flight's SimBrief briefing data.
      Returns:
      TRUE if the SimBrief data can be viewed, otherwise FALSE
    • getCanViewScore

      public boolean getCanViewScore()
      Returns if the user can view the calculated Flight Score.
      Returns:
      TRUE if the Flight Score can be viewed, otherwise FALSE
    • getCanEliteRescore

      public boolean getCanEliteRescore()
      Returns if the user can recalculate the Elite program score for this Flight Report.
      Returns:
      TRUE if Elite score can be recalculated, otherwise FALSE