Commit 7fd9f29f authored by Łukasz Nowak's avatar Łukasz Nowak

- follow rule for interfaces - one interface per file


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29309 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1616e677
......@@ -34,7 +34,8 @@ from Globals import InitializeClass
from Products.PythonScripts.Utility import allow_class
from AccessControl import ClassSecurityInfo
from Products.ERP5.interfaces.transformation import IAggregatedAmountList
from Products.ERP5.interfaces.aggregated_amount_list \
import IAggregatedAmountList
class AggregatedAmountList(UserList):
"""
......
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2009 Nexedi SA and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
# Łukasz Nowak <luke@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly advised to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from zope.interface import Interface
try:
from zope.interface.common.sequence import ISequence
except ImportError:
# ISequence does not exists in old zope.interface versions
class ISequence(Interface):
pass
class IAggregatedAmountList(ISequence):
"""An Aggregated Amount List is a list of amounts aggregated together.
It is a sequence of objects implementing IAmount interface.
"""
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2009 Nexedi SARL and Contributors. All Rights Reserved.
# Łukasz Nowak <luke@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly advised to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from zope.interface import Interface
class IDeliverySolver(Interface):
"""Solves quantity values between delivery line and related simulation movements"""
# placeholder to define
pass
......@@ -5,10 +5,10 @@
# Łukasz Nowak <luke@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# guarantees and support are strongly advised to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
......@@ -37,13 +37,3 @@ class IDivergenceSolver(Interface):
decision_list is list of instances of DivergenceSolutionDecision class
"""
class IDeliverySolver(Interface):
"""Solves quantity values between delivery line and related simulation movements"""
# placeholder to define
pass
class ITargetSolver(Interface):
"""Solves changes of properties up to simulation tree with taking proper decisions"""
# placeholder to define
pass
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2009 Nexedi SARL and Contributors. All Rights Reserved.
# Łukasz Nowak <luke@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly advised to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from zope.interface import Interface
class ITargetSolver(Interface):
"""Solves changes of properties up to simulation tree with taking proper decisions"""
# placeholder to define
pass
......@@ -30,14 +30,6 @@
from zope.interface import Interface
try:
from zope.interface.common.sequence import ISequence
except ImportError:
# ISequence does not exists in old zope.interface versions
class ISequence(Interface):
pass
class ITransformation(Interface):
"""
Common Interface to implementing querying of indirect amount
......@@ -82,11 +74,3 @@ class ITransformation(Interface):
* movement_to_delete_list - a list of movements from movement_list or from the
context that shall be deleted.
"""
class IAggregatedAmountList(ISequence):
"""An Aggregated Amount List is a list of amounts aggregated together.
It is a sequence of objects implementing IAmount interface.
"""
......@@ -64,7 +64,8 @@ class TestERP5Interfaces(ERP5TypeTestCase):
def test_AggregatedAmountList_implements_IAggregatedAmountList(self):
# AggregatedAmountList is not a document
from Products.ERP5.interfaces.transformation import IAggregatedAmountList
from Products.ERP5.interfaces.aggregated_amount_list \
import IAggregatedAmountList
from Products.ERP5.AggregatedAmountList import AggregatedAmountList
verifyClass(IAggregatedAmountList, AggregatedAmountList)
......
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