[Checkins] SVN: GenericSetup/trunk/ - added demo product
Yvo Schubbe
y.2006_ at wcm-solutions.de
Mon Jun 12 04:46:54 EDT 2006
Log message for revision 68596:
- added demo product
Changed:
U GenericSetup/trunk/CHANGES.txt
A GenericSetup/trunk/doc/SampleSite/
A GenericSetup/trunk/doc/SampleSite/README.txt
A GenericSetup/trunk/doc/SampleSite/__init__.py
A GenericSetup/trunk/doc/SampleSite/configure.zcml
A GenericSetup/trunk/doc/SampleSite/exportimport.py
A GenericSetup/trunk/doc/SampleSite/profiles/
A GenericSetup/trunk/doc/SampleSite/profiles/default/
A GenericSetup/trunk/doc/SampleSite/profiles/default/export_steps.xml
A GenericSetup/trunk/doc/SampleSite/profiles/default/import_steps.xml
A GenericSetup/trunk/doc/SampleSite/profiles/default/rolemap.xml
A GenericSetup/trunk/doc/SampleSite/profiles/default/siteroot/
A GenericSetup/trunk/doc/SampleSite/profiles/default/siteroot/bar.py
A GenericSetup/trunk/doc/SampleSite/profiles/default/siteroot/catalog.xml
A GenericSetup/trunk/doc/SampleSite/profiles/default/siteroot/foo.xml
A GenericSetup/trunk/doc/SampleSite/profiles/default/siteroot/index_html.pt
A GenericSetup/trunk/doc/SampleSite/profiles/default/siteroot/mailhost.xml
A GenericSetup/trunk/doc/SampleSite/profiles/default/siteroot.xml
-=-
Modified: GenericSetup/trunk/CHANGES.txt
===================================================================
--- GenericSetup/trunk/CHANGES.txt 2006-06-12 08:01:55 UTC (rev 68595)
+++ GenericSetup/trunk/CHANGES.txt 2006-06-12 08:46:53 UTC (rev 68596)
@@ -2,6 +2,8 @@
GenericSetup 1.2 (unreleased)
+ - docs: Added SampleSite demo product.
+
- ProfileRegistry: Added 'registerProfile' ZCML directive.
Using the old registerProfile method in initialize() is now deprecated.
See doc/profiles.txt for details.
Added: GenericSetup/trunk/doc/SampleSite/README.txt
===================================================================
--- GenericSetup/trunk/doc/SampleSite/README.txt 2006-06-12 08:01:55 UTC (rev 68595)
+++ GenericSetup/trunk/doc/SampleSite/README.txt 2006-06-12 08:46:53 UTC (rev 68596)
@@ -0,0 +1,29 @@
+Sample Zope Site
+
+ This is just an example for setting up some basic Zope objects. It doesn't
+ create a useful Zope site. If you want to give it a try you first have to
+ install this demo product by copying it to the Products folder of your
+ INSTANCE_HOME.
+
+ Please note that the setup steps shipped with this sample product are not
+ compatible with 'toolset' or many third party setup steps.
+
+ Creating your sample site:
+
+ 1. Add a 'Folder' named 'mySite'.
+
+ 2. Add a 'Generic Setup Tool' inside of 'mySite'.
+
+ 3. Go to the Properties tab of 'setup_tool', select 'Sample Zope Site'
+ site configuration and make it active by pushing 'Update'.
+
+ 4. Go to the Import tab of 'setup_tool' and 'Import all steps'. Done.
+
+ You can also use this to create a snapshot of an existing plain Zope site:
+
+ 1. Add a 'Generic Setup Tool' inside the root of your site.
+
+ 2. Go to the Properties tab of 'setup_tool', select 'Sample Zope Site'
+ site configuration and make it active by pushing 'Update'.
+
+ 3. Go to the Snapshots tab and push 'Create a Snapshot'. Done.
Property changes on: GenericSetup/trunk/doc/SampleSite/README.txt
___________________________________________________________________
Name: svn:eol-style
+ native
Added: GenericSetup/trunk/doc/SampleSite/__init__.py
===================================================================
--- GenericSetup/trunk/doc/SampleSite/__init__.py 2006-06-12 08:01:55 UTC (rev 68595)
+++ GenericSetup/trunk/doc/SampleSite/__init__.py 2006-06-12 08:46:53 UTC (rev 68596)
@@ -0,0 +1,16 @@
+##############################################################################
+#
+# Copyright (c) 2006 Zope Corporation and Contributors. All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (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.
+#
+##############################################################################
+"""Sample Zope Site for GenericSetup.
+
+$Id$
+"""
Property changes on: GenericSetup/trunk/doc/SampleSite/__init__.py
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Added: GenericSetup/trunk/doc/SampleSite/configure.zcml
===================================================================
--- GenericSetup/trunk/doc/SampleSite/configure.zcml 2006-06-12 08:01:55 UTC (rev 68595)
+++ GenericSetup/trunk/doc/SampleSite/configure.zcml 2006-06-12 08:46:53 UTC (rev 68596)
@@ -0,0 +1,14 @@
+<configure
+ xmlns="http://namespaces.zope.org/zope"
+ xmlns:genericsetup="http://namespaces.zope.org/genericsetup"
+ i18n_domain="genericsetup">
+
+ <!-- profiles -->
+
+ <genericsetup:registerProfile
+ name="default"
+ title="Sample Zope Site"
+ description="Shows how GenericSetup creates generic Zope objects."
+ />
+
+</configure>
Property changes on: GenericSetup/trunk/doc/SampleSite/configure.zcml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: GenericSetup/trunk/doc/SampleSite/exportimport.py
===================================================================
--- GenericSetup/trunk/doc/SampleSite/exportimport.py 2006-06-12 08:01:55 UTC (rev 68595)
+++ GenericSetup/trunk/doc/SampleSite/exportimport.py 2006-06-12 08:46:53 UTC (rev 68596)
@@ -0,0 +1,56 @@
+##############################################################################
+#
+# Copyright (c) 2006 Zope Corporation and Contributors. All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (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.
+#
+##############################################################################
+"""SampleSite setup handlers.
+
+$Id$
+"""
+
+from zope.component import queryMultiAdapter
+
+from Products.GenericSetup.interfaces import IBody
+from Products.GenericSetup.interfaces import ISetupTool
+from Products.GenericSetup.utils import exportObjects
+from Products.GenericSetup.utils import importObjects
+
+_PATH = 'siteroot'
+
+
+def importSite(context):
+ """Import site configuration.
+ """
+ site = context.getSite()
+ importer = queryMultiAdapter((site, context), IBody)
+ if importer:
+ body = context.readDataFile(_PATH+'.xml')
+ if body is not None:
+ importer.body = body
+
+ for sub in site.objectValues():
+ if ISetupTool.providedBy(sub):
+ continue
+ importObjects(sub, _PATH+'/', context)
+
+def exportSite(context):
+ """Export site configuration.
+ """
+ site = context.getSite()
+ exporter = queryMultiAdapter((site, context), IBody)
+ if exporter:
+ body = exporter.body
+ if body is not None:
+ context.writeDataFile(_PATH+'.xml', body, exporter.mime_type)
+
+ for sub in site.objectValues():
+ if ISetupTool.providedBy(sub):
+ continue
+ exportObjects(sub, _PATH+'/', context)
Property changes on: GenericSetup/trunk/doc/SampleSite/exportimport.py
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Added: GenericSetup/trunk/doc/SampleSite/profiles/default/export_steps.xml
===================================================================
--- GenericSetup/trunk/doc/SampleSite/profiles/default/export_steps.xml 2006-06-12 08:01:55 UTC (rev 68595)
+++ GenericSetup/trunk/doc/SampleSite/profiles/default/export_steps.xml 2006-06-12 08:46:53 UTC (rev 68596)
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<export-steps>
+ <export-step id="rolemap"
+ handler="Products.GenericSetup.rolemap.exportRolemap"
+ title="Role / Permission Map">
+ Export custom roles and non-default role-permission mappings.
+ </export-step>
+ <export-step id="site"
+ handler="Products.SampleSite.exportimport.exportSite"
+ title="Site">
+ Export site configuration.
+ </export-step>
+ <export-step id="step_registries"
+ handler="Products.GenericSetup.tool.exportStepRegistries"
+ title="Step Registries">
+ Export current contents of import step registry and export step registry.
+ </export-step>
+</export-steps>
Property changes on: GenericSetup/trunk/doc/SampleSite/profiles/default/export_steps.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: GenericSetup/trunk/doc/SampleSite/profiles/default/import_steps.xml
===================================================================
--- GenericSetup/trunk/doc/SampleSite/profiles/default/import_steps.xml 2006-06-12 08:01:55 UTC (rev 68595)
+++ GenericSetup/trunk/doc/SampleSite/profiles/default/import_steps.xml 2006-06-12 08:46:53 UTC (rev 68596)
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<import-steps>
+ <import-step id="rolemap" version="20060606-01"
+ handler="Products.GenericSetup.rolemap.importRolemap"
+ title="Role / Permission Map">
+ Import custom roles and non-default role-permission mappings.
+ </import-step>
+ <import-step id="site" version="20060606-01"
+ handler="Products.SampleSite.exportimport.importSite"
+ title="Site">
+ Import site configuration.
+ </import-step>
+</import-steps>
Property changes on: GenericSetup/trunk/doc/SampleSite/profiles/default/import_steps.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: GenericSetup/trunk/doc/SampleSite/profiles/default/rolemap.xml
===================================================================
--- GenericSetup/trunk/doc/SampleSite/profiles/default/rolemap.xml 2006-06-12 08:01:55 UTC (rev 68595)
+++ GenericSetup/trunk/doc/SampleSite/profiles/default/rolemap.xml 2006-06-12 08:46:53 UTC (rev 68596)
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<rolemap>
+ <roles>
+ <role name="Anonymous"/>
+ <role name="Authenticated"/>
+ <role name="Manager"/>
+ <role name="Owner"/>
+ </roles>
+ <permissions>
+
+ </permissions>
+</rolemap>
Property changes on: GenericSetup/trunk/doc/SampleSite/profiles/default/rolemap.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: GenericSetup/trunk/doc/SampleSite/profiles/default/siteroot/bar.py
===================================================================
--- GenericSetup/trunk/doc/SampleSite/profiles/default/siteroot/bar.py 2006-06-12 08:01:55 UTC (rev 68595)
+++ GenericSetup/trunk/doc/SampleSite/profiles/default/siteroot/bar.py 2006-06-12 08:46:53 UTC (rev 68596)
@@ -0,0 +1,22 @@
+## Script (Python) "bar.py"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=Sample Script
+##
+# Example code:
+
+# Import a standard function, and get the HTML request and response objects.
+from Products.PythonScripts.standard import html_quote
+request = container.REQUEST
+RESPONSE = request.RESPONSE
+
+# Return a string identifying this script.
+print "This is the", script.meta_type, '"%s"' % script.getId(),
+if script.title:
+ print "(%s)" % html_quote(script.title),
+print "in", container.absolute_url()
+return printed
Property changes on: GenericSetup/trunk/doc/SampleSite/profiles/default/siteroot/bar.py
___________________________________________________________________
Name: svn:eol-style
+ native
Added: GenericSetup/trunk/doc/SampleSite/profiles/default/siteroot/catalog.xml
===================================================================
--- GenericSetup/trunk/doc/SampleSite/profiles/default/siteroot/catalog.xml 2006-06-12 08:01:55 UTC (rev 68595)
+++ GenericSetup/trunk/doc/SampleSite/profiles/default/siteroot/catalog.xml 2006-06-12 08:46:53 UTC (rev 68596)
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<object name="ZCatalog" meta_type="ZCatalog">
+ <property name="title">Sample Catalog</property>
+ <object name="plaintext_lexicon" meta_type="ZCTextIndex Lexicon">
+ <element name="Whitespace splitter" group="Word Splitter"/>
+ <element name="Case Normalizer" group="Case Normalizer"/>
+ <element name="Remove listed stop words only" group="Stop Words"/>
+ </object>
+ <index name="path" meta_type="PathIndex"/>
+ <index name="title" meta_type="ZCTextIndex">
+ <indexed_attr value="title"/>
+ <extra name="index_type" value="Okapi BM25 Rank"/>
+ <extra name="lexicon_id" value="plaintext_lexicon"/>
+ </index>
+ <column value="getId"/>
+ <column value="title"/>
+</object>
Property changes on: GenericSetup/trunk/doc/SampleSite/profiles/default/siteroot/catalog.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: GenericSetup/trunk/doc/SampleSite/profiles/default/siteroot/foo.xml
===================================================================
--- GenericSetup/trunk/doc/SampleSite/profiles/default/siteroot/foo.xml 2006-06-12 08:01:55 UTC (rev 68595)
+++ GenericSetup/trunk/doc/SampleSite/profiles/default/siteroot/foo.xml 2006-06-12 08:46:53 UTC (rev 68596)
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<object name="foo" meta_type="Folder">
+ <property name="title">Sample Folder</property>
+</object>
Property changes on: GenericSetup/trunk/doc/SampleSite/profiles/default/siteroot/foo.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: GenericSetup/trunk/doc/SampleSite/profiles/default/siteroot/index_html.pt
===================================================================
--- GenericSetup/trunk/doc/SampleSite/profiles/default/siteroot/index_html.pt 2006-06-12 08:01:55 UTC (rev 68595)
+++ GenericSetup/trunk/doc/SampleSite/profiles/default/siteroot/index_html.pt 2006-06-12 08:46:53 UTC (rev 68596)
@@ -0,0 +1,13 @@
+<html>
+ <head>
+ <title tal:content="template/title">The title</title>
+ </head>
+ <body>
+
+ <h2><span tal:replace="here/title_or_id">content title or id</span>
+ <span tal:condition="template/title"
+ tal:replace="template/title">optional template title</span></h2>
+
+ This is Page Template <em tal:content="template/id">template id</em>.
+ </body>
+</html>
Property changes on: GenericSetup/trunk/doc/SampleSite/profiles/default/siteroot/index_html.pt
___________________________________________________________________
Name: svn:eol-style
+ native
Added: GenericSetup/trunk/doc/SampleSite/profiles/default/siteroot/mailhost.xml
===================================================================
--- GenericSetup/trunk/doc/SampleSite/profiles/default/siteroot/mailhost.xml 2006-06-12 08:01:55 UTC (rev 68595)
+++ GenericSetup/trunk/doc/SampleSite/profiles/default/siteroot/mailhost.xml 2006-06-12 08:46:53 UTC (rev 68596)
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<object name="MailHost" meta_type="Mail Host" smtp_host="localhost"
+ smtp_port="25" smtp_pwd="" smtp_uid=""/>
Property changes on: GenericSetup/trunk/doc/SampleSite/profiles/default/siteroot/mailhost.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: GenericSetup/trunk/doc/SampleSite/profiles/default/siteroot.xml
===================================================================
--- GenericSetup/trunk/doc/SampleSite/profiles/default/siteroot.xml 2006-06-12 08:01:55 UTC (rev 68595)
+++ GenericSetup/trunk/doc/SampleSite/profiles/default/siteroot.xml 2006-06-12 08:46:53 UTC (rev 68596)
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<object name="siteroot" meta_type="Folder">
+ <property name="title">Sample Zope Site</property>
+ <object name="MailHost" meta_type="Mail Host"/>
+ <object name="ZCatalog" meta_type="ZCatalog"/>
+ <object name="bar" meta_type="Script (Python)"/>
+ <object name="foo" meta_type="Folder"/>
+ <object name="index_html" meta_type="Page Template"/>
+</object>
Property changes on: GenericSetup/trunk/doc/SampleSite/profiles/default/siteroot.xml
___________________________________________________________________
Name: svn:eol-style
+ native
More information about the Checkins
mailing list