[CMF-checkins] SVN: CMF/trunk/CMFDefault/interfaces/_content.py -
Add content interfaces for link objects.
Tres Seaver
tseaver at palladion.com
Fri Sep 30 18:53:50 EDT 2005
Log message for revision 38708:
- Add content interfaces for link objects.
Changed:
U CMF/trunk/CMFDefault/interfaces/_content.py
-=-
Modified: CMF/trunk/CMFDefault/interfaces/_content.py
===================================================================
--- CMF/trunk/CMFDefault/interfaces/_content.py 2005-09-30 18:13:25 UTC (rev 38707)
+++ CMF/trunk/CMFDefault/interfaces/_content.py 2005-09-30 22:53:49 UTC (rev 38708)
@@ -16,15 +16,14 @@
"""
from zope.interface import Interface
+from zope.interface import Attribute
class IDocument(Interface):
-
""" Textual content, in one of several formats.
o Allowed formats include: structured text, HTML, plain text.
"""
-
def CookedBody():
""" Get the "cooked" (ready for presentation) form of the text.
"""
@@ -35,13 +34,32 @@
class IMutableDocument(IDocument):
-
""" Updatable form of IDocument.
"""
-
def edit(text_format, text, file='', safety_belt=''):
""" Update the document.
o 'safety_belt', if passed, must match the value issued when the edit
began.
"""
+
+
+class ILink(Interface):
+ """ URL as content.
+ """
+ def getRemoteUrl():
+ """ Return the URL to which the link points, as a string.
+ """
+
+
+class IMutableLink(ILink):
+
+ """ Updatable form of ILink.
+ """
+ def edit(remote_url):
+ """ Update the link.
+
+ o 'remote_url' should be a URL in an RFC-compatible form.
+
+ o If 'remote_url' is unparseable by urllib, raise ValueError.
+ """
More information about the CMF-checkins
mailing list