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

- declare interface implementation for ERP5 messages


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29313 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f1c120eb
......@@ -26,13 +26,19 @@
#
##############################################################################
import zope.interface
from Products.PythonScripts.Utility import allow_class
from Products.ERP5Type.ObjectMessage import ObjectMessage
from Products.ERP5Type import interfaces
class ConsistencyMessage(ObjectMessage):
"""
Consistency Message is used for notifications to user after checkConsistency.
"""
zope.interface.implements( interfaces.IConsistencyMessage, )
def __init__(self, constraint, object_relative_url='',
message='', mapping = {}, **kw):
"""
......@@ -59,13 +65,6 @@ class ConsistencyMessage(ObjectMessage):
else:
return self.getTranslatedMessage()
def fix(self):
"""
Fix constraint
XXX to be implemented
"""
pass
def __repr__(self):
return "<ERP5Type.ConsistencyMessage for %s on %s (message: %s)>" % (
self.class_name, self.object_relative_url, self.getTranslatedMessage())
......
......@@ -25,9 +25,12 @@
#
##############################################################################
import zope.interface
from Products.PythonScripts.Utility import allow_class
from Products.ERP5Type.ObjectMessage import ObjectMessage
from zLOG import LOG, PROBLEM, INFO
from Products.ERP5Type import interfaces
class DivergenceMessage(ObjectMessage):
"""
......@@ -56,6 +59,9 @@ class DivergenceMessage(ObjectMessage):
* message
User understandable message about divergence
"""
zope.interface.implements( interfaces.IDivergenceMessage, )
def getMovementGroup(self):
"""Returns movement group of a builder which was responsible for generating tested_property"""
divergence_scope = getattr(self, 'divergence_scope', None)
......
......@@ -26,12 +26,18 @@
#
##############################################################################
import zope.interface
from Products.PythonScripts.Utility import allow_class
from Products.ERP5Type import interfaces
class ObjectMessage:
"""
Object Message is used for notifications to user.
"""
zope.interface.implements( interfaces.IObjectMessage, )
def __init__(self, object_relative_url='', message='', mapping={}, **kw):
self.object_relative_url = object_relative_url
......
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