Changeset 8394
- Timestamp:
- 9 May 2012, 13:39:02 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/interfaces.py
r8361 r8394 22 22 from datetime import datetime 23 23 from hurry.file.interfaces import IFileRetrieval 24 from hurry.workflow.interfaces import IWorkflow , IWorkflowInfo24 from hurry.workflow.interfaces import IWorkflowInfo 25 25 from zc.sourcefactory.basic import BasicSourceFactory 26 26 from zope import schema … … 30 30 from zope.component.interfaces import IObjectEvent 31 31 from zope.container.interfaces import INameChooser 32 from zope.interface import Interface, Attribute , implements32 from zope.interface import Interface, Attribute 33 33 from zope.schema.interfaces import IObject 34 34 from zope.schema.vocabulary import SimpleVocabulary, SimpleTerm … … 218 218 APP_CATS_DICT = Attribute("Dict of application categories") 219 219 SEMESTER_DICT = Attribute("Dict of semesters or trimesters") 220 INT_PHONE_PREFIXES = Attribute("Dict of international phone number prefixes") 220 INT_PHONE_PREFIXES = Attribute( 221 "Dict of international phone number prefixes") 221 222 222 223 def sendContactForm( … … 274 275 """Mangle `value` extracted from `obj` or suobjects thereof. 275 276 276 This is called by export before actually writing to the result file. 277 This is called by export before actually writing to the result 278 file. 277 279 """ 278 280 … … 280 282 """Export iterables as rows in a CSV file. 281 283 282 If `filepath` is not given, a string with the data should be returned. 284 If `filepath` is not given, a string with the data should be 285 returned. 283 286 284 287 What kind of iterables are acceptable depends on the specific … … 289 292 """Export all items in `site` as CSV file. 290 293 291 if `filepath` is not given, a string with the data should be returned. 294 if `filepath` is not given, a string with the data should be 295 returned. 292 296 """ 293 297 … … 616 620 """A data center. 617 621 618 TODO : declare methods, at least those needed by pages. 619 """ 620 pass 622 A data center manages files (uploads, downloads, etc.). 623 624 Beside providing the bare paths needed to keep files, it also 625 provides some helpers to put results of batch processing into 626 well-defined final locations (with well-defined filenames). 627 628 The main use-case is managing of site-related files, i.e. files 629 for import, export etc. 630 631 DataCenters are _not_ meant as storages for object-specific files 632 like passport photographs and similar. 633 634 It is up to the datacenter implementation how to organize data 635 (paths) inside its storage path. 636 """ 637 storage = schema.Bytes( 638 title = u'Path to directory where everything is kept.' 639 ) 640 641 deleted_path = schema.Bytes( 642 title = u'Path were data about deleted objects should be stored.' 643 ) 644 645 def getFiles(sort='name'): 646 """Get a list of files stored in `storage` sorted by basename. 647 """ 648 def setStoragePath(path, move=False, overwrite=False): 649 """Set the path where to store files. 650 651 If `move` is True, move over files from the current location 652 to the new one. 653 654 If `overwrite` is also True, overwrite any already existing 655 files of same name in target location. 656 657 Triggers a DataCenterStorageMovedEvent. 658 """ 659 660 def distProcessedFiles(successful, source_path, finished_file, 661 pending_file, mode='create', move_orig=True): 662 """Distribute processed files over final locations. 663 """ 664 621 665 622 666 class IDataCenterFile(Interface): … … 1054 1098 identifier = schema.TextLine( 1055 1099 title = _(u'Unique Identifier'), 1056 description = _(u'User Name, Student or Applicant Id, Matriculation or Registration Number'), 1100 description = _( 1101 u'User Name, Student or Applicant Id, Matriculation or ' 1102 u'Registration Number'), 1057 1103 required = True, 1058 1104 readonly = False,
Note: See TracChangeset for help on using the changeset viewer.