Uploaded image for project: 'Hippo CMS'
  1. Hippo CMS
  2. CMS-10753

v11 - Minimal support for project specific customizability of Auto-Export LocationMapper entries

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 4.2.2
    • Fix Version/s: 4.2.4
    • Component/s: None
    • Labels:
      None
    • Similar issues:

      Description

      AFAIK auto-export has hardcoded knowledge about how to split certain parts of the repository into files and folders (see the ENTRIES in https://code.onehippo.org/cms-community/hippo-cms/blob/master/automatic-export/repository/src/main/java/org/onehippo/cms7/autoexport/LocationMapper.java).

      The hard-coded entries looks like something we can improve a little bit for a shorter term workaround.

      However, in order to (a) not be too generic/official solution with location-mapper.xml and (b) be a practical shorter term, project specific solution, we might want to do the following instead:

      • Instead of introducing complexities such as separate generic configuration file (e.g, location-mapper.xml) and loading from it generally, we can simply change the code, LocationMapper.java to instantiate InternalLocationMapperEntries.java which is responsible for having the hard-coded entries by default. Same to the current logic.
      • Optionally, if there's a system property (e.g, -Dorg.onehippo.cms7.autoexport.InternalLocationMapperEntries=com.example.MyInternalLocationMapperEntries), then LocationMapper may instantiate the custom class instead. So, the custom code may add more entries.
      • However, we can document the javadoc of InternalLocationMapperEntries clearly that the class is only for advanced use cases or experiment purpose, not meant to be supported with compatibility in the future. That's why its name is prefixed by 'Internal'. I think, this way, we could limit the uses to a project specific practice without risking ourselves with upgrade support in the future.

      Note: Any custom InternalLocationMapperEntries code provision is totally the responsibility of end project. Product won't / can't support upgradability on that kind of custom code obviously.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                wko Woonsan Ko
              • Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: