diff --git a/product/ERP5/Document/Acknowledgement.py b/product/ERP5/Document/Acknowledgement.py index aa487538440e1b9ae2b62a1e2fe089b0f4bbfe96..b36ee7a102525ae1bec3f917b03f80f83e5abc3f 100644 --- a/product/ERP5/Document/Acknowledgement.py +++ b/product/ERP5/Document/Acknowledgement.py @@ -67,7 +67,6 @@ class Acknowledgement(EmailDocumentProxyMixin, Event): , PropertySheet.CategoryCore , PropertySheet.Document , PropertySheet.DublinCore - , PropertySheet.Snapshot , PropertySheet.Task , PropertySheet.Url , PropertySheet.Arrow diff --git a/product/ERP5/Document/Document.py b/product/ERP5/Document/Document.py index ef14a4c021d88fb203c5915987a8c3eb21078e28..c415693415d96d7e45e580bcab339581b67dfeba 100644 --- a/product/ERP5/Document/Document.py +++ b/product/ERP5/Document/Document.py @@ -82,48 +82,6 @@ DEFAULT_QUALITY = 75 DEFAULT_CONTENT_TYPE = 'text/html' - -class SnapshotMixin: - """ - This class provides a generic API to store in the ZODB - PDF snapshots of objects and documents with the - goal to keep a facsimile copy of documents as they - were at a given date. - """ - - # Declarative security - security = ClassSecurityInfo() - security.declareObjectProtected(Permissions.AccessContentsInformation) - - security.declareProtected(Permissions.ModifyPortalContent, 'createSnapshot') - def createSnapshot(self): - """ - Create a snapshot (PDF). This is the normal way to modifiy - snapshot_data. Once a snapshot is taken, a new snapshot - can not be taken. - - NOTE: use getSnapshotData and hasSnapshotData accessors - to access a snapshot. - - NOTE2: implementation of createSnapshot should probably - be delegated to a types base method since this it - is configuration dependent. - """ - if self.hasSnapshotData(): - raise ConversionError('This document already has a snapshot.') - self._setSnapshotData(self.convert(format='pdf')) - - security.declareProtected(Permissions.ManagePortal, 'deleteSnapshot') - def deleteSnapshot(self): - """ - Deletes the snapshot - in theory this should never be done. - It is there for programmers and system administrators. - """ - try: - del(self.snapshot_data) - except AttributeError: - pass - class ConversionError(Exception):pass class DocumentProxyError(Exception):pass @@ -132,8 +90,7 @@ class NotConvertedError(Exception):pass allow_class(NotConvertedError) class Document(DocumentExtensibleTraversableMixin, XMLObject, UrlMixIn, CachedConvertableMixin, - SnapshotMixin, CrawableMixin, TextConvertableMixin, - DownloadableMixin, DocumentMixin): + CrawableMixin, TextConvertableMixin, DownloadableMixin, DocumentMixin): """Document is an abstract class with all methods related to document management in ERP5. This includes searchable text, explicit relations, implicit relations, metadata, versions, languages, etc. @@ -334,7 +291,6 @@ class Document(DocumentExtensibleTraversableMixin, XMLObject, UrlMixIn, CachedCo , PropertySheet.ExternalDocument , PropertySheet.Url , PropertySheet.Periodicity - , PropertySheet.Snapshot ) index_html = DownloadableMixin.index_html diff --git a/product/ERP5/Document/EmailDocument.py b/product/ERP5/Document/EmailDocument.py index 66191491d52b122a26a2bd4652a9834b95e1e7ed..9cdf7acd3a5da0d25a7be280e6e49e98676e8500 100644 --- a/product/ERP5/Document/EmailDocument.py +++ b/product/ERP5/Document/EmailDocument.py @@ -145,7 +145,6 @@ class EmailDocument(TextDocument): , PropertySheet.DublinCore , PropertySheet.Version , PropertySheet.Document - , PropertySheet.Snapshot , PropertySheet.ExternalDocument , PropertySheet.Url , PropertySheet.TextDocument diff --git a/product/ERP5/Document/Event.py b/product/ERP5/Document/Event.py index f68cf59b6048e67a32513f562c48b59719966def..4d7dffc82bc65e69026d23a8bfdf532d81ac5535 100644 --- a/product/ERP5/Document/Event.py +++ b/product/ERP5/Document/Event.py @@ -116,7 +116,6 @@ class Event(EmailDocument, Movement, AcknowledgeableMixin): , PropertySheet.CategoryCore , PropertySheet.Document , PropertySheet.DublinCore - , PropertySheet.Snapshot , PropertySheet.Task , PropertySheet.Url , PropertySheet.TextDocument diff --git a/product/ERP5/Document/TextDocument.py b/product/ERP5/Document/TextDocument.py index 0542155a28c7f0afce987ef95bcf20e8413874c0..d1bf753c62877523bf9f337fa3d3865b823b08e5 100644 --- a/product/ERP5/Document/TextDocument.py +++ b/product/ERP5/Document/TextDocument.py @@ -67,7 +67,6 @@ class TextDocument(CachedConvertableMixin, BaseConvertableFileMixin, , PropertySheet.DublinCore , PropertySheet.Version , PropertySheet.Document - , PropertySheet.Snapshot , PropertySheet.ExternalDocument , PropertySheet.Url , PropertySheet.TextDocument diff --git a/product/ERP5/PropertySheet/Snapshot.py b/product/ERP5/PropertySheet/Snapshot.py deleted file mode 100644 index 5108d7c7a134e452ca708f672af5c74a3bbb101a..0000000000000000000000000000000000000000 --- a/product/ERP5/PropertySheet/Snapshot.py +++ /dev/null @@ -1,49 +0,0 @@ -############################################################################## -# -# Copyright (c) 2006 Nexedi SARL and Contributors. All Rights Reserved. -# Jean-Paul Smets <jp@nexedi.com> -# -# WARNING: This program as such is intended to be used by professional -# programmers who take the whole responsability of assessing all potential -# consequences resulting from its eventual inadequacies and bugs -# End users who are looking for a ready-to-use solution with commercial -# garantees and support are strongly adviced to contract a Free Software -# Service Company -# -# This program is Free Software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -############################################################################## - -class Snapshot: - """ - This property sheet defines the way to store data (file, images, etc.) - in the form of an object of any type - """ - - _properties = ( - { 'id' : 'snapshot_data', - 'description' : 'An object (string, stream, etc.) which contains raw data' - 'of a snapshot. Snapshot is used to keep a visual representation' - 'of a document such as an invoice.', - 'type' : 'data', - 'write_permission' : 'Manage properties', - 'default' : '', - 'mode' : 'w' }, - { 'id' : 'snapshot_content_type', - 'description' : 'A string which represents the mime type of the snapshot data', - 'type' : 'string', - 'default' : 'application/pdf', - 'mode' : 'w' }, - ) diff --git a/product/ERP5OOo/Document/OOoDocument.py b/product/ERP5OOo/Document/OOoDocument.py index fefdfa9a81c2fd62182348653c0226567daafd5b..ea8f75c3ac67b5a405fe1d8686c49770552f66fc 100644 --- a/product/ERP5OOo/Document/OOoDocument.py +++ b/product/ERP5OOo/Document/OOoDocument.py @@ -145,7 +145,6 @@ class OOoDocument(OOoDocumentExtensibleTraversableMixin, BaseConvertableFileMixi , PropertySheet.DublinCore , PropertySheet.Version , PropertySheet.Document - , PropertySheet.Snapshot , PropertySheet.ExternalDocument , PropertySheet.Url , PropertySheet.Periodicity