Package AccessGrid :: Package Security :: Module Action :: Class Action
[show private | hide private]
[frames | no frames]

Class Action

Known Subclasses:
MethodAction

The Action base class.
Method Summary
  __init__(self, name, roles)
Return the return of this is an Action object.
  __str__(self)
The __str__ method provides a way to print this object as a string.
  _repr_(self)
The repr method produces an XML representation of the action object.
  AddRole(self, role)
This method adds a role to the action.
  FindRole(self, roleName)
This method searchs for a Role object (by name) in this action.
  GetName(self)
Simple accessor for the name attribute.
  GetRoles(self)
This method retrieves the list of roles assocatied with this action.
  GetRolesAsStrings(self)
Returns the list of roles as strings.
  HasRole(self, role)
This method checks to see if the specified role is found in the action.
  RemoveRole(self, role)
Remove a role from the action.
  SetName(self, name)
This is the accessor that sets the name of the action.
  SetRoles(self, roles)
This method sets the action's role list, it overwrites the previous value.
  ToXML(self, doc, ref)
The ToXML converts this objects to a DOM subtree of the specified DOM Document.

Class Variable Summary

string

This class provides all the common action functionality.
TYPE: The type of the action object, currently this is an opaque string.

Method Details

__init__(self, name, roles=None)
(Constructor)

Parameters:
name - This is the name of the Action.
           (type=string)
roles - This is a list of roles to initialize the action with.
           (type=list of AccessGrid.Security.Role objects.)
Returns:
The return of this is an Action object.

__str__(self)
(Informal representation operator)

The __str__ method provides a way to print this object as a string.

_repr_(self)

The repr method produces an XML representation of the action object.

AddRole(self, role)

This method adds a role to the action.
Parameters:
role - the role to add to this action.
           (type=AccessGrid.Security.Role)
Returns:
the role that was added to this action.

FindRole(self, roleName)

This method searchs for a Role object (by name) in this action. If it is found it is returned, otherwise None is returned.
Parameters:
roleName - the name of the role being searched for.
           (type=string)
Returns:
the role found that matches roleName or None

GetName(self)

Simple accessor for the name attribute.
Returns:
the name of the action

GetRoles(self)

This method retrieves the list of roles assocatied with this action.
Returns:
the list of roles in this object.

GetRolesAsStrings(self)

Returns the list of roles as strings.

HasRole(self, role)

This method checks to see if the specified role is found in the action.
Parameters:
role - a role to find in the action.
           (type=AccessGrid.Security.Role)
Returns:
a flag indicating if the role was found (1) or not (0)

RemoveRole(self, role)

Remove a role from the action.
Parameters:
role - a role to remove from this action.
           (type=AccessGrid.Security.Role)
Returns:
the role removed is returned

SetName(self, name)

This is the accessor that sets the name of the action.
Parameters:
name - the name being specified for this action.
           (type=string)
Returns:
the name the action is set to

SetRoles(self, roles)

This method sets the action's role list, it overwrites the previous value.
Parameters:
roles - a list of roles to set the actions roles to
           (type=a list of AccessGrid.Security.Role objects.)
Returns:
a list of roles added.

ToXML(self, doc, ref=0)

The ToXML converts this objects to a DOM subtree of the specified DOM Document.
Parameters:
doc - the DOM document this xml should be a part of.
           (type=an xml.dom.minidom Document)

Class Variable Details

TYPE

The type of the action object, currently this is an opaque string.
Type:

string

This class provides all the common action functionality.
Value:
'Invalid'                                                              

Generated by Epydoc 2.1 on Thu Apr 14 16:39:26 2005 http://epydoc.sf.net