diff --git a/product/ERP5Type/Accessor/Acquired.py b/product/ERP5Type/Accessor/Acquired.py index e1531f588ac13c8267dc5b31db80bd72f7071de8..dc8d85f1a4ce7bdc14dd69b726ab2c1a0fd59e7a 100644 --- a/product/ERP5Type/Accessor/Acquired.py +++ b/product/ERP5Type/Accessor/Acquired.py @@ -26,10 +26,10 @@ # ############################################################################## -from Base import func_code, type_definition, list_types, ATTRIBUTE_PREFIX, Method +from Base import func_code, type_definition, list_types, ATTRIBUTE_PREFIX, Getter as BaseGetter from Products.ERP5Type.PsycoWrapper import psyco -class DefaultGetter(Method): +class DefaultGetter(BaseGetter): """ Gets the default reference of a relation """ @@ -106,7 +106,7 @@ class DefaultGetter(Method): Getter = DefaultGetter -class ListGetter(Method): +class ListGetter(BaseGetter): """ Gets an attribute value """ diff --git a/product/ERP5Type/Accessor/AcquiredProperty.py b/product/ERP5Type/Accessor/AcquiredProperty.py index fca329d31fb1ca13a099d77a7c3fba73b01da768..4049782900ff66ee3227c459f2bcbd1287d18186 100644 --- a/product/ERP5Type/Accessor/AcquiredProperty.py +++ b/product/ERP5Type/Accessor/AcquiredProperty.py @@ -28,11 +28,11 @@ import warnings -from Base import func_code, type_definition, list_types, ATTRIBUTE_PREFIX, Method +from Base import func_code, type_definition, list_types, ATTRIBUTE_PREFIX, Getter as BaseGetter, Setter as BaseSetter from Products.ERP5Type.PsycoWrapper import psyco from zLOG import LOG -class Getter(Method): +class Getter(BaseGetter): """ Gets the default reference of a relation """ @@ -108,7 +108,7 @@ class Getter(Method): DefaultGetter = Getter -class Setter(Method): +class Setter(BaseSetter): """ Sets a value of a property wich can be acquired. Since we set here the property, we must not call acquisition. diff --git a/product/ERP5Type/Accessor/Alias.py b/product/ERP5Type/Accessor/Alias.py index 6dcb9c88406b3bb1ca47437b01e5ff3d8aa7d0f9..2432fbbc673949f232428c2f01a14e76e68832a4 100644 --- a/product/ERP5Type/Accessor/Alias.py +++ b/product/ERP5Type/Accessor/Alias.py @@ -26,12 +26,12 @@ # ############################################################################## -from Accessor import Accessor as Method +from Base import Setter # Creation of default constructor class func_code: pass -class Reindex(Method): +class Reindex(Setter): """ Calls a given accessor and reindexes the object. diff --git a/product/ERP5Type/Accessor/Category.py b/product/ERP5Type/Accessor/Category.py index 432388dca65c11f3b5c77761ace634f9f064976e..725d920d876c757edc3b8c074b0b994e5c0c5815 100644 --- a/product/ERP5Type/Accessor/Category.py +++ b/product/ERP5Type/Accessor/Category.py @@ -28,11 +28,11 @@ import warnings -from Base import func_code, type_definition, list_types, ATTRIBUTE_PREFIX, Method +from Base import func_code, type_definition, list_types, ATTRIBUTE_PREFIX, Setter as BaseSetter, Getter as BaseGetter from zLOG import LOG from Products.ERP5Type.PsycoWrapper import psyco -class ListSetter(Method): +class ListSetter(BaseSetter): """ Sets a category """ @@ -68,7 +68,7 @@ class ListSetter(Method): Setter = ListSetter -class DefaultSetter(Method): +class DefaultSetter(BaseSetter): """ Sets a category """ @@ -101,7 +101,7 @@ class DefaultSetter(Method): instance.reindexObject() return (instance, ) -class SetSetter(Method): +class SetSetter(BaseSetter): """ Sets a set of category """ @@ -147,7 +147,7 @@ class SetSetter(Method): return (instance, ) -class DefaultGetter(Method): +class DefaultGetter(BaseGetter): """ Gets a default category value """ @@ -178,7 +178,7 @@ class DefaultGetter(Method): checked_permission=kw.get('checked_permission', None)) psyco.bind(__call__) -class ListGetter(Method): +class ListGetter(BaseGetter): """ Gets a category value list """ @@ -214,7 +214,7 @@ class SetGetter(ListGetter): # ItemList is outdated XXX -> ItemList -class ItemListGetter(Method): +class ItemListGetter(BaseGetter): """ Gets a category value list """ diff --git a/product/ERP5Type/Accessor/Content.py b/product/ERP5Type/Accessor/Content.py index 48f4541beb2a7a0c9f1b115c0a4b76deca4c23cf..0c227940e2d79ab1e86f0759ebf3a22f48e1d9c0 100644 --- a/product/ERP5Type/Accessor/Content.py +++ b/product/ERP5Type/Accessor/Content.py @@ -37,7 +37,7 @@ DefaultValueSetter = Base.Setter from zLOG import LOG -class ValueGetter(Method): +class ValueGetter(Base.Getter): """ Gets an attribute value. A default value can be provided if needed @@ -87,7 +87,7 @@ class ValueGetter(Method): psyco.bind(__call__) -class ValueListGetter(Method): +class ValueListGetter(Base.Getter): """ Gets an attribute value. A default value can be provided if needed @@ -123,7 +123,7 @@ class ValueListGetter(Method): DefaultValueGetter = ValueGetter -class Getter(Method): +class Getter(Base.Getter): """ Gets an attribute value. A default value can be provided if needed @@ -169,7 +169,7 @@ class Getter(Method): psyco.bind(__call__) -class ListGetter(Method): +class ListGetter(Base.Getter): """ Gets an attribute value. A default value can be provided if needed diff --git a/product/ERP5Type/Accessor/ContentProperty.py b/product/ERP5Type/Accessor/ContentProperty.py index 4a08a9b952ce3836c2afa16e99119ece8f7ccc1e..dd45660fb510bb213837ac13d570a1d74cccc232 100644 --- a/product/ERP5Type/Accessor/ContentProperty.py +++ b/product/ERP5Type/Accessor/ContentProperty.py @@ -39,7 +39,7 @@ DefaultValueSetter = Base.Setter from zLOG import LOG -class ValueGetter(Method): +class ValueGetter(Base.Getter): """ Gets an attribute value. A default value can be provided if needed @@ -87,7 +87,7 @@ class ValueGetter(Method): psyco.bind(__call__) -class ValueListGetter(Method): +class ValueListGetter(Base.Getter): """ Gets an attribute value. A default value can be provided if needed @@ -126,7 +126,7 @@ class ValueListGetter(Method): DefaultValueGetter = ValueGetter -class Getter(Method): +class Getter(Base.Getter): """ Gets an attribute value. A default value can be provided if needed @@ -173,7 +173,7 @@ class Getter(Method): psyco.bind(__call__) -class Setter(Method): +class Setter(Base.Setter): """ Gets an attribute value. A default value can be provided if needed @@ -237,7 +237,7 @@ class Setter(Method): modified_object_list = (o, ) return modified_object_list -class ListGetter(Method): +class ListGetter(Base.Getter): """ Gets an attribute value. A default value can be provided if needed diff --git a/product/ERP5Type/Accessor/List.py b/product/ERP5Type/Accessor/List.py index a6e8800b655b590ac1d7321fdc6808b64a0f3174..daa9dbc148ad3b4f8eb6b7d4da4ba11504dafd88 100644 --- a/product/ERP5Type/Accessor/List.py +++ b/product/ERP5Type/Accessor/List.py @@ -38,7 +38,7 @@ from types import ListType, TupleType from zLOG import LOG -class DefaultSetter(Method): +class DefaultSetter(Base.Setter): """ Sets the default attribute in a list """ @@ -126,7 +126,7 @@ class ListSetter(DefaultSetter): Setter = ListSetter -class SetSetter(Method): +class SetSetter(Base.Setter): """ Sets the default attribute in a list """ @@ -198,7 +198,7 @@ class SetSetter(Method): method(*args, **kw) instance.reindexObject() -class DefaultGetter(Method): +class DefaultGetter(Base.Getter): """ Gets the first item of a list """ @@ -250,7 +250,7 @@ class DefaultGetter(Method): Getter = DefaultGetter -class ListGetter(Method): +class ListGetter(Base.Getter): """ Gets an attribute value. A default value can be provided if needed diff --git a/product/ERP5Type/Accessor/Related.py b/product/ERP5Type/Accessor/Related.py index b0e2f54637df877dc644e2764fa00d8f389dd231..aa4a9fdab5139cbe0e32b7a87bfb9cca5cd50ca9 100644 --- a/product/ERP5Type/Accessor/Related.py +++ b/product/ERP5Type/Accessor/Related.py @@ -26,13 +26,13 @@ # ############################################################################## -from Base import func_code, type_definition, list_types, ATTRIBUTE_PREFIX, Method +from Base import func_code, type_definition, list_types, ATTRIBUTE_PREFIX, Getter as BaseGetter, Setter as BaseSetter from Products.ERP5Type.PsycoWrapper import psyco from zLOG import LOG from zLOG import WARNING -class DefaultGetter(Method): +class DefaultGetter(BaseGetter): """ Gets a default reference object """ @@ -65,7 +65,7 @@ class DefaultGetter(Method): Getter = DefaultGetter -class ListGetter(Method): +class ListGetter(BaseGetter): """ Gets a list of reference objects """ diff --git a/product/ERP5Type/Accessor/RelatedValue.py b/product/ERP5Type/Accessor/RelatedValue.py index ae898ea3f20ede475aaa474efd06615c29aa58b9..7e476170a30fff1fd761360c5e63ed91fb34c923 100644 --- a/product/ERP5Type/Accessor/RelatedValue.py +++ b/product/ERP5Type/Accessor/RelatedValue.py @@ -27,12 +27,12 @@ ############################################################################## from Base import func_code, type_definition, list_types, \ - ATTRIBUTE_PREFIX, Method + ATTRIBUTE_PREFIX, Getter as BaseGetter, Setter as BaseSetter from Products.ERP5Type.PsycoWrapper import psyco from zLOG import LOG from zLOG import WARNING -class DefaultGetter(Method): +class DefaultGetter(BaseGetter): """ Gets a default reference object """ @@ -72,7 +72,7 @@ class DefaultGetter(Method): Getter = DefaultGetter -class ListGetter(Method): +class ListGetter(BaseGetter): """ Gets a list of reference objects """ @@ -119,7 +119,7 @@ class SetGetter(ListGetter): result_set = dict([(x, 0) for x in result_list]).keys() return result_set -class DefaultIdGetter(Method): +class DefaultIdGetter(BaseGetter): """ Gets a default reference object """ @@ -155,7 +155,7 @@ class DefaultIdGetter(Method): IdGetter = DefaultIdGetter -class IdListGetter(Method): +class IdListGetter(BaseGetter): """ Gets a list of reference objects """ @@ -198,7 +198,7 @@ class IdSetGetter(IdListGetter): result_set = dict([(x, 0) for x in result_list]).keys() return result_set -class DefaultTitleGetter(Method): +class DefaultTitleGetter(BaseGetter): """ Gets a default reference object """ @@ -234,7 +234,7 @@ class DefaultTitleGetter(Method): TitleGetter = DefaultTitleGetter -class TitleListGetter(Method): +class TitleListGetter(BaseGetter): """ Gets a list of reference objects """ @@ -277,7 +277,7 @@ class TitleSetGetter(TitleListGetter): result_set = dict([(x, 0) for x in result_list]).keys() return result_set -class DefaultPropertyGetter(Method): +class DefaultPropertyGetter(BaseGetter): """ Gets a default reference object """ @@ -312,7 +312,7 @@ class DefaultPropertyGetter(Method): PropertyGetter = DefaultPropertyGetter -class PropertyListGetter(Method): +class PropertyListGetter(BaseGetter): """ Gets a list of reference objects """ diff --git a/product/ERP5Type/Accessor/Translation.py b/product/ERP5Type/Accessor/Translation.py index 5f2aad55aac8a4793c1ca1a3aed51de82a61bd87..d943d97c69b6abea5f7906817b50a86dde30a00c 100644 --- a/product/ERP5Type/Accessor/Translation.py +++ b/product/ERP5Type/Accessor/Translation.py @@ -26,13 +26,13 @@ # ############################################################################## -from Base import func_code, ATTRIBUTE_PREFIX, Method, evaluateTales +from Base import func_code, ATTRIBUTE_PREFIX, evaluateTales, Getter as BaseGetter from zLOG import LOG from Products.ERP5Type.PsycoWrapper import psyco from Acquisition import aq_base from Products.CMFCore.utils import getToolByName -class TranslatedPropertyGetter(Method): +class TranslatedPropertyGetter(BaseGetter): """ Get the translated property """ @@ -65,7 +65,7 @@ class TranslatedPropertyGetter(Method): psyco.bind(__call__) -class PropertyTranslationDomainGetter(Method): +class PropertyTranslationDomainGetter(BaseGetter): """ Get the translation domain """ diff --git a/product/ERP5Type/Accessor/Value.py b/product/ERP5Type/Accessor/Value.py index a2d3545d3efda35e2d029a6bb6862dc29da6c5c9..b4efe4d5a3d391e8cf85eb13867d7c321473d980 100644 --- a/product/ERP5Type/Accessor/Value.py +++ b/product/ERP5Type/Accessor/Value.py @@ -28,11 +28,11 @@ import warnings -from Base import func_code, type_definition, list_types, ATTRIBUTE_PREFIX, Method +from Base import func_code, type_definition, list_types, ATTRIBUTE_PREFIX, Setter as BaseSetter, Getter as BaseGetter from zLOG import LOG from Products.ERP5Type.PsycoWrapper import psyco -class SetSetter(Method): +class SetSetter(BaseSetter): """ Sets a category value through a provided value (List mode) """ @@ -114,7 +114,7 @@ class DefaultSetter(SetSetter): psyco.bind(__call__) -class DefaultGetter(Method): +class DefaultGetter(BaseGetter): """ Gets a default reference object """ @@ -142,7 +142,7 @@ class DefaultGetter(Method): Getter = DefaultGetter -class ListGetter(Method): +class ListGetter(BaseGetter): """ Gets a list of reference objects """ @@ -181,7 +181,7 @@ class SetGetter(ListGetter): return result_set -class DefaultTitleGetter(Method): +class DefaultTitleGetter(BaseGetter): """ Gets a default reference object """ @@ -207,7 +207,7 @@ class DefaultTitleGetter(Method): psyco.bind(__call__) -class TitleListGetter(Method): +class TitleListGetter(BaseGetter): """ Gets a list of reference objects """ @@ -240,7 +240,7 @@ class TitleSetGetter(TitleListGetter): return result_set -class DefaultTranslatedTitleGetter(Method): +class DefaultTranslatedTitleGetter(BaseGetter): """ Gets a default reference object """ @@ -270,7 +270,7 @@ class DefaultTranslatedTitleGetter(Method): psyco.bind(__call__) -class TranslatedTitleListGetter(Method): +class TranslatedTitleListGetter(BaseGetter): """ Gets a list of reference objects """ @@ -309,7 +309,7 @@ class TranslatedTitleSetGetter(TranslatedTitleListGetter): return result_set -class DefaultReferenceGetter(Method): +class DefaultReferenceGetter(BaseGetter): """ Gets a default reference object """ @@ -339,7 +339,7 @@ class DefaultReferenceGetter(Method): psyco.bind(__call__) -class ReferenceListGetter(Method): +class ReferenceListGetter(BaseGetter): """ Gets a list of reference objects """ @@ -378,7 +378,7 @@ class ReferenceSetGetter(ReferenceListGetter): return result_set -class DefaultUidGetter(Method): +class DefaultUidGetter(BaseGetter): """ Gets a default reference object """ @@ -411,7 +411,7 @@ class DefaultUidGetter(Method): UidGetter = DefaultUidGetter -class UidListGetter(Method): +class UidListGetter(BaseGetter): """ Gets a list of reference objects uid """ @@ -450,7 +450,7 @@ class UidSetGetter(UidListGetter): return result_set -class UidSetSetter(Method): +class UidSetSetter(BaseSetter): """ Sets a category from the uid of the object """ @@ -525,7 +525,7 @@ class UidDefaultSetter(UidSetSetter): instance.reindexObject() return (instance, ) -class DefaultIdGetter(Method): +class DefaultIdGetter(BaseGetter): """ Gets a default reference object """ @@ -557,7 +557,7 @@ class DefaultIdGetter(Method): IdGetter = DefaultIdGetter -class DefaultTitleOrIdGetter(Method): +class DefaultTitleOrIdGetter(BaseGetter): """ Gets a default reference object """ @@ -589,7 +589,7 @@ class DefaultTitleOrIdGetter(Method): TitleOrIdGetter = DefaultTitleOrIdGetter -class DefaultLogicalPathGetter(Method): +class DefaultLogicalPathGetter(BaseGetter): """ Gets a default logical path object """ @@ -621,7 +621,7 @@ class DefaultLogicalPathGetter(Method): LogicalPathGetter = DefaultLogicalPathGetter -class IdListGetter(Method): +class IdListGetter(BaseGetter): """ Gets a list of reference objects uid """ @@ -660,7 +660,7 @@ class IdSetGetter(IdListGetter): return result_set -class LogicalPathListGetter(Method): +class LogicalPathListGetter(BaseGetter): """ Gets a list of logical path """ @@ -697,7 +697,7 @@ class LogicalPathSetGetter(LogicalPathListGetter): return result_set -class DefaultPropertyGetter(Method): +class DefaultPropertyGetter(BaseGetter): """ Gets a default reference object """ @@ -730,7 +730,7 @@ class DefaultPropertyGetter(Method): PropertyGetter = DefaultPropertyGetter -class PropertyListGetter(Method): +class PropertyListGetter(BaseGetter): """ Gets a list of reference objects uid """ diff --git a/product/ERP5Type/Accessor/WorkflowState.py b/product/ERP5Type/Accessor/WorkflowState.py index e8fbb9a2ace893ba294d4e7a4f3c1f02bd647732..0005c08b3fa43fa1f11d28f5ec3f52506a154958 100644 --- a/product/ERP5Type/Accessor/WorkflowState.py +++ b/product/ERP5Type/Accessor/WorkflowState.py @@ -26,14 +26,13 @@ # ############################################################################## -from Accessor import Accessor as Method from Products.CMFCore.utils import getToolByName from Products.ERP5Type.PsycoWrapper import psyco - +from Base import Getter as BaseGetter, Setter as BaseSetter # Creation of default constructor class func_code: pass -class Getter(Method): +class Getter(BaseGetter): """ Gets an attribute value. A default value can be provided if needed @@ -59,7 +58,7 @@ class Getter(Method): psyco.bind(__call__) -class TitleGetter(Method): +class TitleGetter(BaseGetter): """ Gets the title of the current state """