jsr344-experts@javaserverfaces-spec-public.java.net

[jsr344-experts] Re: Re: Welcome to the JSF Specification Expert Group

From: Edward Burns <edward.burns_at_oracle.com>
Date: Wed, 11 Jul 2012 15:12:06 -0700

>>>>> On Sun, 8 Jul 2012 17:14:18 +0200, Frank Caputo <frank_at_frankcaputo.de> said:

FC> since there are no followups on this, I propose the following change
FC> to javax.faces.application.Resource:

Thank you so much for putting this in terms that can readily be dropped
into the spec.

FC> ------------- SPEC CHANGE 1 -----------------------------

FC> Add a method getResourceId():

FC> /**
FC> * Return the resource identifier according to the specification
FC> * in JSF.2.6.1.3 of the spec prose document <a
FC> * href="../../../overview-summary.html#prose_document">linked in
FC> * the overview summary</a>.
FC> *
FC> * @return the resource identifier
FC> *
FC> * @since 2.2
FC> */
FC> public abstract String getResourceId();

What do you intend for those parts of the id that are optional and not
present in the actual persistent representation of the Resource?

FC> ------------- SPEC CHANGE 2 -----------------------------

FC> Change the javadoc of getRequestPath():

FC> * <ul><p><code>result = <em>contextRoot</em> + '/' +
FC> * <em>facesServletMapping</em> + {_at_link
FC> * ResourceHandler#RESOURCE_IDENTIFIER} + '/' + {_at_link
FC> * #getResourceId()}</code></p></ul>

FC> * <ul><p><code>result = <em>contextRoot</em> + {_at_link
FC> * ResourceHandler#RESOURCE_IDENTIFIER} + {_at_link #getResourceId()} +
FC> * <em>facesServletMapping</em></code></p></ul>

FC> public abstract String getRequestPath();

The reason we had resourceName there before, which you've changed to
getResourceId(), is that you don't need to encode all those optional
parts, and in-fact, you don't want to because you want to let the server
decide how best to serve up a resource based on just the required parts.

I expect this is related to 947-RelativeResourceHandler. If so, how
does this proposal address that?

Thanks,

Ed

-- 
| edward.burns_at_oracle.com | office: +1 407 458 0017
| homepage:               | http://ridingthecrest.com/
|  6 Business days til JSF 2.2 Public Review to EG