portletspec3
  1. portletspec3
  2. PORTLETSPEC3-11

Create single interface to handle public and private render parameters

    Details

      Description

      The StateAwareResponse and BaseURL interfaces both allow setting and getting public and private render parameters.
      However they use different method names to do the same job. I suggest introducing a new interface that
      represents the aspect of handling parameters and to have both the StateAwareResponse and the
      BaseURL interfaces extend this new interface. This would make it much simpler to write state handling code,
      and would make it easier to keep the semantics consistent.

        Activity

        Hide
        Neil Griffin added a comment -

        I like the idea of a separate interface very much, but perhaps it could be left as an implementation detail.

        It might be that I am simply accustomed to the existing API, but it seems like:

        response.setRenderParameter("foo", "1234");

        seems to self-document a little better than:

        response.setParameter("foo", "1234");

        meaning that the parameter is intended for the render request (in some sense).

        Show
        Neil Griffin added a comment - I like the idea of a separate interface very much, but perhaps it could be left as an implementation detail. It might be that I am simply accustomed to the existing API, but it seems like: response.setRenderParameter( "foo" , "1234" ); seems to self-document a little better than: response.setParameter( "foo" , "1234" ); meaning that the parameter is intended for the render request (in some sense).
        Hide
        msnicklous added a comment -

        We would have to include both setRenderParameters and setParameters in the new interface, and deprecate one of them. The point is that the parameters don't really differ conceptually (at leaset as I understand it so far), so we shouldn't have two different method names for setting / getting the same thing.

        Show
        msnicklous added a comment - We would have to include both setRenderParameters and setParameters in the new interface, and deprecate one of them. The point is that the parameters don't really differ conceptually (at leaset as I understand it so far), so we shouldn't have two different method names for setting / getting the same thing.
        Hide
        julien_viet added a comment -

        I don't see how that is technically possible since:

        1/ StateAwareResponse class has methods named "render parameter" such as setRenderParameters(String key, String value)

        2/ BaseURL class has methods named "parameter" such as setParameter(String name, String value)

        Show
        julien_viet added a comment - I don't see how that is technically possible since: 1/ StateAwareResponse class has methods named "render parameter" such as setRenderParameters(String key, String value) 2/ BaseURL class has methods named "parameter" such as setParameter(String name, String value)
        Hide
        msnicklous added a comment -

        Updated the problem priority to "minor" from "major" ... corrected an oversight on my part.

        Show
        msnicklous added a comment - Updated the problem priority to "minor" from "major" ... corrected an oversight on my part.

          People

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

            Dates

            • Created:
              Updated: