[Erp5-report] r38906 arnaud.fontaine - /erp5/trunk/products/ERP5Type/PropertySheet/

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Oct 6 09:54:24 CEST 2010


Author: arnaud.fontaine
Date: Wed Oct  6 09:54:17 2010
New Revision: 38906

URL: http://svn.erp5.org?rev=38906&view=rev
Log:
Add properties necessary to define new-style Property sheets.


Added:
    erp5/trunk/products/ERP5Type/PropertySheet/AcquiredProperty.py
    erp5/trunk/products/ERP5Type/PropertySheet/DynamicCategoryProperty.py
    erp5/trunk/products/ERP5Type/PropertySheet/StandardProperty.py
    erp5/trunk/products/ERP5Type/PropertySheet/TranslatableProperty.py
Modified:
    erp5/trunk/products/ERP5Type/PropertySheet/__init__.py

Added: erp5/trunk/products/ERP5Type/PropertySheet/AcquiredProperty.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/PropertySheet/AcquiredProperty.py?rev=38906&view=auto
==============================================================================
--- erp5/trunk/products/ERP5Type/PropertySheet/AcquiredProperty.py (added)
+++ erp5/trunk/products/ERP5Type/PropertySheet/AcquiredProperty.py [utf8] Wed Oct  6 09:54:17 2010
@@ -0,0 +1,66 @@
+##############################################################################
+#
+# Copyright (c) 2010 Nexedi SARL and Contributors. All Rights Reserved.
+#                    Arnaud Fontaine <arnaud.fontaine at nexedi.com>
+#
+# WARNING: This program as such is intended to be used by professional
+# programmers who take the whole responsability of assessing all potential
+# consequences resulting from its eventual inadequacies and bugs
+# End users who are looking for a ready-to-use solution with commercial
+# garantees and support are strongly adviced to contract a Free Software
+# Service Company
+#
+# This program is Free Software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+##############################################################################
+
+class AcquiredProperty:
+    """
+    Define an Acquired Property for new-style Property Sheets
+    """
+    _properties = (
+        {   'id': 'acquisition_base_category',
+            'type': 'lines',
+            'description' : 'The base categories to browse' },
+        {   'id': 'acquisition_object_id',
+            'type': 'lines',
+            'description' : 'The default contained object id to look up' },
+        # TALES expression
+        {   'id': 'acquisition_portal_type',
+            'type': 'string',
+            'description' : 'The portal types to browse' },
+        {   'id': 'acquisition_accessor_id',
+            'type': 'string',
+            'description' : 'Property to get from source' },
+        {   'id': 'alt_accessor_id',
+            'type': 'lines',
+            'description' : 'Alternative accessor ids' },
+        {   'id': 'acquisition_copy_value',
+            'type': 'boolean',
+            'description' : 'Determines if acquired value should be copied' },
+        {   'id': 'acquisition_mask_value',
+            'type': 'boolean',
+            'description' : 'Determines if the local value have priority' },
+        # TALES expression
+        {   'id': 'content_portal_type',
+            'type': 'string',
+            'description' : 'Portal type of the object to create' },
+        {   'id': 'content_acquired_property_id',
+            'type': 'lines',
+            'description' : 'Properties to be synchronized with the current object' },
+        {   'id': 'content_translation_acquired_property_id',
+            'type': 'lines',
+            'description' : 'Properties to be translated' },
+        )

Added: erp5/trunk/products/ERP5Type/PropertySheet/DynamicCategoryProperty.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/PropertySheet/DynamicCategoryProperty.py?rev=38906&view=auto
==============================================================================
--- erp5/trunk/products/ERP5Type/PropertySheet/DynamicCategoryProperty.py (added)
+++ erp5/trunk/products/ERP5Type/PropertySheet/DynamicCategoryProperty.py [utf8] Wed Oct  6 09:54:17 2010
@@ -0,0 +1,39 @@
+##############################################################################
+#
+# Copyright (c) 2010 Nexedi SARL and Contributors. All Rights Reserved.
+#                    Arnaud Fontaine <arnaud.fontaine at nexedi.com>
+#
+# WARNING: This program as such is intended to be used by professional
+# programmers who take the whole responsability of assessing all potential
+# consequences resulting from its eventual inadequacies and bugs
+# End users who are looking for a ready-to-use solution with commercial
+# garantees and support are strongly adviced to contract a Free Software
+# Service Company
+#
+# This program is Free Software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+##############################################################################
+
+class DynamicCategoryProperty:
+    """
+    Define a Dynamic Category Property for new-style Property Sheets,
+    meaningful for Property Sheets which defines an Expression within
+    _categories (only Item and Movement for now)
+    """
+    _properties = (
+        {   'id': 'category_expression',
+            'type': 'string',
+            'description' : 'The category list expression' },
+        )

Added: erp5/trunk/products/ERP5Type/PropertySheet/StandardProperty.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/PropertySheet/StandardProperty.py?rev=38906&view=auto
==============================================================================
--- erp5/trunk/products/ERP5Type/PropertySheet/StandardProperty.py (added)
+++ erp5/trunk/products/ERP5Type/PropertySheet/StandardProperty.py [utf8] Wed Oct  6 09:54:17 2010
@@ -0,0 +1,64 @@
+##############################################################################
+#
+# Copyright (c) 2010 Nexedi SARL and Contributors. All Rights Reserved.
+#                    Arnaud Fontaine <arnaud.fontaine at nexedi.com>
+#
+# WARNING: This program as such is intended to be used by professional
+# programmers who take the whole responsability of assessing all potential
+# consequences resulting from its eventual inadequacies and bugs
+# End users who are looking for a ready-to-use solution with commercial
+# garantees and support are strongly adviced to contract a Free Software
+# Service Company
+#
+# This program is Free Software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+##############################################################################
+
+class StandardProperty:
+    """
+    Define a Standard Property for new-style Property Sheets
+    """
+    _properties = (
+        # 'reference'  has  be  used  in  favor  of  'id'  because  of
+        # UniqueObject forbidding 'title' ID for example
+        {   'id': 'reference',
+            'type': 'string',
+            'description': 'Property name' },
+        # TALES expression
+        {   'id': 'property_default',
+            'type': 'string',
+            'description': 'Default value if not set' },
+        {   'id': 'multivalued',
+            'type': 'boolean',
+            'description': 'Determines if the property is multivalued' },
+        {   'id': 'range',
+            'type': 'boolean',
+            'description': 'Determines if the range accessors should be created' },
+        {   'id': 'preference',
+            'type': 'boolean',
+            'description': 'Determines if the preference accessors should be created' },
+        # CMF compatibility
+        {   'id': 'storage_id',
+            'type': 'string',
+            'description' : 'Name to be used instead of the Reference' },
+        {   'id': 'read_permission',
+            'type': 'string',
+            'description' : 'Permission needed to access Getters' },
+        {   'id': 'write_permission',
+            'type': 'string',
+            'description' : 'Permission needed to access Setters' },
+        )
+
+    _categories = ('elementary_type',)

Added: erp5/trunk/products/ERP5Type/PropertySheet/TranslatableProperty.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/PropertySheet/TranslatableProperty.py?rev=38906&view=auto
==============================================================================
--- erp5/trunk/products/ERP5Type/PropertySheet/TranslatableProperty.py (added)
+++ erp5/trunk/products/ERP5Type/PropertySheet/TranslatableProperty.py [utf8] Wed Oct  6 09:54:17 2010
@@ -0,0 +1,40 @@
+##############################################################################
+#
+# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
+#                    Jean-Paul Smets-Solanes <jp at nexedi.com>
+#
+# WARNING: This program as such is intended to be used by professional
+# programmers who take the whole responsability of assessing all potential
+# consequences resulting from its eventual inadequacies and bugs
+# End users who are looking for a ready-to-use solution with commercial
+# garantees and support are strongly adviced to contract a Free Software
+# Service Company
+#
+# This program is Free Software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+##############################################################################
+
+class TranslatableProperty:
+    """
+    Define a Translatable Property for new-style Property Sheets
+    """
+    _properties = (
+        {   'id': 'translatable',
+            'type': 'boolean',
+            'description' : 'Determines if the value is translatable' },
+        {   'id': 'translation_domain',
+            'type': 'string',
+            'description' : 'Define the translation domain' },
+        )

Modified: erp5/trunk/products/ERP5Type/PropertySheet/__init__.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/PropertySheet/__init__.py?rev=38906&r1=38905&r2=38906&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/PropertySheet/__init__.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/PropertySheet/__init__.py [utf8] Wed Oct  6 09:54:17 2010
@@ -12,3 +12,7 @@ from BaseCache import BaseCache
 from DistributedRamCache import DistributedRamCache
 from Url import Url
 from MemcachedPlugin import MemcachedPlugin
+from StandardProperty import StandardProperty
+from TranslatableProperty import TranslatableProperty
+from AcquiredProperty import AcquiredProperty
+from DynamicCategoryProperty import DynamicCategoryProperty




More information about the Erp5-report mailing list