8 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
8 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
9 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS |
9 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS |
10 # FOR A PARTICULAR PURPOSE. |
10 # FOR A PARTICULAR PURPOSE. |
11 # |
11 # |
12 |
12 |
13 __docformat__ = 'restructuredtext' |
|
14 |
|
15 from persistent import Persistent |
13 from persistent import Persistent |
16 from zope.container.contained import Contained |
14 from zope.container.contained import Contained |
17 from zope.interface import implementer, provider |
15 from zope.interface import implementer, provider |
18 from zope.schema.fieldproperty import FieldProperty |
16 from zope.schema.fieldproperty import FieldProperty |
19 |
17 |
20 from pyams_content.component.illustration.interfaces import IIllustrationTarget, ILinkIllustrationTarget |
18 from pyams_content.component.illustration.interfaces import IIllustrationTarget, \ |
|
19 ILinkIllustrationTarget |
21 from pyams_content.component.paragraph.interfaces import IParagraphContainerTarget |
20 from pyams_content.component.paragraph.interfaces import IParagraphContainerTarget |
22 from pyams_content.component.theme.interfaces import ICollectionsTarget, ITagsTarget, IThemesTarget |
21 from pyams_content.component.theme.interfaces import ICollectionsTarget, ITagsTarget, IThemesTarget |
23 from pyams_content.features.preview.interfaces import IPreviewTarget |
22 from pyams_content.features.preview.interfaces import IPreviewTarget |
24 from pyams_content.features.review.interfaces import IReviewTarget |
23 from pyams_content.features.review.interfaces import IReviewTarget |
25 from pyams_content.shared.common import SharedContent, register_content_type |
24 from pyams_content.shared.common import SharedContent, WfSharedContent, register_content_type |
26 from pyams_content.shared.common.interfaces import IWfSharedContentFactory |
25 from pyams_content.shared.common.interfaces import IWfSharedContentFactory |
27 from pyams_content.shared.common.types import WfTypedSharedContent |
26 from pyams_content.shared.common.types import WfTypedSharedContentMixin |
28 from pyams_content.shared.resource.interfaces import IResource, IResourceInfo, IWfResource, IWfResourceFactory, \ |
27 from pyams_content.shared.resource.interfaces import IResource, IResourceInfo, IWfResource, \ |
29 RESOURCE_CONTENT_NAME, RESOURCE_CONTENT_TYPE, RESOURCE_INFO_ANNOTATIONS_KEY |
28 IWfResourceFactory, RESOURCE_CONTENT_NAME, RESOURCE_CONTENT_TYPE, RESOURCE_INFO_ANNOTATIONS_KEY |
30 from pyams_content.shared.resource.schema import IAgeRange |
29 from pyams_content.shared.resource.schema import IAgeRange |
31 from pyams_utils.adapter import adapter_config, get_annotation_adapter |
30 from pyams_utils.adapter import adapter_config, get_annotation_adapter |
32 from pyams_utils.factory import factory_config |
31 from pyams_utils.factory import factory_config |
33 |
32 |
34 |
33 |
|
34 __docformat__ = 'restructuredtext' |
|
35 |
|
36 |
35 @implementer(IWfResource, IIllustrationTarget, ILinkIllustrationTarget, IParagraphContainerTarget, |
37 @implementer(IWfResource, IIllustrationTarget, ILinkIllustrationTarget, IParagraphContainerTarget, |
36 ITagsTarget, ICollectionsTarget, IThemesTarget, IPreviewTarget, IReviewTarget) |
38 ITagsTarget, ICollectionsTarget, IThemesTarget, IPreviewTarget, IReviewTarget) |
37 class WfResource(WfTypedSharedContent): |
39 class WfResource(WfSharedContent, WfTypedSharedContentMixin): |
38 """Resource class""" |
40 """Resource class""" |
39 |
41 |
40 content_type = RESOURCE_CONTENT_TYPE |
42 content_type = RESOURCE_CONTENT_TYPE |
41 content_name = RESOURCE_CONTENT_NAME |
43 content_name = RESOURCE_CONTENT_NAME |
42 |
44 |