Commit 00b1c64d authored by Arnaud Fontaine's avatar Arnaud Fontaine

${SR_DIRECTORY}/bin/python -c 'from zope.fixers.main import main;...

${SR_DIRECTORY}/bin/python -c 'from zope.fixers.main import main; main("--write --nobackups parts/erp5/".split())'
parent 1cd73f91
...@@ -36,6 +36,9 @@ from erp5.component.interface.IRule import IRule ...@@ -36,6 +36,9 @@ from erp5.component.interface.IRule import IRule
from erp5.component.interface.IDivergenceController import IDivergenceController from erp5.component.interface.IDivergenceController import IDivergenceController
from erp5.component.interface.IMovementCollectionUpdater import IMovementCollectionUpdater from erp5.component.interface.IMovementCollectionUpdater import IMovementCollectionUpdater
@zope.interface.implementer(IRule,
IDivergenceController,
IMovementCollectionUpdater,)
class PaymentSimulationRule(RuleMixin, MovementCollectionUpdaterMixin): class PaymentSimulationRule(RuleMixin, MovementCollectionUpdaterMixin):
""" """
Payment Rule generates payment simulation movement from invoice Payment Rule generates payment simulation movement from invoice
...@@ -49,11 +52,6 @@ class PaymentSimulationRule(RuleMixin, MovementCollectionUpdaterMixin): ...@@ -49,11 +52,6 @@ class PaymentSimulationRule(RuleMixin, MovementCollectionUpdaterMixin):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IRule,
IDivergenceController,
IMovementCollectionUpdater,)
# Default Properties # Default Properties
property_sheets = ( property_sheets = (
PropertySheet.Base, PropertySheet.Base,
......
...@@ -31,8 +31,9 @@ ...@@ -31,8 +31,9 @@
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import PropertySheet, Permissions, interfaces from Products.ERP5Type import PropertySheet, Permissions, interfaces
from Products.ERP5Type.Core.Predicate import Predicate from Products.ERP5Type.Core.Predicate import Predicate
from zope.interface import implements from zope.interface import implementer
@implementer( interfaces.IPredicate,)
class Archive(Predicate): class Archive(Predicate):
""" """
A Catalog Archive object A Catalog Archive object
...@@ -47,9 +48,6 @@ class Archive(Predicate): ...@@ -47,9 +48,6 @@ class Archive(Predicate):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
implements( interfaces.IPredicate, )
# Default Properties # Default Properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -37,6 +37,7 @@ import re ...@@ -37,6 +37,7 @@ import re
_marker = object() _marker = object()
@zope.interface.implementer(ICoordinate,)
class Coordinate(Base): class Coordinate(Base):
""" """
Coordinates is a mix-in class which is used to store elementary Coordinates is a mix-in class which is used to store elementary
...@@ -81,9 +82,6 @@ class Coordinate(Base): ...@@ -81,9 +82,6 @@ class Coordinate(Base):
portal_type = 'Coordinate' portal_type = 'Coordinate'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
# Declarative interface
zope.interface.implements(ICoordinate, )
# Declarative security (replaces __ac_permissions__) # Declarative security (replaces __ac_permissions__)
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
......
...@@ -33,6 +33,7 @@ from Products.ERP5Type import Permissions, PropertySheet, interfaces ...@@ -33,6 +33,7 @@ from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5Type.XMLObject import XMLObject from Products.ERP5Type.XMLObject import XMLObject
@zope.interface.implementer(interfaces.INode)
class Login(EncryptedPasswordMixin, XMLObject, LoginAccountProviderMixin): class Login(EncryptedPasswordMixin, XMLObject, LoginAccountProviderMixin):
"""Login """Login
""" """
...@@ -40,8 +41,6 @@ class Login(EncryptedPasswordMixin, XMLObject, LoginAccountProviderMixin): ...@@ -40,8 +41,6 @@ class Login(EncryptedPasswordMixin, XMLObject, LoginAccountProviderMixin):
portal_type = 'Login' portal_type = 'Login'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
zope.interface.implements(interfaces.INode)
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
......
...@@ -32,6 +32,7 @@ from Products.ERP5Type import Permissions, PropertySheet ...@@ -32,6 +32,7 @@ from Products.ERP5Type import Permissions, PropertySheet
from erp5.component.interface.IMovementGroup import IMovementGroup from erp5.component.interface.IMovementGroup import IMovementGroup
import zope.interface import zope.interface
@zope.interface.implementer( IMovementGroup,)
class MovementGroup(XMLObject): class MovementGroup(XMLObject):
""" """
The purpose of MovementGroup is to define how movements The purpose of MovementGroup is to define how movements
...@@ -59,8 +60,6 @@ class MovementGroup(XMLObject): ...@@ -59,8 +60,6 @@ class MovementGroup(XMLObject):
meta_type = 'ERP5 Movement Group' meta_type = 'ERP5 Movement Group'
portal_type = 'Movement Group' portal_type = 'Movement Group'
zope.interface.implements( IMovementGroup, )
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
......
...@@ -32,6 +32,7 @@ from AccessControl import ClassSecurityInfo ...@@ -32,6 +32,7 @@ from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, interfaces from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5.Document.Node import Node from Products.ERP5.Document.Node import Node
@zope.interface.implementer(interfaces.INode)
class Organisation(Node): class Organisation(Node):
""" """
An Organisation object holds the information about An Organisation object holds the information about
...@@ -52,8 +53,6 @@ class Organisation(Node): ...@@ -52,8 +53,6 @@ class Organisation(Node):
portal_type = 'Organisation' portal_type = 'Organisation'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
zope.interface.implements(interfaces.INode)
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
......
...@@ -60,6 +60,7 @@ class UserExistsError( ...@@ -60,6 +60,7 @@ class UserExistsError(
super(UserExistsError, self).__init__('user id %s already exists' % (user_id, )) super(UserExistsError, self).__init__('user id %s already exists' % (user_id, ))
@zope.interface.implementer(interfaces.INode)
class Person(EncryptedPasswordMixin, Node, LoginAccountProviderMixin, ERP5UserMixin): class Person(EncryptedPasswordMixin, Node, LoginAccountProviderMixin, ERP5UserMixin):
""" """
An Person object holds the information about An Person object holds the information about
...@@ -81,8 +82,6 @@ class Person(EncryptedPasswordMixin, Node, LoginAccountProviderMixin, ERP5UserMi ...@@ -81,8 +82,6 @@ class Person(EncryptedPasswordMixin, Node, LoginAccountProviderMixin, ERP5UserMi
portal_type = 'Person' portal_type = 'Person'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
zope.interface.implements(interfaces.INode)
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
......
...@@ -32,6 +32,7 @@ from Products.ERP5Type.XMLObject import XMLObject ...@@ -32,6 +32,7 @@ from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5Type.ERP5Type \ from Products.ERP5Type.ERP5Type \
import ERP5TYPE_SECURITY_GROUP_ID_GENERATION_SCRIPT import ERP5TYPE_SECURITY_GROUP_ID_GENERATION_SCRIPT
@zope.interface.implementer(interfaces.ILocalRoleGenerator)
class RoleDefinition(XMLObject): class RoleDefinition(XMLObject):
# CMF Type Definition # CMF Type Definition
meta_type = 'ERP5 Role Definition' meta_type = 'ERP5 Role Definition'
...@@ -42,8 +43,6 @@ class RoleDefinition(XMLObject): ...@@ -42,8 +43,6 @@ class RoleDefinition(XMLObject):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
zope.interface.implements(interfaces.ILocalRoleGenerator)
# Default Properties # Default Properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -39,6 +39,7 @@ from Products.ERP5Type.Globals import PersistentMapping ...@@ -39,6 +39,7 @@ from Products.ERP5Type.Globals import PersistentMapping
from Products.CMFCore.utils import _checkPermission from Products.CMFCore.utils import _checkPermission
from Products.CMFCore.exceptions import AccessControl_Unauthorized from Products.CMFCore.exceptions import AccessControl_Unauthorized
@zope.interface.implementer(IEncryptedPassword,)
class EncryptedPasswordMixin(object): class EncryptedPasswordMixin(object):
"""Encrypted Password Mixin """Encrypted Password Mixin
""" """
...@@ -46,9 +47,6 @@ class EncryptedPasswordMixin(object): ...@@ -46,9 +47,6 @@ class EncryptedPasswordMixin(object):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IEncryptedPassword,)
security.declareProtected(Permissions.SetOwnPassword, 'checkPassword') security.declareProtected(Permissions.SetOwnPassword, 'checkPassword')
def checkPassword(self, value) : def checkPassword(self, value) :
""" """
......
...@@ -35,6 +35,7 @@ from AccessControl.AuthEncoding import pw_validate ...@@ -35,6 +35,7 @@ from AccessControl.AuthEncoding import pw_validate
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type.Globals import InitializeClass from Products.ERP5Type.Globals import InitializeClass
@zope.interface.implementer(ILoginAccountProvider)
class LoginAccountProviderMixin: class LoginAccountProviderMixin:
""" """
This class provides a generic implementation of ILoginAccountProvider. This class provides a generic implementation of ILoginAccountProvider.
...@@ -43,9 +44,6 @@ class LoginAccountProviderMixin: ...@@ -43,9 +44,6 @@ class LoginAccountProviderMixin:
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
# Declarative interfaces
zope.interface.implements(ILoginAccountProvider)
security.declareProtected(Permissions.SetOwnPassword, 'notifyLoginFailure') security.declareProtected(Permissions.SetOwnPassword, 'notifyLoginFailure')
def notifyLoginFailure(self, **kw): def notifyLoginFailure(self, **kw):
""" """
......
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from Products.PortalTransforms.interfaces import ITransform from Products.PortalTransforms.interfaces import ITransform
from zope.interface import implements from zope.interface import implementer
from erp5.component.document.Document import DocumentConversionServerProxy, ConversionError, enc, dec from erp5.component.document.Document import DocumentConversionServerProxy, ConversionError, enc, dec
@implementer(ITransform)
class DocumentConversionServerTransform: class DocumentConversionServerTransform:
""" """
Transformer using Conversion Server Transformer using Conversion Server
""" """
implements(ITransform)
# Name of the Transform as registered in portal_transforms # Name of the Transform as registered in portal_transforms
__name__ = None __name__ = None
......
...@@ -41,6 +41,7 @@ ROUNDING_OPTION_DICT = {'ROUND_DOWN':ROUND_DOWN, ...@@ -41,6 +41,7 @@ ROUNDING_OPTION_DICT = {'ROUND_DOWN':ROUND_DOWN,
'ROUND_HALF_EVEN':ROUND_HALF_EVEN, 'ROUND_HALF_EVEN':ROUND_HALF_EVEN,
'ROUND_HALF_UP':ROUND_HALF_UP} 'ROUND_HALF_UP':ROUND_HALF_UP}
@zope.interface.implementer(IRoundingTool)
class RoundingTool(BaseTool): class RoundingTool(BaseTool):
"""Rounding Tool""" """Rounding Tool"""
id = 'portal_roundings' id = 'portal_roundings'
...@@ -48,8 +49,6 @@ class RoundingTool(BaseTool): ...@@ -48,8 +49,6 @@ class RoundingTool(BaseTool):
meta_type = 'ERP5 Rounding Tool' meta_type = 'ERP5 Rounding Tool'
portal_type = 'Rounding Tool' portal_type = 'Rounding Tool'
zope.interface.implements(IRoundingTool)
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declarePublic('findRoundingModelValueList') security.declarePublic('findRoundingModelValueList')
......
...@@ -39,6 +39,9 @@ from erp5.component.interface.IRule import IRule ...@@ -39,6 +39,9 @@ from erp5.component.interface.IRule import IRule
from erp5.component.interface.IDivergenceController import IDivergenceController from erp5.component.interface.IDivergenceController import IDivergenceController
from erp5.component.interface.IMovementCollectionUpdater import IMovementCollectionUpdater from erp5.component.interface.IMovementCollectionUpdater import IMovementCollectionUpdater
@zope.interface.implementer(IRule,
IDivergenceController,
IMovementCollectionUpdater,)
class LoyaltyTransactionSimulationRule(RuleMixin,MovementCollectionUpdaterMixin): class LoyaltyTransactionSimulationRule(RuleMixin,MovementCollectionUpdaterMixin):
""" """ """ """
# CMF Type Definition # CMF Type Definition
...@@ -49,11 +52,6 @@ class LoyaltyTransactionSimulationRule(RuleMixin,MovementCollectionUpdaterMixin) ...@@ -49,11 +52,6 @@ class LoyaltyTransactionSimulationRule(RuleMixin,MovementCollectionUpdaterMixin)
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IRule,
IDivergenceController,
IMovementCollectionUpdater,)
# Default Properties # Default Properties
property_sheets = ( property_sheets = (
PropertySheet.Base, PropertySheet.Base,
......
...@@ -35,6 +35,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin ...@@ -35,6 +35,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class AccountConfiguratorItem(ConfiguratorItemMixin, XMLObject): class AccountConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" Setup an Accounting Account. """ """ Setup an Accounting Account. """
...@@ -48,9 +49,6 @@ class AccountConfiguratorItem(ConfiguratorItemMixin, XMLObject): ...@@ -48,9 +49,6 @@ class AccountConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -34,6 +34,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin ...@@ -34,6 +34,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class AccountingPeriodConfiguratorItem(ConfiguratorItemMixin, XMLObject): class AccountingPeriodConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" Setup an Accounting Period. """ """ Setup an Accounting Period. """
...@@ -47,9 +48,6 @@ class AccountingPeriodConfiguratorItem(ConfiguratorItemMixin, XMLObject): ...@@ -47,9 +48,6 @@ class AccountingPeriodConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -35,6 +35,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin ...@@ -35,6 +35,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class AdvancedPurchaseTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLObject): class AdvancedPurchaseTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" Setup Purchase Trade Conditions. """ """ Setup Purchase Trade Conditions. """
...@@ -48,9 +49,6 @@ class AdvancedPurchaseTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLO ...@@ -48,9 +49,6 @@ class AdvancedPurchaseTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLO
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -35,6 +35,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin ...@@ -35,6 +35,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class AdvancedSaleTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLObject): class AdvancedSaleTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" Setup Sale Trade Conditions. """ """ Setup Sale Trade Conditions. """
...@@ -48,9 +49,6 @@ class AdvancedSaleTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLObjec ...@@ -48,9 +49,6 @@ class AdvancedSaleTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLObjec
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -35,6 +35,7 @@ from erp5.component.interface.IConfiguratorItem import IConfiguratorItem ...@@ -35,6 +35,7 @@ from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
from DateTime import DateTime from DateTime import DateTime
@zope.interface.implementer(IConfiguratorItem)
class AlarmConfiguratorItem(ConfiguratorItemMixin, XMLObject): class AlarmConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" Setup an Alarm """ """ Setup an Alarm """
...@@ -48,9 +49,6 @@ class AlarmConfiguratorItem(ConfiguratorItemMixin, XMLObject): ...@@ -48,9 +49,6 @@ class AlarmConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -36,6 +36,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin ...@@ -36,6 +36,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class BankAccountConfiguratorItem(ConfiguratorItemMixin, XMLObject): class BankAccountConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" Setup bank account. """ """ Setup bank account. """
...@@ -49,9 +50,6 @@ class BankAccountConfiguratorItem(ConfiguratorItemMixin, XMLObject): ...@@ -49,9 +50,6 @@ class BankAccountConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -35,6 +35,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin ...@@ -35,6 +35,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class BusinessProcessConfiguratorItem(ConfiguratorItemMixin, XMLObject): class BusinessProcessConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" Setup Rules. """ """ Setup Rules. """
...@@ -48,9 +49,6 @@ class BusinessProcessConfiguratorItem(ConfiguratorItemMixin, XMLObject): ...@@ -48,9 +49,6 @@ class BusinessProcessConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -35,6 +35,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin ...@@ -35,6 +35,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class CatalogKeywordKeyConfiguratorItem(ConfiguratorItemMixin, XMLObject): class CatalogKeywordKeyConfiguratorItem(ConfiguratorItemMixin, XMLObject):
"""Set up catalog keyword keys.""" """Set up catalog keyword keys."""
...@@ -48,9 +49,6 @@ class CatalogKeywordKeyConfiguratorItem(ConfiguratorItemMixin, XMLObject): ...@@ -48,9 +49,6 @@ class CatalogKeywordKeyConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -40,6 +40,7 @@ class UnrestrictedStringIO(StringIO): ...@@ -40,6 +40,7 @@ class UnrestrictedStringIO(StringIO):
__allow_access_to_unprotected_subobjects__ = 1 __allow_access_to_unprotected_subobjects__ = 1
@zope.interface.implementer(IConfiguratorItem)
class CategoriesSpreadsheetConfiguratorItem(ConfiguratorItemMixin, XMLObject): class CategoriesSpreadsheetConfiguratorItem(ConfiguratorItemMixin, XMLObject):
"""Import a categories spreadsheet. """Import a categories spreadsheet.
""" """
...@@ -54,9 +55,6 @@ class CategoriesSpreadsheetConfiguratorItem(ConfiguratorItemMixin, XMLObject): ...@@ -54,9 +55,6 @@ class CategoriesSpreadsheetConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -34,6 +34,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin ...@@ -34,6 +34,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class CategoryConfiguratorItem(ConfiguratorItemMixin, XMLObject): class CategoryConfiguratorItem(ConfiguratorItemMixin, XMLObject):
"""This class is meta build step for customization of ERP5 site.""" """This class is meta build step for customization of ERP5 site."""
...@@ -47,9 +48,6 @@ class CategoryConfiguratorItem(ConfiguratorItemMixin, XMLObject): ...@@ -47,9 +48,6 @@ class CategoryConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -35,6 +35,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin ...@@ -35,6 +35,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class CurrencyConfiguratorItem(ConfiguratorItemMixin, XMLObject): class CurrencyConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" Setup currency. """ """ Setup currency. """
...@@ -48,9 +49,6 @@ class CurrencyConfiguratorItem(ConfiguratorItemMixin, XMLObject): ...@@ -48,9 +49,6 @@ class CurrencyConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -33,6 +33,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin ...@@ -33,6 +33,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class CustomerBT5ConfiguratorItem(ConfiguratorItemMixin, XMLObject): class CustomerBT5ConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" Create a new bt5 for customer configuration. """ Create a new bt5 for customer configuration.
...@@ -49,9 +50,6 @@ class CustomerBT5ConfiguratorItem(ConfiguratorItemMixin, XMLObject): ...@@ -49,9 +50,6 @@ class CustomerBT5ConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -36,6 +36,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin ...@@ -36,6 +36,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class OrganisationConfiguratorItem(ConfiguratorItemMixin, XMLObject): class OrganisationConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" This class install a Organisation.""" """ This class install a Organisation."""
...@@ -49,9 +50,6 @@ class OrganisationConfiguratorItem(ConfiguratorItemMixin, XMLObject): ...@@ -49,9 +50,6 @@ class OrganisationConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -34,6 +34,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin ...@@ -34,6 +34,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class PermissionConfiguratorItem(ConfiguratorItemMixin, XMLObject): class PermissionConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" Set permission matrix on module.""" """ Set permission matrix on module."""
...@@ -47,9 +48,6 @@ class PermissionConfiguratorItem(ConfiguratorItemMixin, XMLObject): ...@@ -47,9 +48,6 @@ class PermissionConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -37,6 +37,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin ...@@ -37,6 +37,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class PersonConfiguratorItem(XMLObject, ConfiguratorItemMixin): class PersonConfiguratorItem(XMLObject, ConfiguratorItemMixin):
""" Setup user. """ """ Setup user. """
...@@ -50,9 +51,6 @@ class PersonConfiguratorItem(XMLObject, ConfiguratorItemMixin): ...@@ -50,9 +51,6 @@ class PersonConfiguratorItem(XMLObject, ConfiguratorItemMixin):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -34,6 +34,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin ...@@ -34,6 +34,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class PortalTypeConfiguratorItem(ConfiguratorItemMixin, XMLObject): class PortalTypeConfiguratorItem(ConfiguratorItemMixin, XMLObject):
"""Configure Portal Type.""" """Configure Portal Type."""
...@@ -47,9 +48,6 @@ class PortalTypeConfiguratorItem(ConfiguratorItemMixin, XMLObject): ...@@ -47,9 +48,6 @@ class PortalTypeConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -34,6 +34,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin ...@@ -34,6 +34,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class PortalTypeRolesSpreadsheetConfiguratorItem(ConfiguratorItemMixin, XMLObject): class PortalTypeRolesSpreadsheetConfiguratorItem(ConfiguratorItemMixin, XMLObject):
"""Import a portal type roles spreadsheet. """Import a portal type roles spreadsheet.
""" """
...@@ -48,9 +49,6 @@ class PortalTypeRolesSpreadsheetConfiguratorItem(ConfiguratorItemMixin, XMLObjec ...@@ -48,9 +49,6 @@ class PortalTypeRolesSpreadsheetConfiguratorItem(ConfiguratorItemMixin, XMLObjec
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -34,6 +34,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin ...@@ -34,6 +34,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class PreferenceConfiguratorItem(ConfiguratorItemMixin, XMLObject): class PreferenceConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" Setup preference. """ """ Setup preference. """
...@@ -47,9 +48,6 @@ class PreferenceConfiguratorItem(ConfiguratorItemMixin, XMLObject): ...@@ -47,9 +48,6 @@ class PreferenceConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -35,6 +35,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin ...@@ -35,6 +35,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class PurchaseTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLObject): class PurchaseTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" Setup Purchase Trade Conditions. """ """ Setup Purchase Trade Conditions. """
...@@ -48,9 +49,6 @@ class PurchaseTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLObject): ...@@ -48,9 +49,6 @@ class PurchaseTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -36,6 +36,7 @@ from erp5.component.interface.IConfiguratorItem import IConfiguratorItem ...@@ -36,6 +36,7 @@ from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
from zLOG import LOG, INFO from zLOG import LOG, INFO
@zope.interface.implementer(IConfiguratorItem)
class RoleConfiguratorItem(ConfiguratorItemMixin, XMLObject): class RoleConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" Setup role per module basis. """ """ Setup role per module basis. """
...@@ -49,9 +50,6 @@ class RoleConfiguratorItem(ConfiguratorItemMixin, XMLObject): ...@@ -49,9 +50,6 @@ class RoleConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -34,6 +34,7 @@ from Products.ERP5Type.XMLObject import XMLObject ...@@ -34,6 +34,7 @@ from Products.ERP5Type.XMLObject import XMLObject
from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class RuleConfiguratorItem(ConfiguratorItemMixin, XMLObject): class RuleConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" Setup Rules. """ """ Setup Rules. """
...@@ -47,9 +48,6 @@ class RuleConfiguratorItem(ConfiguratorItemMixin, XMLObject): ...@@ -47,9 +48,6 @@ class RuleConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -35,6 +35,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin ...@@ -35,6 +35,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class SaleTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLObject): class SaleTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" Setup Sale Trade Conditions. """ """ Setup Sale Trade Conditions. """
...@@ -48,9 +49,6 @@ class SaleTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLObject): ...@@ -48,9 +49,6 @@ class SaleTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -35,6 +35,7 @@ from erp5.component.mixin.SkinConfiguratorItemMixin import \ ...@@ -35,6 +35,7 @@ from erp5.component.mixin.SkinConfiguratorItemMixin import \
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class SecurityCategoryMappingConfiguratorItem(SkinConfiguratorItemMixin, class SecurityCategoryMappingConfiguratorItem(SkinConfiguratorItemMixin,
XMLObject): XMLObject):
""" Setup the ERP5Type_getSecurityCategoryMapping Python Script which """ Setup the ERP5Type_getSecurityCategoryMapping Python Script which
...@@ -50,9 +51,6 @@ class SecurityCategoryMappingConfiguratorItem(SkinConfiguratorItemMixin, ...@@ -50,9 +51,6 @@ class SecurityCategoryMappingConfiguratorItem(SkinConfiguratorItemMixin,
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -36,6 +36,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin ...@@ -36,6 +36,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class ServiceConfiguratorItem(ConfiguratorItemMixin, XMLObject): class ServiceConfiguratorItem(ConfiguratorItemMixin, XMLObject):
"""Create default service documents.""" """Create default service documents."""
...@@ -49,9 +50,6 @@ class ServiceConfiguratorItem(ConfiguratorItemMixin, XMLObject): ...@@ -49,9 +50,6 @@ class ServiceConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -34,6 +34,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin ...@@ -34,6 +34,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class SitePropertyConfiguratorItem(ConfiguratorItemMixin, XMLObject): class SitePropertyConfiguratorItem(ConfiguratorItemMixin, XMLObject):
"""Set up site properties.""" """Set up site properties."""
...@@ -47,9 +48,6 @@ class SitePropertyConfiguratorItem(ConfiguratorItemMixin, XMLObject): ...@@ -47,9 +48,6 @@ class SitePropertyConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -34,6 +34,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin ...@@ -34,6 +34,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class SolverConfiguratorItem(ConfiguratorItemMixin, XMLObject): class SolverConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" Setup Solvers. """ """ Setup Solvers. """
...@@ -47,9 +48,6 @@ class SolverConfiguratorItem(ConfiguratorItemMixin, XMLObject): ...@@ -47,9 +48,6 @@ class SolverConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -36,6 +36,7 @@ from Products.ERP5Type.Cache import CachingMethod ...@@ -36,6 +36,7 @@ from Products.ERP5Type.Cache import CachingMethod
from zLOG import LOG, INFO from zLOG import LOG, INFO
@zope.interface.implementer(IConfiguratorItem)
class StandardBT5ConfiguratorItem(ConfiguratorItemMixin, XMLObject): class StandardBT5ConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" This class will install standard ERP5 template from a repository to """ This class will install standard ERP5 template from a repository to
fake site. """ fake site. """
...@@ -50,9 +51,6 @@ class StandardBT5ConfiguratorItem(ConfiguratorItemMixin, XMLObject): ...@@ -50,9 +51,6 @@ class StandardBT5ConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -34,6 +34,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin ...@@ -34,6 +34,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class SystemPreferenceConfiguratorItem(ConfiguratorItemMixin, XMLObject): class SystemPreferenceConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" Setup System preference. """ """ Setup System preference. """
...@@ -47,9 +48,6 @@ class SystemPreferenceConfiguratorItem(ConfiguratorItemMixin, XMLObject): ...@@ -47,9 +48,6 @@ class SystemPreferenceConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -53,9 +53,9 @@ if 1: # BBB ...@@ -53,9 +53,9 @@ if 1: # BBB
from zope.i18n.interfaces import ITranslationDomain, \ from zope.i18n.interfaces import ITranslationDomain, \
IFallbackTranslationDomainFactory IFallbackTranslationDomainFactory
@zope.interface.implementer(ITranslationDomain)
@zope.interface.provider(IFallbackTranslationDomainFactory)
class DummyTranslationDomainFallback(object): class DummyTranslationDomainFallback(object):
zope.interface.implements(ITranslationDomain)
zope.interface.classProvides(IFallbackTranslationDomainFactory)
def __init__(self, domain): def __init__(self, domain):
self.domain = domain self.domain = domain
......
...@@ -40,6 +40,7 @@ from zLOG import LOG, INFO, PROBLEM ...@@ -40,6 +40,7 @@ from zLOG import LOG, INFO, PROBLEM
import errno import errno
from StringIO import StringIO from StringIO import StringIO
@zope.interface.implementer(IWatermarkable)
class PDFDocument(Image): class PDFDocument(Image):
""" """
PDFDocument is a subclass of Image which is able to PDFDocument is a subclass of Image which is able to
...@@ -68,8 +69,6 @@ class PDFDocument(Image): ...@@ -68,8 +69,6 @@ class PDFDocument(Image):
, PropertySheet.Periodicity , PropertySheet.Periodicity
) )
zope.interface.implements(IWatermarkable)
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
'getWatermarkedData') 'getWatermarkedData')
def getWatermarkedData(self, watermark_data, repeat_watermark=True, def getWatermarkedData(self, watermark_data, repeat_watermark=True,
......
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class DocToDocx: class DocToDocx:
"""Transforms doc to docx by using Cloudooo""" """Transforms doc to docx by using Cloudooo"""
implements(itransform)
__name__ = 'doc_to_docx' __name__ = 'doc_to_docx'
inputs = ('application/msword',) inputs = ('application/msword',)
output = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' output = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
......
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class DocToHtml: class DocToHtml:
"""Transforms doc to html by using Cloudooo""" """Transforms doc to html by using Cloudooo"""
implements(itransform)
__name__ = 'doc_to_html' __name__ = 'doc_to_html'
inputs = ('application/msword',) inputs = ('application/msword',)
output = 'text/html' output = 'text/html'
......
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class DocxToDocy: class DocxToDocy:
"""Transforms docx to docy by using Cloudooo""" """Transforms docx to docy by using Cloudooo"""
implements(itransform)
__name__ = 'docx_to_docy' __name__ = 'docx_to_docy'
inputs = ('application/vnd.openxmlformats-officedocument.wordprocessingml.document',) inputs = ('application/vnd.openxmlformats-officedocument.wordprocessingml.document',)
output = 'application/x-asc-text' output = 'application/x-asc-text'
......
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class DocxToOdt: class DocxToOdt:
"""Transforms docx to odt by using Cloudooo""" """Transforms docx to odt by using Cloudooo"""
implements(itransform)
__name__ = 'docx_to_odt' __name__ = 'docx_to_odt'
inputs = ('application/vnd.openxmlformats-officedocument.wordprocessingml.document',) inputs = ('application/vnd.openxmlformats-officedocument.wordprocessingml.document',)
output = 'application/vnd.oasis.opendocument.text' output = 'application/vnd.oasis.opendocument.text'
......
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class DocyToDocx: class DocyToDocx:
"""Transforms docy to docx by using Cloudooo""" """Transforms docy to docx by using Cloudooo"""
implements(itransform)
__name__ = 'docy_to_docx' __name__ = 'docy_to_docx'
inputs = ('application/x-asc-text',) inputs = ('application/x-asc-text',)
output = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' output = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
......
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class OdpToHtml: class OdpToHtml:
"""Transforms odp to html by using Cloudooo""" """Transforms odp to html by using Cloudooo"""
implements(itransform)
__name__ = 'odp_to_html' __name__ = 'odp_to_html'
inputs = ('application/vnd.oasis.opendocument.presentation',) inputs = ('application/vnd.oasis.opendocument.presentation',)
output = 'text/html' output = 'text/html'
......
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class OdpToPdf: class OdpToPdf:
"""Transforms odp to pdf by using Cloudooo""" """Transforms odp to pdf by using Cloudooo"""
implements(itransform)
__name__ = 'odp_to_pdf' __name__ = 'odp_to_pdf'
inputs = ('application/vnd.oasis.opendocument.presentation',) inputs = ('application/vnd.oasis.opendocument.presentation',)
output = 'application/pdf' output = 'application/pdf'
......
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class OdpToPptx: class OdpToPptx:
"""Transforms odp to pptx by using Cloudooo""" """Transforms odp to pptx by using Cloudooo"""
implements(itransform)
__name__ = 'odp_to_pptx' __name__ = 'odp_to_pptx'
inputs = ('application/vnd.oasis.opendocument.presentation',) inputs = ('application/vnd.oasis.opendocument.presentation',)
output = 'application/vnd.openxmlformats-officedocument.presentationml.presentation' output = 'application/vnd.openxmlformats-officedocument.presentationml.presentation'
......
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class OdpToSxi: class OdpToSxi:
"""Transforms odp to sxi by using Cloudooo""" """Transforms odp to sxi by using Cloudooo"""
implements(itransform)
__name__ = 'odp_to_sxi' __name__ = 'odp_to_sxi'
inputs = ('application/vnd.oasis.opendocument.presentation',) inputs = ('application/vnd.oasis.opendocument.presentation',)
output = 'application/vnd.sun.xml.impress' output = 'application/vnd.sun.xml.impress'
......
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class OdsToHtml: class OdsToHtml:
"""Transforms ods to html by using Cloudooo""" """Transforms ods to html by using Cloudooo"""
implements(itransform)
__name__ = 'ods_to_html' __name__ = 'ods_to_html'
inputs = ('application/vnd.oasis.opendocument.spreadsheet',) inputs = ('application/vnd.oasis.opendocument.spreadsheet',)
output = 'text/html' output = 'text/html'
......
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class OdsToPdf: class OdsToPdf:
"""Transforms ods to pdf by using Cloudooo""" """Transforms ods to pdf by using Cloudooo"""
implements(itransform)
__name__ = 'ods_to_pdf' __name__ = 'ods_to_pdf'
inputs = ('application/vnd.oasis.opendocument.spreadsheet',) inputs = ('application/vnd.oasis.opendocument.spreadsheet',)
output = 'application/pdf' output = 'application/pdf'
......
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class OdsToXlsx: class OdsToXlsx:
"""Transforms ods to xlsx by using Cloudooo""" """Transforms ods to xlsx by using Cloudooo"""
implements(itransform)
__name__ = 'ods_to_xlsx' __name__ = 'ods_to_xlsx'
inputs = ('application/vnd.oasis.opendocument.spreadsheet',) inputs = ('application/vnd.oasis.opendocument.spreadsheet',)
output = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' output = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
......
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class OdtToDocx: class OdtToDocx:
"""Transforms odt to docx by using Cloudooo""" """Transforms odt to docx by using Cloudooo"""
implements(itransform)
__name__ = 'odt_to_docx' __name__ = 'odt_to_docx'
inputs = ('application/vnd.oasis.opendocument.text',) inputs = ('application/vnd.oasis.opendocument.text',)
output = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' output = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
......
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class OdtToHtml: class OdtToHtml:
"""Transforms odt to html by using Cloudooo""" """Transforms odt to html by using Cloudooo"""
implements(itransform)
__name__ = 'odt_to_html' __name__ = 'odt_to_html'
inputs = ('application/vnd.oasis.opendocument.text',) inputs = ('application/vnd.oasis.opendocument.text',)
output = 'text/html' output = 'text/html'
......
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class PdfToBmp: class PdfToBmp:
"""Transforms pdf to bmp by using Cloudooo""" """Transforms pdf to bmp by using Cloudooo"""
implements(itransform)
__name__ = 'pdf_to_bmp' __name__ = 'pdf_to_bmp'
inputs = ('application/pdf',) inputs = ('application/pdf',)
output = 'image/x-ms-bmp' # image/bmp output = 'image/x-ms-bmp' # image/bmp
......
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class PptToPptx: class PptToPptx:
"""Transforms ppt to pptx by using Cloudooo""" """Transforms ppt to pptx by using Cloudooo"""
implements(itransform)
__name__ = 'ppt_to_pptx' __name__ = 'ppt_to_pptx'
inputs = ('application/vnd.ms-powerpoint', inputs = ('application/vnd.ms-powerpoint',
'application/powerpoint', 'application/powerpoint',
......
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class PptxToOdp: class PptxToOdp:
"""Transforms pptx to odp by using Cloudooo""" """Transforms pptx to odp by using Cloudooo"""
implements(itransform)
__name__ = 'pptx_to_odp' __name__ = 'pptx_to_odp'
inputs = ('application/vnd.openxmlformats-officedocument.presentationml.presentation',) inputs = ('application/vnd.openxmlformats-officedocument.presentationml.presentation',)
output = 'application/vnd.oasis.opendocument.presentation' output = 'application/vnd.oasis.opendocument.presentation'
......
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class PptxToPpty: class PptxToPpty:
"""Transforms pptx to ppty by using Cloudooo""" """Transforms pptx to ppty by using Cloudooo"""
implements(itransform)
__name__ = 'pptx_to_ppty' __name__ = 'pptx_to_ppty'
inputs = ('application/vnd.openxmlformats-officedocument.presentationml.presentation',) inputs = ('application/vnd.openxmlformats-officedocument.presentationml.presentation',)
output = 'application/x-asc-presentation' output = 'application/x-asc-presentation'
......
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class PptyToPptx: class PptyToPptx:
"""Transforms ppty to pptx by using Cloudooo""" """Transforms ppty to pptx by using Cloudooo"""
implements(itransform)
__name__ = 'ppty_to_pptx' __name__ = 'ppty_to_pptx'
inputs = ('application/x-asc-presentation',) inputs = ('application/x-asc-presentation',)
output = 'application/vnd.openxmlformats-officedocument.presentationml.presentation' output = 'application/vnd.openxmlformats-officedocument.presentationml.presentation'
......
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class SxiToHtml: class SxiToHtml:
"""Transforms sxi to html by using Cloudooo""" """Transforms sxi to html by using Cloudooo"""
implements(itransform)
__name__ = 'sxi_to_html' __name__ = 'sxi_to_html'
inputs = ('application/vnd.sun.xml.impress',) inputs = ('application/vnd.sun.xml.impress',)
output = 'text/html' output = 'text/html'
......
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class SxiToOdp: class SxiToOdp:
"""Transforms sxi to odp by using Cloudooo""" """Transforms sxi to odp by using Cloudooo"""
implements(itransform)
__name__ = 'sxi_to_odp' __name__ = 'sxi_to_odp'
inputs = ('application/vnd.sun.xml.impress',) inputs = ('application/vnd.sun.xml.impress',)
output = 'application/vnd.oasis.opendocument.presentation' output = 'application/vnd.oasis.opendocument.presentation'
......
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class XlsToOds: class XlsToOds:
"""Transforms xls to ods by using Cloudooo""" """Transforms xls to ods by using Cloudooo"""
implements(itransform)
__name__ = 'xls_to_ods' __name__ = 'xls_to_ods'
inputs = ('application/vnd.ms-excel',) inputs = ('application/vnd.ms-excel',)
output = 'application/vnd.oasis.opendocument.spreadsheet' output = 'application/vnd.oasis.opendocument.spreadsheet'
......
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class XlsToXlsx: class XlsToXlsx:
"""Transforms xls to xlsx by using Cloudooo""" """Transforms xls to xlsx by using Cloudooo"""
implements(itransform)
__name__ = 'xls_to_xlsx' __name__ = 'xls_to_xlsx'
inputs = ('application/vnd.ms-excel',) inputs = ('application/vnd.ms-excel',)
output = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' output = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
......
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class XlsxToOds: class XlsxToOds:
"""Transforms xlsx to ods by using Cloudooo""" """Transforms xlsx to ods by using Cloudooo"""
implements(itransform)
__name__ = 'xlsx_to_ods' __name__ = 'xlsx_to_ods'
inputs = ('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',) inputs = ('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',)
output = 'application/vnd.oasis.opendocument.spreadsheet' output = 'application/vnd.oasis.opendocument.spreadsheet'
......
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class XlsxToXlsy: class XlsxToXlsy:
"""Transforms xlsx to xlsy by using Cloudooo""" """Transforms xlsx to xlsy by using Cloudooo"""
implements(itransform)
__name__ = 'xlsx_to_xlsy' __name__ = 'xlsx_to_xlsy'
inputs = ('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',) inputs = ('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',)
output = 'application/x-asc-spreadsheet' output = 'application/x-asc-spreadsheet'
......
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class XlsyToXlsx: class XlsyToXlsx:
"""Transforms xlsy to xlsx by using Cloudooo""" """Transforms xlsy to xlsx by using Cloudooo"""
implements(itransform)
__name__ = 'xlsy_to_xlsx' __name__ = 'xlsy_to_xlsx'
inputs = ('application/x-asc-spreadsheet',) inputs = ('application/x-asc-spreadsheet',)
output = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' output = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
......
...@@ -34,6 +34,7 @@ from Products.ERP5Type import Permissions, PropertySheet, interfaces ...@@ -34,6 +34,7 @@ from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5Type.XMLObject import XMLObject from Products.ERP5Type.XMLObject import XMLObject
from erp5.component.document.Delivery import Delivery from erp5.component.document.Delivery import Delivery
@zope.interface.implementer( interfaces.IVariated,)
class Immobilisation(Delivery, XMLObject): class Immobilisation(Delivery, XMLObject):
""" """
An Immobilisation object holds the information about An Immobilisation object holds the information about
...@@ -51,9 +52,6 @@ class Immobilisation(Delivery, XMLObject): ...@@ -51,9 +52,6 @@ class Immobilisation(Delivery, XMLObject):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements( interfaces.IVariated, )
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -37,6 +37,9 @@ from erp5.component.interface.IRule import IRule ...@@ -37,6 +37,9 @@ from erp5.component.interface.IRule import IRule
from erp5.component.interface.IDivergenceController import IDivergenceController from erp5.component.interface.IDivergenceController import IDivergenceController
from erp5.component.interface.IMovementCollectionUpdater import IMovementCollectionUpdater from erp5.component.interface.IMovementCollectionUpdater import IMovementCollectionUpdater
@zope.interface.implementer(IRule,
IDivergenceController,
IMovementCollectionUpdater,)
class InvoiceSimulationRule(RuleMixin, MovementCollectionUpdaterMixin): class InvoiceSimulationRule(RuleMixin, MovementCollectionUpdaterMixin):
""" """
Invoicing Rule expand simulation created by a order or delivery rule. Invoicing Rule expand simulation created by a order or delivery rule.
...@@ -49,11 +52,6 @@ class InvoiceSimulationRule(RuleMixin, MovementCollectionUpdaterMixin): ...@@ -49,11 +52,6 @@ class InvoiceSimulationRule(RuleMixin, MovementCollectionUpdaterMixin):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IRule,
IDivergenceController,
IMovementCollectionUpdater,)
# Default Properties # Default Properties
property_sheets = ( property_sheets = (
PropertySheet.Base, PropertySheet.Base,
......
...@@ -38,6 +38,9 @@ from erp5.component.interface.IRule import IRule ...@@ -38,6 +38,9 @@ from erp5.component.interface.IRule import IRule
from erp5.component.interface.IDivergenceController import IDivergenceController from erp5.component.interface.IDivergenceController import IDivergenceController
from erp5.component.interface.IMovementCollectionUpdater import IMovementCollectionUpdater from erp5.component.interface.IMovementCollectionUpdater import IMovementCollectionUpdater
@zope.interface.implementer(IRule,
IDivergenceController,
IMovementCollectionUpdater,)
class InvoiceTransactionSimulationRule(RuleMixin, class InvoiceTransactionSimulationRule(RuleMixin,
MovementCollectionUpdaterMixin, PredicateMatrix): MovementCollectionUpdaterMixin, PredicateMatrix):
""" """
...@@ -54,11 +57,6 @@ class InvoiceTransactionSimulationRule(RuleMixin, ...@@ -54,11 +57,6 @@ class InvoiceTransactionSimulationRule(RuleMixin,
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IRule,
IDivergenceController,
IMovementCollectionUpdater,)
# Default Properties # Default Properties
property_sheets = ( property_sheets = (
PropertySheet.Base, PropertySheet.Base,
......
...@@ -38,6 +38,9 @@ from erp5.component.interface.IRule import IRule ...@@ -38,6 +38,9 @@ from erp5.component.interface.IRule import IRule
from erp5.component.interface.IDivergenceController import IDivergenceController from erp5.component.interface.IDivergenceController import IDivergenceController
from erp5.component.interface.IMovementCollectionUpdater import IMovementCollectionUpdater from erp5.component.interface.IMovementCollectionUpdater import IMovementCollectionUpdater
@zope.interface.implementer(IRule,
IDivergenceController,
IMovementCollectionUpdater,)
class TradeModelSimulationRule(RuleMixin, MovementCollectionUpdaterMixin): class TradeModelSimulationRule(RuleMixin, MovementCollectionUpdaterMixin):
""" """
Rule for Trade Model Rule for Trade Model
...@@ -50,11 +53,6 @@ class TradeModelSimulationRule(RuleMixin, MovementCollectionUpdaterMixin): ...@@ -50,11 +53,6 @@ class TradeModelSimulationRule(RuleMixin, MovementCollectionUpdaterMixin):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IRule,
IDivergenceController,
IMovementCollectionUpdater,)
# Default Properties # Default Properties
property_sheets = ( property_sheets = (
PropertySheet.Base, PropertySheet.Base,
......
...@@ -35,13 +35,12 @@ from Products.ERP5Type import Permissions, PropertySheet ...@@ -35,13 +35,12 @@ from Products.ERP5Type import Permissions, PropertySheet
from erp5.component.interface.IJSONConvertable import IJSONConvertable from erp5.component.interface.IJSONConvertable import IJSONConvertable
@zope.interface.implementer(
IJSONConvertable,)
class JSONType(XMLObject): class JSONType(XMLObject):
""" """
Represents a portal type with JSON Schema Represents a portal type with JSON Schema
""" """
zope.interface.implements(
IJSONConvertable,
)
# Default Properties # Default Properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
......
...@@ -39,6 +39,7 @@ from Products.ERP5.mixin.periodicity import PeriodicityMixin ...@@ -39,6 +39,7 @@ from Products.ERP5.mixin.periodicity import PeriodicityMixin
from Products.ERP5Type.Base import Base from Products.ERP5Type.Base import Base
from erp5.component.interface.IMovementGenerator import IMovementGenerator from erp5.component.interface.IMovementGenerator import IMovementGenerator
@zope.interface.implementer(IMovementGenerator,)
class SubscriptionItem(Item, CompositionMixin, MovementGeneratorMixin, class SubscriptionItem(Item, CompositionMixin, MovementGeneratorMixin,
SimulableMixin, PeriodicityMixin): SimulableMixin, PeriodicityMixin):
""" """
...@@ -67,10 +68,6 @@ class SubscriptionItem(Item, CompositionMixin, MovementGeneratorMixin, ...@@ -67,10 +68,6 @@ class SubscriptionItem(Item, CompositionMixin, MovementGeneratorMixin,
, PropertySheet.Periodicity , PropertySheet.Periodicity
) )
# Declarative interfaces
zope.interface.implements(IMovementGenerator,
)
def _createRootAppliedRule(self): def _createRootAppliedRule(self):
# only try to expand if we are not in draft state # only try to expand if we are not in draft state
if self.getValidationState() in ('draft', ): # XXX-JPS harcoded if self.getValidationState() in ('draft', ): # XXX-JPS harcoded
......
...@@ -35,13 +35,13 @@ from Products.ERP5Type import Permissions, PropertySheet ...@@ -35,13 +35,13 @@ from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type.XMLObject import XMLObject from Products.ERP5Type.XMLObject import XMLObject
from erp5.component.interface.IPaymentService import IPaymentService from erp5.component.interface.IPaymentService import IPaymentService
@zope.interface.implementer(IPaymentService)
class PaypalService(XMLObject): class PaypalService(XMLObject):
"""Paypal Service for payment""" """Paypal Service for payment"""
meta_type = 'Paypal Service' meta_type = 'Paypal Service'
portal_type = 'Paypal Service' portal_type = 'Paypal Service'
security = ClassSecurityInfo() security = ClassSecurityInfo()
zope.interface.implements(IPaymentService)
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -90,12 +90,11 @@ class PayzenREST: ...@@ -90,12 +90,11 @@ class PayzenREST:
from erp5.component.interface.IPaymentService import IPaymentService from erp5.component.interface.IPaymentService import IPaymentService
@zope.interface.implementer(IPaymentService)
class PayzenService(XMLObject, PayzenREST): class PayzenService(XMLObject, PayzenREST):
meta_type = 'Payzen Service' meta_type = 'Payzen Service'
portal_type = 'Payzen Service' portal_type = 'Payzen Service'
zope.interface.implements(IPaymentService)
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
......
...@@ -47,6 +47,9 @@ from Products import ERP5Security ...@@ -47,6 +47,9 @@ from Products import ERP5Security
from erp5.component.interface.ISmsSendingGateway import ISmsSendingGateway from erp5.component.interface.ISmsSendingGateway import ISmsSendingGateway
from erp5.component.interface.ISmsReceivingGateway import ISmsReceivingGateway from erp5.component.interface.ISmsReceivingGateway import ISmsReceivingGateway
@zope.interface.implementer(
ISmsSendingGateway,
ISmsReceivingGateway)
class DummyGateway(XMLObject): class DummyGateway(XMLObject):
"""Dummy SMS Gateway Implementation""" """Dummy SMS Gateway Implementation"""
...@@ -57,10 +60,6 @@ class DummyGateway(XMLObject): ...@@ -57,10 +60,6 @@ class DummyGateway(XMLObject):
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
zope.interface.implements(
ISmsSendingGateway,
ISmsReceivingGateway)
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
......
...@@ -50,6 +50,9 @@ from erp5.component.module.SMSGatewayError import SMSGatewayError ...@@ -50,6 +50,9 @@ from erp5.component.module.SMSGatewayError import SMSGatewayError
from erp5.component.interface.ISmsSendingGateway import ISmsSendingGateway from erp5.component.interface.ISmsSendingGateway import ISmsSendingGateway
from erp5.component.interface.ISmsReceivingGateway import ISmsReceivingGateway from erp5.component.interface.ISmsReceivingGateway import ISmsReceivingGateway
@zope.interface.implementer(
ISmsSendingGateway,
ISmsReceivingGateway)
class EssendexGateway(XMLObject): class EssendexGateway(XMLObject):
"""Base of SMS an Gateway. You can use push notification for delivered and new message notification.""" """Base of SMS an Gateway. You can use push notification for delivered and new message notification."""
...@@ -60,10 +63,6 @@ class EssendexGateway(XMLObject): ...@@ -60,10 +63,6 @@ class EssendexGateway(XMLObject):
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
zope.interface.implements(
ISmsSendingGateway,
ISmsReceivingGateway)
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
......
...@@ -48,6 +48,9 @@ from erp5.component.module.SMSGatewayError import SMSGatewayError ...@@ -48,6 +48,9 @@ from erp5.component.module.SMSGatewayError import SMSGatewayError
from erp5.component.interface.ISmsSendingGateway import ISmsSendingGateway from erp5.component.interface.ISmsSendingGateway import ISmsSendingGateway
from erp5.component.interface.ISmsReceivingGateway import ISmsReceivingGateway from erp5.component.interface.ISmsReceivingGateway import ISmsReceivingGateway
@zope.interface.implementer(
ISmsSendingGateway,
ISmsReceivingGateway)
class MobytGateway(XMLObject): class MobytGateway(XMLObject):
"""Mobyt SMS Gateway Implementation""" """Mobyt SMS Gateway Implementation"""
...@@ -57,10 +60,6 @@ class MobytGateway(XMLObject): ...@@ -57,10 +60,6 @@ class MobytGateway(XMLObject):
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
zope.interface.implements(
ISmsSendingGateway,
ISmsReceivingGateway)
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
......
...@@ -32,6 +32,7 @@ from Products.ERP5Type import Permissions, PropertySheet ...@@ -32,6 +32,7 @@ from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type.XMLObject import XMLObject from Products.ERP5Type.XMLObject import XMLObject
from erp5.component.interface.IDeliverySolver import IDeliverySolver from erp5.component.interface.IDeliverySolver import IDeliverySolver
@zope.interface.implementer(IDeliverySolver,)
class FIFODeliverySolver(XMLObject): class FIFODeliverySolver(XMLObject):
""" """
The FIFO solver reduces delivered quantity by reducing the quantity of The FIFO solver reduces delivered quantity by reducing the quantity of
...@@ -54,9 +55,6 @@ class FIFODeliverySolver(XMLObject): ...@@ -54,9 +55,6 @@ class FIFODeliverySolver(XMLObject):
, PropertySheet.DeliverySolver , PropertySheet.DeliverySolver
) )
# Declarative interfaces
zope.interface.implements(IDeliverySolver,)
# IDeliverySolver Implementation # IDeliverySolver Implementation
security.declareProtected(Permissions.AccessContentsInformation, 'getTotalQuantity') security.declareProtected(Permissions.AccessContentsInformation, 'getTotalQuantity')
def getTotalQuantity(self): def getTotalQuantity(self):
......
...@@ -38,6 +38,8 @@ from erp5.component.module.MovementCollectionDiff import _getPropertyAndCategory ...@@ -38,6 +38,8 @@ from erp5.component.module.MovementCollectionDiff import _getPropertyAndCategory
from erp5.component.interface.ISolver import ISolver from erp5.component.interface.ISolver import ISolver
from erp5.component.interface.IConfigurable import IConfigurable from erp5.component.interface.IConfigurable import IConfigurable
@zope.interface.implementer(ISolver,
IConfigurable,)
class ItemListSplitSolver(SolverMixin, ConfigurableMixin, XMLObject): class ItemListSplitSolver(SolverMixin, ConfigurableMixin, XMLObject):
"""Target solver that split the prevision based on aggregated items. """Target solver that split the prevision based on aggregated items.
...@@ -61,10 +63,6 @@ class ItemListSplitSolver(SolverMixin, ConfigurableMixin, XMLObject): ...@@ -61,10 +63,6 @@ class ItemListSplitSolver(SolverMixin, ConfigurableMixin, XMLObject):
, PropertySheet.Arrow , PropertySheet.Arrow
, PropertySheet.TargetSolver , PropertySheet.TargetSolver
) )
# Declarative interfaces
zope.interface.implements(ISolver,
IConfigurable,
)
def _solve(self, activate_kw=None): def _solve(self, activate_kw=None):
"""This method create new movement based on difference of aggregate sets. """This method create new movement based on difference of aggregate sets.
......
...@@ -32,6 +32,7 @@ from Products.ERP5Type import Permissions, PropertySheet ...@@ -32,6 +32,7 @@ from Products.ERP5Type import Permissions, PropertySheet
from erp5.component.document.FIFODeliverySolver import FIFODeliverySolver from erp5.component.document.FIFODeliverySolver import FIFODeliverySolver
from erp5.component.interface.IDeliverySolver import IDeliverySolver from erp5.component.interface.IDeliverySolver import IDeliverySolver
@zope.interface.implementer(IDeliverySolver,)
class LIFODeliverySolver(FIFODeliverySolver): class LIFODeliverySolver(FIFODeliverySolver):
""" """
The LIFO solver reduces delivered quantity by reducing the quantity of The LIFO solver reduces delivered quantity by reducing the quantity of
...@@ -54,9 +55,6 @@ class LIFODeliverySolver(FIFODeliverySolver): ...@@ -54,9 +55,6 @@ class LIFODeliverySolver(FIFODeliverySolver):
, PropertySheet.DeliverySolver , PropertySheet.DeliverySolver
) )
# Declarative interfaces
zope.interface.implements(IDeliverySolver,)
def _getSimulationMovementList(self): def _getSimulationMovementList(self):
""" """
Returns a list of simulation movement sorted from the first order. Returns a list of simulation movement sorted from the first order.
......
...@@ -32,6 +32,7 @@ from Products.ERP5Type import Permissions, PropertySheet ...@@ -32,6 +32,7 @@ from Products.ERP5Type import Permissions, PropertySheet
from erp5.component.document.FIFODeliverySolver import FIFODeliverySolver from erp5.component.document.FIFODeliverySolver import FIFODeliverySolver
from erp5.component.interface.IDeliverySolver import IDeliverySolver from erp5.component.interface.IDeliverySolver import IDeliverySolver
@zope.interface.implementer(IDeliverySolver,)
class MinimisePriceDeliverySolver(FIFODeliverySolver): class MinimisePriceDeliverySolver(FIFODeliverySolver):
""" """
The Minimise Price deliver solver distributes quantity in order to minimise The Minimise Price deliver solver distributes quantity in order to minimise
...@@ -54,9 +55,6 @@ class MinimisePriceDeliverySolver(FIFODeliverySolver): ...@@ -54,9 +55,6 @@ class MinimisePriceDeliverySolver(FIFODeliverySolver):
, PropertySheet.DeliverySolver , PropertySheet.DeliverySolver
) )
# Declarative interfaces
zope.interface.implements(IDeliverySolver,)
# IDeliverySolver Implementation # IDeliverySolver Implementation
security.declareProtected(Permissions.ModifyPortalContent, 'setTotalQuantity') security.declareProtected(Permissions.ModifyPortalContent, 'setTotalQuantity')
def setTotalQuantity(self, new_quantity, activate_kw=None): def setTotalQuantity(self, new_quantity, activate_kw=None):
......
...@@ -37,6 +37,8 @@ from Products.ERP5Type.Message import translateString ...@@ -37,6 +37,8 @@ from Products.ERP5Type.Message import translateString
from erp5.component.interface.ISolver import ISolver from erp5.component.interface.ISolver import ISolver
from erp5.component.interface.IConfigurable import IConfigurable from erp5.component.interface.IConfigurable import IConfigurable
@zope.interface.implementer(ISolver,
IConfigurable,)
class MovementSplitSolver(SolverMixin, ConfigurableMixin, XMLObject): class MovementSplitSolver(SolverMixin, ConfigurableMixin, XMLObject):
meta_type = 'ERP5 Movement Split Solver' meta_type = 'ERP5 Movement Split Solver'
portal_type = 'Movement Split Solver' portal_type = 'Movement Split Solver'
...@@ -55,10 +57,6 @@ class MovementSplitSolver(SolverMixin, ConfigurableMixin, XMLObject): ...@@ -55,10 +57,6 @@ class MovementSplitSolver(SolverMixin, ConfigurableMixin, XMLObject):
, PropertySheet.Arrow , PropertySheet.Arrow
, PropertySheet.TargetSolver , PropertySheet.TargetSolver
) )
# Declarative interfaces
zope.interface.implements(ISolver,
IConfigurable,
)
def _solve(self, activate_kw=None): def _solve(self, activate_kw=None):
""" """
......
...@@ -34,6 +34,8 @@ from erp5.component.document.QuantitySplitSolver import QuantitySplitSolver ...@@ -34,6 +34,8 @@ from erp5.component.document.QuantitySplitSolver import QuantitySplitSolver
from erp5.component.interface.ISolver import ISolver from erp5.component.interface.ISolver import ISolver
from erp5.component.interface.IConfigurable import IConfigurable from erp5.component.interface.IConfigurable import IConfigurable
@zope.interface.implementer(ISolver,
IConfigurable,)
class QuantitySplitMoveSolver(QuantitySplitSolver): class QuantitySplitMoveSolver(QuantitySplitSolver):
"""Target solver that split the prevision based on quantity. """Target solver that split the prevision based on quantity.
...@@ -52,11 +54,6 @@ class QuantitySplitMoveSolver(QuantitySplitSolver): ...@@ -52,11 +54,6 @@ class QuantitySplitMoveSolver(QuantitySplitSolver):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(ISolver,
IConfigurable,
)
# ISolver Implementation # ISolver Implementation
def _solve(self, activate_kw=None): def _solve(self, activate_kw=None):
""" """
......
...@@ -39,6 +39,8 @@ from erp5.component.module.MovementCollectionDiff import _getPropertyAndCategory ...@@ -39,6 +39,8 @@ from erp5.component.module.MovementCollectionDiff import _getPropertyAndCategory
from erp5.component.interface.ISolver import ISolver from erp5.component.interface.ISolver import ISolver
from erp5.component.interface.IConfigurable import IConfigurable from erp5.component.interface.IConfigurable import IConfigurable
@zope.interface.implementer(ISolver,
IConfigurable,)
class QuantitySplitSolver(SolverMixin, ConfigurableMixin, XMLObject): class QuantitySplitSolver(SolverMixin, ConfigurableMixin, XMLObject):
"""Target solver that split the prevision based on quantity. """Target solver that split the prevision based on quantity.
...@@ -62,10 +64,6 @@ class QuantitySplitSolver(SolverMixin, ConfigurableMixin, XMLObject): ...@@ -62,10 +64,6 @@ class QuantitySplitSolver(SolverMixin, ConfigurableMixin, XMLObject):
, PropertySheet.Arrow , PropertySheet.Arrow
, PropertySheet.TargetSolver , PropertySheet.TargetSolver
) )
# Declarative interfaces
zope.interface.implements(ISolver,
IConfigurable,
)
# ISolver Implementation # ISolver Implementation
def _solve(self, activate_kw=None): def _solve(self, activate_kw=None):
......
...@@ -34,6 +34,7 @@ from Products.ERP5Type.XMLObject import XMLObject ...@@ -34,6 +34,7 @@ from Products.ERP5Type.XMLObject import XMLObject
from erp5.component.mixin.ConfigurableMixin import ConfigurableMixin from erp5.component.mixin.ConfigurableMixin import ConfigurableMixin
from erp5.component.interface.IConfigurable import IConfigurable from erp5.component.interface.IConfigurable import IConfigurable
@zope.interface.implementer(IConfigurable,)
class SolverDecision(ConfigurableMixin, XMLObject): class SolverDecision(ConfigurableMixin, XMLObject):
"""Solver Decision """Solver Decision
...@@ -71,15 +72,6 @@ class SolverDecision(ConfigurableMixin, XMLObject): ...@@ -71,15 +72,6 @@ class SolverDecision(ConfigurableMixin, XMLObject):
, PropertySheet.SolverSelection , PropertySheet.SolverSelection
, PropertySheet.Configurable , PropertySheet.Configurable
) )
# XXX-JPS missing property sheet or categories to specify
# (default)delivery or solver_application or order -> the object of application of resolution
# ie. a specified delivery, a specified delivery line, etc.
# (delivery should be enough)
# all property sheets of target solvers (with their configuration properties)
# Declarative interfaces
zope.interface.implements(IConfigurable,
)
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
'getDefaultConfigurationPropertyDict') 'getDefaultConfigurationPropertyDict')
......
...@@ -37,6 +37,8 @@ from erp5.component.interface.IMovement import IMovement ...@@ -37,6 +37,8 @@ from erp5.component.interface.IMovement import IMovement
from erp5.component.interface.ISolver import ISolver from erp5.component.interface.ISolver import ISolver
from erp5.component.interface.IConfigurable import IConfigurable from erp5.component.interface.IConfigurable import IConfigurable
@zope.interface.implementer(ISolver,
IConfigurable,)
class SolverProcess(XMLObject, ActiveProcess): class SolverProcess(XMLObject, ActiveProcess):
""" """
Solver Process class represents the decision of the user Solver Process class represents the decision of the user
...@@ -74,11 +76,6 @@ class SolverProcess(XMLObject, ActiveProcess): ...@@ -74,11 +76,6 @@ class SolverProcess(XMLObject, ActiveProcess):
, PropertySheet.DublinCore , PropertySheet.DublinCore
) )
# Declarative interfaces
zope.interface.implements(ISolver,
IConfigurable,
)
# Implementation # Implementation
security.declareProtected(Permissions.ModifyPortalContent, 'buildTargetSolverList') security.declareProtected(Permissions.ModifyPortalContent, 'buildTargetSolverList')
@UnrestrictedMethod @UnrestrictedMethod
......
...@@ -32,6 +32,7 @@ from Products.ERP5Type import Permissions, PropertySheet ...@@ -32,6 +32,7 @@ from Products.ERP5Type import Permissions, PropertySheet
from erp5.component.document.AcceptSolver import AcceptSolver from erp5.component.document.AcceptSolver import AcceptSolver
from erp5.component.interface.ISolver import ISolver from erp5.component.interface.ISolver import ISolver
@zope.interface.implementer(ISolver,)
class TradeModelSolver(AcceptSolver): class TradeModelSolver(AcceptSolver):
"""Solve Divergences on Invoice Lines, and dependant trade model lines. """Solve Divergences on Invoice Lines, and dependant trade model lines.
...@@ -55,9 +56,6 @@ class TradeModelSolver(AcceptSolver): ...@@ -55,9 +56,6 @@ class TradeModelSolver(AcceptSolver):
, PropertySheet.TargetSolver , PropertySheet.TargetSolver
) )
# Declarative interfaces
zope.interface.implements(ISolver,)
def _solve(self, activate_kw=None): def _solve(self, activate_kw=None):
""" """
Adopt new values to simulation movements, with keeping the original Adopt new values to simulation movements, with keeping the original
......
...@@ -33,6 +33,7 @@ from Products.ERP5Type import Permissions, PropertySheet ...@@ -33,6 +33,7 @@ from Products.ERP5Type import Permissions, PropertySheet
from erp5.component.document.AcceptSolver import AcceptSolver from erp5.component.document.AcceptSolver import AcceptSolver
from erp5.component.interface.ISolver import ISolver from erp5.component.interface.ISolver import ISolver
@zope.interface.implementer(ISolver,)
class UnifySolver(AcceptSolver): class UnifySolver(AcceptSolver):
""" """
""" """
...@@ -53,9 +54,6 @@ class UnifySolver(AcceptSolver): ...@@ -53,9 +54,6 @@ class UnifySolver(AcceptSolver):
, PropertySheet.TargetSolver , PropertySheet.TargetSolver
) )
# Declarative interfaces
zope.interface.implements(ISolver,)
def _getActualTargetMovement(self, movement, solved_property): def _getActualTargetMovement(self, movement, solved_property):
# The movement might not be the right place to correct the # The movement might not be the right place to correct the
# divergence, if the property is obtained by direct Acquisition. # divergence, if the property is obtained by direct Acquisition.
......
...@@ -34,6 +34,7 @@ from Products.ERP5Type import Permissions ...@@ -34,6 +34,7 @@ from Products.ERP5Type import Permissions
from Products.ERP5Type.Globals import PersistentMapping from Products.ERP5Type.Globals import PersistentMapping
from erp5.component.interface.IConfigurable import IConfigurable from erp5.component.interface.IConfigurable import IConfigurable
@zope.interface.implementer(IConfigurable,)
class ConfigurableMixin: class ConfigurableMixin:
""" """
This class provides a generic implementation of IConfigurable. This class provides a generic implementation of IConfigurable.
...@@ -47,9 +48,6 @@ class ConfigurableMixin: ...@@ -47,9 +48,6 @@ class ConfigurableMixin:
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfigurable,)
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
'getConfigurationProperty') 'getConfigurationProperty')
def getConfigurationProperty(self, key, default=None): def getConfigurationProperty(self, key, default=None):
......
...@@ -37,6 +37,8 @@ from erp5.component.mixin.ConfigurableMixin import ConfigurableMixin ...@@ -37,6 +37,8 @@ from erp5.component.mixin.ConfigurableMixin import ConfigurableMixin
from erp5.component.interface.ISolver import ISolver from erp5.component.interface.ISolver import ISolver
from erp5.component.interface.IConfigurable import IConfigurable from erp5.component.interface.IConfigurable import IConfigurable
@zope.interface.implementer(ISolver,
IConfigurable,)
class ConfigurablePropertySolverMixin(SolverMixin, class ConfigurablePropertySolverMixin(SolverMixin,
ConfigurableMixin, ConfigurableMixin,
XMLObject): XMLObject):
...@@ -53,9 +55,6 @@ class ConfigurablePropertySolverMixin(SolverMixin, ...@@ -53,9 +55,6 @@ class ConfigurablePropertySolverMixin(SolverMixin,
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
zope.interface.implements(ISolver,
IConfigurable,)
# Default Properties # Default Properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
......
...@@ -36,6 +36,7 @@ from Products.PythonScripts.standard import html_quote as h ...@@ -36,6 +36,7 @@ from Products.PythonScripts.standard import html_quote as h
from zLOG import LOG, WARNING from zLOG import LOG, WARNING
from erp5.component.interface.IEquivalenceTester import IEquivalenceTester from erp5.component.interface.IEquivalenceTester import IEquivalenceTester
@zope.interface.implementer(IEquivalenceTester,)
class EquivalenceTesterMixin: class EquivalenceTesterMixin:
""" """
Provides generic methods and helper methods to implement Provides generic methods and helper methods to implement
...@@ -45,9 +46,6 @@ class EquivalenceTesterMixin: ...@@ -45,9 +46,6 @@ class EquivalenceTesterMixin:
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IEquivalenceTester,)
# Implementation of IEquivalenceTester # Implementation of IEquivalenceTester
security.declarePrivate('testEquivalence') security.declarePrivate('testEquivalence')
def testEquivalence(self, simulation_movement): def testEquivalence(self, simulation_movement):
......
...@@ -34,6 +34,7 @@ from Products.ERP5Type import Permissions ...@@ -34,6 +34,7 @@ from Products.ERP5Type import Permissions
from Products.ERP5Type.UnrestrictedMethod import super_user from Products.ERP5Type.UnrestrictedMethod import super_user
from erp5.component.interface.ISolver import ISolver from erp5.component.interface.ISolver import ISolver
@zope.interface.implementer(ISolver,)
class SolverMixin(object): class SolverMixin(object):
""" """
Provides generic methods and helper methods to implement ISolver. Provides generic methods and helper methods to implement ISolver.
...@@ -42,9 +43,6 @@ class SolverMixin(object): ...@@ -42,9 +43,6 @@ class SolverMixin(object):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(ISolver,)
workflow_list = () workflow_list = ()
def _solve(self, activate_kw=None): def _solve(self, activate_kw=None):
raise NotImplementedError raise NotImplementedError
......
...@@ -31,6 +31,7 @@ from Products.PythonScripts.Utility import allow_class ...@@ -31,6 +31,7 @@ from Products.PythonScripts.Utility import allow_class
from Products.ERP5Type.ObjectMessage import ObjectMessage from Products.ERP5Type.ObjectMessage import ObjectMessage
from erp5.component.interface.IDivergenceMessage import IDivergenceMessage from erp5.component.interface.IDivergenceMessage import IDivergenceMessage
@zope.interface.implementer(IDivergenceMessage,)
class DivergenceMessage(ObjectMessage): class DivergenceMessage(ObjectMessage):
""" """
Divergence Message is used for notifications to user about divergences. Divergence Message is used for notifications to user about divergences.
...@@ -59,8 +60,6 @@ class DivergenceMessage(ObjectMessage): ...@@ -59,8 +60,6 @@ class DivergenceMessage(ObjectMessage):
User understandable message about divergence User understandable message about divergence
""" """
zope.interface.implements(IDivergenceMessage,)
def getMovementGroup(self): def getMovementGroup(self):
"""Returns movement group of a builder which was responsible for generating tested_property""" """Returns movement group of a builder which was responsible for generating tested_property"""
divergence_scope = getattr(self, 'divergence_scope', None) divergence_scope = getattr(self, 'divergence_scope', None)
......
...@@ -37,6 +37,7 @@ from Products.ERP5Type.Tool.BaseTool import BaseTool ...@@ -37,6 +37,7 @@ from Products.ERP5Type.Tool.BaseTool import BaseTool
from Products.ERP5Type.UnrestrictedMethod import UnrestrictedMethod from Products.ERP5Type.UnrestrictedMethod import UnrestrictedMethod
from erp5.component.interface.IDivergenceController import IDivergenceController from erp5.component.interface.IDivergenceController import IDivergenceController
@zope.interface.implementer(IDivergenceController,)
class SolverProcessTool(BaseTool): class SolverProcessTool(BaseTool):
""" Container for solver processes. """ Container for solver processes.
""" """
...@@ -49,9 +50,6 @@ class SolverProcessTool(BaseTool): ...@@ -49,9 +50,6 @@ class SolverProcessTool(BaseTool):
# Declarative Security # Declarative Security
security = ClassSecurityInfo() security = ClassSecurityInfo()
# Declarative interfaces
zope.interface.implements(IDivergenceController, )
# IDivergenceController implementation # IDivergenceController implementation
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
'isDivergent') 'isDivergent')
......
...@@ -46,7 +46,7 @@ parser = etree.XMLParser(remove_blank_text=True) ...@@ -46,7 +46,7 @@ parser = etree.XMLParser(remove_blank_text=True)
from xml_marshaller.xml_marshaller import load_tree as unmarshaller from xml_marshaller.xml_marshaller import load_tree as unmarshaller
from xupdate_processor import xuproc from xupdate_processor import xuproc
from base64 import standard_b64decode from base64 import standard_b64decode
from zope.interface import implements from zope.interface import implementer
from copy import deepcopy from copy import deepcopy
import logging import logging
...@@ -91,6 +91,7 @@ WORKFLOW_ACTION_NOT_ADDABLE = 0 ...@@ -91,6 +91,7 @@ WORKFLOW_ACTION_NOT_ADDABLE = 0
WORKFLOW_ACTION_ADDABLE = 1 WORKFLOW_ACTION_ADDABLE = 1
WORKFLOW_ACTION_INSERTABLE = 2 WORKFLOW_ACTION_INSERTABLE = 2
@implementer( IConduit,)
class ERP5Conduit(XMLSyncUtilsMixin): class ERP5Conduit(XMLSyncUtilsMixin):
""" """
A conduit is a piece of code in charge of A conduit is a piece of code in charge of
...@@ -128,9 +129,6 @@ class ERP5Conduit(XMLSyncUtilsMixin): ...@@ -128,9 +129,6 @@ class ERP5Conduit(XMLSyncUtilsMixin):
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
""" """
# Declarative interfaces
implements( IConduit, )
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -39,6 +39,8 @@ from erp5.component.interface.IBusinessLink import IBusinessLink ...@@ -39,6 +39,8 @@ from erp5.component.interface.IBusinessLink import IBusinessLink
import zope.interface import zope.interface
@zope.interface.implementer(IBusinessLink,
interfaces.IPredicate,)
class BusinessLink(Path, Predicate): class BusinessLink(Path, Predicate):
""" """
The BusinessLink class embeds all information related to The BusinessLink class embeds all information related to
...@@ -93,11 +95,6 @@ class BusinessLink(Path, Predicate): ...@@ -93,11 +95,6 @@ class BusinessLink(Path, Predicate):
, PropertySheet.PaymentCondition # XXX-JPS must be renames some day , PropertySheet.PaymentCondition # XXX-JPS must be renames some day
) )
# Declarative interfaces
zope.interface.implements(IBusinessLink,
interfaces.IPredicate,
)
# Helper Methods # Helper Methods
def _getExplanationRelatedSimulationMovementValueList(self, explanation): def _getExplanationRelatedSimulationMovementValueList(self, explanation):
explanation_cache = _getExplanationCache(explanation) explanation_cache = _getExplanationCache(explanation)
......
...@@ -37,6 +37,9 @@ from erp5.component.interface.IRule import IRule ...@@ -37,6 +37,9 @@ from erp5.component.interface.IRule import IRule
from erp5.component.interface.IDivergenceController import IDivergenceController from erp5.component.interface.IDivergenceController import IDivergenceController
from erp5.component.interface.IMovementCollectionUpdater import IMovementCollectionUpdater from erp5.component.interface.IMovementCollectionUpdater import IMovementCollectionUpdater
@zope.interface.implementer(IRule,
IDivergenceController,
IMovementCollectionUpdater,)
class DeliveryRootSimulationRule(RuleMixin, MovementCollectionUpdaterMixin): class DeliveryRootSimulationRule(RuleMixin, MovementCollectionUpdaterMixin):
""" """
Delivery Rule object make sure an Delivery in the simulation Delivery Rule object make sure an Delivery in the simulation
...@@ -52,11 +55,6 @@ class DeliveryRootSimulationRule(RuleMixin, MovementCollectionUpdaterMixin): ...@@ -52,11 +55,6 @@ class DeliveryRootSimulationRule(RuleMixin, MovementCollectionUpdaterMixin):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IRule,
IDivergenceController,
IMovementCollectionUpdater,)
# Default Properties # Default Properties
property_sheets = ( property_sheets = (
PropertySheet.Base, PropertySheet.Base,
......
...@@ -37,6 +37,9 @@ from erp5.component.interface.IRule import IRule ...@@ -37,6 +37,9 @@ from erp5.component.interface.IRule import IRule
from erp5.component.interface.IDivergenceController import IDivergenceController from erp5.component.interface.IDivergenceController import IDivergenceController
from erp5.component.interface.IMovementCollectionUpdater import IMovementCollectionUpdater from erp5.component.interface.IMovementCollectionUpdater import IMovementCollectionUpdater
@zope.interface.implementer(IRule,
IDivergenceController,
IMovementCollectionUpdater,)
class DeliverySimulationRule(RuleMixin, MovementCollectionUpdaterMixin): class DeliverySimulationRule(RuleMixin, MovementCollectionUpdaterMixin):
""" """
Delivery Rule object make sure an Delivery in the simulation Delivery Rule object make sure an Delivery in the simulation
...@@ -52,11 +55,6 @@ class DeliverySimulationRule(RuleMixin, MovementCollectionUpdaterMixin): ...@@ -52,11 +55,6 @@ class DeliverySimulationRule(RuleMixin, MovementCollectionUpdaterMixin):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IRule,
IDivergenceController,
IMovementCollectionUpdater,)
# Default Properties # Default Properties
property_sheets = ( property_sheets = (
PropertySheet.Base, PropertySheet.Base,
......
...@@ -37,6 +37,9 @@ from erp5.component.interface.IRule import IRule ...@@ -37,6 +37,9 @@ from erp5.component.interface.IRule import IRule
from erp5.component.interface.IDivergenceController import IDivergenceController from erp5.component.interface.IDivergenceController import IDivergenceController
from erp5.component.interface.IMovementCollectionUpdater import IMovementCollectionUpdater from erp5.component.interface.IMovementCollectionUpdater import IMovementCollectionUpdater
@zope.interface.implementer(IRule,
IDivergenceController,
IMovementCollectionUpdater,)
class OrderRootSimulationRule(RuleMixin, MovementCollectionUpdaterMixin): class OrderRootSimulationRule(RuleMixin, MovementCollectionUpdaterMixin):
""" """
Order Rule object make sure an Order in the simulation Order Rule object make sure an Order in the simulation
...@@ -52,11 +55,6 @@ class OrderRootSimulationRule(RuleMixin, MovementCollectionUpdaterMixin): ...@@ -52,11 +55,6 @@ class OrderRootSimulationRule(RuleMixin, MovementCollectionUpdaterMixin):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IRule,
IDivergenceController,
IMovementCollectionUpdater,)
# Default Properties # Default Properties
property_sheets = ( property_sheets = (
PropertySheet.Base, PropertySheet.Base,
......
...@@ -44,6 +44,9 @@ from erp5.component.interface.IMovementCollectionUpdater import IMovementCollect ...@@ -44,6 +44,9 @@ from erp5.component.interface.IMovementCollectionUpdater import IMovementCollect
from erp5.component.interface.IAmountGenerator import IAmountGenerator from erp5.component.interface.IAmountGenerator import IAmountGenerator
from erp5.component.interface.IMovementGenerator import IMovementGenerator from erp5.component.interface.IMovementGenerator import IMovementGenerator
@zope.interface.implementer(IAmountGenerator,
IMovementGenerator,
IMovementCollectionUpdater,)
class TradeCondition(MappedValue, AmountGeneratorMixin, VariatedMixin): class TradeCondition(MappedValue, AmountGeneratorMixin, VariatedMixin):
""" """
Trade Conditions are used to store the conditions (payment, logistic,...) Trade Conditions are used to store the conditions (payment, logistic,...)
...@@ -75,10 +78,6 @@ class TradeCondition(MappedValue, AmountGeneratorMixin, VariatedMixin): ...@@ -75,10 +78,6 @@ class TradeCondition(MappedValue, AmountGeneratorMixin, VariatedMixin):
# if not present. Cleaning required. # if not present. Cleaning required.
) )
zope.interface.implements(IAmountGenerator,
IMovementGenerator,
IMovementCollectionUpdater,)
# Mapped Value implementation # Mapped Value implementation
# Transformation itself provides no properties or categories # Transformation itself provides no properties or categories
......
...@@ -34,6 +34,8 @@ from erp5.component.interface.IAmountGenerator import IAmountGenerator ...@@ -34,6 +34,8 @@ from erp5.component.interface.IAmountGenerator import IAmountGenerator
import zope.interface import zope.interface
@zope.interface.implementer(
IAmountGenerator)
class TradeModelCell(TradeModelLine): class TradeModelCell(TradeModelLine):
"""Trade Model Line """Trade Model Line
""" """
...@@ -45,12 +47,6 @@ class TradeModelCell(TradeModelLine): ...@@ -45,12 +47,6 @@ class TradeModelCell(TradeModelLine):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
# interfaces.IVariated as soon as interfaces.IVariated will be zope3
zope.interface.implements(
IAmountGenerator
)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.SimpleItem , PropertySheet.SimpleItem
......
...@@ -39,6 +39,10 @@ from erp5.component.interface.IArrowBase import IArrowBase ...@@ -39,6 +39,10 @@ from erp5.component.interface.IArrowBase import IArrowBase
import zope.interface import zope.interface
@zope.interface.implementer(interfaces.ICategoryAccessProvider,
IArrowBase,
ITradeModelPath,
interfaces.IPredicate,)
class TradeModelPath(Path): class TradeModelPath(Path):
""" """
The TradeModelPath class embeds all information related to The TradeModelPath class embeds all information related to
...@@ -93,13 +97,6 @@ class TradeModelPath(Path): ...@@ -93,13 +97,6 @@ class TradeModelPath(Path):
, PropertySheet.PaymentCondition # XXX-JPS must be renames some day , PropertySheet.PaymentCondition # XXX-JPS must be renames some day
) )
# Declarative interfaces
zope.interface.implements(interfaces.ICategoryAccessProvider,
IArrowBase,
ITradeModelPath,
interfaces.IPredicate,
)
# Helper Methods # Helper Methods
def _getExplanationRelatedSimulationMovementValueList(self, explanation): def _getExplanationRelatedSimulationMovementValueList(self, explanation):
explanation_cache = _getExplanationCache(explanation) explanation_cache = _getExplanationCache(explanation)
......
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from Products.PortalTransforms.interfaces import ITransform from Products.PortalTransforms.interfaces import ITransform
from zope.interface import implements from zope.interface import implementer
from erp5.component.module.TransformLib import DocumentConversionServerTransform from erp5.component.module.TransformLib import DocumentConversionServerTransform
@implementer(ITransform)
class TransformHtmlToPdf(DocumentConversionServerTransform): class TransformHtmlToPdf(DocumentConversionServerTransform):
""" """
Transforms HTML to PDF through document conversion server Transforms HTML to PDF through document conversion server
""" """
implements(ITransform)
__name__ = 'html_to_pdf' __name__ = 'html_to_pdf'
inputs = ('text/html',) inputs = ('text/html',)
......
...@@ -16,6 +16,7 @@ class WechatException(Exception): ...@@ -16,6 +16,7 @@ class WechatException(Exception):
super(WechatException, self).__init__(msg) super(WechatException, self).__init__(msg)
from erp5.component.interface.IPaymentService import IPaymentService from erp5.component.interface.IPaymentService import IPaymentService
@zope.interface.implementer(IPaymentService)
class WechatService(XMLObject): class WechatService(XMLObject):
meta_type = 'Wechat Service' meta_type = 'Wechat Service'
portal_type = 'Wechat Service' portal_type = 'Wechat Service'
...@@ -23,8 +24,6 @@ class WechatService(XMLObject): ...@@ -23,8 +24,6 @@ class WechatService(XMLObject):
ORDER_URL = "/pay/unifiedorder" # Wechat unified order API ORDER_URL = "/pay/unifiedorder" # Wechat unified order API
QUERY_URL = "/pay/orderquery" QUERY_URL = "/pay/orderquery"
zope.interface.implements(IPaymentService)
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
......
...@@ -34,11 +34,11 @@ from Products.ERP5Type.Base import Base ...@@ -34,11 +34,11 @@ from Products.ERP5Type.Base import Base
from Products.CMFCore.utils import getToolByName from Products.CMFCore.utils import getToolByName
from zLOG import LOG, INFO from zLOG import LOG, INFO
@zope.interface.implementer(interfaces.IIdGenerator)
class IdGenerator(Base): class IdGenerator(Base):
""" """
Generator of Ids Generator of Ids
""" """
zope.interface.implements(interfaces.IIdGenerator)
# CMF Type Definition # CMF Type Definition
meta_type = 'ERP5 Id Generator' meta_type = 'ERP5 Id Generator'
portal_type = 'Id Generator' portal_type = 'Id Generator'
......
...@@ -32,6 +32,7 @@ from AccessControl import ClassSecurityInfo ...@@ -32,6 +32,7 @@ from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, interfaces from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5Type.XMLObject import XMLObject from Products.ERP5Type.XMLObject import XMLObject
@zope.interface.implementer(interfaces.INode)
class Node(XMLObject): class Node(XMLObject):
"""Node base class. """Node base class.
...@@ -41,8 +42,6 @@ class Node(XMLObject): ...@@ -41,8 +42,6 @@ class Node(XMLObject):
portal_type = 'Node' portal_type = 'Node'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
zope.interface.implements(interfaces.INode)
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
......
...@@ -37,12 +37,12 @@ from MySQLdb.constants.ER import NO_SUCH_TABLE ...@@ -37,12 +37,12 @@ from MySQLdb.constants.ER import NO_SUCH_TABLE
from zLOG import LOG, INFO from zLOG import LOG, INFO
from BTrees.OOBTree import OOBTree from BTrees.OOBTree import OOBTree
@zope.interface.implementer(interfaces.IIdGenerator)
class SQLNonContinuousIncreasingIdGenerator(IdGenerator): class SQLNonContinuousIncreasingIdGenerator(IdGenerator):
""" """
Generate some ids with mysql storage and also zodb is enabled Generate some ids with mysql storage and also zodb is enabled
by the checkbox : StoredInZodb by the checkbox : StoredInZodb
""" """
zope.interface.implements(interfaces.IIdGenerator)
# CMF Type Definition # CMF Type Definition
meta_type = 'ERP5 SQL Non Continous Increasing Id Generator' meta_type = 'ERP5 SQL Non Continous Increasing Id Generator'
portal_type = 'SQL Non Continous Increasing Id Generator' portal_type = 'SQL Non Continous Increasing Id Generator'
......
...@@ -34,11 +34,11 @@ from BTrees.OOBTree import OOBTree ...@@ -34,11 +34,11 @@ from BTrees.OOBTree import OOBTree
from zLOG import LOG, INFO from zLOG import LOG, INFO
@zope.interface.implementer(interfaces.IIdGenerator)
class ZODBContinuousIncreasingIdGenerator(IdGenerator): class ZODBContinuousIncreasingIdGenerator(IdGenerator):
""" """
Create some Ids with the zodb storage Create some Ids with the zodb storage
""" """
zope.interface.implements(interfaces.IIdGenerator)
# CMF Type Definition # CMF Type Definition
meta_type = 'ERP5 ZODB Continous Increasing Id Generator' meta_type = 'ERP5 ZODB Continous Increasing Id Generator'
portal_type = 'ZODB Continous Increasing Id Generator' portal_type = 'ZODB Continous Increasing Id Generator'
......
...@@ -42,11 +42,11 @@ from BTrees.Length import Length ...@@ -42,11 +42,11 @@ from BTrees.Length import Length
_marker = object() _marker = object()
@zope.interface.implementer(interfaces.IIdTool)
class IdTool(BaseTool): class IdTool(BaseTool):
""" """
This tools handles the generation of IDs. This tools handles the generation of IDs.
""" """
zope.interface.implements(interfaces.IIdTool)
id = 'portal_ids' id = 'portal_ids'
meta_type = 'ERP5 Id Tool' meta_type = 'ERP5 Id Tool'
portal_type = 'Id Tool' portal_type = 'Id Tool'
......
...@@ -42,6 +42,7 @@ from zLOG import LOG, ERROR ...@@ -42,6 +42,7 @@ from zLOG import LOG, ERROR
from warnings import warn from warnings import warn
@zope.interface.implementer(IAmount)
class Amount(Base, VariatedMixin): class Amount(Base, VariatedMixin):
""" """
A mix-in class which provides some utilities A mix-in class which provides some utilities
...@@ -58,9 +59,6 @@ class Amount(Base, VariatedMixin): ...@@ -58,9 +59,6 @@ class Amount(Base, VariatedMixin):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IAmount)
property_sheets = ( PropertySheet.SimpleItem property_sheets = ( PropertySheet.SimpleItem
, PropertySheet.Amount , PropertySheet.Amount
, PropertySheet.Price , PropertySheet.Price
......
...@@ -35,6 +35,7 @@ from erp5.component.document.MappedValue import MappedValue ...@@ -35,6 +35,7 @@ from erp5.component.document.MappedValue import MappedValue
from erp5.component.mixin.AmountGeneratorMixin import AmountGeneratorMixin from erp5.component.mixin.AmountGeneratorMixin import AmountGeneratorMixin
from erp5.component.interface.IAmountGeneratorLine import IAmountGeneratorLine from erp5.component.interface.IAmountGeneratorLine import IAmountGeneratorLine
@zope.interface.implementer(IAmountGeneratorLine)
class AmountGeneratorLine(MappedValue, XMLMatrix, Amount, class AmountGeneratorLine(MappedValue, XMLMatrix, Amount,
AmountGeneratorMixin): AmountGeneratorMixin):
"""Abstract class to represent amount transformation for movements""" """Abstract class to represent amount transformation for movements"""
...@@ -45,9 +46,6 @@ class AmountGeneratorLine(MappedValue, XMLMatrix, Amount, ...@@ -45,9 +46,6 @@ class AmountGeneratorLine(MappedValue, XMLMatrix, Amount,
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IAmountGeneratorLine)
# Declarative properties # Declarative properties
property_sheets = (PropertySheet.DublinCore, property_sheets = (PropertySheet.DublinCore,
PropertySheet.AmountGeneratorLine) PropertySheet.AmountGeneratorLine)
......
...@@ -46,6 +46,8 @@ from erp5.component.mixin.RuleMixin import RuleMixin ...@@ -46,6 +46,8 @@ from erp5.component.mixin.RuleMixin import RuleMixin
from erp5.component.interface.IExpandable import IExpandable from erp5.component.interface.IExpandable import IExpandable
from erp5.component.interface.IMovementCollection import IMovementCollection from erp5.component.interface.IMovementCollection import IMovementCollection
@zope.interface.implementer(IExpandable,
IMovementCollection)
class AppliedRule(XMLObject, ExplainableMixin): class AppliedRule(XMLObject, ExplainableMixin):
""" """
An applied rule holds a list of simulation movements. An applied rule holds a list of simulation movements.
...@@ -81,10 +83,6 @@ class AppliedRule(XMLObject, ExplainableMixin): ...@@ -81,10 +83,6 @@ class AppliedRule(XMLObject, ExplainableMixin):
, PropertySheet.AppliedRule , PropertySheet.AppliedRule
) )
# Declarative interfaces
zope.interface.implements(IExpandable,
IMovementCollection)
def tpValues(self) : def tpValues(self) :
""" show the content in the left pane of the ZMI """ """ show the content in the left pane of the ZMI """
return self.objectValues() return self.objectValues()
......
...@@ -43,6 +43,8 @@ import zope.interface ...@@ -43,6 +43,8 @@ import zope.interface
_marker = object() _marker = object()
@zope.interface.implementer(IBusinessProcess,
IArrowBase)
class BusinessProcess(Path, XMLObject): class BusinessProcess(Path, XMLObject):
"""The BusinessProcess class is a container class which is used """The BusinessProcess class is a container class which is used
to describe business processes in the area of trade, payroll to describe business processes in the area of trade, payroll
...@@ -117,10 +119,6 @@ class BusinessProcess(Path, XMLObject): ...@@ -117,10 +119,6 @@ class BusinessProcess(Path, XMLObject):
, PropertySheet.BusinessProcess , PropertySheet.BusinessProcess
) )
# Declarative interfaces
zope.interface.implements(IBusinessProcess,
IArrowBase)
# Cache used by composition mixin (as a composed document always inherit # Cache used by composition mixin (as a composed document always inherit
# from BusinessProcess. The cache avoids memory leak, and has been moved # from BusinessProcess. The cache avoids memory leak, and has been moved
# here to be automatically flushed when BusinessProcess class is reseted # here to be automatically flushed when BusinessProcess class is reseted
......
...@@ -47,6 +47,9 @@ from erp5.component.interface.IMovementCollection import IMovementCollection ...@@ -47,6 +47,9 @@ from erp5.component.interface.IMovementCollection import IMovementCollection
from erp5.component.interface.IDivergenceController import IDivergenceController from erp5.component.interface.IDivergenceController import IDivergenceController
from erp5.component.interface.IAmountGenerator import IAmountGenerator from erp5.component.interface.IAmountGenerator import IAmountGenerator
@zope.interface.implementer(IAmountGenerator,
IDivergenceController,
IMovementCollection)
class Delivery(XMLObject, ImmobilisationDelivery, SimulableMixin, class Delivery(XMLObject, ImmobilisationDelivery, SimulableMixin,
CompositionMixin, AmountGeneratorMixin): CompositionMixin, AmountGeneratorMixin):
""" """
...@@ -75,11 +78,6 @@ class Delivery(XMLObject, ImmobilisationDelivery, SimulableMixin, ...@@ -75,11 +78,6 @@ class Delivery(XMLObject, ImmobilisationDelivery, SimulableMixin,
, PropertySheet.Price , PropertySheet.Price
) )
# Declarative interfaces
zope.interface.implements(IAmountGenerator,
IDivergenceController,
IMovementCollection)
security.declareProtected(Permissions.AccessContentsInformation, 'isAccountable') security.declareProtected(Permissions.AccessContentsInformation, 'isAccountable')
def isAccountable(self): def isAccountable(self):
""" """
......
...@@ -39,6 +39,7 @@ from erp5.component.document.MappedValue import MappedValue ...@@ -39,6 +39,7 @@ from erp5.component.document.MappedValue import MappedValue
from erp5.component.document.ImmobilisationMovement import ImmobilisationMovement from erp5.component.document.ImmobilisationMovement import ImmobilisationMovement
from erp5.component.interface.IDivergenceController import IDivergenceController from erp5.component.interface.IDivergenceController import IDivergenceController
@zope.interface.implementer(IDivergenceController,)
class DeliveryCell(MappedValue, Movement, ImmobilisationMovement): class DeliveryCell(MappedValue, Movement, ImmobilisationMovement):
""" """
A DeliveryCell allows to define specific quantities A DeliveryCell allows to define specific quantities
...@@ -65,9 +66,6 @@ class DeliveryCell(MappedValue, Movement, ImmobilisationMovement): ...@@ -65,9 +66,6 @@ class DeliveryCell(MappedValue, Movement, ImmobilisationMovement):
, PropertySheet.ItemAggregation , PropertySheet.ItemAggregation
) )
# Declarative interfaces
zope.interface.implements(IDivergenceController,)
security.declareProtected(Permissions.AccessContentsInformation, 'isPredicate') security.declareProtected(Permissions.AccessContentsInformation, 'isPredicate')
def isPredicate(self): def isPredicate(self):
"""Movements are not predicates. """Movements are not predicates.
......
...@@ -42,6 +42,7 @@ edit_args_list = getargspec(Base._edit).args ...@@ -42,6 +42,7 @@ edit_args_list = getargspec(Base._edit).args
from erp5.component.interface.IDivergenceController import IDivergenceController from erp5.component.interface.IDivergenceController import IDivergenceController
@zope.interface.implementer(IDivergenceController,)
class DeliveryLine(Movement, XMLMatrix, ImmobilisationMovement): class DeliveryLine(Movement, XMLMatrix, ImmobilisationMovement):
""" """
A DeliveryLine object allows to implement lines in A DeliveryLine object allows to implement lines in
...@@ -71,9 +72,6 @@ class DeliveryLine(Movement, XMLMatrix, ImmobilisationMovement): ...@@ -71,9 +72,6 @@ class DeliveryLine(Movement, XMLMatrix, ImmobilisationMovement):
, PropertySheet.SortIndex , PropertySheet.SortIndex
) )
# Declarative interfaces
zope.interface.implements(IDivergenceController,)
# Multiple inheritance definition # Multiple inheritance definition
updateRelatedContent = XMLMatrix.updateRelatedContent updateRelatedContent = XMLMatrix.updateRelatedContent
......
...@@ -219,6 +219,16 @@ from erp5.component.interface.ICrawlable import ICrawlable ...@@ -219,6 +219,16 @@ from erp5.component.interface.ICrawlable import ICrawlable
from erp5.component.interface.IDocument import IDocument from erp5.component.interface.IDocument import IDocument
from erp5.component.interface.IDiscoverable import IDiscoverable from erp5.component.interface.IDiscoverable import IDiscoverable
from erp5.component.interface.IUrl import IUrl from erp5.component.interface.IUrl import IUrl
@zope.interface.implementer(IConvertable,
ITextConvertable,
IHtmlConvertable,
ICachedConvertable,
IVersionable,
IDownloadable,
ICrawlable,
IDocument,
IDiscoverable,
IUrl,)
class Document(DocumentExtensibleTraversableMixin, XMLObject, UrlMixin, class Document(DocumentExtensibleTraversableMixin, XMLObject, UrlMixin,
CachedConvertableMixin, CrawlableMixin, TextConvertableMixin, CachedConvertableMixin, CrawlableMixin, TextConvertableMixin,
DownloadableMixin, DocumentMixin, DiscoverableMixin): DownloadableMixin, DocumentMixin, DiscoverableMixin):
...@@ -391,18 +401,6 @@ class Document(DocumentExtensibleTraversableMixin, XMLObject, UrlMixin, ...@@ -391,18 +401,6 @@ class Document(DocumentExtensibleTraversableMixin, XMLObject, UrlMixin,
isDocument = ConstantGetter('isDocument', value=True) isDocument = ConstantGetter('isDocument', value=True)
__dav_collection__=0 __dav_collection__=0
zope.interface.implements(IConvertable,
ITextConvertable,
IHtmlConvertable,
ICachedConvertable,
IVersionable,
IDownloadable,
ICrawlable,
IDocument,
IDiscoverable,
IUrl,
)
# Regular expressions # Regular expressions
# XXX those regex are weak, fast but not reliable. # XXX those regex are weak, fast but not reliable.
# this is a valid url than regex are not able to parse # this is a valid url than regex are not able to parse
......
...@@ -53,6 +53,7 @@ NEGLIGEABLE_PRICE = 10e-8 ...@@ -53,6 +53,7 @@ NEGLIGEABLE_PRICE = 10e-8
from Products.ERP5Type.Errors import ImmobilisationValidityError from Products.ERP5Type.Errors import ImmobilisationValidityError
from Products.ERP5Type.Errors import ImmobilisationCalculationError from Products.ERP5Type.Errors import ImmobilisationCalculationError
@zope.interface.implementer(IImmobilisationItem)
class ImmobilisableItem(Item, Amount): class ImmobilisableItem(Item, Amount):
""" """
An Immobilisable Item is an Item which can be immobilised An Immobilisable Item is an Item which can be immobilised
...@@ -79,8 +80,6 @@ class ImmobilisableItem(Item, Amount): ...@@ -79,8 +80,6 @@ class ImmobilisableItem(Item, Amount):
, PropertySheet.Amortisation , PropertySheet.Amortisation
) )
zope.interface.implements(IImmobilisationItem)
# IExpandableItem interface implementation # IExpandableItem interface implementation
def getSimulationMovementSimulationState(self, simulation_movement): def getSimulationMovementSimulationState(self, simulation_movement):
"""Returns the simulation state for this simulation movement. """Returns the simulation state for this simulation movement.
......
...@@ -36,6 +36,7 @@ from erp5.component.interface.IMappedValue import IMappedValue ...@@ -36,6 +36,7 @@ from erp5.component.interface.IMappedValue import IMappedValue
TRANSFORMATION_FIX = True TRANSFORMATION_FIX = True
_MARKER = object() _MARKER = object()
@zope.interface.implementer(IMappedValue,)
class MappedValue(Predicate): class MappedValue(Predicate):
""" """
A MappedValue allows to associate a value to a predicate A MappedValue allows to associate a value to a predicate
...@@ -55,9 +56,6 @@ class MappedValue(Predicate): ...@@ -55,9 +56,6 @@ class MappedValue(Predicate):
, PropertySheet.Predicate , PropertySheet.Predicate
, PropertySheet.MappedValue , PropertySheet.MappedValue
) )
# Declarative interfaces
zope.interface.implements(IMappedValue,
)
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
'getMappedValueBaseCategoryList') 'getMappedValueBaseCategoryList')
......
...@@ -60,6 +60,9 @@ def getExchangeRate(currency_value, section_currency, date): ...@@ -60,6 +60,9 @@ def getExchangeRate(currency_value, section_currency, date):
price_currency=section_currency price_currency=section_currency
)) ))
@zope.interface.implementer(IAmountGenerator,
interfaces.IVariated,
IMovement)
class Movement(XMLObject, Amount, CompositionMixin, AmountGeneratorMixin): class Movement(XMLObject, Amount, CompositionMixin, AmountGeneratorMixin):
""" """
The Movement class allows to implement ERP5 universal accounting model. The Movement class allows to implement ERP5 universal accounting model.
...@@ -203,11 +206,6 @@ class Movement(XMLObject, Amount, CompositionMixin, AmountGeneratorMixin): ...@@ -203,11 +206,6 @@ class Movement(XMLObject, Amount, CompositionMixin, AmountGeneratorMixin):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IAmountGenerator,
interfaces.IVariated,
IMovement)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.SimpleItem , PropertySheet.SimpleItem
......
...@@ -38,6 +38,7 @@ from erp5.component.document.Movement import Movement ...@@ -38,6 +38,7 @@ from erp5.component.document.Movement import Movement
from erp5.component.interface.IMovement import IMovement from erp5.component.interface.IMovement import IMovement
from Products.ERP5Type.XMLMatrix import XMLMatrix from Products.ERP5Type.XMLMatrix import XMLMatrix
@zope.interface.implementer(interfaces.INode, IMovement)
class Project(Node, Movement, XMLMatrix): class Project(Node, Movement, XMLMatrix):
""" """
Project is a class which describes a typical project in consulting firm. Project is a class which describes a typical project in consulting firm.
...@@ -55,8 +56,6 @@ class Project(Node, Movement, XMLMatrix): ...@@ -55,8 +56,6 @@ class Project(Node, Movement, XMLMatrix):
isDelivery = ConstantGetter('isDelivery', value=True) isDelivery = ConstantGetter('isDelivery', value=True)
isAccountable = ConstantGetter('isAccountable', value=False) isAccountable = ConstantGetter('isAccountable', value=False)
zope.interface.implements(interfaces.INode, IMovement)
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
......
...@@ -61,6 +61,8 @@ parent_to_movement_simulation_state = { ...@@ -61,6 +61,8 @@ parent_to_movement_simulation_state = {
'invoiced' : 'planned', 'invoiced' : 'planned',
} }
@zope.interface.implementer(IExpandable,
interfaces.IPropertyRecordable)
class SimulationMovement(PropertyRecordableMixin, Movement, ExplainableMixin): class SimulationMovement(PropertyRecordableMixin, Movement, ExplainableMixin):
""" """
Simulation movements belong to a simulation workflow which includes Simulation movements belong to a simulation workflow which includes
...@@ -118,10 +120,6 @@ class SimulationMovement(PropertyRecordableMixin, Movement, ExplainableMixin): ...@@ -118,10 +120,6 @@ class SimulationMovement(PropertyRecordableMixin, Movement, ExplainableMixin):
, PropertySheet.Reference , PropertySheet.Reference
) )
# Declarative interfaces
zope.interface.implements(IExpandable,
interfaces.IPropertyRecordable)
def tpValues(self) : def tpValues(self) :
""" show the content in the left pane of the ZMI """ """ show the content in the left pane of the ZMI """
return self.objectValues() return self.objectValues()
......
...@@ -239,6 +239,7 @@ class BaseAmountResolver(BaseAmountDict): ...@@ -239,6 +239,7 @@ class BaseAmountResolver(BaseAmountDict):
return 0 return 0
@zope.interface.implementer(IAmountGenerator,)
class AmountGeneratorMixin: class AmountGeneratorMixin:
""" """
This class provides a generic implementation of IAmountGenerator. This class provides a generic implementation of IAmountGenerator.
...@@ -255,9 +256,6 @@ class AmountGeneratorMixin: ...@@ -255,9 +256,6 @@ class AmountGeneratorMixin:
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IAmountGenerator,)
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
'getGeneratedAmountList') 'getGeneratedAmountList')
def getGeneratedAmountList(self, amount_list=None, rounding=False, def getGeneratedAmountList(self, amount_list=None, rounding=False,
......
...@@ -32,6 +32,7 @@ from Products.ERP5Type.Globals import InitializeClass ...@@ -32,6 +32,7 @@ from Products.ERP5Type.Globals import InitializeClass
from Products.ERP5Type import Permissions from Products.ERP5Type import Permissions
from erp5.component.interface.IExplainable import IExplainable from erp5.component.interface.IExplainable import IExplainable
@zope.interface.implementer(IExplainable,)
class ExplainableMixin: class ExplainableMixin:
"""A mixin which provides common implementation of """A mixin which provides common implementation of
IExplainable to simulation movements and applied rules IExplainable to simulation movements and applied rules
...@@ -44,9 +45,6 @@ class ExplainableMixin: ...@@ -44,9 +45,6 @@ class ExplainableMixin:
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IExplainable,)
# IExplainable implementation # IExplainable implementation
security.declareProtected(Permissions.AccessContentsInformation,'getExplanationValueList') security.declareProtected(Permissions.AccessContentsInformation,'getExplanationValueList')
def getExplanationValueList(self): def getExplanationValueList(self):
......
...@@ -35,6 +35,7 @@ from erp5.component.module.MovementCollectionDiff import ( ...@@ -35,6 +35,7 @@ from erp5.component.module.MovementCollectionDiff import (
from erp5.component.mixin.RuleMixin import _compare from erp5.component.mixin.RuleMixin import _compare
from erp5.component.interface.IMovementCollectionUpdater import IMovementCollectionUpdater from erp5.component.interface.IMovementCollectionUpdater import IMovementCollectionUpdater
@zope.interface.implementer(IMovementCollectionUpdater,)
class MovementCollectionUpdaterMixin: class MovementCollectionUpdaterMixin:
"""Movement Collection Updater. """Movement Collection Updater.
...@@ -49,9 +50,6 @@ class MovementCollectionUpdaterMixin: ...@@ -49,9 +50,6 @@ class MovementCollectionUpdaterMixin:
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IMovementCollectionUpdater,)
# Implementation of IMovementCollectionUpdater # Implementation of IMovementCollectionUpdater
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
'getMovementCollectionDiff') 'getMovementCollectionDiff')
......
...@@ -42,6 +42,9 @@ def _compare(tester_list, prevision_movement, decision_movement): ...@@ -42,6 +42,9 @@ def _compare(tester_list, prevision_movement, decision_movement):
return False return False
return True return True
@zope.interface.implementer(IRule,
IDivergenceController,
IMovementCollectionUpdater,)
class RuleMixin(Predicate): class RuleMixin(Predicate):
""" """
Provides generic methods and helper methods to implement Provides generic methods and helper methods to implement
...@@ -51,11 +54,6 @@ class RuleMixin(Predicate): ...@@ -51,11 +54,6 @@ class RuleMixin(Predicate):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IRule,
IDivergenceController,
IMovementCollectionUpdater,)
# Portal Type of created children # Portal Type of created children
movement_type = 'Simulation Movement' movement_type = 'Simulation Movement'
......
...@@ -32,6 +32,7 @@ import zope.interface ...@@ -32,6 +32,7 @@ import zope.interface
from AccessControl import allow_class from AccessControl import allow_class
from erp5.component.interface.IAmountList import IAmountList from erp5.component.interface.IAmountList import IAmountList
@zope.interface.implementer(IAmountList)
class GeneratedAmountList(list): class GeneratedAmountList(list):
""" """
Temporary object needed to aggregate Amount value Temporary object needed to aggregate Amount value
...@@ -44,7 +45,6 @@ class GeneratedAmountList(list): ...@@ -44,7 +45,6 @@ class GeneratedAmountList(list):
2. detailed information on each movement with split(), which would be 2. detailed information on each movement with split(), which would be
equivalent to call getGeneratedAmountList() on each movement equivalent to call getGeneratedAmountList() on each movement
""" """
zope.interface.implements(IAmountList)
def getTotalPrice(self): def getTotalPrice(self):
""" """
......
...@@ -30,6 +30,7 @@ import zope.interface ...@@ -30,6 +30,7 @@ import zope.interface
from Products.ERP5Type.Accessor.TypeDefinition import list_types from Products.ERP5Type.Accessor.TypeDefinition import list_types
from erp5.component.interface.IMovementCollectionDiff import IMovementCollectionDiff from erp5.component.interface.IMovementCollectionDiff import IMovementCollectionDiff
@zope.interface.implementer(IMovementCollectionDiff,)
class MovementCollectionDiff(object): class MovementCollectionDiff(object):
""" """
Documents which implement IMovementCollectionDiff Documents which implement IMovementCollectionDiff
...@@ -38,8 +39,6 @@ class MovementCollectionDiff(object): ...@@ -38,8 +39,6 @@ class MovementCollectionDiff(object):
They are usually generated and used by They are usually generated and used by
IMovementCollectionUpdater. IMovementCollectionUpdater.
""" """
# Declarative interfaces
zope.interface.implements(IMovementCollectionDiff,)
def __init__(self): def __init__(self):
self._deletable_movement_list = [] self._deletable_movement_list = []
......
...@@ -35,6 +35,8 @@ from Products.ERP5Type import interfaces, Permissions, PropertySheet ...@@ -35,6 +35,8 @@ from Products.ERP5Type import interfaces, Permissions, PropertySheet
import zope.interface import zope.interface
@zope.interface.implementer(interfaces.IVariated,
interfaces.IVariationRange)
class VariatedMixin: class VariatedMixin:
""" """
Mix-in class for all classes which implement the Variated Interface. Mix-in class for all classes which implement the Variated Interface.
...@@ -54,10 +56,6 @@ class VariatedMixin: ...@@ -54,10 +56,6 @@ class VariatedMixin:
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
# Declarative interfaces
zope.interface.implements(interfaces.IVariated,
interfaces.IVariationRange)
isRADContent = 1 # for 'property_sheets' isRADContent = 1 # for 'property_sheets'
property_sheets = (PropertySheet.VariationRange, ) property_sheets = (PropertySheet.VariationRange, )
......
...@@ -42,7 +42,7 @@ import random ...@@ -42,7 +42,7 @@ import random
from hashlib import md5 from hashlib import md5
import time import time
from zope.interface import Interface from zope.interface import Interface
from zope.interface import implements from zope.interface import implementer
class ICaptchaProvider(Interface): class ICaptchaProvider(Interface):
"""The CaptchaProvider interface provides a captcha generator.""" """The CaptchaProvider interface provides a captcha generator."""
...@@ -57,10 +57,9 @@ class ICaptchaProvider(Interface): ...@@ -57,10 +57,9 @@ class ICaptchaProvider(Interface):
def getExtraPropertyList(self): def getExtraPropertyList(self):
"""Returns the list of additionnary properties that are configurable""" """Returns the list of additionnary properties that are configurable"""
@implementer(ICaptchaProvider)
class CaptchasDotNetProvider(object): class CaptchasDotNetProvider(object):
implements(ICaptchaProvider)
def getImageGenerator (self, field): def getImageGenerator (self, field):
captchas_client = field.get_value("captcha_dot_net_client") or "demo" captchas_client = field.get_value("captcha_dot_net_client") or "demo"
captchas_secret = field.get_value("captcha_dot_net_secret") or "secret" captchas_secret = field.get_value("captcha_dot_net_secret") or "secret"
...@@ -107,10 +106,9 @@ class CaptchasDotNetProvider(object): ...@@ -107,10 +106,9 @@ class CaptchasDotNetProvider(object):
TALESField(**self._dynamic_property_list[1]), TALESField(**self._dynamic_property_list[1]),
TALESField(**self._dynamic_property_list[2])] TALESField(**self._dynamic_property_list[2])]
@implementer(ICaptchaProvider)
class NumericCaptchaProvider(object): class NumericCaptchaProvider(object):
implements(ICaptchaProvider)
# No division because it would create decimal numbers # No division because it would create decimal numbers
operator_set = {"+": "plus", "-": "minus", "*": "times"} operator_set = {"+": "plus", "-": "minus", "*": "times"}
......
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from __future__ import absolute_import from __future__ import absolute_import
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from .oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from .oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
from .oood_commandtransform import includeMetaContentType from .oood_commandtransform import includeMetaContentType
from zLOG import LOG from zLOG import LOG
...@@ -10,11 +10,10 @@ from lxml.etree import Element, SubElement ...@@ -10,11 +10,10 @@ from lxml.etree import Element, SubElement
html_parser = etree.HTMLParser(remove_blank_text=True, encoding='utf-8') html_parser = etree.HTMLParser(remove_blank_text=True, encoding='utf-8')
@implementer(itransform)
class HTMLToOdt: class HTMLToOdt:
"""Transforms HTML to odt by using oood""" """Transforms HTML to odt by using oood"""
implements(itransform)
__name__ = 'html_to_odt' __name__ = 'html_to_odt'
inputs = ('text/html',) inputs = ('text/html',)
output = 'application/vnd.oasis.opendocument.text' output = 'application/vnd.oasis.opendocument.text'
......
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from __future__ import absolute_import from __future__ import absolute_import
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from .oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from .oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
from zLOG import LOG from zLOG import LOG
@implementer(itransform)
class OdtToDoc: class OdtToDoc:
"""Transforms ODT to Doc by using oood""" """Transforms ODT to Doc by using oood"""
implements(itransform)
__name__ = 'odt_to_doc' __name__ = 'odt_to_doc'
inputs = ('application/vnd.oasis.opendocument.text',) inputs = ('application/vnd.oasis.opendocument.text',)
output = 'application/msword' output = 'application/msword'
......
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from __future__ import absolute_import from __future__ import absolute_import
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from .oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from .oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
from zLOG import LOG from zLOG import LOG
@implementer(itransform)
class OdtToPdf: class OdtToPdf:
"""Transforms ODT to PDF by using oood""" """Transforms ODT to PDF by using oood"""
implements(itransform)
__name__ = 'odt_to_pdf' __name__ = 'odt_to_pdf'
inputs = ('application/vnd.oasis.opendocument.text',) inputs = ('application/vnd.oasis.opendocument.text',)
output = 'application/pdf' output = 'application/pdf'
......
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from __future__ import absolute_import from __future__ import absolute_import
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implementer
from .oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from .oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
from zLOG import LOG from zLOG import LOG
from Products.ERP5OOo.OOoUtils import OOoBuilder from Products.ERP5OOo.OOoUtils import OOoBuilder
import re import re
@implementer(itransform)
class OdtToXml: class OdtToXml:
"""Transforms ODT to Doc by using oood""" """Transforms ODT to Doc by using oood"""
implements(itransform)
__name__ = 'odt_to_xml' __name__ = 'odt_to_xml'
inputs = ('application/vnd.oasis.opendocument.text',) inputs = ('application/vnd.oasis.opendocument.text',)
output = 'text/xml' output = 'text/xml'
......
...@@ -3,7 +3,7 @@ from Products.PortalTransforms.libtransforms.commandtransform import commandtran ...@@ -3,7 +3,7 @@ from Products.PortalTransforms.libtransforms.commandtransform import commandtran
from Products.PortalTransforms.interfaces import idatastream from Products.PortalTransforms.interfaces import idatastream
from erp5.component.document.Document import ConversionError from erp5.component.document.Document import ConversionError
from Acquisition import aq_base from Acquisition import aq_base
from zope.interface import implements from zope.interface import implementer
from OFS.Image import Image as OFSImage from OFS.Image import Image as OFSImage
from zLOG import LOG from zLOG import LOG
...@@ -35,9 +35,9 @@ def includeMetaContentType(html_node): ...@@ -35,9 +35,9 @@ def includeMetaContentType(html_node):
CLEAN_RELATIVE_PATH = re.compile('^../') CLEAN_RELATIVE_PATH = re.compile('^../')
@implementer(idatastream)
class OOoDocumentDataStream: class OOoDocumentDataStream:
"""Handle OOoDocument in Portal Transforms""" """Handle OOoDocument in Portal Transforms"""
implements(idatastream)
def setData(self, value): def setData(self, value):
"""set the main""" """set the main"""
......
...@@ -49,13 +49,11 @@ connection_pool = local() ...@@ -49,13 +49,11 @@ connection_pool = local()
_MARKER = [] _MARKER = []
@zope.interface.implementer(
interfaces.ICachePlugin)
class DistributedRamCache(BaseCache): class DistributedRamCache(BaseCache):
""" Memcached based cache plugin. """ """ Memcached based cache plugin. """
zope.interface.implements(
interfaces.ICachePlugin
)
def __init__(self, uid, params={}): def __init__(self, uid, params={}):
self._servers = params.get('server', '') self._servers = params.get('server', '')
self._expiration_time = params.get('expiration_time', 0) self._expiration_time = params.get('expiration_time', 0)
......
...@@ -49,13 +49,11 @@ def calcPythonObjectMemorySize(i): ...@@ -49,13 +49,11 @@ def calcPythonObjectMemorySize(i):
return 0 return 0
_MARKER = [] _MARKER = []
@zope.interface.implementer(
interfaces.ICachePlugin)
class RamCache(BaseCache): class RamCache(BaseCache):
""" RAM based cache plugin.""" """ RAM based cache plugin."""
zope.interface.implements(
interfaces.ICachePlugin
)
cache_expire_check_interval = 300 cache_expire_check_interval = 300
def __init__(self, uid, params={}): def __init__(self, uid, params={}):
......
...@@ -146,12 +146,11 @@ class ActionInformation(XMLObject): ...@@ -146,12 +146,11 @@ class ActionInformation(XMLObject):
permission_list=self.getActionPermissionList()) permission_list=self.getActionPermissionList())
@zope.interface.implementer(interfaces.IAction)
class CacheableAction(object): class CacheableAction(object):
"""The purpose of this class is to provide a cacheable instance having """The purpose of this class is to provide a cacheable instance having
an enough information of Action Information document.""" an enough information of Action Information document."""
zope.interface.implements(interfaces.IAction)
test_permission = None test_permission = None
def __init__(self, **kw): def __init__(self, **kw):
......
...@@ -46,6 +46,7 @@ from Products.ERP5Type.Globals import PersistentMapping ...@@ -46,6 +46,7 @@ from Products.ERP5Type.Globals import PersistentMapping
from Products.ERP5Type.UnrestrictedMethod import unrestricted_apply from Products.ERP5Type.UnrestrictedMethod import unrestricted_apply
from Products.CMFCore.Expression import Expression from Products.CMFCore.Expression import Expression
@zope.interface.implementer( interfaces.IPredicate,)
class Predicate(XMLObject): class Predicate(XMLObject):
""" """
A Predicate object defines a list of criterions A Predicate object defines a list of criterions
...@@ -82,9 +83,6 @@ class Predicate(XMLObject): ...@@ -82,9 +83,6 @@ class Predicate(XMLObject):
, PropertySheet.SortIndex , PropertySheet.SortIndex
) )
# Declarative interfaces
zope.interface.implements( interfaces.IPredicate, )
security.declareProtected( Permissions.AccessContentsInformation, 'test' ) security.declareProtected( Permissions.AccessContentsInformation, 'test' )
def test(self, context, tested_base_category_list=None, def test(self, context, tested_base_category_list=None,
strict_membership=0, isMemberOf=None, **kw): strict_membership=0, isMemberOf=None, **kw):
......
...@@ -42,6 +42,7 @@ from Products.ERP5Type.Permissions import AccessContentsInformation ...@@ -42,6 +42,7 @@ from Products.ERP5Type.Permissions import AccessContentsInformation
from Products.ERP5Type.XMLObject import XMLObject from Products.ERP5Type.XMLObject import XMLObject
@zope.interface.implementer(interfaces.ILocalRoleGenerator)
class RoleInformation(XMLObject): class RoleInformation(XMLObject):
""" Represent a role definition. """ Represent a role definition.
...@@ -55,8 +56,6 @@ class RoleInformation(XMLObject): ...@@ -55,8 +56,6 @@ class RoleInformation(XMLObject):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(AccessContentsInformation) security.declareObjectProtected(AccessContentsInformation)
zope.interface.implements(interfaces.ILocalRoleGenerator)
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.CategoryCore property_sheets = ( PropertySheet.CategoryCore
, PropertySheet.DublinCore , PropertySheet.DublinCore
......
...@@ -31,13 +31,12 @@ import zope.interface ...@@ -31,13 +31,12 @@ import zope.interface
from Products.PythonScripts.Utility import allow_class from Products.PythonScripts.Utility import allow_class
from Products.ERP5Type import interfaces from Products.ERP5Type import interfaces
@zope.interface.implementer( interfaces.IObjectMessage,)
class ObjectMessage: class ObjectMessage:
""" """
Object Message is used for notifications to user. Object Message is used for notifications to user.
""" """
zope.interface.implements( interfaces.IObjectMessage, )
def __init__(self, object_relative_url='', message='', mapping={}, **kw): def __init__(self, object_relative_url='', message='', mapping={}, **kw):
self.object_relative_url = object_relative_url self.object_relative_url = object_relative_url
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
from Products.ERP5Type.interfaces import IConstraint from Products.ERP5Type.interfaces import IConstraint
from Products.ERP5Type.ConsistencyMessage import ConsistencyMessage from Products.ERP5Type.ConsistencyMessage import ConsistencyMessage
from zope.interface import implements from zope.interface import implementer
from Products.ERP5Type.Core.Predicate import Predicate from Products.ERP5Type.Core.Predicate import Predicate
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet from Products.ERP5Type import Permissions, PropertySheet
...@@ -39,6 +39,7 @@ from Products.ERP5Type.Utils import UpperCase, createExpressionContext ...@@ -39,6 +39,7 @@ from Products.ERP5Type.Utils import UpperCase, createExpressionContext
from Products.CMFCore.Expression import Expression from Products.CMFCore.Expression import Expression
from Products.ERP5Type.id_as_reference import IdAsReferenceMixin from Products.ERP5Type.id_as_reference import IdAsReferenceMixin
@implementer( IConstraint,)
class ConstraintMixin(IdAsReferenceMixin('_constraint'), Predicate): class ConstraintMixin(IdAsReferenceMixin('_constraint'), Predicate):
""" """
Mixin Constraint implementation (only relevant for ZODB Property Mixin Constraint implementation (only relevant for ZODB Property
...@@ -58,7 +59,6 @@ class ConstraintMixin(IdAsReferenceMixin('_constraint'), Predicate): ...@@ -58,7 +59,6 @@ class ConstraintMixin(IdAsReferenceMixin('_constraint'), Predicate):
_message_id_tuple = () _message_id_tuple = ()
__allow_access_to_unprotected_subobjects__ = 1 __allow_access_to_unprotected_subobjects__ = 1
implements( IConstraint, )
property_sheets = (PropertySheet.SimpleItem, property_sheets = (PropertySheet.SimpleItem,
PropertySheet.Reference, PropertySheet.Reference,
......
...@@ -27,7 +27,7 @@ from Acquisition import aq_parent ...@@ -27,7 +27,7 @@ from Acquisition import aq_parent
from App.class_init import InitializeClass from App.class_init import InitializeClass
from OFS.Folder import Folder from OFS.Folder import Folder
from zLOG import LOG, ERROR, INFO, PROBLEM from zLOG import LOG, ERROR, INFO, PROBLEM
from zope.interface import implements from zope.interface import implementer
from zope.i18n import translate from zope.i18n import translate
from ZPublisher.BeforeTraverse import registerBeforeTraverse, \ from ZPublisher.BeforeTraverse import registerBeforeTraverse, \
unregisterBeforeTraverse, queryBeforeTraverse, NameCaller unregisterBeforeTraverse, queryBeforeTraverse, NameCaller
...@@ -53,6 +53,7 @@ def manage_addLocalizer(self, title, languages, REQUEST=None, RESPONSE=None): ...@@ -53,6 +53,7 @@ def manage_addLocalizer(self, title, languages, REQUEST=None, RESPONSE=None):
RESPONSE.redirect('manage_main') RESPONSE.redirect('manage_main')
@implementer(ILocalizer)
class Localizer(LanguageManager, Folder): class Localizer(LanguageManager, Folder):
""" """
The Localizer meta type lets you customize the language negotiation The Localizer meta type lets you customize the language negotiation
...@@ -60,7 +61,6 @@ class Localizer(LanguageManager, Folder): ...@@ -60,7 +61,6 @@ class Localizer(LanguageManager, Folder):
""" """
meta_type = 'Localizer' meta_type = 'Localizer'
implements(ILocalizer)
id = 'Localizer' id = 'Localizer'
......
...@@ -45,7 +45,7 @@ from ZPublisher import HTTPRequest ...@@ -45,7 +45,7 @@ from ZPublisher import HTTPRequest
from zope.component import getSiteManager from zope.component import getSiteManager
from zope.i18n import interpolate from zope.i18n import interpolate
from zope.i18n.interfaces import ITranslationDomain from zope.i18n.interfaces import ITranslationDomain
from zope.interface import implements from zope.interface import implementer
from zLOG import LOG, INFO from zLOG import LOG, INFO
from zExceptions import Forbidden from zExceptions import Forbidden
...@@ -154,12 +154,12 @@ def manage_addMessageCatalog(self, id, title, languages, sourcelang=None, ...@@ -154,12 +154,12 @@ def manage_addMessageCatalog(self, id, title, languages, sourcelang=None,
@implementer(IMessageCatalog)
class MessageCatalog(LanguageManager, ObjectManager, SimpleItem): class MessageCatalog(LanguageManager, ObjectManager, SimpleItem):
"""Stores messages and their translations... """Stores messages and their translations...
""" """
meta_type = 'MessageCatalog' meta_type = 'MessageCatalog'
implements(IMessageCatalog)
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
from zLOG import ERROR from zLOG import ERROR
from UserDict import UserDict from UserDict import UserDict
from zope.interface import implements from zope.interface import implementer
from Products.PageTemplates.PageTemplateFile import PageTemplateFile from Products.PageTemplates.PageTemplateFile import PageTemplateFile
from App.class_init import default__class_init__ as InitializeClass from App.class_init import default__class_init__ as InitializeClass
...@@ -54,13 +54,12 @@ VALIDATORS = { ...@@ -54,13 +54,12 @@ VALIDATORS = {
'dict' : PersistentMapping, 'dict' : PersistentMapping,
} }
@implementer(ITransform)
class Transform(SimpleItem): class Transform(SimpleItem):
"""A transform is an external method with """A transform is an external method with
additional configuration information additional configuration information
""" """
implements(ITransform)
meta_type = 'Transform' meta_type = 'Transform'
meta_types = all_meta_types = () meta_types = all_meta_types = ()
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
from logging import DEBUG from logging import DEBUG
from persistent.list import PersistentList from persistent.list import PersistentList
from zope.interface import implements from zope.interface import implementer
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Acquisition import aq_base from Acquisition import aq_base
...@@ -36,14 +36,13 @@ from Products.PortalTransforms.utils import parseContentType ...@@ -36,14 +36,13 @@ from Products.PortalTransforms.utils import parseContentType
from ZODB.POSException import ConflictError from ZODB.POSException import ConflictError
from zLOG import WARNING from zLOG import WARNING
@implementer(IPortalTransformsTool, IEngine)
class TransformTool(UniqueObject, ActionProviderBase, Folder): class TransformTool(UniqueObject, ActionProviderBase, Folder):
id = 'portal_transforms' id = 'portal_transforms'
meta_type = id.title().replace('_', ' ') meta_type = id.title().replace('_', ' ')
isPrincipiaFolderish = 1 # Show up in the ZMI isPrincipiaFolderish = 1 # Show up in the ZMI
implements(IPortalTransformsTool, IEngine)
meta_types = all_meta_types = ( meta_types = all_meta_types = (
{'name': 'Transform', 'action': 'manage_addTransformForm'}, {'name': 'Transform', 'action': 'manage_addTransformForm'},
{'name': 'TransformsChain', 'action': 'manage_addTransformsChainForm'}, {'name': 'TransformsChain', 'action': 'manage_addTransformsChainForm'},
......
from zope.interface import implements from zope.interface import implementer
from Products.PageTemplates.PageTemplateFile import PageTemplateFile from Products.PageTemplates.PageTemplateFile import PageTemplateFile
from Persistence import Persistent from Persistence import Persistent
...@@ -18,11 +18,10 @@ from Products.PortalTransforms.interfaces import ITransform ...@@ -18,11 +18,10 @@ from Products.PortalTransforms.interfaces import ITransform
from UserList import UserList from UserList import UserList
@implementer(IChain, ITransform)
class chain(UserList): class chain(UserList):
"""A chain of transforms used to transform data""" """A chain of transforms used to transform data"""
implements(IChain, ITransform)
def __init__(self, name='',*args): def __init__(self, name='',*args):
UserList.__init__(self, *args) UserList.__init__(self, *args)
self.__name__ = name self.__name__ = name
......
...@@ -6,15 +6,15 @@ import re ...@@ -6,15 +6,15 @@ import re
import shutil import shutil
from os.path import join, basename from os.path import join, basename
from zope.interface import implements from zope.interface import implementer
from Products.PortalTransforms.libtransforms.utils import bin_search, sansext, getShortPathName from Products.PortalTransforms.libtransforms.utils import bin_search, sansext, getShortPathName
from Products.PortalTransforms.interfaces import ITransform from Products.PortalTransforms.interfaces import ITransform
@implementer(ITransform)
class commandtransform: class commandtransform:
"""abstract class for external command based transform """abstract class for external command based transform
""" """
implements(ITransform)
def __init__(self, name=None, binary=None, **kwargs): def __init__(self, name=None, binary=None, **kwargs):
if name is not None: if name is not None:
...@@ -55,12 +55,12 @@ class commandtransform: ...@@ -55,12 +55,12 @@ class commandtransform:
def cleanDir(self, tmpdir): def cleanDir(self, tmpdir):
shutil.rmtree(tmpdir) shutil.rmtree(tmpdir)
@implementer(ITransform)
class popentransform: class popentransform:
"""abstract class for external command based transform """abstract class for external command based transform
Command must read from stdin and write to stdout Command must read from stdin and write to stdout
""" """
implements(ITransform)
binaryName = "" binaryName = ""
binaryArgs = "" binaryArgs = ""
...@@ -115,12 +115,12 @@ class popentransform: ...@@ -115,12 +115,12 @@ class popentransform:
from subprocess import Popen, PIPE from subprocess import Popen, PIPE
import shlex import shlex
@implementer(ITransform)
class subprocesstransform: class subprocesstransform:
"""abstract class for subprocess command based transform """abstract class for subprocess command based transform
Command must read from stdin and write to stdout Command must read from stdin and write to stdout
""" """
implements(ITransform)
binaryName = "" binaryName = ""
binaryArgs = "" binaryArgs = ""
......
from Products.PortalTransforms.interfaces import ITransform from Products.PortalTransforms.interfaces import ITransform
import os import os
import subprocess import subprocess
from zope.interface import implements from zope.interface import implementer
@implementer(ITransform)
class ImageMagickTransforms: class ImageMagickTransforms:
implements(ITransform)
__name__ = "imagemagick_transforms" __name__ = "imagemagick_transforms"
def __init__(self, name=None): def __init__(self, name=None):
if name is not None: if name is not None:
......
from Products.PortalTransforms.interfaces import ITransform from Products.PortalTransforms.interfaces import ITransform
from zope.interface import implements from zope.interface import implementer
from StringIO import StringIO from StringIO import StringIO
import PIL.Image import PIL.Image
@implementer(ITransform)
class PILTransforms: class PILTransforms:
implements(ITransform)
__name__ = "piltransforms" __name__ = "piltransforms"
def __init__(self, name=None): def __init__(self, name=None):
if name is not None: if name is not None:
......
import re import re
from zope.interface import implements from zope.interface import implementer
from Products.PortalTransforms.interfaces import ITransform from Products.PortalTransforms.interfaces import ITransform
@implementer(ITransform)
class retransform: class retransform:
"""abstract class for regex transforms (re.sub wrapper)""" """abstract class for regex transforms (re.sub wrapper)"""
implements(ITransform)
inputs = ('text/',) inputs = ('text/',)
def __init__(self, name, *args): def __init__(self, name, *args):
......
from Products.Archetypes.tests.atsitetestcase import ATSiteTestCase from Products.Archetypes.tests.atsitetestcase import ATSiteTestCase
from zope.interface import implements from zope.interface import implementer
from Products.PortalTransforms.utils import TransformException from Products.PortalTransforms.utils import TransformException
from Products.PortalTransforms.interfaces import ITransform from Products.PortalTransforms.interfaces import ITransform
from Products.PortalTransforms.chain import chain from Products.PortalTransforms.chain import chain
...@@ -14,8 +14,8 @@ class BaseTransform: ...@@ -14,8 +14,8 @@ class BaseTransform:
return getattr(self, '__name__', self.__class__.__name__) return getattr(self, '__name__', self.__class__.__name__)
@implementer(ITransform)
class HtmlToText(BaseTransform): class HtmlToText(BaseTransform):
implements(ITransform)
inputs = ('text/html',) inputs = ('text/html',)
output = 'text/plain' output = 'text/plain'
...@@ -31,8 +31,8 @@ class HtmlToText(BaseTransform): ...@@ -31,8 +31,8 @@ class HtmlToText(BaseTransform):
class HtmlToTextWithEncoding(HtmlToText): class HtmlToTextWithEncoding(HtmlToText):
output_encoding = 'ascii' output_encoding = 'ascii'
@implementer(ITransform)
class FooToBar(BaseTransform): class FooToBar(BaseTransform):
implements(ITransform)
inputs = ('text/*',) inputs = ('text/*',)
output = 'text/plain' output = 'text/plain'
...@@ -45,8 +45,8 @@ class FooToBar(BaseTransform): ...@@ -45,8 +45,8 @@ class FooToBar(BaseTransform):
data.setData(orig) data.setData(orig)
return data return data
@implementer(ITransform)
class DummyHtmlFilter1(BaseTransform): class DummyHtmlFilter1(BaseTransform):
implements(ITransform)
__name__ = 'dummy_html_filter1' __name__ = 'dummy_html_filter1'
inputs = ('text/html',) inputs = ('text/html',)
output = 'text/html' output = 'text/html'
...@@ -55,8 +55,8 @@ class DummyHtmlFilter1(BaseTransform): ...@@ -55,8 +55,8 @@ class DummyHtmlFilter1(BaseTransform):
data.setData("<span class='dummy'>%s</span>" % orig) data.setData("<span class='dummy'>%s</span>" % orig)
return data return data
@implementer(ITransform)
class DummyHtmlFilter2(BaseTransform): class DummyHtmlFilter2(BaseTransform):
implements(ITransform)
__name__ = 'dummy_html_filter2' __name__ = 'dummy_html_filter2'
inputs = ('text/html',) inputs = ('text/html',)
output = 'text/html' output = 'text/html'
...@@ -74,31 +74,32 @@ class QuxToVHost(DummyHtmlFilter1): ...@@ -74,31 +74,32 @@ class QuxToVHost(DummyHtmlFilter1):
return data return data
@implementer(ITransform)
class TransformNoIO(BaseTransform): class TransformNoIO(BaseTransform):
implements(ITransform) pass
class BadTransformMissingImplements(BaseTransform): class BadTransformMissingImplements(BaseTransform):
#__implements__ = None #__implements__ = None
inputs = ('text/*',) inputs = ('text/*',)
output = 'text/plain' output = 'text/plain'
@implementer(ITransform)
class BadTransformBadMIMEType1(BaseTransform): class BadTransformBadMIMEType1(BaseTransform):
implements(ITransform)
inputs = ('truc/muche',) inputs = ('truc/muche',)
output = 'text/plain' output = 'text/plain'
@implementer(ITransform)
class BadTransformBadMIMEType2(BaseTransform): class BadTransformBadMIMEType2(BaseTransform):
implements(ITransform)
inputs = ('text/plain',) inputs = ('text/plain',)
output = 'truc/muche' output = 'truc/muche'
@implementer(ITransform)
class BadTransformNoInput(BaseTransform): class BadTransformNoInput(BaseTransform):
implements(ITransform)
inputs = () inputs = ()
output = 'text/plain' output = 'text/plain'
@implementer(ITransform)
class BadTransformWildcardOutput(BaseTransform): class BadTransformWildcardOutput(BaseTransform):
implements(ITransform)
inputs = ('text/plain',) inputs = ('text/plain',)
output = 'text/*' output = 'text/*'
......
from __future__ import print_function from __future__ import print_function
from Products.PortalTransforms.interfaces import ITransform from Products.PortalTransforms.interfaces import ITransform
from zope.interface import implements from zope.interface import implementer
from Products.PortalTransforms.utils import log from Products.PortalTransforms.utils import log
WARNING=100 WARNING=100
@implementer(ITransform)
class BrokenTransform: class BrokenTransform:
implements(ITransform)
__name__ = "broken transform" __name__ = "broken transform"
inputs = ("BROKEN",) inputs = ("BROKEN",)
......
from Products.PortalTransforms.interfaces import ITransform from Products.PortalTransforms.interfaces import ITransform
from zope.interface import implements from zope.interface import implementer
from Products.PortalTransforms.libtransforms.utils import bodyfinder from Products.PortalTransforms.libtransforms.utils import bodyfinder
@implementer(ITransform)
class HTMLBody: class HTMLBody:
"""Simple transform which extracts the content of the body tag""" """Simple transform which extracts the content of the body tag"""
implements(ITransform)
__name__ = "html_body" __name__ = "html_body"
inputs = ('text/html',) inputs = ('text/html',)
output = "text/html" output = "text/html"
......
from Products.PortalTransforms.interfaces import ITransform from Products.PortalTransforms.interfaces import ITransform
from zope.interface import implements from zope.interface import implementer
from plone.intelligenttext.transforms import convertHtmlToWebIntelligentPlainText from plone.intelligenttext.transforms import convertHtmlToWebIntelligentPlainText
@implementer(ITransform)
class HtmlToWebIntelligentPlainText: class HtmlToWebIntelligentPlainText:
"""Transform which replaces urls and email into hyperlinks""" """Transform which replaces urls and email into hyperlinks"""
implements(ITransform)
__name__ = "html_to_web_intelligent_plain_text" __name__ = "html_to_web_intelligent_plain_text"
output = "text/x-web-intelligent" output = "text/x-web-intelligent"
......
...@@ -5,14 +5,14 @@ A simple identity transform ...@@ -5,14 +5,14 @@ A simple identity transform
__revision__ = '$Id: identity.py 4787 2005-08-19 21:43:41Z dreamcatcher $' __revision__ = '$Id: identity.py 4787 2005-08-19 21:43:41Z dreamcatcher $'
from Products.PortalTransforms.interfaces import ITransform from Products.PortalTransforms.interfaces import ITransform
from zope.interface import implements from zope.interface import implementer
@implementer(ITransform)
class IdentityTransform: class IdentityTransform:
""" Identity transform """ Identity transform
return content unchanged. return content unchanged.
""" """
implements(ITransform)
__name__ = "rest_to_text" __name__ = "rest_to_text"
......
from Products.PortalTransforms.interfaces import ITransform from Products.PortalTransforms.interfaces import ITransform
from zope.interface import implements from zope.interface import implementer
@implementer(ITransform)
class image_to_html: class image_to_html:
implements(ITransform)
__name__ = "image_to_html" __name__ = "image_to_html"
inputs = ('image/*', ) inputs = ('image/*', )
......
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
Uses lynx -dump Uses lynx -dump
""" """
from Products.PortalTransforms.interfaces import ITransform from Products.PortalTransforms.interfaces import ITransform
from zope.interface import implements from zope.interface import implementer
from Products.PortalTransforms.libtransforms.commandtransform import commandtransform from Products.PortalTransforms.libtransforms.commandtransform import commandtransform
from Products.PortalTransforms.libtransforms.commandtransform import popentransform from Products.PortalTransforms.libtransforms.commandtransform import popentransform
import os import os
@implementer(ITransform)
class lynx_dump(popentransform): class lynx_dump(popentransform):
implements(ITransform)
__name__ = "lynx_dump" __name__ = "lynx_dump"
inputs = ('text/html',) inputs = ('text/html',)
...@@ -21,8 +21,8 @@ class lynx_dump(popentransform): ...@@ -21,8 +21,8 @@ class lynx_dump(popentransform):
binaryArgs = "-dump -stdin -force_html" binaryArgs = "-dump -stdin -force_html"
useStdin = True useStdin = True
@implementer(ITransform)
class old_lynx_dump(commandtransform): class old_lynx_dump(commandtransform):
implements(ITransform)
__name__ = "lynx_dump" __name__ = "lynx_dump"
inputs = ('text/html',) inputs = ('text/html',)
......
...@@ -4,7 +4,7 @@ Uses the http://www.freewisdom.org/projects/python-markdown/ module ...@@ -4,7 +4,7 @@ Uses the http://www.freewisdom.org/projects/python-markdown/ module
Author: Tom Lazar <tom@tomster.org> at the archipelago sprint 2006 Author: Tom Lazar <tom@tomster.org> at the archipelago sprint 2006
""" """
from zope.interface import implements from zope.interface import implementer
from Products.PortalTransforms.interfaces import ITransform from Products.PortalTransforms.interfaces import ITransform
from Products.PortalTransforms.utils import log from Products.PortalTransforms.utils import log
...@@ -18,8 +18,8 @@ else: ...@@ -18,8 +18,8 @@ else:
HAS_MARKDOWN = True HAS_MARKDOWN = True
@implementer(ITransform)
class markdown: class markdown:
implements(ITransform)
__name__ = "markdown_to_html" __name__ = "markdown_to_html"
inputs = ("text/x-web-markdown",) inputs = ("text/x-web-markdown",)
......
...@@ -3,15 +3,15 @@ Uses the http://sf.net/projects/pdftohtml bin to do its handy work ...@@ -3,15 +3,15 @@ Uses the http://sf.net/projects/pdftohtml bin to do its handy work
""" """
from Products.PortalTransforms.interfaces import ITransform from Products.PortalTransforms.interfaces import ITransform
from zope.interface import implements from zope.interface import implementer
from Products.PortalTransforms.libtransforms.utils import bin_search, \ from Products.PortalTransforms.libtransforms.utils import bin_search, \
bodyfinder, sansext bodyfinder, sansext
from Products.PortalTransforms.libtransforms.commandtransform import commandtransform from Products.PortalTransforms.libtransforms.commandtransform import commandtransform
from Products.PortalTransforms.libtransforms.commandtransform import popentransform from Products.PortalTransforms.libtransforms.commandtransform import popentransform
import os import os
@implementer(ITransform)
class popen_pdf_to_html(popentransform): class popen_pdf_to_html(popentransform):
implements(ITransform)
__version__ = '2004-07-02.01' __version__ = '2004-07-02.01'
...@@ -27,8 +27,8 @@ class popen_pdf_to_html(popentransform): ...@@ -27,8 +27,8 @@ class popen_pdf_to_html(popentransform):
def getData(self, couterr): def getData(self, couterr):
return bodyfinder(couterr.read()) return bodyfinder(couterr.read())
@implementer(ITransform)
class pdf_to_html(commandtransform): class pdf_to_html(commandtransform):
implements(ITransform)
__name__ = "pdf_to_html" __name__ = "pdf_to_html"
inputs = ('application/pdf',) inputs = ('application/pdf',)
......
...@@ -4,15 +4,15 @@ Uses the xpdf (www.foolabs.com/xpdf) ...@@ -4,15 +4,15 @@ Uses the xpdf (www.foolabs.com/xpdf)
""" """
from Products.PortalTransforms.interfaces import ITransform from Products.PortalTransforms.interfaces import ITransform
from zope.interface import implements from zope.interface import implementer
from Products.PortalTransforms.libtransforms.utils import bin_search, sansext from Products.PortalTransforms.libtransforms.utils import bin_search, sansext
from Products.PortalTransforms.libtransforms.commandtransform import commandtransform from Products.PortalTransforms.libtransforms.commandtransform import commandtransform
from Products.PortalTransforms.libtransforms.commandtransform import popentransform from Products.PortalTransforms.libtransforms.commandtransform import popentransform
from Products.PortalTransforms.libtransforms.commandtransform import subprocesstransform from Products.PortalTransforms.libtransforms.commandtransform import subprocesstransform
import os import os
@implementer(ITransform)
class pdf_to_text(subprocesstransform): class pdf_to_text(subprocesstransform):
implements(ITransform)
__name__ = "pdf_to_text" __name__ = "pdf_to_text"
inputs = ('application/pdf',) inputs = ('application/pdf',)
...@@ -25,8 +25,8 @@ class pdf_to_text(subprocesstransform): ...@@ -25,8 +25,8 @@ class pdf_to_text(subprocesstransform):
binaryArgs = "-enc UTF-8 -layout -nopgbrk %(infile)s -" binaryArgs = "-enc UTF-8 -layout -nopgbrk %(infile)s -"
useStdin = False useStdin = False
@implementer(ITransform)
class old_pdf_to_text(commandtransform): class old_pdf_to_text(commandtransform):
implements(ITransform)
__name__ = "pdf_to_text" __name__ = "pdf_to_text"
inputs = ('application/pdf',) inputs = ('application/pdf',)
......
...@@ -5,10 +5,10 @@ from Products.PortalTransforms.libtransforms.commandtransform \ ...@@ -5,10 +5,10 @@ from Products.PortalTransforms.libtransforms.commandtransform \
from subprocess import Popen, PIPE from subprocess import Popen, PIPE
import os import os
import tempfile import tempfile
from zope.interface import implements from zope.interface import implementer
@implementer(ITransform)
class png_to_text(popentransform): class png_to_text(popentransform):
implements(ITransform)
__name__ = "png_to_text" __name__ = "png_to_text"
inputs = ('image/png',) inputs = ('image/png',)
......
...@@ -20,7 +20,7 @@ import keyword, token, tokenize ...@@ -20,7 +20,7 @@ import keyword, token, tokenize
from cStringIO import StringIO from cStringIO import StringIO
from Products.PortalTransforms.interfaces import ITransform from Products.PortalTransforms.interfaces import ITransform
from zope.interface import implements from zope.interface import implementer
from DocumentTemplate.DT_Util import html_quote from DocumentTemplate.DT_Util import html_quote
## Python Source Parser ##################################################### ## Python Source Parser #####################################################
...@@ -105,10 +105,10 @@ class Parser: ...@@ -105,10 +105,10 @@ class Parser:
@implementer(ITransform)
class PythonTransform: class PythonTransform:
"""Colorize Python source files """Colorize Python source files
""" """
implements(ITransform)
__name__ = "python_to_html" __name__ = "python_to_html"
inputs = ("text/x-python",) inputs = ("text/x-python",)
......
from Products.PortalTransforms.interfaces import ITransform from Products.PortalTransforms.interfaces import ITransform
from zope.interface import implements from zope.interface import implementer
from reStructuredText import HTML from reStructuredText import HTML
import sys import sys
@implementer(ITransform)
class rest: class rest:
r"""Converts from reST to HTML. r"""Converts from reST to HTML.
...@@ -41,7 +42,6 @@ class rest: ...@@ -41,7 +42,6 @@ class rest:
... print 'Failure' ... print 'Failure'
Good Good
""" """
implements(ITransform)
__name__ = "rest_to_html" __name__ = "rest_to_html"
inputs = ("text/x-rst", "text/restructured",) inputs = ("text/x-rst", "text/restructured",)
......
...@@ -3,14 +3,14 @@ Uses the http://freshmeat.net/projects/rtfconverter/ bin to do its handy work ...@@ -3,14 +3,14 @@ Uses the http://freshmeat.net/projects/rtfconverter/ bin to do its handy work
""" """
from Products.PortalTransforms.interfaces import ITransform from Products.PortalTransforms.interfaces import ITransform
from zope.interface import implements from zope.interface import implementer
from Products.PortalTransforms.libtransforms.utils import bin_search, \ from Products.PortalTransforms.libtransforms.utils import bin_search, \
bodyfinder, sansext bodyfinder, sansext
from Products.PortalTransforms.libtransforms.commandtransform import commandtransform from Products.PortalTransforms.libtransforms.commandtransform import commandtransform
import os import os
@implementer(ITransform)
class rtf_to_html(commandtransform): class rtf_to_html(commandtransform):
implements(ITransform)
__name__ = "rtf_to_html" __name__ = "rtf_to_html"
inputs = ('application/rtf',) inputs = ('application/rtf',)
......
...@@ -3,13 +3,13 @@ Uses the http://sf.net/projects/rtf2xml bin to do its handy work ...@@ -3,13 +3,13 @@ Uses the http://sf.net/projects/rtf2xml bin to do its handy work
""" """
from Products.PortalTransforms.interfaces import ITransform from Products.PortalTransforms.interfaces import ITransform
from zope.interface import implements from zope.interface import implementer
from Products.PortalTransforms.libtransforms.utils import bin_search, sansext from Products.PortalTransforms.libtransforms.utils import bin_search, sansext
from Products.PortalTransforms.libtransforms.commandtransform import commandtransform from Products.PortalTransforms.libtransforms.commandtransform import commandtransform
import os import os
@implementer(ITransform)
class rtf_to_xml(commandtransform): class rtf_to_xml(commandtransform):
implements(ITransform)
__name__ = "rtf_to_xml" __name__ = "rtf_to_xml"
inputs = ('application/rtf',) inputs = ('application/rtf',)
......
...@@ -6,7 +6,7 @@ from cgi import escape ...@@ -6,7 +6,7 @@ from cgi import escape
import codecs import codecs
from Products.PortalTransforms.interfaces import ITransform from Products.PortalTransforms.interfaces import ITransform
from zope.interface import implements from zope.interface import implementer
from Products.PortalTransforms.utils import log from Products.PortalTransforms.utils import log
from Products.PortalTransforms.libtransforms.utils import IllegalHTML from Products.PortalTransforms.libtransforms.utils import IllegalHTML
from Products.PortalTransforms.utils import safeToInt from Products.PortalTransforms.utils import safeToInt
...@@ -375,6 +375,7 @@ def scrubHTML(html, valid=VALID_TAGS, nasty=NASTY_TAGS, ...@@ -375,6 +375,7 @@ def scrubHTML(html, valid=VALID_TAGS, nasty=NASTY_TAGS,
result = result.decode(parser.original_charset).encode(default_encoding) result = result.decode(parser.original_charset).encode(default_encoding)
return result return result
@implementer(ITransform)
class SafeHTML: class SafeHTML:
"""Simple transform which uses CMFDefault functions to """Simple transform which uses CMFDefault functions to
clean potentially bad tags. clean potentially bad tags.
...@@ -392,8 +393,6 @@ class SafeHTML: ...@@ -392,8 +393,6 @@ class SafeHTML:
-> Flush Cache. -> Flush Cache.
""" """
implements(ITransform)
__name__ = "safe_html" __name__ = "safe_html"
inputs = ('text/html',) inputs = ('text/html',)
output = "text/x-html-safe" output = "text/x-html-safe"
......
from Products.PortalTransforms.interfaces import ITransform from Products.PortalTransforms.interfaces import ITransform
from zope.interface import implements from zope.interface import implementer
from zope.structuredtext import stx2html from zope.structuredtext import stx2html
DEFAULT_STX_LEVEL = 2 DEFAULT_STX_LEVEL = 2
STX_LEVEL = DEFAULT_STX_LEVEL STX_LEVEL = DEFAULT_STX_LEVEL
@implementer(ITransform)
class st: class st:
implements(ITransform)
__name__ = "st_to_html" __name__ = "st_to_html"
inputs = ("text/structured",) inputs = ("text/structured",)
......
from Products.PortalTransforms.interfaces import ITransform from Products.PortalTransforms.interfaces import ITransform
from zope.interface import implements from zope.interface import implementer
from DocumentTemplate.DT_Util import html_quote from DocumentTemplate.DT_Util import html_quote
__revision__ = '$Id: text_pre_to_html.py 3658 2005-02-23 16:29:54Z tiran $' __revision__ = '$Id: text_pre_to_html.py 3658 2005-02-23 16:29:54Z tiran $'
@implementer(ITransform)
class TextPreToHTML: class TextPreToHTML:
"""simple transform which wraps raw text into a <pre> tag""" """simple transform which wraps raw text into a <pre> tag"""
implements(ITransform)
__name__ = "text-pre_to_html" __name__ = "text-pre_to_html"
inputs = ('text/plain-pre',) inputs = ('text/plain-pre',)
output = "text/html" output = "text/html"
......
from Products.PortalTransforms.interfaces import ITransform from Products.PortalTransforms.interfaces import ITransform
from zope.interface import implements from zope.interface import implementer
from DocumentTemplate.DT_Util import html_quote from DocumentTemplate.DT_Util import html_quote
__revision__ = '$Id: text_to_html.py 4787 2005-08-19 21:43:41Z dreamcatcher $' __revision__ = '$Id: text_to_html.py 4787 2005-08-19 21:43:41Z dreamcatcher $'
@implementer(ITransform)
class TextToHTML: class TextToHTML:
"""simple transform which wrap raw text in a verbatim environment""" """simple transform which wrap raw text in a verbatim environment"""
implements(ITransform)
__name__ = "text_to_html" __name__ = "text_to_html"
output = "text/html" output = "text/html"
......
...@@ -6,7 +6,7 @@ author: Tom Lazar <tom@tomster.org> at the archipelago sprint 2006 ...@@ -6,7 +6,7 @@ author: Tom Lazar <tom@tomster.org> at the archipelago sprint 2006
""" """
import os import os
from zope.interface import implements from zope.interface import implementer
from Products.PortalTransforms.interfaces import ITransform from Products.PortalTransforms.interfaces import ITransform
from Products.PortalTransforms.libtransforms.commandtransform import commandtransform from Products.PortalTransforms.libtransforms.commandtransform import commandtransform
...@@ -24,8 +24,8 @@ else: ...@@ -24,8 +24,8 @@ else:
HAS_TEXTILE = True HAS_TEXTILE = True
@implementer(ITransform)
class textile: class textile:
implements(ITransform)
__name__ = "textile_to_html" __name__ = "textile_to_html"
inputs = ("text/x-web-textile",) inputs = ("text/x-web-textile",)
......
...@@ -6,10 +6,10 @@ from Products.PortalTransforms.libtransforms.commandtransform \ ...@@ -6,10 +6,10 @@ from Products.PortalTransforms.libtransforms.commandtransform \
import os import os
import subprocess import subprocess
import tempfile import tempfile
from zope.interface import implements from zope.interface import implementer
@implementer(ITransform)
class tiff_to_text(commandtransform): class tiff_to_text(commandtransform):
implements(ITransform)
__name__ = "tiff_to_text" __name__ = "tiff_to_text"
inputs = ('image/tiff',) inputs = ('image/tiff',)
......
...@@ -30,12 +30,12 @@ ...@@ -30,12 +30,12 @@
from Products.PortalTransforms.interfaces import ITransform from Products.PortalTransforms.interfaces import ITransform
from Products.PortalTransforms.libtransforms.commandtransform import\ from Products.PortalTransforms.libtransforms.commandtransform import\
subprocesstransform subprocesstransform
from zope.interface import implements from zope.interface import implementer
# Conversor using w3m to replace lynx at PortalTransforms... # Conversor using w3m to replace lynx at PortalTransforms...
@implementer(ITransform)
class w3m_dump(subprocesstransform): class w3m_dump(subprocesstransform):
implements(ITransform)
__name__ = "w3m_dump" __name__ = "w3m_dump"
inputs = ('text/html',) inputs = ('text/html',)
......
from Products.PortalTransforms.interfaces import ITransform from Products.PortalTransforms.interfaces import ITransform
from zope.interface import implements from zope.interface import implementer
from plone.intelligenttext.transforms import convertWebIntelligentPlainTextToHtml from plone.intelligenttext.transforms import convertWebIntelligentPlainTextToHtml
@implementer(ITransform)
class WebIntelligentPlainTextToHtml: class WebIntelligentPlainTextToHtml:
"""Transform which replaces urls and email into hyperlinks""" """Transform which replaces urls and email into hyperlinks"""
implements(ITransform)
__name__ = "web_intelligent_plain_text_to_html" __name__ = "web_intelligent_plain_text_to_html"
output = "text/html" output = "text/html"
......
from __future__ import absolute_import from __future__ import absolute_import
from Products.PortalTransforms.interfaces import ITransform from Products.PortalTransforms.interfaces import ITransform
from zope.interface import implements from zope.interface import implementer
EXTRACT_BODY = 1 EXTRACT_BODY = 1
EXTRACT_STYLE = 0 EXTRACT_STYLE = 0
...@@ -31,8 +31,8 @@ else: ...@@ -31,8 +31,8 @@ else:
import os.path import os.path
@implementer(ITransform)
class word_to_html: class word_to_html:
implements(ITransform)
__name__ = "word_to_html" __name__ = "word_to_html"
inputs = ('application/msword',) inputs = ('application/msword',)
......
from Products.PortalTransforms.interfaces import ITransform from Products.PortalTransforms.interfaces import ITransform
from zope.interface import implements from zope.interface import implementer
from lxml import etree from lxml import etree
@implementer(ITransform)
class xml_to_text: class xml_to_text:
implements(ITransform)
__name__ = 'xml_to_text' __name__ = 'xml_to_text'
inputs = ('text/xml', 'application/xml') inputs = ('text/xml', 'application/xml')
......
...@@ -7,11 +7,12 @@ __revision__ = '$Id: command.py 4439 2005-06-15 16:32:36Z panjunyong $' ...@@ -7,11 +7,12 @@ __revision__ = '$Id: command.py 4439 2005-06-15 16:32:36Z panjunyong $'
import os.path import os.path
from os import popen3 from os import popen3
from Products.PortalTransforms.interfaces import ITransform from Products.PortalTransforms.interfaces import ITransform
from zope.interface import implements from zope.interface import implementer
from Products.PortalTransforms.libtransforms.utils import bin_search, sansext from Products.PortalTransforms.libtransforms.utils import bin_search, sansext
from Products.PortalTransforms.libtransforms.commandtransform import commandtransform from Products.PortalTransforms.libtransforms.commandtransform import commandtransform
from Products.PortalTransforms.utils import log from Products.PortalTransforms.utils import log
@implementer(ITransform)
class ExternalCommandTransform(commandtransform): class ExternalCommandTransform(commandtransform):
""" Custom external command """ Custom external command
...@@ -21,7 +22,6 @@ class ExternalCommandTransform(commandtransform): ...@@ -21,7 +22,6 @@ class ExternalCommandTransform(commandtransform):
the command line parameters) and return output on stdout. the command line parameters) and return output on stdout.
Input and output mime types must be set correctly ! Input and output mime types must be set correctly !
""" """
implements(ITransform)
__name__ = "command_transform" __name__ = "command_transform"
......
...@@ -11,11 +11,12 @@ from os import popen3, popen4, system ...@@ -11,11 +11,12 @@ from os import popen3, popen4, system
from cStringIO import StringIO from cStringIO import StringIO
from Products.PortalTransforms.interfaces import ITransform from Products.PortalTransforms.interfaces import ITransform
from zope.interface import implements from zope.interface import implementer
from Products.PortalTransforms.libtransforms.utils import bin_search, sansext from Products.PortalTransforms.libtransforms.utils import bin_search, sansext
from Products.PortalTransforms.libtransforms.commandtransform import commandtransform from Products.PortalTransforms.libtransforms.commandtransform import commandtransform
from Products.PortalTransforms.utils import log from Products.PortalTransforms.utils import log
@implementer(ITransform)
class XsltTransform(commandtransform): class XsltTransform(commandtransform):
""" Custom external command """ Custom external command
...@@ -25,7 +26,6 @@ class XsltTransform(commandtransform): ...@@ -25,7 +26,6 @@ class XsltTransform(commandtransform):
You can associate different document type to different transformations. You can associate different document type to different transformations.
""" """
implements(ITransform)
__name__ = "xml_to_html" __name__ = "xml_to_html"
......
...@@ -33,7 +33,7 @@ import itertools ...@@ -33,7 +33,7 @@ import itertools
from zLOG import LOG, WARNING, INFO from zLOG import LOG, WARNING, INFO
from .interfaces.column_map import IColumnMap from .interfaces.column_map import IColumnMap
from zope.interface.verify import verifyClass from zope.interface.verify import verifyClass
from zope.interface import implements from zope.interface import implementer
from Products.ZSQLCatalog.interfaces.column_map import IColumnMap from Products.ZSQLCatalog.interfaces.column_map import IColumnMap
from Products.ZSQLCatalog.TableDefinition import (PlaceHolderTableDefinition, from Products.ZSQLCatalog.TableDefinition import (PlaceHolderTableDefinition,
TableAlias, TableAlias,
...@@ -52,10 +52,9 @@ MAPPING_TRACE = False ...@@ -52,10 +52,9 @@ MAPPING_TRACE = False
re_sql_as = re.compile("\s+AS\s[^)]+$", re.IGNORECASE | re.MULTILINE) re_sql_as = re.compile("\s+AS\s[^)]+$", re.IGNORECASE | re.MULTILINE)
@implementer(IColumnMap)
class ColumnMap(object): class ColumnMap(object):
implements(IColumnMap)
def __init__(self, def __init__(self,
catalog_table_name=None, catalog_table_name=None,
table_override_map=None, table_override_map=None,
......
...@@ -33,7 +33,7 @@ from DateTime import DateTime ...@@ -33,7 +33,7 @@ from DateTime import DateTime
from Products.ZSQLCatalog.interfaces.operator import IOperator from Products.ZSQLCatalog.interfaces.operator import IOperator
from Products.ZSQLCatalog.Utils import sqlquote as escapeString from Products.ZSQLCatalog.Utils import sqlquote as escapeString
from zope.interface.verify import verifyClass from zope.interface.verify import verifyClass
from zope.interface import implements from zope.interface import implementer
def valueFloatRenderer(value): def valueFloatRenderer(value):
if isinstance(value, basestring): if isinstance(value, basestring):
...@@ -98,10 +98,9 @@ column_renderer = { ...@@ -98,10 +98,9 @@ column_renderer = {
'float': columnFloatRenderer 'float': columnFloatRenderer
} }
@implementer(IOperator)
class OperatorBase(object): class OperatorBase(object):
implements(IOperator)
def __init__(self, operator, operator_search_text=None): def __init__(self, operator, operator_search_text=None):
self.operator = operator self.operator = operator
if operator_search_text is None: if operator_search_text is None:
......
...@@ -30,15 +30,14 @@ ...@@ -30,15 +30,14 @@
from Products.ZSQLCatalog.interfaces.query import IQuery from Products.ZSQLCatalog.interfaces.query import IQuery
from zope.interface.verify import verifyClass from zope.interface.verify import verifyClass
from zope.interface import implements from zope.interface import implementer
@implementer(IQuery)
class Query(object): class Query(object):
""" """
This is the base class of all kind of queries. Its only purpose is to be This is the base class of all kind of queries. Its only purpose is to be
able to distinguish any kind of value from a query. able to distinguish any kind of value from a query.
""" """
implements(IQuery)
__allow_access_to_unprotected_subobjects__ = 1 __allow_access_to_unprotected_subobjects__ = 1
def asSQLExpression(self, sql_catalog, column_map, only_group_columns): def asSQLExpression(self, sql_catalog, column_map, only_group_columns):
......
...@@ -33,7 +33,7 @@ from Products.ZSQLCatalog.Query.SimpleQuery import SimpleQuery ...@@ -33,7 +33,7 @@ from Products.ZSQLCatalog.Query.SimpleQuery import SimpleQuery
from Products.ZSQLCatalog.Query.ComplexQuery import ComplexQuery from Products.ZSQLCatalog.Query.ComplexQuery import ComplexQuery
from Products.ZSQLCatalog.interfaces.search_key import ISearchKey from Products.ZSQLCatalog.interfaces.search_key import ISearchKey
from zope.interface.verify import verifyClass from zope.interface.verify import verifyClass
from zope.interface import implements from zope.interface import implementer
from Products.ZSQLCatalog.SQLCatalog import list_type_list from Products.ZSQLCatalog.SQLCatalog import list_type_list
single_operator_dict = { single_operator_dict = {
...@@ -75,10 +75,9 @@ operator_value_deprocessor_dict = { ...@@ -75,10 +75,9 @@ operator_value_deprocessor_dict = {
numeric_type_set = (long, float) # get mapped to int, so do not mention it numeric_type_set = (long, float) # get mapped to int, so do not mention it
@implementer(ISearchKey)
class SearchKey(object): class SearchKey(object):
implements(ISearchKey)
# Comparison operator to use when parsing a string value and no operator is # Comparison operator to use when parsing a string value and no operator is
# found. # found.
# Note: for non-string values, "=" is always used by default. # Note: for non-string values, "=" is always used by default.
......
...@@ -14,7 +14,7 @@ import zipfile ...@@ -14,7 +14,7 @@ import zipfile
import StringIO import StringIO
import types import types
from zope.interface import implements from zope.interface import implementer
from AccessControl.SecurityInfo import ClassSecurityInfo from AccessControl.SecurityInfo import ClassSecurityInfo
from App.class_init import InitializeClass from App.class_init import InitializeClass
...@@ -107,6 +107,7 @@ def _recurseFSTestCases( result, prefix, fsobjs ): ...@@ -107,6 +107,7 @@ def _recurseFSTestCases( result, prefix, fsobjs ):
, info , info
) )
@implementer(IZuite)
class Zuite( OrderedFolder ): class Zuite( OrderedFolder ):
""" TTW-manageable browser test suite """ TTW-manageable browser test suite
...@@ -123,8 +124,6 @@ class Zuite( OrderedFolder ): ...@@ -123,8 +124,6 @@ class Zuite( OrderedFolder ):
) )
) )
implements(IZuite)
test_case_metatypes = ( 'File' test_case_metatypes = ( 'File'
, 'Page Template' , 'Page Template'
) )
......
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