interfaces.py :  » Content-Management-Systems » Silva » trunk » Python Open Source

Home
Python Open Source
1.3.1.2 Python
2.Ajax
3.Aspect Oriented
4.Blog
5.Build
6.Business Application
7.Chart Report
8.Content Management Systems
9.Cryptographic
10.Database
11.Development
12.Editor
13.Email
14.ERP
15.Game 2D 3D
16.GIS
17.GUI
18.IDE
19.Installer
20.IRC
21.Issue Tracker
22.Language Interface
23.Log
24.Math
25.Media Sound Audio
26.Mobile
27.Network
28.Parser
29.PDF
30.Project Management
31.RSS
32.Search
33.Security
34.Template Engines
35.Test
36.UML
37.USB Serial
38.Web Frameworks
39.Web Server
40.Web Services
41.Web Unit
42.Wiki
43.Windows
44.XML
Python Open Source » Content Management Systems » Silva 
Silva » trunk » interfaces.py
# Copyright (c) 2002-2010 Infrae. All rights reserved.
# See also LICENSE.txt
# $Id: interfaces.py 39073 2010-01-15 10:08:33Z sylvain $

from silva.core.interfaces import ISilvaService
from zope.interface import Interface

# FIXME: I think it's useless
#from AccessControl import ModuleSecurityInfo
#__allow_access_to_unprotected_subobjects__ = 1
#module_security = ModuleSecurityInfo('Products.SilvaExternalSources.interfaces')


class ICodeSourceService(ISilvaService):
    """Code source service.
    """

class IExternalSource(Interface):
    """ Access to an external source of data.
    """

    # ACCESSORS

    def form():
        """ Returns a Formulator form or None if not applicable.

        This Formulator form is used in the Silva Document 'external data'
        document element to render the parameters UI.
        """
        pass

    def to_html(REQUEST, **kw):
        """ Returns the HTML for inclusion in the rendered Silva HTML.
        """
        pass

    def to_xml(REQUEST, **kw):
        """ Returns XML for this source for inclusion in exported Silva XML.

        NOTE: The use of this feature is not yet fully defined!

        """
        pass

    def is_cacheable(**kw):
        """ Returns the cacheability (true or false) for this source.

        Silva Document atempts to cache the public rendering. If a document
        references this external source, it will check for its cachability.
        If the data from this source can be cached this source will only be
        called once.
        """
        pass

    def data_encoding():
        """ Returns the encoding of source's data.

        Silva expects unicode for its document data. This parameter
        specifies the encoding of the original data so it can be properly
        converted to unicode when passing the data to the Silva Document.

        NOTE: This is usually only used *within* the external source
        implementation.
        """
        pass

    def description():
        """ Returns the purpose of this external source.

        The description is shown in the 'external data' element's editor.
        It can contain a description of the use of its parameters and the
        what data is will render in the document.
        """
        pass

    def get_title(self):
        """Returns the title of this instance.
        """
        pass
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.