## $Id: interfaces.py 12200 2014-12-12 15:34:50Z henrik $ ## ## Copyright (C) 2014 Uli Fouquet & Henrik Bettermann ## 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 ## from zope.interface import Attribute, Interface from zope import schema from waeup.ikoba.interfaces import ( IIkobaObject, ContextualDictSourceFactoryBase) from waeup.ikoba.interfaces import MessageFactory as _ class IDocumentsContainer(IIkobaObject): """A container for all kind of document objects. """ def addDocument(document): """Add a document. """ class IDocument(IIkobaObject): """A base representation of documents. """ document_id = Attribute('Document Identifier') history = Attribute('Object history, a list of messages') state = Attribute('Returns the verification state of a document') translated_state = Attribute( 'Returns a translated, more verbose verification state of a document') class_name = Attribute('Name of the document class') formatted_transition_date = Attribute('Last transition formatted date string') user_id = Attribute('Id of a user') connected_files = Attribute('Names of files connected to a document') is_verifiable = Attribute('Contract verifiable by officer') title = schema.TextLine( title = _(u'Document Title'), required = True, ) last_transition_date = schema.Datetime( title = _(u'Last Transition Date'), required = False, readonly = False, ) def setMD5(): """Determine md5 checksum of selected files and store checksums as document attributes. """ class IPDFDocument(IDocument): """A base representation of PDF documents. """ class IHTMLDocument(IDocument): """A base representation of HTML documents. """ class IDocumentsUtils(Interface): """A collection of methods which are subject to customization. """