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

Support Channel properties which are not back by a ChannelInfo interface

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • 14.2.0, 100.2.0
    • None
    • None
    • 0.25
    • Quasar
    • Puma Sprint 230

    Description

      ChannelInfo settings are being stored below the hst channel info node, for example

      hst:workspace/hst:channel/hst:channelinfo
      

      as a set of String, Boolean, Date, etc properties.

      When the channel settings are read, at this moment, only the properties are read which are described by a ChannelInfo interface getter, which typically looks for example like:

      @FieldGroupList({
              @FieldGroup(
                      titleKey = "fields.channel",
                      value = { "logo", "pageTitlePrefix" }
              )
      })
      public interface MobileInfo extends ChannelInfo {
          @Parameter(name = "logo", displayName = "Logo")
          @JcrPath(
                  pickerSelectableNodeTypes = { "hippogogreengallery:imageset" },
                  pickerInitialPath = "/content/gallery/logos"
          )
          String getLogoPath();
      
          @Parameter(name = "pageTitlePrefix", displayName = "Page title prefix", defaultValue = "Hippo Go Green")
          String getPageTitlePrefix();
      

      Next to the primary ChannelInfo class for an hst:channel node we also support channel info mixin classes.

      Any stored property on the hst:channelinfo node which is NOT represented by a ChannelInfo @Parameter is ignored.

      When writing / updating the Channel Settings, any property that is already stored on the hst:channelinfo node but not represented by a ChannelInfo @Parameter is even removed.

      The above is really unhandy: As a developer, I'd like to be able to bootstrap or configure channelinfo properties (settings) which are not editable or meant for the channel settings dialog, and I do not want these properties to be removed on save and I do want these properties to be available in the channel properties map.

      A direct use case is for example to be able to configure the

      org.hippoecm.hst.configuration.channel.PreviewURLChannelInfo_url
      

      on channel info node without requiring a channel info interface for it

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              aschrijvers Ard Schrijvers
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: