Back to index

plone3  3.1.7
Public Member Functions | Public Attributes | Static Public Attributes | Static Private Attributes
DCWorkflow.Worklists.WorklistDefinition Class Reference
Inheritance diagram for DCWorkflow.Worklists.WorklistDefinition:
Inheritance graph
[legend]
Collaboration diagram for DCWorkflow.Worklists.WorklistDefinition:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def getGuard
def getGuardSummary
def getWorkflow
def getAvailableCatalogVars
def getVarMatchKeys
def getVarMatch
def getVarMatchText
def manage_properties
def setProperties

Public Attributes

 id
 description
 actbox_name
 actbox_url
 actbox_category

Static Public Attributes

string meta_type = 'Worklist'
tuple security = ClassSecurityInfo()
string description = ''
 var_matches = None
string actbox_name = ''
string actbox_url = ''
string actbox_category = 'global'
 guard = None
tuple manage_options

Static Private Attributes

tuple _properties_form = DTMLFile('worklist_properties', _dtmldir)

Detailed Description

Worklist definiton

Definition at line 32 of file Worklists.py.


Constructor & Destructor Documentation

Definition at line 51 of file Worklists.py.

00051 
00052     def __init__(self, id):
00053         self.id = id


Member Function Documentation

Definition at line 69 of file Worklists.py.

00069 
00070     def getAvailableCatalogVars(self):
00071         res = []
00072         res.append(self.getWorkflow().state_var)
00073         for id, vdef in self.getWorkflow().variables.items():
00074             if vdef.for_catalog:
00075                 res.append(id)
00076         res.sort()
00077         return res

Here is the call graph for this function:

Definition at line 54 of file Worklists.py.

00054 
00055     def getGuard(self):
00056         if self.guard is not None:
00057             return self.guard
00058         else:
00059             return Guard().__of__(self)  # Create a temporary guard.

Definition at line 60 of file Worklists.py.

00060 
00061     def getGuardSummary(self):
00062         res = None
00063         if self.guard is not None:
00064             res = self.guard.getSummary()
00065         return res

Definition at line 84 of file Worklists.py.

00084 
00085     def getVarMatch(self, id):
00086         if self.var_matches:
00087             matches = self.var_matches.get(id, ())
00088             if not isinstance(matches, tuple):
00089                 # Old version, convert it.
00090                 matches = (matches,)
00091                 self.var_matches[id] = matches
00092             return matches
00093         else:
00094             return ()

Here is the caller graph for this function:

Definition at line 78 of file Worklists.py.

00078 
00079     def getVarMatchKeys(self):
00080         if self.var_matches:
00081             return self.var_matches.keys()
00082         else:
00083             return []

Definition at line 95 of file Worklists.py.

00095 
00096     def getVarMatchText(self, id):
00097         values = self.getVarMatch(id)
00098         return '; '.join(values)

Here is the call graph for this function:

Definition at line 66 of file Worklists.py.

00066 
00067     def getWorkflow(self):
00068         return aq_parent(aq_inner(aq_parent(aq_inner(self))))

Here is the caller graph for this function:

def DCWorkflow.Worklists.WorklistDefinition.manage_properties (   self,
  REQUEST,
  manage_tabs_message = None 
)

Definition at line 101 of file Worklists.py.

00101 
00102     def manage_properties(self, REQUEST, manage_tabs_message=None):
00103         '''
00104         '''
00105         return self._properties_form(REQUEST,
00106                                      management_view='Properties',
00107                                      manage_tabs_message=manage_tabs_message,
00108                                      )

Here is the call graph for this function:

def DCWorkflow.Worklists.WorklistDefinition.setProperties (   self,
  description,
  actbox_name = '',
  actbox_url = '',
  actbox_category = 'global',
  props = None,
  REQUEST = None 
)

Definition at line 111 of file Worklists.py.

00111 
00112                       props=None, REQUEST=None):
00113         '''
00114         '''
00115         if props is None:
00116             props = REQUEST
00117         self.description = str(description)
00118         for key in self.getAvailableCatalogVars():
00119             # Populate var_matches.
00120             fieldname = 'var_match_%s' % key
00121             v = props.get(fieldname, '')
00122             if v:
00123                 if not self.var_matches:
00124                     self.var_matches = PersistentMapping()
00125                 v = [ var.strip() for var in v.split(';') ]
00126                 self.var_matches[key] = tuple(v)
00127             else:
00128                 if self.var_matches and self.var_matches.has_key(key):
00129                     del self.var_matches[key]
00130         self.actbox_name = str(actbox_name)
00131         self.actbox_url = str(actbox_url)
00132         self.actbox_category = str(actbox_category)
00133         g = Guard()
00134         if g.changeFromProperties(props or REQUEST):
00135             self.guard = g
00136         else:
00137             self.guard = None
00138         if REQUEST is not None:
00139             return self.manage_properties(REQUEST, 'Properties changed.')
00140 
00141 InitializeClass(WorklistDefinition)
00142 

Here is the caller graph for this function:


Member Data Documentation

tuple DCWorkflow.Worklists.WorklistDefinition._properties_form = DTMLFile('worklist_properties', _dtmldir) [static, private]

Definition at line 99 of file Worklists.py.

Definition at line 44 of file Worklists.py.

Definition at line 131 of file Worklists.py.

Definition at line 42 of file Worklists.py.

Definition at line 129 of file Worklists.py.

Definition at line 43 of file Worklists.py.

Definition at line 130 of file Worklists.py.

Definition at line 40 of file Worklists.py.

Definition at line 116 of file Worklists.py.

Definition at line 45 of file Worklists.py.

Definition at line 52 of file Worklists.py.

Initial value:
(
        {'label': 'Properties', 'action': 'manage_properties'},
        )

Definition at line 47 of file Worklists.py.

Definition at line 35 of file Worklists.py.

tuple DCWorkflow.Worklists.WorklistDefinition.security = ClassSecurityInfo() [static]

Definition at line 37 of file Worklists.py.

Definition at line 41 of file Worklists.py.


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