Class ExamAccessControl

java.lang.Object
org.deltava.security.command.AccessControl
org.deltava.security.command.ExamAccessControl
All Implemented Interfaces:
Serializable

public class ExamAccessControl extends AccessControl
An Access Controller for Pilot Examinations and Check Ride records.
Since:
1.0
Version:
7.0
Author:
Luke
See Also:
  • Constructor Details

    • ExamAccessControl

      public ExamAccessControl(SecurityContext ctx, Test t, UserData ud)
      Initialize the Access controller.
      Parameters:
      ctx - the command context
      t - the Examination/CheckRide to validate against
      ud - the UserData bean for the user taking the test
    • ExamAccessControl

      public ExamAccessControl(SecurityContext ctx, Test t, UserData ud, ExamProfile ep)
      Initialize the Access controller.
      Parameters:
      ctx - the command context
      t - the Examination/CheckRide to validate against
      ud - the UserData bean for the user taking the test
      ep - the ExamProfile bean for the Exam
  • Method Details

    • validate

      public void validate() throws AccessControlException
      Calculates access rights.
      Specified by:
      validate in class AccessControl
      Throws:
      AccessControlException - if we cannot view the data
    • getCanRead

      public boolean getCanRead()
      Returns if the Test can be read.
      Returns:
      TRUE if the Test can be read, otherwise FALSE
    • getCanSubmit

      public boolean getCanSubmit()
      Returns if the Test can be submitted.
      Returns:
      TRUE if the Test can be submitted, otherwise FALSE
    • getCanScore

      public boolean getCanScore()
      Returns if the Test can be scored.
      Returns:
      TRUE if the Test can be scored, otherwise FALSE
    • getCanEdit

      public boolean getCanEdit()
      Returns if the Test can be edited.
      Returns:
      TRUE if the Test can be edited, otherwise FALSE
    • getCanDelete

      public boolean getCanDelete()
      Returns if the Test can be deleted.
      Returns:
      TRUE if the Test can be deleted, otherwise FALSE
    • getCanViewAnswers

      public boolean getCanViewAnswers()
      Returns if the correct answers to this Test's questions can be viewed.
      Returns:
      TRUE if the correct answers can be viewed, otherwise FALSE