org.deltava.security.command
Class VideoAccessControl

java.lang.Object
  extended by org.deltava.security.command.AccessControl
      extended by 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

Field Summary
 
Fields inherited from class org.deltava.security.command.AccessControl
_ctx
 
Constructor Summary
VideoAccessControl(SecurityContext ctx, Collection<Course> courses)
          Initializes the Access Controller.
 
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 org.deltava.security.command.AccessControl
validateContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VideoAccessControl

public VideoAccessControl(SecurityContext ctx,
                          Collection<Course> courses)
Initializes the Access Controller.

Parameters:
ctx - the security context
courses - the student's currently enrollled courses
Method Detail

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.