[Erp5-report] r18601 - /erp5/trunk/products/ERP5Type/DocumentationHelper.py

nobody at svn.erp5.org nobody at svn.erp5.org
Sat Jan 5 17:59:30 CET 2008


Author: jp
Date: Sat Jan  5 17:59:29 2008
New Revision: 18601

URL: http://svn.erp5.org?rev=18601&view=rev
Log:
Added shell for baye (DC Workflow)

Modified:
    erp5/trunk/products/ERP5Type/DocumentationHelper.py

Modified: erp5/trunk/products/ERP5Type/DocumentationHelper.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/DocumentationHelper.py?rev=18601&r1=18600&r2=18601&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/DocumentationHelper.py (original)
+++ erp5/trunk/products/ERP5Type/DocumentationHelper.py Sat Jan  5 17:59:29 2008
@@ -349,10 +349,6 @@
 class AccessorDocumentationHelper(DocumentationHelper):
   """
   """
-class WorkflowDocumentationHelper(DocumentationHelper):
-  """
-  """
-
 
 class ClassMethodDocumentationHelper(DocumentationHelper):
   """
@@ -498,6 +494,113 @@
 
 InitializeClass(WorkflowMethodDocumentationHelper)
 
+class DCWorkflowDocumentationHelper(DocumentationHelper):
+  """
+    Provides access to all documentation information
+    of a workflow.
+  """
+
+  security = ClassSecurityInfo()
+  security.declareObjectProtected(Permissions.AccessContentsInformation)
+
+  # API Implementation
+  security.declareProtected( Permissions.AccessContentsInformation, 'getTitle' )
+  def getTitle(self):
+    """
+    Returns the title of the documentation helper
+    """
+    return self.getDocumentedObject().getTitleOrId()
+
+  security.declareProtected( Permissions.AccessContentsInformation, 'getType' )
+  def getType(self):
+    """
+    Returns the type of the documentation helper
+    """
+    return "DC Workflow"
+
+  security.declareProtected( Permissions.AccessContentsInformation, 'getSectionList' )
+  def getSectionList(self):
+    """
+    Returns a list of documentation sections
+    """
+    return map(lamda x: x.__of__(self), [
+      DocumentationSection(
+        id='state',
+        title='Workflow States',
+        class_name='DCWorkflowStateDocumentationHelper',
+        uri_list=self.getStateURIList(),
+      ),
+      DocumentationSection(
+        id='transition',
+        title='Workflow Transitions',
+        class_name='DCWorkflowTransitionDocumentationHelper',
+        uri_list=self.getStateURIList(),
+      ),
+      DocumentationSection(
+        id='variable',
+        title='Workflow Variables',
+        class_name='DCWorkflowVariableDocumentationHelper',
+        uri_list=self.getVariableURIList(),
+      ),
+      DocumentationSection(
+        id='variable',
+        title='Workflow Permissions',
+        class_name='PermissionDocumentationHelper',
+        uri_list=self.getPermissionURIList(),
+      ),
+    ])
+
+  # Specific methods
+  security.declareProtected( Permissions.AccessContentsInformation, 'getDescription' )
+  def getDescription(self):
+    """
+    Returns the title of the documentation helper
+    """
+    raise NotImplemented
+
+  security.declareProtected( Permissions.AccessContentsInformation, 'getVariableURIList' )
+  def getVariableURIList(self):
+    """
+    """
+    raise NotImplemented
+
+  security.declareProtected( Permissions.AccessContentsInformation, 'getStateURIList' )
+  def getStateURIList(self):
+    """
+    """
+    raise NotImplemented
+
+  security.declareProtected( Permissions.AccessContentsInformation, 'getVariableURIList' )
+  def getVariableURIList(self):
+    """
+    """
+    raise NotImplemented
+
+  security.declareProtected( Permissions.AccessContentsInformation, 'getPermissionURIList' )
+  def getPermissionURIList(self):
+    """
+    """
+    raise NotImplemented
+
+  security.declareProtected( Permissions.AccessContentsInformation, 'getGraphImageURL' )
+  def getGraphImageURL(self):
+    """
+      Returns a URL to a graphic representation of the workflow
+    """
+    raise NotImplemented
+
+  security.declareProtected( Permissions.AccessContentsInformation, 'getGraphImageData' )
+  def getGraphImageData(self):
+    """
+      Returns the graphic representation of the workflow as a PNG file
+    """
+    raise NotImplemented
+
+InitializeClass(DCWorkflowDocumentationHelper)
+
+
+#############################################################################
+#############################################################################
 
 if 0:
   if 0:




More information about the Erp5-report mailing list