Commit 949917dc authored by Nicolas Delaby's avatar Nicolas Delaby

deprecate fromText Methods

parent 8d745dfe
......@@ -31,6 +31,7 @@ from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5Type.Base import Base
from Products.ERP5Type.Utils import deprecated
from Products.CMFDefault.utils import formatRFC822Headers
import re
......@@ -136,9 +137,9 @@ class Coordinate(Base):
calls asText
"""
return self.asText()
security.declareProtected( Permissions.ModifyPortalContent, 'fromText' )
@deprecated
def fromText(self, coordinate_text):
"""
modifies the coordinate according to the input text
......
......@@ -30,6 +30,7 @@ from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type.Base import Base
from Products.ERP5Type.Utils import deprecated
from Products.ERP5.Document.Coordinate import Coordinate
......@@ -80,6 +81,7 @@ class GeographicAddress(Coordinate, Base):
return result
security.declareProtected(Permissions.ModifyPortalContent, 'fromText')
@deprecated
def fromText(self, coordinate_text):
"""
Tries to recognize the coordinate_text to update
......
......@@ -31,6 +31,7 @@ from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type.Base import Base
from Products.ERP5Type.Utils import convertToUpperCase
from Products.ERP5Type.Utils import deprecated
from Products.ERP5.Document.Coordinate import Coordinate
......@@ -72,6 +73,7 @@ class InternetProtocolAddress(Base, Coordinate):
result = '\n'.join(tmp)
return result
@deprecated
def fromText(self, coordinate_text):
"""
Try to import data from text.
......
......@@ -30,6 +30,7 @@ from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type.Base import Base
from Products.ERP5Type.Utils import deprecated
from Products.ERP5.Document.Coordinate import Coordinate
import re
......
......@@ -31,6 +31,7 @@ from AccessControl import ClassSecurityInfo
from Products.CMFCore.utils import getToolByName
from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type.Base import Base
from Products.ERP5Type.Utils import deprecated
from Products.ERP5.Document.Coordinate import Coordinate
from Products.ERP5.mixin.url import UrlMixin, no_crawl_protocol_list,\
no_host_protocol_list, default_protocol_dict
......@@ -71,6 +72,7 @@ class Url(Coordinate, Base, UrlMixin):
return self.getUrlString()
security.declareProtected(Permissions.ModifyPortalContent, 'fromText')
@deprecated
def fromText(self, text):
"""
Sets url_string a.k.a. scheme-specific-part of a 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