org.deltava.security.command
Class PilotAccessControl

java.lang.Object
  extended by org.deltava.security.command.AccessControl
      extended by org.deltava.security.command.PilotAccessControl
Direct Known Subclasses:
CrossAppPilotAccessControl

public class PilotAccessControl
extends AccessControl

An access controller for Pilot profile operations.

Since:
1.0
Version:
3.0
Author:
Luke

Field Summary
protected  Pilot _p
           
 
Fields inherited from class org.deltava.security.command.AccessControl
_ctx
 
Constructor Summary
PilotAccessControl(SecurityContext ctx, Pilot p)
          Initializes the Access controller.
 
Method Summary
 boolean getCanActivate()
          Returns if the pilot can be activated.
 boolean getCanAssignRide()
          Returns if a check ride can be assigned to this Pilot.
 boolean getCanChangeMailProfile()
          Returns if the pilot's IMAP mailbox profile can be edited.
 boolean getCanChangeRoles()
          Returns if the pilot's access roles can be edited.
 boolean getCanChangeSignature()
          Returns if the pilot's Water Cooler signature image can be edited.
 boolean getCanChangeStaffProfile()
          Returns if the pilot's staff profile can be edited.
 boolean getCanChangeStatus()
          Returns if the pilot's status can be edited.
 boolean getCanEdit()
          Returns if the pilot profile can be edited.
 boolean getCanInactivate()
          Returns if the Pilot can be suspended/inactivated.
 boolean getCanPromote()
          Returns if the pilot can be promoted.
 boolean getCanTakeLeave()
          Returns if the Pilot can be pleaced On Leave.
 boolean getCanTransfer()
          Returns if the Pilot can be transferred to another airline.
 boolean getCanViewEmail()
          Returns if the e-mail address can be viewed.
 boolean getCanViewExams()
          Returns if the Pilot's examination history can be viewed.
 boolean getIsOurs()
          Returns if we are currently accessing our own profile.
 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
 

Field Detail

_p

protected Pilot _p
Constructor Detail

PilotAccessControl

public PilotAccessControl(SecurityContext ctx,
                          Pilot p)
Initializes the Access controller.

Parameters:
ctx - the command context
p - the Pilot profile
Method Detail

validate

public void validate()
Calculates access rights.

Specified by:
validate in class AccessControl

getIsOurs

public boolean getIsOurs()
Returns if we are currently accessing our own profile.

Returns:
TRUE if the profile is that of the currently logged in user, otherwise FALSE

getCanEdit

public boolean getCanEdit()
Returns if the pilot profile can be edited.

Returns:
TRUE if the profile can be edited, otherwise FALSE

getCanTakeLeave

public boolean getCanTakeLeave()
Returns if the Pilot can be pleaced On Leave.

Returns:
TRUE if the Pilot can be placed on Leave, otherwise FALSE

getCanViewEmail

public boolean getCanViewEmail()
Returns if the e-mail address can be viewed.

Returns:
TRUE if the address can be viewed, otherwise FALSE

getCanViewExams

public boolean getCanViewExams()
Returns if the Pilot's examination history can be viewed.

Returns:
TRUE if the exams can be viewed, otherwise FALSE

getCanChangeStatus

public boolean getCanChangeStatus()
Returns if the pilot's status can be edited.

Returns:
TRUE if the status can be edited, otherwise FALSE

getCanInactivate

public boolean getCanInactivate()
Returns if the Pilot can be suspended/inactivated.

Returns:
TRUE if the Pilot can be inactivated, otherwise FALSE

getCanAssignRide

public boolean getCanAssignRide()
Returns if a check ride can be assigned to this Pilot.

Returns:
TRUE if a check ride can be assigned, otherwise FALSE

getCanPromote

public boolean getCanPromote()
Returns if the pilot can be promoted.

Returns:
TRUE if the rank/equipment type can be edited, otherwise FALSE

getCanChangeRoles

public boolean getCanChangeRoles()
Returns if the pilot's access roles can be edited.

Returns:
TRUE if the access roles can be edited, otherwise FALSE

getCanChangeStaffProfile

public boolean getCanChangeStaffProfile()
Returns if the pilot's staff profile can be edited.

Returns:
TRUE if the staff profile can be edited, otherwise FALSE

getCanChangeMailProfile

public boolean getCanChangeMailProfile()
Returns if the pilot's IMAP mailbox profile can be edited.

Returns:
TRUE if the mailbox profile can be edited, otherwise FALSE

getCanChangeSignature

public boolean getCanChangeSignature()
Returns if the pilot's Water Cooler signature image can be edited.

Returns:
TRUE if the signature image can be edited, otherwise FALSE

getCanTransfer

public boolean getCanTransfer()
Returns if the Pilot can be transferred to another airline.

Returns:
TRUE if the Pilot can be transferred, otherwise FALSE

getCanActivate

public boolean getCanActivate()
Returns if the pilot can be activated. This is a convenience method, since it just checks if the Pilot is Inactive or Retired, and the canChangeStatus property is TRUE.

Returns:
TRUE if the Pilot can be activated, otherwise FALSE
See Also:
getCanChangeStatus()


Copyright © 2004-2009 Global Virtual Airlines Group. All Rights Reserved.