Class CourseAccessControl
java.lang.Object
org.deltava.security.command.AccessControl
org.deltava.security.command.CourseAccessControl
- All Implemented Interfaces:
Serializable
An Access Controller for Flight Academy Course profiles.
- Since:
- 1.0
- Version:
- 10.1
- Author:
- Luke
- See Also:
-
Field Summary
Fields inherited from class AccessControl
_ctx -
Constructor Summary
ConstructorsConstructorDescriptionCourseAccessControl(SecurityContext ctx, Course c) Initializes the Access Controller. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns if the user can approve completion of the Course.booleanReturns if the user can assign a Check Ride for this Course.booleanReturns if the user can assign an Instructor to this Course.booleanReturns if the user can cancel the Course.booleanReturns if the user can add a comment to the Course.booleanReturns if the user can delete the Course.booleanReturns if the user can restart the Course.booleanReturns if the user can schedule a training session.booleanReturns if the user can start the Course.booleanReturns if the user can update Course Progress.voidSets the Certification, used for validating Online courses.voidvalidate()Calculates access rights.Methods inherited from class AccessControl
validateContextModifier and TypeMethodDescriptionprotected voidValidates the command context for this access controller.
-
Constructor Details
-
CourseAccessControl
Initializes the Access Controller.- Parameters:
ctx- the security contextc- the Course bean
-
-
Method Details
-
setCertification
Sets the Certification, used for validating Online courses.- Parameters:
crt- the Certification bean
-
validate
Calculates access rights.- Specified by:
validatein classAccessControl- Throws:
AccessControlException- if the user cannot view the data
-
getCanComment
public boolean getCanComment()Returns if the user can add a comment to the Course.- Returns:
- TRUE if a comment can be added, otherwise FALSE
-
getCanUpdateProgress
public boolean getCanUpdateProgress()Returns if the user can update Course Progress.- Returns:
- TRUE if progress can be edited, otherwise FALSE
-
getCanStart
public boolean getCanStart()Returns if the user can start the Course.- Returns:
- TRUE if the course can be started, otherwise FALSE
-
getCanCancel
public boolean getCanCancel()Returns if the user can cancel the Course.- Returns:
- TRUE if the Course can be canceled, otherwise FALSE
-
getCanRestart
public boolean getCanRestart()Returns if the user can restart the Course.- Returns:
- TRUE if the Course can be restarted, otherwise FALSE
-
getCanSchedule
public boolean getCanSchedule()Returns if the user can schedule a training session.- Returns:
- TRUE if a Session can be scheduled, otherwise FALSE
-
getCanAssignInstructor
public boolean getCanAssignInstructor()Returns if the user can assign an Instructor to this Course.- Returns:
- TRUE if an Instructor can be assigned, otherwise FALSE
-
getCanAssignCheckRide
public boolean getCanAssignCheckRide()Returns if the user can assign a Check Ride for this Course.- Returns:
- TRUE if a Check Ride can be assigned, otherwise FALSE
-
getCanApprove
public boolean getCanApprove()Returns if the user can approve completion of the Course.- Returns:
- TRUE if the Course can be marked complete, otherwise FALSE
-
getCanDelete
public boolean getCanDelete()Returns if the user can delete the Course.- Returns:
- TRUE if the Course can be deleted, otherwise FALSE
-