Back to index

plone3  3.1.7
resource.py
Go to the documentation of this file.
00001 from zope.interface import implements
00002 from interfaces import (
00003     IKSSDemo,
00004     IKSSSeleniumTestDirectory,
00005     )
00006 
00007 # --
00008 # Reference implementations for the described elements
00009 # They are designed to be passive
00010 # --
00011 
00012 class KSSDemo(object):
00013     """Represents a demo.
00014     """
00015     implements(IKSSDemo)
00016     def __init__(self, plugin_namespace, category, page_url, title, description=None, helpfile=None, packageName=None):
00017         self.plugin_namespace = plugin_namespace
00018         self.category = category
00019         self.page_url = page_url
00020         self.title = title
00021         self.description = description
00022         if not packageName:
00023             helpfile = None
00024         self.helpfile = helpfile
00025         self.packageName = packageName
00026 
00027     # convenience access for page templates
00028     __allow_access_to_unprotected_subobjects__ = 1
00029     def __getitem__(self, key):
00030         return getattr(self, key)
00031 
00032 class KSSSeleniumTestDirectory(object):
00033     """Represents a selenium test directory.
00034     """
00035     implements(IKSSSeleniumTestDirectory)
00036     def __init__(self, test_directory):
00037         self.test_directory = test_directory
00038 
00039     # convenience access for page templates
00040     __allow_access_to_unprotected_subobjects__ = 1
00041     def __getitem__(self, key):
00042         return getattr(self, key)
00043 
00044