Back to index

plone3  3.1.7
Public Member Functions | Public Attributes | Static Public Attributes | Private Attributes
CMFFormController.FormValidator.FormValidatorContainer Class Reference
Inheritance diagram for CMFFormController.FormValidator.FormValidatorContainer:
Inheritance graph
[legend]
Collaboration diagram for CMFFormController.FormValidator.FormValidatorContainer:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def __copy__
def set
def get
def delete
def match
def getFiltered

Public Attributes

 validators

Static Public Attributes

tuple security = ClassSecurityInfo()

Private Attributes

 _p_changed

Detailed Description

Definition at line 88 of file FormValidator.py.


Constructor & Destructor Documentation

Definition at line 93 of file FormValidator.py.

00093 
00094     def __init__(self):
00095         self.validators = {}


Member Function Documentation

Definition at line 96 of file FormValidator.py.

00096 
00097     def __copy__(self):
00098         newobj = FormValidatorContainer()
00099         for v in self.validators.values():
00100             newobj.set(v.__copy__())
00101         return newobj

Definition at line 109 of file FormValidator.py.

00109 
00110     def delete(self, key):
00111         del self.validators[key]
00112         self._p_changed = 1

Definition at line 106 of file FormValidator.py.

00106 
00107     def get(self, key):
00108         return self.validators[key]

Here is the caller graph for this function:

def CMFFormController.FormValidator.FormValidatorContainer.getFiltered (   self,
  object_id = _marker,
  context_type = _marker,
  button = _marker,
  validators = _marker 
)

Definition at line 141 of file FormValidator.py.

00141 
00142                     button=_marker, validators=_marker):
00143         filtered = []
00144         keys = self.validators.keys()
00145         keys.sort()
00146         for key in keys:
00147             validator = self.validators[key]
00148             if object_id != _marker and not validator.getObjectId() == object_id:
00149                 continue
00150             if context_type != _marker and not validator.getContextType() == context_type:
00151                 continue
00152             if button != _marker and not validator.getButton() == button:
00153                 continue
00154             if validators != _marker and not validator.getValidators() == validators:
00155                 continue
00156             filtered.append(validator)
00157         return filtered

Here is the caller graph for this function:

def CMFFormController.FormValidator.FormValidatorContainer.match (   self,
  object_id,
  context_type,
  button 
)

Definition at line 113 of file FormValidator.py.

00113 
00114     def match(self, object_id, context_type, button):
00115         controller = getToolByName(self, 'portal_form_controller')
00116         validator = None
00117         try:
00118             validator = self.validators.get(FormValidatorKey(object_id, context_type, button, controller), None)
00119             if validator:
00120                 return validator
00121         except ValueError:
00122             pass
00123         try:
00124             validator = self.validators.get(FormValidatorKey(object_id, ANY_CONTEXT, button, controller))
00125             if validator:
00126                 return validator
00127         except ValueError:
00128             pass
00129         try:
00130             validator = self.validators.get(FormValidatorKey(object_id, context_type, ANY_BUTTON, controller))
00131             if validator:
00132                 return validator
00133         except ValueError:
00134             pass
00135         try:
00136             return self.validators.get(FormValidatorKey(object_id, ANY_CONTEXT, ANY_BUTTON, controller), None)
00137         except ValueError:
00138             pass
00139         return None

Here is the call graph for this function:

Definition at line 102 of file FormValidator.py.

00102 
00103     def set(self, validator):
00104         self.validators[aq_base(validator.getKey())] = aq_base(validator)
00105         self._p_changed = 1

Here is the caller graph for this function:


Member Data Documentation

Definition at line 104 of file FormValidator.py.

Definition at line 90 of file FormValidator.py.

Definition at line 94 of file FormValidator.py.


The documentation for this class was generated from the following file: