Commit 3c252fbb authored by Ivan Tyagov's avatar Ivan Tyagov

Type in mixin class name. Do not use alias.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@37168 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a4305cfa
...@@ -59,7 +59,7 @@ from Products.ERP5.mixin.cached_convertable import CachedConvertableMixin ...@@ -59,7 +59,7 @@ from Products.ERP5.mixin.cached_convertable import CachedConvertableMixin
from Products.ERP5.mixin.text_convertable import TextConvertableMixin from Products.ERP5.mixin.text_convertable import TextConvertableMixin
from Products.ERP5.mixin.downloadable import DownloadableMixin from Products.ERP5.mixin.downloadable import DownloadableMixin
from Products.ERP5.mixin.document import DocumentMixin from Products.ERP5.mixin.document import DocumentMixin
from Products.ERP5.mixin.extensible_traversable import DocumentExtensibleTraversableMixIn from Products.ERP5.mixin.extensible_traversable import DocumentExtensibleTraversableMixin
from Products.ERP5.mixin.crawable import CrawableMixin from Products.ERP5.mixin.crawable import CrawableMixin
_MARKER = [] _MARKER = []
...@@ -131,7 +131,7 @@ class DocumentProxyError(Exception):pass ...@@ -131,7 +131,7 @@ class DocumentProxyError(Exception):pass
class NotConvertedError(Exception):pass class NotConvertedError(Exception):pass
allow_class(NotConvertedError) allow_class(NotConvertedError)
class Document(DocumentExtensibleTraversableMixIn, XMLObject, UrlMixIn, CachedConvertableMixin, class Document(DocumentExtensibleTraversableMixin, XMLObject, UrlMixIn, CachedConvertableMixin,
SnapshotMixin, CrawableMixin, TextConvertableMixin, SnapshotMixin, CrawableMixin, TextConvertableMixin,
DownloadableMixin, DocumentMixin): DownloadableMixin, DocumentMixin):
"""Document is an abstract class with all methods related to document """Document is an abstract class with all methods related to document
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5.Document.Domain import Domain from Products.ERP5.Document.Domain import Domain
from Products.ERP5.mixin.extensible_traversable import DocumentExtensibleTraversableMixIn as PermanentURLMixIn from Products.ERP5.mixin.extensible_traversable import DocumentExtensibleTraversableMixin
from Acquisition import aq_base, aq_inner from Acquisition import aq_base, aq_inner
from Products.ERP5Type.UnrestrictedMethod import unrestricted_apply from Products.ERP5Type.UnrestrictedMethod import unrestricted_apply
from AccessControl import Unauthorized from AccessControl import Unauthorized
...@@ -42,7 +42,7 @@ from Products.ERP5Type.Cache import getReadOnlyTransactionCache ...@@ -42,7 +42,7 @@ from Products.ERP5Type.Cache import getReadOnlyTransactionCache
WEBSECTION_KEY = 'web_section_value' WEBSECTION_KEY = 'web_section_value'
MARKER = [] MARKER = []
class WebSection(Domain, PermanentURLMixIn): class WebSection(Domain, DocumentExtensibleTraversableMixin):
""" """
A Web Section is a Domain with an extended API intended to A Web Section is a Domain with an extended API intended to
support the creation of Web front ends to support the creation of Web front ends to
...@@ -115,14 +115,14 @@ class WebSection(Domain, PermanentURLMixIn): ...@@ -115,14 +115,14 @@ class WebSection(Domain, PermanentURLMixIn):
document = None document = None
try: try:
document = PermanentURLMixIn.__bobo_traverse__(self, request, name) document = DocumentExtensibleTraversableMixin.__bobo_traverse__(self, request, name)
except NotFound: except NotFound:
not_found_page_ref = self.getLayoutProperty('layout_not_found_page_reference') not_found_page_ref = self.getLayoutProperty('layout_not_found_page_reference')
if not_found_page_ref: if not_found_page_ref:
document = PermanentURLMixIn.getDocumentValue(self, name=not_found_page_ref) document = DocumentExtensibleTraversableMixin.getDocumentValue(self, name=not_found_page_ref)
if document is None: if document is None:
# if no document found, fallback on default page template # if no document found, fallback on default page template
document = PermanentURLMixIn.__bobo_traverse__(self, request, document = DocumentExtensibleTraversableMixin.__bobo_traverse__(self, request,
'404.error.page') '404.error.page')
return document return document
......
...@@ -49,7 +49,7 @@ EMBEDDED_FORMAT = '_embedded' ...@@ -49,7 +49,7 @@ EMBEDDED_FORMAT = '_embedded'
class ConversionError(Exception):pass class ConversionError(Exception):pass
class NotConvertedError(Exception):pass class NotConvertedError(Exception):pass
class BaseExtensibleTraversableMixIn(ExtensibleTraversableMixIn): class BaseExtensibleTraversableMixin(ExtensibleTraversableMixIn):
""" """
This class provides a generic base mixin implementation of IExtensibleTraversable. This class provides a generic base mixin implementation of IExtensibleTraversable.
...@@ -155,7 +155,7 @@ class BaseExtensibleTraversableMixIn(ExtensibleTraversableMixIn): ...@@ -155,7 +155,7 @@ class BaseExtensibleTraversableMixIn(ExtensibleTraversableMixIn):
if document is not None: if document is not None:
return document.__of__(self) return document.__of__(self)
class DocumentExtensibleTraversableMixIn(BaseExtensibleTraversableMixIn): class DocumentExtensibleTraversableMixin(BaseExtensibleTraversableMixin):
""" """
This class provides a implementation of IExtensibleTraversable for Document classed based documents. This class provides a implementation of IExtensibleTraversable for Document classed based documents.
""" """
...@@ -184,7 +184,7 @@ class DocumentExtensibleTraversableMixIn(BaseExtensibleTraversableMixIn): ...@@ -184,7 +184,7 @@ class DocumentExtensibleTraversableMixIn(BaseExtensibleTraversableMixIn):
# force user to login as specified in Web Section # force user to login as specified in Web Section
raise Unauthorized raise Unauthorized
class OOoDocumentExtensibleTraversableMixIn(BaseExtensibleTraversableMixIn): class OOoDocumentExtensibleTraversableMixin(BaseExtensibleTraversableMixin):
""" """
This class provides a implementation of IExtensibleTraversable for OOoDocument classed based documents. This class provides a implementation of IExtensibleTraversable for OOoDocument classed based documents.
""" """
...@@ -201,7 +201,7 @@ class OOoDocumentExtensibleTraversableMixIn(BaseExtensibleTraversableMixIn): ...@@ -201,7 +201,7 @@ class OOoDocumentExtensibleTraversableMixIn(BaseExtensibleTraversableMixIn):
mime, data = self.getConversion(format=EMBEDDED_FORMAT, file_name=name) mime, data = self.getConversion(format=EMBEDDED_FORMAT, file_name=name)
document = OFSFile(name, name, data, content_type=mime).__of__(self.aq_parent) document = OFSFile(name, name, data, content_type=mime).__of__(self.aq_parent)
except (NotConvertedError, ConversionError, KeyError): except (NotConvertedError, ConversionError, KeyError):
document = DocumentExtensibleTraversableMixIn.getExtensibleContent(self, request, name) document = DocumentExtensibleTraversableMixin.getExtensibleContent(self, request, name)
# restore original security context if there's a logged in user # restore original security context if there's a logged in user
if user is not None: if user is not None:
setSecurityManager(old_manager) setSecurityManager(old_manager)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment