| Package | org.springextensions.actionscript.security |
| SVN browsing | SimpleStageSecurityManager.as |
| Fisheye | SimpleStageSecurityManager.as |
| Class | public class SimpleStageSecurityManager |
| Inheritance | SimpleStageSecurityManager flash.events.EventDispatcher |
| Implements | ISecurityManager |
ISecurityManager that restricts the access to a list of UIComponents, 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 UIComponents will be used
to restrict access. | SimpleStageSecurityManager | ||
| objects : Dictionary
An array of
UIComponents whose access is restricted by the current SimpleStageSecurityManager. | SimpleStageSecurityManager | ||
| rights : Array
An array of strings that represent the right names that are applicable to the current
IMembershipOwner
| SimpleStageSecurityManager | ||
| roles : Array
An array 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 | ||
|---|---|---|---|
|
checkObjectDictionary(objects:Dictionary):void
Checks if all the objects in the specified Dictionary are of type
UIComponent. | SimpleStageSecurityManager | ||
|
isInArray(sourceArray:Array, checkedArray:Array):Boolean
Returns
true if one of the items in the checkedArray exists in the sourceArray. | SimpleStageSecurityManager | ||
|
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 | ||
|
restrictAccess(component:UIComponent, 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 UIComponents that the current SimpleStageSecurityManager manages by invoking the restrictAccess()
for each UIComponents
| SimpleStageSecurityManager | ||
| accessStrategy | property |
accessStrategy:AccessStrategy [read-write]
The AccessStrategy that determines which property on the list of managed UIComponents will be used
to restrict access.
public function get accessStrategy():AccessStrategy
public function set accessStrategy(value:AccessStrategy):void
| objects | property |
objects:Dictionary [read-write]
An array of UIComponents whose access is restricted by the current SimpleStageSecurityManager.
public function get objects():Dictionary
public function set objects(value:Dictionary):void
See also
| rights | property |
rights:Array [read-write]
An array of strings that represent the right names that are applicable to the current IMembershipOwner
public function get rights():Array
public function set rights(value:Array):void
| roles | property |
roles:Array [read-write]
An array of strings that represent the role names that are applicable to the current IMembershipOwner
public function get roles():Array
public function set roles(value:Array):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 UIComponents
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.
owner:IMembershipOwner |
Boolean |
| checkObjectDictionary | () | method |
protected function checkObjectDictionary(objects:Dictionary):void
Checks if all the objects in the specified Dictionary are of type UIComponent.
objects:Dictionary — The array of objects that will be checked
|
— If one or more of the objects is not of type UIComponent.
|
| isInArray | () | method |
protected function isInArray(sourceArray:Array, checkedArray:Array):Boolean
Returns true if one of the items in the checkedArray exists in the sourceArray.
sourceArray:Array — The array of which one or more items need to be contained in the checkedArray.
|
|
checkedArray:Array — 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.
|
| isInRights | () | method |
protected function isInRights(owner:IMembershipOwner):Boolean
Returns true if the specified IMembershipOwner has any rights equal to the current SimpleStageSecurityManager rights.
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.
owner:IMembershipOwner |
Boolean |
| restrictAccess | () | method |
protected function restrictAccess(component:UIComponent, 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.
component:UIComponent — 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 UIComponents that the current SimpleStageSecurityManager manages by invoking the restrictAccess()
for each UIComponents
state:Boolean |