Ejemplo n.º 1
0
# -*- coding: utf-8 -*-
# Copyright (c) 2011-2013 RelationWare, Benno Luthiger. All rights reserved.
# See also LICENSE.txt
from silva.core import conf as silvaconf
from silva.core.conf.installer import DefaultInstaller
from zope.interface import Interface

_extensionName = "RwLayout"
silvaconf.extensionName(_extensionName)
silvaconf.extensionTitle("RelationWare Layout")
silvaconf.extensionDepends(("SilvaDocument", "SilvaExternalSources"))

from Products.PythonScripts.Utility import allow_module
allow_module('Products.RwLayout.helpers')


class IExtension(Interface):
    '''
    RwLayout Extension
    '''

class RwLayoutInstaller(DefaultInstaller):

    def install_custom(self, root):
        pass
    
    def uninstall_custom(self, root):
        pass
    
install = RwLayoutInstaller(_extensionName, IExtension)
Ejemplo n.º 2
0
from silva.core.conf.installer import DefaultInstaller
from zope.interface import Interface
from Products.SilvaExternalSources.CodeSourceService import INSTALLERS

from Products.RwCSCollection.code_source.configure import code_sources, code_sources_derived

pjoin = os.path.join
_fs_cs_path = pjoin(package_home(globals()), 'code_source', 'plain')
_cs_prefix = 'cs_rw_'
    
logger = logging.getLogger('Products.RwCSCollection')

_extensionName = "RwCSCollection"
silvaconf.extensionName(_extensionName)
silvaconf.extensionTitle("RelationWare Code Sources")
silvaconf.extensionDepends(["RwLayout", "SilvaExternalSources"])   
_cs_service = 'service_codesources'

class IExtension(Interface):
    '''
    RwCSCollection Extension
    '''

class RwCSCollectionInstaller(DefaultInstaller):
    def install_custom(self, root):
        install_code_sources(root, _fs_cs_path, code_sources, code_sources_derived)
    
    def uninstall_custom(self, root):
        delete_code_sources(root, code_sources_derived)
        delete_code_sources(root, code_sources)
Ejemplo n.º 3
0
# -*- coding: utf-8 -*-
# Copyright (c) 2012 RelationWare. All rights reserved.
# See also LICENSE.txt

from zope.interface import Interface
from silva.core.conf.installer import DefaultInstaller
from silva.core import conf as silvaconf

# from Products.Silva.install import add_fss_directory_view
from Products.Silva import roleinfo

_extensionName = "StaticSite"
_meta_type = "Static Site"
silvaconf.extensionName(_extensionName)
silvaconf.extensionTitle("Static Site")
silvaconf.extensionDepends(["Silva"])


class IExtension(Interface):
    """
    StaticSite Extension
    """


class StaticSiteInstaller(DefaultInstaller):
    def install_custom(self, root):
        # TODO
        # add_fss_directory_view(
        #    root.service_views, _extensionName, __file__, 'views')
        # also register views
        # registerViews(root.service_view_registry)
Ejemplo n.º 4
0
# See also LICENSE.txt

import AccessControl

#from Products.SilvaExternalSources import install
from zope.interface import Interface
from silva.core.conf.installer import DefaultInstaller

from silva.core import conf as silvaconf

from Products.SilvaPhotoGallery.configuration import cs_container, dft_id, dft_title

_extensionName = "SilvaPhotoGallery"
silvaconf.extensionName(_extensionName)
silvaconf.extensionTitle('Silva Photo Gallery')
silvaconf.extensionDepends(["SilvaExternalSources"])


class IExtension(Interface):
    '''
    SilvaPhotoGallery Extension
    '''

class GalleryInstaller(DefaultInstaller):
    def install_custom(self, root):
        folder = getattr(root, cs_container, root)
        if hasattr(folder.aq_inner.aq_explicit, dft_id):
            return
        constructor = getattr(folder.manage_addProduct['SilvaPhotoGallery'], 'manage_addPhotoGallery')
        if constructor:
            constructor(dft_id, dft_title)
Ejemplo n.º 5
0
import os

# Zope
#TODO: package_home is deprecated, import from App.Common instead
from Globals import package_home
from zope.interface import Interface

# Silva
from silva.core.conf.installer import DefaultInstaller

from silva.core import conf as silvaconf

_extensionName = "RelationsLayout"
silvaconf.extensionName(_extensionName)
silvaconf.extensionTitle('Relations Layout')
silvaconf.extensionDepends('RwLayout')

pjoin = os.path.join

metadatasets = [('relations-layout', 'relations.xml', 
                     ('Silva Root', 'Silva Publication')),
               ]

class IExtension(Interface):
    '''
    RelationsLayout Extension
    '''

class RelationsLayoutInstaller(DefaultInstaller):

    def install_custom(self, root):