Package CMFFormController :: Module ControllerState :: Class ControllerState
[show private | hide private]
[frames | no frames]

Type ControllerState

 object --+        
          |        
       Base --+    
              |    
RoleManager --+    
              |    
    RoleManager --+
                  |
                 ControllerState


An object that has configurable permissions
Method Summary
  __init__(self, id, context, button, status, errors, next_action, **kwargs)
  __str__(self)
  clearValidator(self, validator)
  clearValidators(self)
  getButton(self)
Get the name of the named button pressed.
  getContext(self)
Get the context of the current form/script
  getError(self, id)
Return the error message associated with the form variable id
  getErrors(self)
Return all errors in a dict of the form dict['name'] = errmsg
  getI18NError(self, id)
Return the error message and i18n msgid associated with the form variable id.
  getI18NErrors(self)
Return all errors in a dict of the form dict['name'] = (errmsg, i18n_msgid)
  getId(self)
Get the id of the calling script/page template
  getKwargs(self)
Get any extra arguments (e.g.
  getNextAction(self)
Get the default next action (this action can be overridden in portal_form_controller).
  getStatus(self)
Get the current status
  hasValidated(self, validators)
  set(self, **kwargs)
Set state object properties
  setButton(self, button)
Set the name of the named button pressed.
  setContext(self, context)
Set the context of the current form/script
  setError(self, id, message, msgid, new_status)
Add an error message to the current state object.
  setErrors(self, errors)
Set the error dictionary.
  setId(self, id)
Set the id of the calling script/page template
  setKwargs(self, kwargs)
Set any extra arguments (e.g.
  setNextAction(self, action)
Set the default next action (this action can be overridden in portal_form_controller).
  setStatus(self, status)
Get the current status
    Inherited from RoleManager
  ac_inherited_permissions(self, all)
  access_debug_info(self)
Return debug info.
  acquiredRolesAreUsedBy(self, permission)
Used by management screen.
  get_local_roles(self)
  get_local_roles_for_userid(self, userid)
  get_valid_userids(self)
  has_local_roles(self)
  manage_access(self, REQUEST, **kw)
Return an interface for making permissions settings.
  manage_acquiredPermissions(self, permissions, REQUEST)
Change the permissions that acquire.
  manage_addLocalRoles(self, userid, roles, REQUEST)
Set local roles for a user.
  manage_changePermissions(self, REQUEST)
Change all permissions settings, called by management screen.
  manage_defined_roles(self, submit, REQUEST)
Called by management screen.
  manage_delLocalRoles(self, userids, REQUEST)
Remove all local roles for a user.
  manage_editRoles(self, REQUEST, acl_type, acl_roles)
  manage_permission(self, permission_to_manage, roles, acquire, REQUEST)
Change the settings for the given permission.
  manage_role(self, role_to_manage, permissions, REQUEST)
Change the permissions given to the given role.
  manage_setLocalRoles(self, userid, roles, REQUEST)
Set local roles for a user.
  permission_settings(self, permission)
Return user-role permission settings.
  permissionsOfRole(self, role)
Used by management screen.
  possible_permissions(self)
  rolesOfPermission(self, permission)
Used by management screen.
  userdefined_roles(self)
Return list of user-defined roles.
  users_with_local_role(self, role)
  valid_roles(self)
Return list of valid roles.
  validate_roles(self, roles)
Return true if all given roles are valid.
  validRoles(self)
Return list of valid roles.
    Inherited from RoleManager
  manage_getPermissionMapping(self)
Return the permission mapping for the object This is a list of dictionaries with: permission_name -- The name of the native object permission class_permission -- The class permission the permission is mapped to.
  manage_setPermissionMapping(self, permission_names, class_permissions, REQUEST)
Change the permission mapping
    Inherited from Base
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __getnewargs__(...)
Get arguments to be passed to __new__
  __getstate__(...)
Get the object serialization state
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
Reduce an object to contituent parts for serialization
  __setstate__(...)
Set the object serialization state The state should be in one of 3 forms: - None Ignored - A dictionary In this case, the object's instance dictionary will be cleared and updated with the new state.
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value

Class Variable Summary
tuple __ac_permissions__ = ()
int __allow_access_to_unprotected_subobjects__ = 1                                                                     
NoneType __roles__ = None                                                                  
NoneType button = None                                                                  
NoneType context = None                                                                  
dict errors = {}
NoneType id = None                                                                  
dict kwargs = {}
NoneType next_action = None                                                                  
str status = 'success'
    Inherited from RoleManager
NoneType __ac_local_roles__ = None                                                                  
tuple __ac_roles__ = ('Manager', 'Owner', 'Anonymous', 'Authen...
Implements __implemented__ = <implementedBy AccessControl.Role.Role...
ClassProvides __provides__ = <zope.interface.declarations.ClassProvide...
PermissionRole ac_inherited_permissions__roles__ = <PermissionRole obje...
tuple access_debug_info__roles__ = ()
str aclAChecked = ''
str aclEChecked = ''
str aclPChecked = ''
PermissionRole acquiredRolesAreUsedBy__roles__ = <PermissionRole object...
PermissionRole manage_access__roles__ = <PermissionRole object at 0xb75...
DTMLFile manage_acquiredForm = <App.special_dtml.DTMLFile object ...
PermissionRole manage_acquiredForm__roles__ = <PermissionRole object at...
PermissionRole manage_acquiredPermissions__roles__ = <PermissionRole ob...
PermissionRole manage_addLocalRoles__roles__ = <PermissionRole object a...
PermissionRole manage_changePermissions__roles__ = <PermissionRole obje...
PermissionRole manage_defined_roles__roles__ = <PermissionRole object a...
PermissionRole manage_delLocalRoles__roles__ = <PermissionRole object a...
DTMLFile manage_editLocalRoles = <App.special_dtml.DTMLFile objec...
PermissionRole manage_editLocalRoles__roles__ = <PermissionRole object ...
tuple manage_editRoles__roles__ = ('Manager',)
DTMLFile manage_listLocalRoles = <App.special_dtml.DTMLFile objec...
PermissionRole manage_listLocalRoles__roles__ = <PermissionRole object ...
tuple manage_options = ({'action': 'manage_access', 'filter': ...
PermissionRole manage_permission__roles__ = <PermissionRole object at 0...
DTMLFile manage_permissionForm = <App.special_dtml.DTMLFile objec...
PermissionRole manage_permissionForm__roles__ = <PermissionRole object ...
PermissionRole manage_role__roles__ = <PermissionRole object at 0xb7558...
DTMLFile manage_roleForm = <App.special_dtml.DTMLFile object at 0...
PermissionRole manage_roleForm__roles__ = <PermissionRole object at 0xb...
PermissionRole manage_setLocalRoles__roles__ = <PermissionRole object a...
PermissionRole permission_settings__roles__ = <PermissionRole object at...
str permissionMappingPossibleValues = '<Special Object Used ...
PermissionRole permissionsOfRole__roles__ = <PermissionRole object at 0...
PermissionRole rolesOfPermission__roles__ = <PermissionRole object at 0...
str selectedRoles = ''
str smallRolesWidget = ''
PermissionRole userdefined_roles__roles__ = <PermissionRole object at 0...
    Inherited from RoleManager
ClassProvides __providedBy__ = <zope.interface.declarations.ClassProvi...
tuple manage_getPermissionMapping__roles__ = ('Manager',)
tuple manage_setPermissionMapping__roles__ = ('Manager',)

Method Details

getButton(self)

Get the name of the named button pressed. You can name a button NAME in a template by giving it the name form.button.NAME

getContext(self)

Get the context of the current form/script

getError(self, id)

Return the error message associated with the form variable id

getErrors(self)

Return all errors in a dict of the form dict['name'] = errmsg

getI18NError(self, id)

Return the error message and i18n msgid associated with the form variable id. The return value is the tuple (errmsg, i18n_msgid).

getI18NErrors(self)

Return all errors in a dict of the form dict['name'] = (errmsg, i18n_msgid)

getId(self)

Get the id of the calling script/page template

getKwargs(self)

Get any extra arguments (e.g. portal_status_message) that should be passed along to the next template/script

getNextAction(self)

Get the default next action (this action can be overridden in portal_form_controller). The action will have the form {'action_type':action_type, 'args':args} where action_type is a string (from portal_form_controller.validActionTypes), and args is a string that will be passed to the constructor when generating an action object

getStatus(self)

Get the current status

set(self, **kwargs)

Set state object properties

setButton(self, button)

Set the name of the named button pressed. You can name a button NAME in a template by giving it the name form.button.NAME

setContext(self, context)

Set the context of the current form/script

setError(self, id, message, msgid=None, new_status=None)

Add an error message to the current state object. The new_status argument allows you to optionally change the object's status.

setErrors(self, errors)

Set the error dictionary. The dictionary should have entries of the form dict['name'] = (errmsg, i18n_msgid). The msgid can be None

setId(self, id)

Set the id of the calling script/page template

setKwargs(self, kwargs)

Set any extra arguments (e.g. portal_status_message) that should be passed along to the next template/script

setNextAction(self, action)

Set the default next action (this action can be overridden in portal_form_controller). setNextAction can be called either with a dictionary argument of the form {'action_type':action_type, 'args':args} or with a string of the form 'action_type:args'. Here action_type is a string (from form_controller.validActionTypes) and args is a string that will be passed to the constructor when generating an action object

setStatus(self, status)

Get the current status

Class Variable Details

__ac_permissions__

Type:
tuple
Value:
()                                                                     

__allow_access_to_unprotected_subobjects__

Type:
int
Value:
1                                                                     

__roles__

Type:
NoneType
Value:
None                                                                  

button

Type:
NoneType
Value:
None                                                                  

context

Type:
NoneType
Value:
None                                                                  

errors

Type:
dict
Value:
{}                                                                     

id

Type:
NoneType
Value:
None                                                                  

kwargs

Type:
dict
Value:
{}                                                                     

next_action

Type:
NoneType
Value:
None                                                                  

status

Type:
str
Value:
'success'                                                              

Generated by Epydoc 2.1 on Wed Nov 30 03:59:05 2005 http://epydoc.sf.net