portletspec3
  1. portletspec3
  2. PORTLETSPEC3-18

Provide a method in PortletConfig to query the supported portlet modes

    Details

      Description

      It would be good to add a method to the PortletConfig interface that would
      provide the portlet modes supported my the portlet.

        Activity

        Hide
        msnicklous added a comment -

        Implemented methods in Pluto branch V3Prototype. While doing so, I discovered an oversight - both the portlet modes and window states are dependent on the MIME type. I updated the method signatures to reflect the fact. I also added a method to obtain the public render parameter QNames, since that information wasn't available elsewhere. The method signatures are:

        Enumeration<PortletMode> PortletConfig.getPortletModes(String) Enumeration<WindowState> PortletConfig.getWindowStates(String)
        Map<String, QName> PortletConfig.getPublicRenderParameterDefinitions()
        

        See:
        V3.0 javadoc

        Show
        msnicklous added a comment - Implemented methods in Pluto branch V3Prototype. While doing so, I discovered an oversight - both the portlet modes and window states are dependent on the MIME type. I updated the method signatures to reflect the fact. I also added a method to obtain the public render parameter QNames, since that information wasn't available elsewhere. The method signatures are: Enumeration<PortletMode> PortletConfig.getPortletModes( String ) Enumeration<WindowState> PortletConfig.getWindowStates( String ) Map< String , QName> PortletConfig.getPublicRenderParameterDefinitions() See: V3.0 javadoc
        Show
        msnicklous added a comment - Added methods: PortletConfig.getPortletModes() PortletConfig.getWindowStates()
        Hide
        msnicklous added a comment -

        I think that most of the other information is available through one method or the other already. Supported languages can be obtained through Portletconfig.getSupportedLocales() and the portlet name through PortletConfig.getPortletName(). The supported processing and publishing events are available along with the supported public render parameters. The portlet title, short title, keywords, display name, etc. are available through the resource bundle (even if no real resource bundle is provided ).

        What I find to be missing completely is a way of obtaining the defined and supported portlet modes and window states. You can get that information sort of indirectly through use of PortletRequest.isPortletModeAllowed(PortletMode) and PortletRequest.isWindowStateAllowed(WindowState), but you have to sort of try it out ... it isn't very elegant.

        So I think we need a way to get an enumeration of the available portlet modes and window states.

        It might be that we need other information in a nice API as well, but so far I haven't found anything else to be missing.

        Show
        msnicklous added a comment - I think that most of the other information is available through one method or the other already. Supported languages can be obtained through Portletconfig.getSupportedLocales() and the portlet name through PortletConfig.getPortletName(). The supported processing and publishing events are available along with the supported public render parameters. The portlet title, short title, keywords, display name, etc. are available through the resource bundle (even if no real resource bundle is provided ). What I find to be missing completely is a way of obtaining the defined and supported portlet modes and window states. You can get that information sort of indirectly through use of PortletRequest.isPortletModeAllowed(PortletMode) and PortletRequest.isWindowStateAllowed(WindowState), but you have to sort of try it out ... it isn't very elegant. So I think we need a way to get an enumeration of the available portlet modes and window states. It might be that we need other information in a nice API as well, but so far I haven't found anything else to be missing.
        Hide
        andre.hagemeier added a comment -

        +1 why not extend this to the whole portlet descriptor? I could imagine that supported languages, portlet name, title etc might be interesting as well

        Show
        andre.hagemeier added a comment - +1 why not extend this to the whole portlet descriptor? I could imagine that supported languages, portlet name, title etc might be interesting as well
        Hide
        Neil Griffin added a comment -

        +1 Always seems helpful to expose elements configured in the portlet.xml descriptor to the developer.

        Show
        Neil Griffin added a comment - +1 Always seems helpful to expose elements configured in the portlet.xml descriptor to the developer.

          People

          • Assignee:
            msnicklous
            Reporter:
            msnicklous
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: