# -*- coding: utf-8 # Copyright 2007 by Meelis Mets from Products.CMFCore.utils import getToolByName from Products.Archetypes.Extensions.utils import install_subskin, installTypes from Products.Archetypes.public import listTypes from StringIO import StringIO import string from Products.Psyhvel.config import GLOBALS, PROJECT_NAME, STIMULUS_LIST, TASK_LIST, TEST_LIST def install(self): """ install. """ out = StringIO() install_subskin(self, out, GLOBALS) installTypes(self, out, listTypes(PROJECT_NAME), PROJECT_NAME) pftool = getToolByName(self, 'portal_factory') pftool.manage_setPortalFactoryTypes(listOfTypeIds=STIMULUS_LIST+TASK_LIST+TEST_LIST) return out.getvalue() def uninstall(self): """ uninstall """ out = StringIO() return out.getvalue()