r13585 - ArchGenXML/trunk/src/archgenxml
"Philipp Auersperg" <[email protected]> Wed, 13 Apr 2011 07:40:10 +0000
| Newsgroups | gmane.comp.web.zope.plone.archetypes.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: zworkb
Date: Wed Apr 13 07:40:09 2011
New Revision: 13585
Modified:
ArchGenXML/trunk/src/archgenxml/ArchetypesGenerator.py
ArchGenXML/trunk/src/archgenxml/WorkflowGenerator.py
ArchGenXML/trunk/src/archgenxml/utils.py
Log:
isTGVTrue accepts python:True
Modified: ArchGenXML/trunk/src/archgenxml/ArchetypesGenerator.py
==============================================================================
--- ArchGenXML/trunk/src/archgenxml/ArchetypesGenerator.py (original)
+++ ArchGenXML/trunk/src/archgenxml/ArchetypesGenerator.py Wed Apr 13 07:40:09 2011
@@ -3042,7 +3042,7 @@
"""
klasses = package.getClasses(recursive=1)
for klass in klasses:
-
+
if not self._isContentClass(klass):
continue
@@ -3097,6 +3097,7 @@
index = utils.isTGVTrue(index)
if not (index or metadata):
continue
+
catalogname = self.getOption('catalog:name', attribute,
'portal_catalog, Plone Catalog Tool')
catalogid, catalogmetatype = [a.strip()
Modified: ArchGenXML/trunk/src/archgenxml/WorkflowGenerator.py
==============================================================================
--- ArchGenXML/trunk/src/archgenxml/WorkflowGenerator.py (original)
+++ ArchGenXML/trunk/src/archgenxml/WorkflowGenerator.py Wed Apr 13 07:40:09 2011
@@ -8,6 +8,7 @@
from archgenxml.TaggedValueSupport import STATE_PERMISSION_MAPPING
from CodeSectionHandler import handleSectionedFile
from TaggedValueSupport import tgvRegistry
+from xmiparser.xmiparser import XMIClass
log = logging.getLogger('workflow')
@@ -197,7 +198,7 @@
res['effectname'] = action.getAfterActionName()
res['wfinterface'] = 'Products.DCWorkflow.interfaces.IAfterTransitionEvent'
klass = res['sourcestate'].getParent().getParent()
- if klass.hasStereoType(self.atgenerator.noncontentstereotype,
+ if not isinstance(klass,XMIClass) or klass.hasStereoType(self.atgenerator.noncontentstereotype,
umlprofile=self.atgenerator.uml_profile):
defaultbinding = '*'
else:
Modified: ArchGenXML/trunk/src/archgenxml/utils.py
==============================================================================
--- ArchGenXML/trunk/src/archgenxml/utils.py (original)
+++ ArchGenXML/trunk/src/archgenxml/utils.py Wed Apr 13 07:40:09 2011
@@ -160,11 +160,11 @@
def isTGVTrue(tgv):
if isinstance(tgv, (str, unicode)):
- tgv = tgv.lower()
+ tgv = tgv.lower().strip()
else:
return bool(tgv)
- return tgv in (1, '1', 'true')
+ return tgv in (1, '1', 'true','python:true')
def isTGVFalse(tgv):
"""Checks if a tgv is _explicitly_ False.
@@ -173,14 +173,14 @@
different than (not toBoolean(tgv)).
"""
if isinstance(tgv, (str, unicode)):
- tgv = tgv.lower()
+ tgv = tgv.lower().strip()
else:
if not tgv is None:
return not bool(tgv)
else:
return False
- return tgv in (0, '0', 'false')
+ return tgv in (0, '0', 'false','python:false')
def cleanName(name):
return name.replace(' ','_').replace('.','_').replace('/','_')
------------------------------------------------------------------------------
Forrester Wave Report - Recovery time is now measured in hours and minutes
not days. Key insights are discussed in the 2010 Forrester Wave Report as
part of an in-depth evaluation of disaster recovery service providers.
Forrester found the best-in-class provider in terms of services and vision.
Read this report now! http://p.sf.net/sfu/ibm-webcastpromo