[Zope3-checkins] CVS: Zope3/src/zope/app/onlinehelp - interfaces.py:1.1 __init__.py:1.14 configure.zcml:1.7

Philipp von Weitershausen philikon at philikon.de
Fri Feb 27 11:15:55 EST 2004


Update of /cvs-repository/Zope3/src/zope/app/onlinehelp
In directory cvs.zope.org:/tmp/cvs-serv16018/onlinehelp

Modified Files:
	__init__.py configure.zcml 
Added Files:
	interfaces.py 
Log Message:
Centralized the onlinehelp facility, its browser views/skins and its
interfaces in zope.app.onlinehelp.


=== Added File Zope3/src/zope/app/onlinehelp/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.
#
##############################################################################
"""OnlineHelp Interfaces

These are the interfaces designed for the OnlineHelp system.

$Id: interfaces.py,v 1.1 2004/02/27 16:15:24 philikon Exp $
"""
from zope.app.interfaces.container import IContainer


class IOnlineHelpTopic(IContainer):
    """A Topic is one help page that you could view. Topics will be able to
    contain other Topics and so on.

    You can also associate a Topic with a particular view.
    
    The Topic's content can be in the following three forms:
    Plain Text, HTML and Structured Text (STX). The Content is usually
    stored in a file and not the Topic itself. The file is only read
    when required.
    
    Note that all the Sub-Topic management is done by the IContainer
    interface. 
    """

    def setTitle(title):
        """Set the title of the Topic."""
        
    def getTitle():
        """Get the title of the Topic."""

    def setContentPath(filename, doc_type="stx"):
        """Tell the Topic where it can find"""

    def getContent():
        """Get the content of the Topic's file and return it. If the contents
        is STX or Plain Text, the content is processed to HTML at this
        point."""

        
class IOnlineHelp(IOnlineHelpTopic):
    """This service manages all the HelpTopics."""

    def getTopicsForInterfaceAndView(interface=None, view=None):
        """Returns a list of Topics that were registered to be
        applicable to a particular view of an interface."""

    def registerHelpTopic(parent_path, title, doc_path, doc_type, 
                          interface=None, view=None):
        """This method registers a topic at the correct place.

           parent_path -- Location of this topic's parent in the OnlineHelp
           tree.

           title -- Specifies title of the topic. This title will be used in
           the tree as Identification.

           doc_path -- Specifies where the file that contains the topic
           content is located.

           doc_type -- Defines the type of document this topic will
           be. Examples (not necessarily available) are: TXT, reST, HTML

           interface -- Name of the interface for which the help topic is
           being registered. This can be optional, since not all topics must
           be bound to a particular interface.

           view -- This attribute specifies the name of the view for which
           this topic is registered. Note that this attribute is also
           optional.
        """


=== Zope3/src/zope/app/onlinehelp/__init__.py 1.13 => 1.14 ===
--- Zope3/src/zope/app/onlinehelp/__init__.py:1.13	Sun Sep 21 13:32:31 2003
+++ Zope3/src/zope/app/onlinehelp/__init__.py	Fri Feb 27 11:15:24 2004
@@ -25,7 +25,7 @@
 from zope.app.interfaces.traversing import IContainmentRoot
 from zope.app.traversing import traverse
 
-from zope.app.interfaces.onlinehelp import IOnlineHelpTopic, IOnlineHelp
+from zope.app.onlinehelp.interfaces import IOnlineHelpTopic, IOnlineHelp
 from zope.interface import implements
 
 class OnlineHelpTopic(SampleContainer):


=== Zope3/src/zope/app/onlinehelp/configure.zcml 1.6 => 1.7 ===
--- Zope3/src/zope/app/onlinehelp/configure.zcml:1.6	Sun Aug  3 15:08:30 2003
+++ Zope3/src/zope/app/onlinehelp/configure.zcml	Fri Feb 27 11:15:24 2004
@@ -7,12 +7,12 @@
   <content class="zope.app.onlinehelp.OnlineHelpTopic">
     <require
         permission="zope.View"
-        interface="zope.app.interfaces.onlinehelp.IOnlineHelpTopic" />
+        interface="zope.app.onlinehelp.interfaces.IOnlineHelpTopic" />
   </content>
 
   <!-- Setup OnlineHelp as Service -->
   <serviceType id="OnlineHelp" 
-               interface="zope.app.interfaces.onlinehelp.IOnlineHelp" />
+               interface="zope.app.onlinehelp.interfaces.IOnlineHelp" />
 
   <service serviceType="OnlineHelp"
       permission="zope.Public"
@@ -34,5 +34,10 @@
       id = "onlinehelp"
       title = "Online help system"
       doc_path = "./README.txt" />
+
+
+  <!-- include browser package -->
+
+  <include package=".browser" />
     
 </configure>




More information about the Zope3-Checkins mailing list