Ignore:
Timestamp:
23 Sep 2016, 05:54:20 (8 years ago)
Author:
Henrik Bettermann
Message:

Renaming 2

Location:
main/ikobacustom.uniben/trunk/src/ikobacustom/uniben/documents
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • main/ikobacustom.uniben/trunk/src/ikobacustom/uniben/documents/__init__.py

    r14178 r14181  
    22"""
    33# Make this a package.
    4 from ikobacustom.uniben.documents.document import SkeletonDocument
     4from ikobacustom.uniben.documents.document import UnibenDocument
    55
    66__all__ = [
    7     'SkeletonDocument',
     7    'UnibenDocument',
    88    ]
  • main/ikobacustom.uniben/trunk/src/ikobacustom/uniben/documents/batching.py

    r14178 r14181  
    2020import grok
    2121from waeup.ikoba.documents.batching import DocumentProcessorBase
    22 from ikobacustom.uniben.documents.interfaces import ISkeletonDocument
     22from ikobacustom.uniben.documents.interfaces import IUnibenDocument
    2323from ikobacustom.uniben.interfaces import MessageFactory as _
    2424
    2525
    26 class SkeletonDocumentProcessor(DocumentProcessorBase):
    27     """A batch processor for ISkeletonDocument objects.
     26class UnibenDocumentProcessor(DocumentProcessorBase):
     27    """A batch processor for IUnibenDocument objects.
    2828    """
    2929    util_name = 'unibendocumentprocessor'
    3030    grok.name(util_name)
    3131
    32     name = _('Skeleton Document Processor')
    33     iface = ISkeletonDocument
     32    name = _('Uniben Document Processor')
     33    iface = IUnibenDocument
    3434
    35     factory_name = 'waeup.SkeletonDocument'
     35    factory_name = 'waeup.UnibenDocument'
  • main/ikobacustom.uniben/trunk/src/ikobacustom/uniben/documents/document.py

    r14178 r14181  
    2424from waeup.ikoba.utils.helpers import attrs_to_fields
    2525from waeup.ikoba.documents.document import PublicDocumentBase
    26 from ikobacustom.uniben.documents.interfaces import ISkeletonDocument
     26from ikobacustom.uniben.documents.interfaces import IUnibenDocument
    2727from ikobacustom.uniben.interfaces import MessageFactory as _
    2828
    2929
    30 class SkeletonDocument(PublicDocumentBase):
     30class UnibenDocument(PublicDocumentBase):
    3131    """This is a document.
    3232    """
    33     grok.implements(ISkeletonDocument)
    34     grok.provides(ISkeletonDocument)
     33    grok.implements(IUnibenDocument)
     34    grok.provides(IUnibenDocument)
    3535
    36     form_fields_interface = ISkeletonDocument
     36    form_fields_interface = IUnibenDocument
    3737
    38 SkeletonDocument = attrs_to_fields(SkeletonDocument)
     38UnibenDocument = attrs_to_fields(UnibenDocument)
    3939
    4040
    41 class SkeletonDocumentFactory(grok.GlobalUtility):
     41class UnibenDocumentFactory(grok.GlobalUtility):
    4242    """A factory for documents.
    4343    """
    4444    grok.implements(IFactory)
    45     grok.name(u'waeup.SkeletonDocument')
     45    grok.name(u'waeup.UnibenDocument')
    4646    title = u"Create a new document.",
    4747    description = u"This factory instantiates new uniben documents."
    4848
    4949    def __call__(self, *args, **kw):
    50         return SkeletonDocument(*args, **kw)
     50        return UnibenDocument(*args, **kw)
    5151
    5252    def getInterfaces(self):
    53         return implementedBy(SkeletonDocument)
     53        return implementedBy(UnibenDocument)
  • main/ikobacustom.uniben/trunk/src/ikobacustom/uniben/documents/export.py

    r14178 r14181  
    2020import grok
    2121from waeup.ikoba.documents.export import DocumentExporterBase
    22 from ikobacustom.uniben.documents.interfaces import ISkeletonDocument
     22from ikobacustom.uniben.documents.interfaces import IUnibenDocument
    2323from ikobacustom.uniben.interfaces import MessageFactory as _
    2424
    2525
    26 class SkeletonDocumentExporter(DocumentExporterBase):
     26class UnibenDocumentExporter(DocumentExporterBase):
    2727    """Exporter for documents.
    2828    """
    2929    grok.name('unibendocuments')
    30     iface = ISkeletonDocument
    31     class_name = 'SkeletonDocument'
    32     title = _(u'Skeleton Documents')
     30    iface = IUnibenDocument
     31    class_name = 'UnibenDocument'
     32    title = _(u'Uniben Documents')
  • main/ikobacustom.uniben/trunk/src/ikobacustom/uniben/documents/interfaces.py

    r14178 r14181  
    2020
    2121
    22 class ISkeletonDocument(IPublicDocument):
     22class IUnibenDocument(IPublicDocument):
    2323    """A representation of a uniben document.
    2424
  • main/ikobacustom.uniben/trunk/src/ikobacustom/uniben/documents/tests/test_browser.py

    r14178 r14181  
    2727from zope.interface.verify import verifyObject, verifyClass
    2828from waeup.ikoba.documents.tests.test_batching import DocumentImportExportSetup
    29 from ikobacustom.uniben.documents.document import SkeletonDocument
    30 from ikobacustom.uniben.documents.export import SkeletonDocumentExporter
    31 from ikobacustom.uniben.documents.batching import SkeletonDocumentProcessor
     29from ikobacustom.uniben.documents.document import UnibenDocument
     30from ikobacustom.uniben.documents.export import UnibenDocumentExporter
     31from ikobacustom.uniben.documents.batching import UnibenDocumentProcessor
    3232from ikobacustom.uniben.testing import FunctionalLayer
    3333
     
    3838
    3939    def setup_for_export(self):
    40         document = SkeletonDocument()
     40        document = UnibenDocument()
    4141        document.document_id = u'DOC1'
    4242        document.title = u'My first document'
     
    4949        # set values we can expect in export file
    5050        self.setup_for_export()
    51         exporter = SkeletonDocumentExporter()
     51        exporter = UnibenDocumentExporter()
    5252        exporter.export_all(self.app, self.outfile)
    5353        result = open(self.outfile, 'rb').read()
     
    5555            'class_name,description,document_id,history,state,title,'
    5656            'users_with_local_roles\r\n'
    57             'SkeletonDocument,,DOC1,'
     57            'UnibenDocument,,DOC1,'
    5858            '[u\'2014-12-21 23:27:15 WAT - Document created by system\'],'
    5959            'created,My first document,[]\r\n')
    6060        # We can import the same file.
    61         processor = SkeletonDocumentProcessor()
     61        processor = UnibenDocumentProcessor()
    6262        result = processor.doImport(
    6363            self.outfile,
     
    7979        self.assertEqual(num_fail,0)
    8080        # We can import the same file in update mode.
    81         processor = SkeletonDocumentProcessor()
     81        processor = UnibenDocumentProcessor()
    8282        result = processor.doImport(
    8383            self.outfile,
  • main/ikobacustom.uniben/trunk/src/ikobacustom/uniben/documents/tests/test_document.py

    r14178 r14181  
    2424
    2525from ikobacustom.uniben.testing import (FunctionalLayer, FunctionalTestCase)
    26 from ikobacustom.uniben.documents.document import SkeletonDocument
    27 from ikobacustom.uniben.documents.interfaces import ISkeletonDocument
     26from ikobacustom.uniben.documents.document import UnibenDocument
     27from ikobacustom.uniben.documents.interfaces import IUnibenDocument
    2828
    29 class SkeletonDocumentTestCase(FunctionalTestCase):
     29class UnibenDocumentTestCase(FunctionalTestCase):
    3030
    3131    layer = FunctionalLayer
     
    3535        self.assertTrue(
    3636            verifyClass(
    37                 ISkeletonDocument, SkeletonDocument)
     37                IUnibenDocument, UnibenDocument)
    3838            )
    3939        self.assertTrue(
    4040            verifyObject(
    41                 ISkeletonDocument, SkeletonDocument())
     41                IUnibenDocument, UnibenDocument())
    4242            )
    4343        return
    4444
    45     def test_addSkeletonDocument(self):
     45    def test_addUnibenDocument(self):
    4646        container = DocumentsContainer()
    47         document = createObject(u'waeup.SkeletonDocument')
     47        document = createObject(u'waeup.UnibenDocument')
    4848        document.document_id = u'DOC1'
    4949        container.addDocument(document)
  • main/ikobacustom.uniben/trunk/src/ikobacustom/uniben/documents/utils.py

    r14178 r14181  
    2222
    2323
    24 class SkeletonDocumentsUtils(DocumentsUtils):
     24class UnibenDocumentsUtils(DocumentsUtils):
    2525    """A collection of methods subject to customization.
    2626    """
     
    3030        'HTMLDocument': _('HTML Document'),
    3131        'RESTDocument': _('REST Document'),
    32         'SkeletonDocument': _('Skeleton Document'),
     32        'UnibenDocument': _('Uniben Document'),
    3333        }
    3434
Note: See TracChangeset for help on using the changeset viewer.