| Package | org.springextensions.actionscript.security.impl |
| Class | public class SimpleStageSecurityManager |
| Inheritance | SimpleStageSecurityManager flash.events.EventDispatcher |
| Implements | ISecurityManager |
ISecurityManager that restricts the access to a list of Objects, the way this restriction works is determined by
an instance of the AccessStrategy enum.
| Property | Defined By | ||
|---|---|---|---|
| accessStrategy : AccessStrategy
The AccessStrategy that determines which property on the list of managed Objects will be used
to restrict access. | SimpleStageSecurityManager | ||
| objects : Dictionary
A Vector of Objects whose access is restricted by the current SimpleStageSecurityManager. | SimpleStageSecurityManager | ||
| rights : Vector.<String>
A Vector of strings that represent the right names that are applicable to the current IMembershipOwner
| SimpleStageSecurityManager | ||
| roles : Vector.<String>
A Vector of strings that represent the role names that are applicable to the current IMembershipOwner
| SimpleStageSecurityManager | ||
| Method | Defined By | ||
|---|---|---|---|
SimpleStageSecurityManager(membershipOwner:IMembershipOwner = null)
Creates a new SimpleStageSecurityManager instance. | SimpleStageSecurityManager | ||
checkMembership(owner:IMembershipOwner):Boolean
Checks the specified IMembershipOwner against the roles and rights
of the current SimpleStageSecurityManager. | SimpleStageSecurityManager | ||
| Method | Defined By | ||
|---|---|---|---|
isInRights(owner:IMembershipOwner):Boolean
Returns true if the specified IMembershipOwner has any rights equal to the current SimpleStageSecurityManager rights. | SimpleStageSecurityManager | ||
isInRoles(owner:IMembershipOwner):Boolean
Returns true if the specified IMembershipOwner has any roles equal to the current SimpleStageSecurityManager roles. | SimpleStageSecurityManager | ||
isInVector(sourceArray:Vector.<String>, checkedArray:Vector.<String>):Boolean
Returns true if one of the items in the checkedArray exists in the sourceArray. | SimpleStageSecurityManager | ||
restrictAccess(component:Object, strategy:AccessStrategy, state:Boolean):void
Sets a property whose name is specified by the AccessStrategy on the UIComponent to the value
of the state argument. | SimpleStageSecurityManager | ||
setAccess(state:Boolean):void
Sets a property determined by the accessStrategy to true or false (based on the state value) on all
the Objects that the current SimpleStageSecurityManager manages by invoking the restrictAccess()
for each UIComponents
| SimpleStageSecurityManager | ||
| accessStrategy | property |
accessStrategy:AccessStrategy
The AccessStrategy that determines which property on the list of managed Objects will be used
to restrict access.
public function get accessStrategy():AccessStrategy public function set accessStrategy(value:AccessStrategy):void| objects | property |
objects:Dictionary
A Vector of Objects whose access is restricted by the current SimpleStageSecurityManager.
public function get objects():Dictionary public function set objects(value:Dictionary):voidSee also
| rights | property |
rights:Vector.<String>
A Vector of strings that represent the right names that are applicable to the current IMembershipOwner
public function get rights():Vector.<String> public function set rights(value:Vector.<String>):void| roles | property |
roles:Vector.<String>
A Vector of strings that represent the role names that are applicable to the current IMembershipOwner
public function get roles():Vector.<String> public function set roles(value:Vector.<String>):void| SimpleStageSecurityManager | () | Constructor |
public function SimpleStageSecurityManager(membershipOwner:IMembershipOwner = null)
Creates a new SimpleStageSecurityManager instance.
membershipOwner:IMembershipOwner (default = null) — a IMembershipOwner instance whose roles and rights are applicable to the list of Objects
that the current SimpleStageSecurityManager manages.
|
| checkMembership | () | method |
public function checkMembership(owner:IMembershipOwner):Boolean
Checks the specified IMembershipOwner against the roles and rights
of the current SimpleStageSecurityManager. Roles take precendence in this,
so if the roles list of the SimpleStageSecurityManager is not empty and the
specified IMembershipOwner shares one or more roles true is returned,
if not the same check is done for the rights.
Parameters
owner:IMembershipOwner |
Boolean |
| isInRights | () | method |
protected function isInRights(owner:IMembershipOwner):Boolean
Returns true if the specified IMembershipOwner has any rights equal to the current SimpleStageSecurityManager rights.
Parameters
owner:IMembershipOwner |
Boolean |
| isInRoles | () | method |
protected function isInRoles(owner:IMembershipOwner):Boolean
Returns true if the specified IMembershipOwner has any roles equal to the current SimpleStageSecurityManager roles.
Parameters
owner:IMembershipOwner |
Boolean |
| isInVector | () | method |
protected function isInVector(sourceArray:Vector.<String>, checkedArray:Vector.<String>):Boolean
Returns true if one of the items in the checkedArray exists in the sourceArray.
Parameters
sourceArray:Vector.<String> — The array of which one or more items need to be contained in the checkedArray.
| |
checkedArray:Vector.<String> — The array that needs to contain one or more items of the sourceArray.
|
Boolean — true if one of the items in the checkedArray exists in the sourceArray.
|
| restrictAccess | () | method |
protected function restrictAccess(component:Object, strategy:AccessStrategy, state:Boolean):void
Sets a property whose name is specified by the AccessStrategy on the UIComponent to the value
of the state argument.
Parameters
component:Object — The specified UIComponent
| |
strategy:AccessStrategy — The specified AccessStrategy which determines which property will be set on the UIComponent
| |
state:Boolean — The value of the property that will be set
|
| setAccess | () | method |
protected function setAccess(state:Boolean):void
Sets a property determined by the accessStrategy to true or false (based on the state value) on all
the Objects that the current SimpleStageSecurityManager manages by invoking the restrictAccess()
for each UIComponents
Parameters
state:Boolean |