Commit 92c4a034 authored by Arnaud Fontaine's avatar Arnaud Fontaine

Add properties necessary to define new-style Property sheets.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@38906 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c33994d4
##############################################################################
#
# Copyright (c) 2010 Nexedi SARL and Contributors. All Rights Reserved.
# Arnaud Fontaine <arnaud.fontaine@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' },
)
##############################################################################
#
# Copyright (c) 2010 Nexedi SARL and Contributors. All Rights Reserved.
# Arnaud Fontaine <arnaud.fontaine@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' },
)
##############################################################################
#
# Copyright (c) 2010 Nexedi SARL and Contributors. All Rights Reserved.
# Arnaud Fontaine <arnaud.fontaine@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',)
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@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' },
)
...@@ -12,3 +12,7 @@ from BaseCache import BaseCache ...@@ -12,3 +12,7 @@ from BaseCache import BaseCache
from DistributedRamCache import DistributedRamCache from DistributedRamCache import DistributedRamCache
from Url import Url from Url import Url
from MemcachedPlugin import MemcachedPlugin from MemcachedPlugin import MemcachedPlugin
from StandardProperty import StandardProperty
from TranslatableProperty import TranslatableProperty
from AcquiredProperty import AcquiredProperty
from DynamicCategoryProperty import DynamicCategoryProperty
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