## $Id: interfaces.py 14188 2016-09-26 05:13:42Z 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 import schema from waeup.ikoba.interfaces import IIkobaObject from waeup.ikoba.customers.interfaces import ( ICustomer, ICustomerDocument, ICustomerPDFDocument, IContract) from waeup.ikoba.customers.vocabularies import ( ConCatProductSource, CustomerDocumentSource) from waeup.ikoba.products.productoptions import ProductOptionField from ikobacustom.uniben.interfaces import MessageFactory as _ class IUnibenCustomer(ICustomer): """Representation of a customer. """ # Customer document interfaces class IUnibenCustomerDocument(ICustomerDocument): """A customer document. """ class IUnibenCustomerPDFDocument(ICustomerPDFDocument): """A customer pdf document. """ # Customer contract interfaces class IUnibenContract(IContract): """A customer contract sample with document attached. """ doc1 = schema.Choice( title = _(u'Biographical Citation'), source = CustomerDocumentSource(), required = False, ) doc2 = schema.Choice( title = _(u'Supporting Statement'), source = CustomerDocumentSource(), required = False, ) doc3 = schema.Choice( title = _(u'Narrative Write-Up'), source = CustomerDocumentSource(), required = False, ) doc4 = schema.Choice( title = _(u'Itemized Statement'), source = CustomerDocumentSource(), required = False, ) doc5 = schema.Choice( title = _(u'Significant Publivations'), source = CustomerDocumentSource(), required = False, ) doc6 = schema.Choice( title = _(u'Curriculum Vitae'), source = CustomerDocumentSource(), required = False, ) doc7 = schema.Choice( title = _(u'Previous Awards'), source = CustomerDocumentSource(), required = False, ) doc8 = schema.Choice( title = _(u'Leadership Roles'), source = CustomerDocumentSource(), required = False, ) doc9 = schema.Choice( title = _(u'Photos and Illustrations'), source = CustomerDocumentSource(), required = False, ) doc10 = schema.Choice( title = _(u'State of H-Index'), source = CustomerDocumentSource(), required = False, ) doc11 = schema.Choice( title = _(u'Reference Letters'), source = CustomerDocumentSource(), required = False, ) class IRIAAContract(IUnibenContract): """A Retention of Name contract. """ class IRIAAContractOfficialUse(IIkobaObject): """Interface for editing RIAA official use data. """ comment = schema.Text( title= _('Reason for rejection'), required = False, ) class IRIAAContractProcess(IRIAAContract, IRIAAContractOfficialUse): """Interface for processing RIAA data. """ product_options = schema.List( title = _(u'Options/Fees'), value_type = ProductOptionField(), required = False, readonly = False, defaultFactory=list, ) class IRIAAContractEdit(IRIAAContract): """Interface for editing RIAA data by customers. """ doc1 = schema.Choice( title = _(u'Biographical Citation'), source = CustomerDocumentSource(), required = True, ) doc2 = schema.Choice( title = _(u'Supporting Statement'), source = CustomerDocumentSource(), required = True, ) doc3 = schema.Choice( title = _(u'Narrative Write-Up'), source = CustomerDocumentSource(), required = True, ) doc4 = schema.Choice( title = _(u'Itemized Statement'), source = CustomerDocumentSource(), required = True, ) doc5 = schema.Choice( title = _(u'Significant Publivations'), source = CustomerDocumentSource(), required = True, ) doc6 = schema.Choice( title = _(u'Curriculum Vitae'), source = CustomerDocumentSource(), required = True, ) doc7 = schema.Choice( title = _(u'Previous Awards'), source = CustomerDocumentSource(), required = True, ) doc8 = schema.Choice( title = _(u'Leadership Roles'), source = CustomerDocumentSource(), required = True, ) doc9 = schema.Choice( title = _(u'Photos and Illustrations'), source = CustomerDocumentSource(), required = True, ) doc10 = schema.Choice( title = _(u'State of H-Index'), source = CustomerDocumentSource(), required = True, ) doc11 = schema.Choice( title = _(u'Reference Letters'), source = CustomerDocumentSource(), required = True, )