#
# Copyright (c) 2008-2015 Thierry Florac <tflorac AT ulthar.net>
# 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.
#
__docformat__ = 'restructuredtext'
from zope.interface import Interface, invariant, Invalid
from zope.schema import Bool, Choice
from pyams_sequence.schema import InternalReferenceField
from pyams_thesaurus.interfaces.thesaurus import IThesaurusContextManager, IThesaurusContextManagerTarget
from pyams_thesaurus.schema import ThesaurusTermsListField
from pyams_content import _
#
# Tags management
#
TAGS_MANAGER_KEY = 'pyams_content.tags.manager'
TAGS_INFO_KEY = 'pyams_content.tags.info'
PORTLET_SETTINGS_TAGS_KEY = 'pyams_content.portlet.tags.settings'
#
# Themes management
#
THEMES_MANAGER_KEY = 'pyams_content.themes.manager'
THEMES_INFO_KEY = 'pyams_content.themes.info'
[docs]class IThemesManager(IThesaurusContextManager):
"""Themes manager interface"""
[docs]class IThemesManagerTarget(IThesaurusContextManagerTarget):
"""Marker interface for tools managing themes"""
[docs]class IThemesInfo(Interface):
"""Themes information interface"""
themes = ThesaurusTermsListField(title=_("Themes"),
required=False)
[docs]class IThemesTarget(Interface):
"""Themes target interface"""
PORTLET_SETTINGS_THEMES_KEY = 'pyams_content.portlet.themes.settings'
[docs]class IPortletThemesSettings(Interface):
"""Interface for portlet settings managing themes"""
themes = ThesaurusTermsListField(title=_("Themes"),
required=False)
[docs]class IPortletThemesSettingsTarget(Interface):
"""Marker interface for portlet settings managing themes"""
#
# Collections management
#
COLLECTIONS_MANAGER_KEY = 'pyams_content.collections.manager'
COLLECTIONS_INFO_KEY = 'pyams_content.collections.info'
[docs]class ICollectionsManager(IThesaurusContextManager):
"""Collections manager interface"""
[docs]class ICollectionsManagerTarget(IThesaurusContextManagerTarget):
"""Marker interface for tools managing collections"""
[docs]class ICollectionsInfo(Interface):
"""Collections information interface"""
collections = ThesaurusTermsListField(title=_("Collections"),
required=False)
[docs]class ICollectionsTarget(Interface):
"""Collections target interface"""
PORTLET_SETTINGS_COLLECTIONS_KEY = 'pyams_content.portlet.collections.settings'
[docs]class IPortletCollectionsSettings(Interface):
"""Interface for portlet settings managing collections"""
collections = ThesaurusTermsListField(title=_("Collections"),
required=False)
[docs]class IPortletCollectionsSettingsTarget(Interface):
"""Marker interface for portlet settings managing collections"""