Added base site management classes
authorThierry Florac <thierry.florac@onf.fr>
Mon, 20 Jun 2016 12:24:49 +0200
changeset 41 48aa4de90de2
parent 40 ef0e560a8699
child 42 bcb01961928e
Added base site management classes
src/pyams_content/shared/site/__init__.py
src/pyams_content/shared/site/interfaces/__init__.py
src/pyams_content/shared/site/zmi/__init__.py
src/pyams_content/site/__init__.py
src/pyams_content/site/interfaces/__init__.py
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_content/shared/site/__init__.py	Mon Jun 20 12:24:49 2016 +0200
@@ -0,0 +1,41 @@
+#
+# 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'
+
+
+# import standard library
+
+# import interfaces
+from pyams_content.shared.common.interfaces import ISharedSite
+from zope.schema.interfaces import IVocabularyFactory
+
+# import packages
+from pyams_utils.container import BTreeOrderedContainer
+from zope.componentvocabulary.vocabulary import UtilityVocabulary
+from zope.interface import provider, implementer
+from zope.schema.vocabulary import getVocabularyRegistry
+
+
+@implementer(ISharedSite)
+class SharedSite(BTreeOrderedContainer):
+    """Shared site persistent class"""
+
+
+@provider(IVocabularyFactory)
+class SharedSiteVocabulary(UtilityVocabulary):
+    """Shared sites vocabulary"""
+
+    interface = ISharedSite
+    nameOnly = True
+
+getVocabularyRegistry().register('PyAMS shared sites', SharedSiteVocabulary)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_content/shared/site/interfaces/__init__.py	Mon Jun 20 12:24:49 2016 +0200
@@ -0,0 +1,20 @@
+#
+# 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'
+
+
+# import standard library
+
+# import interfaces
+
+# import packages
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_content/shared/site/zmi/__init__.py	Mon Jun 20 12:24:49 2016 +0200
@@ -0,0 +1,20 @@
+#
+# 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'
+
+
+# import standard library
+
+# import interfaces
+
+# import packages
--- a/src/pyams_content/site/__init__.py	Mon Jun 20 12:24:28 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-#
-# 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'
-
-
-# import standard library
-
-# import interfaces
-from pyams_content.site.interfaces import ISite
-from zope.schema.interfaces import IVocabularyFactory
-
-# import packages
-from pyams_utils.container import BTreeOrderedContainer
-from zope.componentvocabulary.vocabulary import UtilityVocabulary
-from zope.interface import provider, implementer
-from zope.schema.vocabulary import getVocabularyRegistry
-
-
-@implementer(ISite)
-class Site(BTreeOrderedContainer):
-    """Site persistent class"""
-
-
-@provider(IVocabularyFactory)
-class SiteVocabulary(UtilityVocabulary):
-    """Sites vocabulary"""
-
-    interface = ISite
-    nameOnly = True
-
-getVocabularyRegistry().register('PyAMS content sites', SiteVocabulary)
--- a/src/pyams_content/site/interfaces/__init__.py	Mon Jun 20 12:24:28 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-#
-# 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'
-
-
-# import standard library
-
-# import interfaces
-
-# import packages
-from zope.interface import Interface
-
-
-class ISite(Interface):
-    """Site interface"""