Details
-
Improvement
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
4.2.2
-
None
-
None
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
- includes
-
HSTTWO-4034 v11 - Add simple example for a project specific customizability of Auto-Export LocationMapper entries
- Closed
- relates to
-
CMS-10754 Forward port - v12 - Externalize Auto-Export LocationMapper entries to a resource file
- Closed