Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-2734

Refactor Form Resources to use Custom Datatypes

    Details

    • Complexity:
      Medium

      Description

      1. Roll back Form Resource code

      • FormResource.hbm.xml (delete)
      • FormResource.java (delete)
      • CopyFormMetadataChangeSet.java (delete)
      • liquibase-update-to-latest.xml (remove changesets)
      • FormService.java (remove methods)
      • FormServiceImpl.java (remove methods)
      • FormDAO.java (remove methods)
      • HibernateFormDAO.java (remove methods)
      • Form.java (throw errors instead of service calls in getters and setters for XSLT, template)
      • verify that all tests pass and xslt, template columns still exist in data
      • commit

      2. For all following, create class, hbm.xml and liquibase changeset:

      • FormResource extends BaseOpenmrsObject implements CustomValueDescriptor, SingleCustomValue<FormResource>
        • generally speaking, a copy of GlobalProperty
        • references form and name instead of property
      • BlobDatatype implements CustomDatatype
        • might be complicated; need a good demonstration
      • BlobDatatypeHandler implements CustomDatatypeHandler
        • possibly create a FileHandler class (for upload/edit and download/view)
        • also possibly a portlet? hrm ..

      3. Migrate data ... from FormEntry or core?

      • create FormResources from xslt and template columns on the Form table

        Attachments

        1. form-resource-dj-3.patch
          91 kB
        2. formresources-add.png
          formresources-add.png
          65 kB
        3. formresources-datatype.png
          formresources-datatype.png
          67 kB
        4. formresources-handler.png
          formresources-handler.png
          64 kB
        5. formresources-list.png
          formresources-list.png
          67 kB
        6. formresources-listblank.png
          formresources-listblank.png
          62 kB
        7. formresources-managelink.png
          formresources-managelink.png
          101 kB
        8. TRUNK-2734-20120124.patch
          792 kB
        9. TRUNK-2734-new.patch
          731 kB

          Issue Links

            Activity

              People

              • Assignee:
                jeremy Jeremy Keiper
                Reporter:
                jeremy Jeremy Keiper
              • Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: