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

deprecate fromText Methods

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