org.deltava.security.command
Class VideoAccessControl
java.lang.Object
org.deltava.security.command.AccessControl
org.deltava.security.command.VideoAccessControl
public class VideoAccessControl
- extends AccessControl
An Access Controller for Flight Academy training videos.
- Since:
- 1.0
- Version:
- 2.2
- Author:
- Luke
|
Method Summary |
boolean |
getCanRead()
Returns whether the user can view this Video. |
void |
updateContext(Video video)
Updates the video to validate access for. |
void |
validate()
Calculates access rights. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VideoAccessControl
public VideoAccessControl(SecurityContext ctx,
Collection<Course> courses)
- Initializes the Access Controller.
- Parameters:
ctx - the security contextcourses - the student's currently enrollled courses
updateContext
public void updateContext(Video video)
- Updates the video to validate access for.
- Parameters:
video - the Video to check
validate
public void validate()
- Calculates access rights.
- Specified by:
validate in class AccessControl
getCanRead
public boolean getCanRead()
- Returns whether the user can view this Video.
- Returns:
- TRUE if the video can be read, otherwise FALSE
Copyright © 2004-2009 Global Virtual Airlines Group. All Rights Reserved.