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
from Products.ERP5.mixin.text_convertable import TextConvertableMixin
from Products.ERP5.mixin.downloadable import DownloadableMixin
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
_MARKER = []
......@@ -131,7 +131,7 @@ class DocumentProxyError(Exception):pass
class NotConvertedError(Exception):pass
allow_class(NotConvertedError)
class Document(DocumentExtensibleTraversableMixIn, XMLObject, UrlMixIn, CachedConvertableMixin,
class Document(DocumentExtensibleTraversableMixin, XMLObject, UrlMixIn, CachedConvertableMixin,
SnapshotMixin, CrawableMixin, TextConvertableMixin,
DownloadableMixin, DocumentMixin):
"""Document is an abstract class with all methods related to document
......
......@@ -30,7 +30,7 @@
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet
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 Products.ERP5Type.UnrestrictedMethod import unrestricted_apply
from AccessControl import Unauthorized
......@@ -42,7 +42,7 @@ from Products.ERP5Type.Cache import getReadOnlyTransactionCache
WEBSECTION_KEY = 'web_section_value'
MARKER = []
class WebSection(Domain, PermanentURLMixIn):
class WebSection(Domain, DocumentExtensibleTraversableMixin):
"""
A Web Section is a Domain with an extended API intended to
support the creation of Web front ends to
......@@ -115,14 +115,14 @@ class WebSection(Domain, PermanentURLMixIn):
document = None
try:
document = PermanentURLMixIn.__bobo_traverse__(self, request, name)
document = DocumentExtensibleTraversableMixin.__bobo_traverse__(self, request, name)
except NotFound:
not_found_page_ref = self.getLayoutProperty('layout_not_found_page_reference')
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 no document found, fallback on default page template
document = PermanentURLMixIn.__bobo_traverse__(self, request,
document = DocumentExtensibleTraversableMixin.__bobo_traverse__(self, request,
'404.error.page')
return document
......
......@@ -49,7 +49,7 @@ EMBEDDED_FORMAT = '_embedded'
class ConversionError(Exception):pass
class NotConvertedError(Exception):pass
class BaseExtensibleTraversableMixIn(ExtensibleTraversableMixIn):
class BaseExtensibleTraversableMixin(ExtensibleTraversableMixIn):
"""
This class provides a generic base mixin implementation of IExtensibleTraversable.
......@@ -155,7 +155,7 @@ class BaseExtensibleTraversableMixIn(ExtensibleTraversableMixIn):
if document is not None:
return document.__of__(self)
class DocumentExtensibleTraversableMixIn(BaseExtensibleTraversableMixIn):
class DocumentExtensibleTraversableMixin(BaseExtensibleTraversableMixin):
"""
This class provides a implementation of IExtensibleTraversable for Document classed based documents.
"""
......@@ -184,7 +184,7 @@ class DocumentExtensibleTraversableMixIn(BaseExtensibleTraversableMixIn):
# force user to login as specified in Web Section
raise Unauthorized
class OOoDocumentExtensibleTraversableMixIn(BaseExtensibleTraversableMixIn):
class OOoDocumentExtensibleTraversableMixin(BaseExtensibleTraversableMixin):
"""
This class provides a implementation of IExtensibleTraversable for OOoDocument classed based documents.
"""
......@@ -201,7 +201,7 @@ class OOoDocumentExtensibleTraversableMixIn(BaseExtensibleTraversableMixIn):
mime, data = self.getConversion(format=EMBEDDED_FORMAT, file_name=name)
document = OFSFile(name, name, data, content_type=mime).__of__(self.aq_parent)
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
if user is not None:
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