Class ExamAccessControl
java.lang.Object
org.deltava.security.command.AccessControl
org.deltava.security.command.ExamAccessControl
- All Implemented Interfaces:
Serializable
An Access Controller for Pilot Examinations and Check Ride records.
- Since:
- 1.0
- Version:
- 7.0
- Author:
- Luke
- See Also:
-
Field Summary
Fields inherited from class org.deltava.security.command.AccessControl
_ctx
-
Constructor Summary
ConstructorsConstructorDescriptionExamAccessControl
(SecurityContext ctx, Test t, UserData ud) Initialize the Access controller.ExamAccessControl
(SecurityContext ctx, Test t, UserData ud, ExamProfile ep) Initialize the Access controller. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns if the Test can be deleted.boolean
Returns if the Test can be edited.boolean
Returns if the Test can be read.boolean
Returns if the Test can be scored.boolean
Returns if the Test can be submitted.boolean
Returns if the correct answers to this Test's questions can be viewed.void
validate()
Calculates access rights.Methods inherited from class org.deltava.security.command.AccessControl
validateContext
-
Constructor Details
-
ExamAccessControl
Initialize the Access controller.- Parameters:
ctx
- the command contextt
- the Examination/CheckRide to validate againstud
- the UserData bean for the user taking the test
-
ExamAccessControl
Initialize the Access controller.- Parameters:
ctx
- the command contextt
- the Examination/CheckRide to validate againstud
- the UserData bean for the user taking the testep
- the ExamProfile bean for the Exam
-
-
Method Details
-
validate
Calculates access rights.- Specified by:
validate
in classAccessControl
- 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
-