[Zope-CVS] CVS: Products/PageDesign - interfaces.py:1.1 BrokenPageElement.py:1.3 ElementReference.py:1.4 PageDesign.py:1.14 RawFile.py:1.3 SimpleItemAsElement.py:1.3 Slot.py:1.7 SlotElementClipboardSource.py:1.4 SlotElementClipboardTarget.py:1.4 SlotNameCollector.py:1.2 SlotProvider.py:1.3 IClipboardSource.py:NONE IClipboardTarget.py:NONE IElementReference.py:NONE IIndexedSlot.py:NONE IPageElement.py:NONE ISlot.py:NONE ISlotProvider.py:NONE

Shane Hathaway shane at zope.com
Thu Sep 18 14:13:23 EDT 2003


Update of /cvs-repository/Products/PageDesign
In directory cvs.zope.org:/tmp/cvs-serv14709

Modified Files:
	BrokenPageElement.py ElementReference.py PageDesign.py 
	RawFile.py SimpleItemAsElement.py Slot.py 
	SlotElementClipboardSource.py SlotElementClipboardTarget.py 
	SlotNameCollector.py SlotProvider.py 
Added Files:
	interfaces.py 
Removed Files:
	IClipboardSource.py IClipboardTarget.py IElementReference.py 
	IIndexedSlot.py IPageElement.py ISlot.py ISlotProvider.py 
Log Message:
Consolidated all interfaces into one file

=== Added File Products/PageDesign/interfaces.py ===
##############################################################################
#
# Copyright (c) 2002 Zope Corporation and Contributors.
# All Rights Reserved.
# 
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
# 
##############################################################################


from Interface import Interface

class IClipboardSource(Interface):

    def cut():
        """Removes object(s) from containers, returning the list of objects.
        """

    #def copy():
    #    """Belongs here too but I don't need it yet. ;-)"""


class IClipboardTarget(Interface):

    def paste(objects):
        """Adds the given objects to the container."""


class IElementReference (Interface):

    def dereference():
        """Returns an IPageElement."""

    def afterAdd():
        """Updates the reference after adding or moving."""

    def beforeDelete():
        """Updates the reference before deleting or moving."""


class ISlot (Interface):

    def single():
        """Renders as a single-element slot, returning a string."""

    def multiple():
        """Renders as a multiple-element slot, returning a list of strings."""



class IIndexedSlot(ISlot):

    def getElementCount():
        """Returns the number of elements currently in the slot.
        """

    def getElementReference(index):
        """Returns the IElementReference at the specified index.
        """

    def track(index):
        """Returns an insertion point tracker.

        The insertion point will be updated as items are added or
        removed from this slot, ensuring that elements are later inserted
        where the user expected.
        """

    def untrack(ipt):
        """Disconnects an insertion point tracker, returning its index.
        """

    def insert(index, refs):
        """Inserts IElementReferences at the specified index.

        If index is an insertion point tracker (as returned by track()),
        the tracker will be disconnected and its current value will be
        used as the index.

        If index is None, the references will be appended to the end.
        """

    def remove(refs):
        """Removes element references.
        """


class ISlotProvider (Interface):
    """The aq_parent should be the page design object."""

    def __getitem__(name):
        """Returns an object that implements ISlot.

        The slot might be created on the fly and not stored.
        """

    def _persistSlot(slot):
        """Ensures the slot is linked into the database.
        """

    def _isEditable():
        """
        """

    def _getLayeredProvider():
        """
        """


class IPageElement (Interface):

    def render(design, editable, index, slot_name):
        """Returns a string.
        """

    def getTitle():
        """Returns the title of this element.
        """

    def getIconURL():
        """Returns the URL to an icon for this element if any.
        """

    def getEditURL():
        """Returns the URL for editing this element.

        Returns None or a blank string if it is not editable.
        """




=== Products/PageDesign/BrokenPageElement.py 1.2 => 1.3 ===
--- Products/PageDesign/BrokenPageElement.py:1.2	Thu Feb 27 11:55:40 2003
+++ Products/PageDesign/BrokenPageElement.py	Thu Sep 18 14:13:21 2003
@@ -12,7 +12,7 @@
 # 
 ##############################################################################
 
-from IPageElement import IPageElement
+from interfaces import IPageElement
 
 
 class BrokenPageElement:


=== Products/PageDesign/ElementReference.py 1.3 => 1.4 ===
--- Products/PageDesign/ElementReference.py:1.3	Wed Mar  5 15:01:55 2003
+++ Products/PageDesign/ElementReference.py	Thu Sep 18 14:13:21 2003
@@ -19,8 +19,7 @@
 from Persistence import Persistent
 from OFS.Traversable import Traversable
 
-from IElementReference import IElementReference
-from IPageElement import IPageElement
+from interfaces import IElementReference, IPageElement
 from SimpleItemAsElement import SimpleItemAsElement
 from BrokenPageElement import BrokenPageElement
 


=== Products/PageDesign/PageDesign.py 1.13 => 1.14 ===
--- Products/PageDesign/PageDesign.py:1.13	Wed Mar  5 15:09:24 2003
+++ Products/PageDesign/PageDesign.py	Thu Sep 18 14:13:21 2003
@@ -38,9 +38,7 @@
 from RawFile import RawFile
 from SlotProvider import SlotProvider
 from ElementReference import ElementReference
-from ISlotProvider import ISlotProvider
-from IClipboardSource import IClipboardSource
-from IClipboardTarget import IClipboardTarget
+from interfaces import ISlotProvider, IClipboardSource, IClipboardTarget
 
 # Permission name
 change_page_designs = 'Change Page Designs'


=== Products/PageDesign/RawFile.py 1.2 => 1.3 ===
--- Products/PageDesign/RawFile.py:1.2	Mon Aug 12 10:39:29 2002
+++ Products/PageDesign/RawFile.py	Thu Sep 18 14:13:21 2003
@@ -96,3 +96,4 @@
         RESPONSE.setHeader('Content-Type', self.content_type)
         RESPONSE.setHeader('Last-Modified', self.lmh)
         return ''
+


=== Products/PageDesign/SimpleItemAsElement.py 1.2 => 1.3 ===
--- Products/PageDesign/SimpleItemAsElement.py:1.2	Thu Feb 27 11:55:40 2003
+++ Products/PageDesign/SimpleItemAsElement.py	Thu Sep 18 14:13:21 2003
@@ -15,7 +15,7 @@
 from Acquisition import aq_base, aq_get, aq_inner, aq_parent
 from OFS.Application import Application
 
-from IPageElement import IPageElement
+from interfaces import IPageElement
 
 
 class SimpleItemAsElement:


=== Products/PageDesign/Slot.py 1.6 => 1.7 ===
--- Products/PageDesign/Slot.py:1.6	Wed Jun 18 16:37:07 2003
+++ Products/PageDesign/Slot.py	Thu Sep 18 14:13:21 2003
@@ -27,9 +27,7 @@
 from AccessControl import ClassSecurityInfo
 from OFS.Traversable import Traversable
 
-from IIndexedSlot import IIndexedSlot
-from IPageElement import IPageElement
-from IElementReference import IElementReference
+from interfaces import IIndexedSlot, IPageElement, IElementReference
 from SlotElementClipboardSource import SlotElementClipboardSource
 from SlotElementClipboardTarget \
      import SlotElementClipboardTarget, SlotElementClipboardLastTarget


=== Products/PageDesign/SlotElementClipboardSource.py 1.3 => 1.4 ===
--- Products/PageDesign/SlotElementClipboardSource.py:1.3	Thu Aug 15 20:29:35 2002
+++ Products/PageDesign/SlotElementClipboardSource.py	Thu Sep 18 14:13:21 2003
@@ -17,9 +17,7 @@
 import Globals
 from Acquisition import aq_base, aq_inner, aq_parent
 from AccessControl import ClassSecurityInfo
-from IClipboardSource import IClipboardSource
-from IIndexedSlot import IIndexedSlot
-from IElementReference import IElementReference
+from interfaces import IClipboardSource, IIndexedSlot, IElementReference
 
 # Permission name
 change_page_designs = 'Change Page Designs'


=== Products/PageDesign/SlotElementClipboardTarget.py 1.3 => 1.4 ===
--- Products/PageDesign/SlotElementClipboardTarget.py:1.3	Thu Aug 15 20:29:35 2002
+++ Products/PageDesign/SlotElementClipboardTarget.py	Thu Sep 18 14:13:21 2003
@@ -16,8 +16,7 @@
 import Globals
 from Acquisition import aq_base, aq_inner, aq_parent
 from AccessControl import ClassSecurityInfo
-from IClipboardTarget import IClipboardTarget
-from IIndexedSlot import IIndexedSlot
+from interfaces import IClipboardTarget, IIndexedSlot
 
 # Permission name
 change_page_designs = 'Change Page Designs'


=== Products/PageDesign/SlotNameCollector.py 1.1 => 1.2 ===
--- Products/PageDesign/SlotNameCollector.py:1.1	Sat Aug  3 15:46:10 2002
+++ Products/PageDesign/SlotNameCollector.py	Thu Sep 18 14:13:21 2003
@@ -15,6 +15,7 @@
 
 import Acquisition
 from AccessControl import ClassSecurityInfo
+from interfaces import ISlot, ISlotProvider
 
 
 class MockSlot:


=== Products/PageDesign/SlotProvider.py 1.2 => 1.3 ===
--- Products/PageDesign/SlotProvider.py:1.2	Mon Aug 12 10:39:29 2002
+++ Products/PageDesign/SlotProvider.py	Thu Sep 18 14:13:21 2003
@@ -18,7 +18,7 @@
 from AccessControl import ClassSecurityInfo
 from OFS.Traversable import Traversable
 
-from ISlotProvider import ISlotProvider
+from interfaces import ISlotProvider
 from Slot import Slot
 
 

=== Removed File Products/PageDesign/IClipboardSource.py ===

=== Removed File Products/PageDesign/IClipboardTarget.py ===

=== Removed File Products/PageDesign/IElementReference.py ===

=== Removed File Products/PageDesign/IIndexedSlot.py ===

=== Removed File Products/PageDesign/IPageElement.py ===

=== Removed File Products/PageDesign/ISlot.py ===

=== Removed File Products/PageDesign/ISlotProvider.py ===




More information about the Zope-CVS mailing list