Commit 29ecce3c authored by Jean-Paul Smets's avatar Jean-Paul Smets

Added more shells

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18603 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 63faefa2
......@@ -338,10 +338,6 @@ class PortalDocumentationHelper(DocumentationHelper):
"""
"""
class PortalTypeDocumentationHelper(DocumentationHelper):
"""
"""
class ClassDocumentationHelper(DocumentationHelper):
"""
"""
......@@ -598,6 +594,136 @@ class DCWorkflowDocumentationHelper(DocumentationHelper):
InitializeClass(DCWorkflowDocumentationHelper)
class BusinessTemplateDocumentationHelper(DocumentationHelper):
"""
Provides access to all documentation information
of a business template.
"""
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 "Business Template"
security.declareProtected( Permissions.AccessContentsInformation, 'getSectionList' )
def getSectionList(self):
"""
Returns a list of documentation sections
"""
return map(lambda x: x.__of__(self), [
DocumentationSection(
id='portal_type',
title='Portal Types',
class_name='PortalTypeDocumentationHelper',
uri_list=self.getPortalTypeURIList(),
),
DocumentationSection(
id='workflow',
title='Workflows',
class_name='DCWorkflowDocumentationHelper',
uri_list=self.getDCWorkflowURIList(),
),
DocumentationSection(
id='interaction',
title='Interaction Workflows',
class_name='InteractionWorkflowStateDocumentationHelper',
uri_list=self.getInteractionWorkflowURIList(),
),
DocumentationSection(
id='skin_folder',
title='Skin Folders',
class_name='SkinFolderDocumentationHelper',
uri_list=self.getSkinFolderURIList(),
),
])
# Specific methods
security.declareProtected( Permissions.AccessContentsInformation, 'getDescription' )
def getDescription(self):
"""
Returns the title of the documentation helper
"""
raise NotImplemented
InitializeClass(BusinessTemplateDocumentationHelper)
class PortalTypeDocumentationHelper(DocumentationHelper):
"""
Provides access to all documentation information
of a portal type. Accessors and methods are documented
by generating a temporary instance which provides
an access to the property holder and allows
reusing PortalTypeInstanceDocumentationHelper
"""
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 "Portal Type"
security.declareProtected( Permissions.AccessContentsInformation, 'getSectionList' )
def getSectionList(self):
"""
Returns a list of documentation sections
"""
return map(lambda x: x.__of__(self), [
DocumentationSection(
id='action',
title='Actions',
class_name='ActionDocumentationHelper',
uri_list=self.getActionURIList(),
),
DocumentationSection(
id='local_role',
title='Local Role Definitions',
class_name='LocalRoleDefinitionDocumentationHelper',
uri_list=self.getDCWorkflowURIList(),
),
# XXX - add here all sections of a portal type instance
])
# Specific methods
security.declareProtected( Permissions.AccessContentsInformation, 'getDescription' )
def getDescription(self):
"""
Returns the title of the documentation helper
"""
raise NotImplemented
InitializeClass(PortalTypeDocumentationHelper)
#############################################################################
#############################################################################
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment