# ATContentTypes - Developer report tools: XXX/TODO/BBB comments

Generated on Fri, 22 Jul 2005 16:29:15 CEST

### Summary

There are currently 39 XXX/TODO/BBB comments.

### Listing

1. File: ATContentTypes/__init__.py:57

       # BBB aliases
       import Products.ATContentTypes.modulealiases

       # wire the add permission after all types are registered

2. File: ATContentTypes/content/base.py:376

               # XXX what should be returned if no data is present?

           security.declareProtected(View, 'get_data')
           def get_data(self):

3. File: ATContentTypes/content/base.py:550

               # XXX no error catching
               fh, mimetype, filename, size = self.loadFileFromURL(value,
                                                  contenttypes=('image',))
               mutator = self.getPrimaryField().getMutator(self)

4. File: ATContentTypes/content/document.py:147

               # XXX this is ugly
               # When an object is initialized the first time we have to
               # set the filename and mimetype.
               # In the case the value is empty/None we must not set the value because

5. File: ATContentTypes/content/event.py:187

                       # XXX disabled for now, see
                       # https://sourceforge.net/tracker/index.php?func=detail&aid=974102&group_id=55262&atid=645337
                       #validators = ('isInternationalPhoneNumber',),
                       validators= (),

6. File: ATContentTypes/content/event.py:379

                   # XXX come up with a nice cmp for types
                   return cmp(self.Title(), other)

           def __hash__(self):

7. File: ATContentTypes/content/image.py:146

               BBB: ImageField.get_size() returns the size of the original image + all
               scales but we want only the size of the original image.
               """
               img = self.getImage()

8. File: ATContentTypes/content/topic.py:274

               # XXX Sorting results in inconsistent order. Leave them in the order
               # they were added.
               #val.sort()
               return val

9. File: ATContentTypes/docs/CHANGELOG.txt:2680

       	  up other XXX added security assertions fixed implementation of AT
       	  Event rewrote some doc strings

       2004-04-04 23:47  tiran

10. File: ATContentTypes/docs/HISTORY.txt:397

         * Merged the topic tool branch into 1.0 XXX: insert history here.
           [tiran]

         * Refactored ConstrainTypesMixin to support PLIP 78:

11. File: ATContentTypes/docs/HISTORY.txt:470

         * Added XXX report tool to ATCT. It's mostly a copy from the Zope3 XXX tools.
           [tiran]

         * Fixed [ 1049018 ] url field on Link doesn't allow mailto. Also added an

12. File: ATContentTypes/lib/autosort.py:194

                # TODO: folderish first is missing, use the catalog to resort it!

            security.declareProtected(ModifyPortalContent, 'moveObject')
            def moveObject(self, id, position):

13. File: ATContentTypes/lib/autosort.py:238

                # XXX: disabled
                # we need a proper event system to make it work
                #if item.aq_inner.aq_parent == self:
                #    self.autoOrderItems()

14. File: ATContentTypes/lib/constraintypes.py:76

                # XXX: AT doesn't support enforce on vocabs with int display list
                #enforceVocabulary = True,
                languageIndependent = True,
                write_permissions = ATCTPermissions.ModifyConstrainTypes,

15. File: ATContentTypes/lib/imagetransform.py:101

                # TODO: explicit check for Pdata or file handler
                if isinstance(img, OFSImage):
                    data = str(img.data)
                else:

16. File: ATContentTypes/lib/urlupload.py:119

                # XXX no error catching
                fh, mimetype, filename, size = self.loadFileFromURL(value,
                                                   contenttypes=('image',))
                mutator = self.getPrimaryField().getMutator(self)

17. File: ATContentTypes/migration/walker.py:195

                                # XXX: savepoints are invalidated once they are used
                                savepoint = transaction.savepoint()
                                continue
                            else:

18. File: ATContentTypes/migration/walker.py:280

                TODO: stop when no objects are left. Don't try to migrate until the walker
                      reaches max_depth
                """
                depth = self.depth

19. File: ATContentTypes/tests/atcttestcase.py:69

        # BBB remove import from PloneLanguageTool later
        try:
            from Products.CMFPlone.interfaces.Translatable import ITranslatable
        except ImportError:

20. File: ATContentTypes/tests/atcttestcase.py:190

                # XXX more

            def compareAfterMigration(self, migrated, mod=None, created=None):
                self.failUnless(isinstance(migrated, self.klass),

21. File: ATContentTypes/tests/atcttestcase.py:223

                # TODO: not a real test
                self._ATCT.getObjPositionInParent()

            def test_schema_marshall(self):

22. File: ATContentTypes/tests/test_atfavorite.py:124

                # XXX more

                self.failUnless(migrated.getRemoteUrl() == url, 'URL mismatch: %s / %s' \
                                % (migrated.getRemoteUrl(), url))

23. File: ATContentTypes/tests/test_atfile.py:105

                # TODO: more tests

            def test_migration(self):
                old = self._cmf

24. File: ATContentTypes/tests/test_atfile.py:135

                # TODO: more tests

            def test_schema_marshall(self):
                atct = self._ATCT

25. File: ATContentTypes/tests/test_atfolder.py:139

                # TODO: more tests

            def test_migrator_doesnt_migrate_non_contentish_sub_objects(self):
                # Test that we don't try to migrate conteaind non-content objects

26. File: ATContentTypes/tests/test_atfolder.py:349

            # TODO: more tests

        tests.append(TestAutoSortSupport)

27. File: ATContentTypes/tests/test_atlink.py:122

                # TODO: more tests

                self.failUnless(migrated.getRemoteUrl() == url, 'URL mismatch: %s / %s' \
                                % (migrated.getRemoteUrl(), url))

28. File: ATContentTypes/tests/test_atnewsitem.py:120

                # XXX more

            def test_get_size(self):
                atct = self._ATCT

29. File: ATContentTypes/tests/test_attopic.py:460

                # XXX not in the current version
                return
                dummy = self._dummy
                field = dummy.getField('customView')

30. File: ATContentTypes/tests/test_attopic.py:502

                # XXX not in the current version
                return
                dummy = self._dummy
                field = dummy.getField('customViewFields')

31. File: ATContentTypes/tests/test_browserdefaultmixin.py:49

        # XXX: This should probably move to the new CMFDynamicViewFTI
        class TestBrowserDefaultMixin(atcttestcase.ATCTSiteTestCase):
            folder_type = 'Folder'
            image_type = 'Image'

32. File: ATContentTypes/tests/test_tool.py:92

                # XXX add a cmf based object before cataloging

                result, time, ctime = t._catalogCMFtypes()

33. File: ATContentTypes/tests/test_versionMigration.py:139

                # XXX this relies on the current AttributeStorage implementation
                updateIntegerCriteria(self.portal,[])
                self.assertEqual(self.int_crit.value2,None)
                self.assertEqual(self.int_crit.direction,'')

34. File: ATContentTypes/tests/webdav.txt:145

          XXX: .event should be removed?

          >>> event = self.folder['test-event.event']

35. File: ATContentTypes/tests/webdav.txt:300

          XXX: Note that name mangeling for WebDAV PUTs are not supported at the
          moment!

          >>> image = self.folder['test my image.gif']

36. File: ATContentTypes/tests/webdav.txt:329

          XXX: .link should be removed?

          >>> link = self.folder['test-link.link']

37. File: ATContentTypes/tests/webdav.txt:356

          XXX: .news should be removed?

          >>> news = self.folder['test-newsitem.news']

38. File: ATContentTypes/tool/atct.py:522

                    # TODO: not impelemented
                    raise NotImplementedError, "Migrating a subset of types is not implemented"
                if isinstance(portal_types, basestring):
                    portal_types = (portal_types,)

39. File: ATContentTypes/tool/atct.py:693

                    # XXX: I consider passing an empty mt argument as bug
                    return [], 0, 0

                if not isinstance(mt, (list, tuple)):