Ticket #979 (new Enhancement)
Opened 9 years ago
question: it would be handy to expose the geomaps types uris as public constants
Reported by: | Malte | Owned by: | |
---|---|---|---|
Priority: | Major | Milestone: | Release 4.8.1 |
Component: | DeepaMehta Standard Distribution | Version: | 4.8 |
Keywords: | Cc: | jri, dgf, JuergeN | |
Complexity: | 3 | Area: | Application Framework / API |
Module: |
Description
What do you think of this proposal:
As we do already in some plugins, do you think it is a good idea toto expose the typeUris of your plugin to other plugin developers as public static constants so they do not need to know the exact URI String and need to create a CONSTANT for themselves, new in every plugin?
For example, in the geomaps plugin add to the GeomapsService? interface:
public final static String GEO_COORDINATE = "dm4.geomaps.geo_coordinate" public final static String GEO_COORDINATE_FACET = "dm4.geomaps.geo_coordinate.facet" public final static String GEOMAPS_LONGITUDE = "dm4.geomaps.geo_coordinate""dm4.geomaps.longitude" public final static String GEOMAPS_LATITUDE = "dm4.geomaps.geo_coordinate""dm4.geomaps.latitude"
In the dm4-files plugin add, all child type uris if a "File" topic.
Furthmore, add public constants for core type URIs, e.g. "dm4.core.parent", "dm4.core.child", "dm4.core.default", "dm4.core.aggregation_def", "dm4.core.compisition", etc. pp.
I started to add these constants into the service interface of my plugin, as that is the one i expect to be imported into Migrations and other plugins anyway (if they make use of my plugin).
Have you've done that too and if so, which convention did you follow?
Thanks for sharing your thoughts on this.