<?xml version="1.0"?>
<ZopeData>
  <record id="1" aka="AAAAAAAAAAE=">
    <pickle>
      <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
    </pickle>
    <pickle>
      <dictionary>
        <item>
            <key> <string>Script_magic</string> </key>
            <value> <int>3</int> </value>
        </item>
        <item>
            <key> <string>_bind_names</string> </key>
            <value>
              <object>
                <klass>
                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
                </klass>
                <tuple/>
                <state>
                  <dictionary>
                    <item>
                        <key> <string>_asgns</string> </key>
                        <value>
                          <dictionary>
                            <item>
                                <key> <string>name_container</string> </key>
                                <value> <string>container</string> </value>
                            </item>
                            <item>
                                <key> <string>name_context</string> </key>
                                <value> <string>context</string> </value>
                            </item>
                            <item>
                                <key> <string>name_m_self</string> </key>
                                <value> <string>script</string> </value>
                            </item>
                            <item>
                                <key> <string>name_subpath</string> </key>
                                <value> <string>traverse_subpath</string> </value>
                            </item>
                          </dictionary>
                        </value>
                    </item>
                  </dictionary>
                </state>
              </object>
            </value>
        </item>
        <item>
            <key> <string>_body</string> </key>
            <value> <string>""" Run this next bt5 install. Make Vifib ready to use.\n
Keyword: \n
pattern -- Object are search with id=pattern (default:"vifib_%", string)"""\n
\n
\n
print "Installation start"\n
print "Pattern use is " + pattern\n
\n
web_page_list = context.portal_catalog(portal_type="Web Page", id=pattern, validation_state="draft")\n
for web_page in web_page_list:\n
    web_page.publish(message)\n
    print "%s is published" % (web_page.getRelativeUrl())\n
\n
#validate notification message\n
notification_message_list = context.portal_catalog(portal_type="Notification Message", id=pattern, validation_state="draft")\n
for notification_message in notification_message_list:\n
    notification_message.validate(message)\n
    print "%s is validated" % (notification_message.getRelativeUrl())\n
\n
#Test Support Organisation\n
support_org_list = context.portal_catalog(portal_type="Organisation",\n
                                           reference=\'vifib-support\', \n
                                           validation_state="validated")\n
print "Update of state is finished"\n
\n
if len(support_org_list) == 0:\n
  print "A Organisation with reference egal to \'vifib-support\' and with validation state egal to \'validated\' is needed"\n
elif len(support_org_list) == 1:\n
  print "Organisation for support found"\n
else:\n
  print "Many support organisation found. Please have only one validated organisation with reference \'vifib-support\'"\n
\n
\n
print "Please make sure that each websections of website are in good state (publish or protected)"\n
print "Installation is finished"\n
return printed\n
</string> </value>
        </item>
        <item>
            <key> <string>_params</string> </key>
            <value> <string>pattern = "vifib_%",message="Publish on website install"</string> </value>
        </item>
        <item>
            <key> <string>id</string> </key>
            <value> <string>WebSite_install</string> </value>
        </item>
      </dictionary>
    </pickle>
  </record>
</ZopeData>
