myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Neil Griffin (JIRA)" <...@myfaces.apache.org>
Subject [jira] [Commented] (PORTLETBRIDGE-199) Proposal for 3.0 API: BridgeUtil.getClassPathResourceAsString(String resourcePath)
Date Mon, 21 Mar 2011 09:45:06 GMT

    [ https://issues.apache.org/jira/browse/PORTLETBRIDGE-199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13009077#comment-13009077
] 

Neil Griffin commented on PORTLETBRIDGE-199:
--------------------------------------------

The functionality of this method is currently provided in GenericFacesPortlet.java:

private String getFromServicesPath(PortletContext context, String resourceName) {
    ...
}

The reason why I suggested moving this to BridgeUtil, was because at one time in the development
of the PortletFaces Bridge, I needed this functionality both in GenericFacesPortlet (to discover
the bridge impl) and in another place to discover the BridgeConfig impl. Having the method
in BridgeUtil provided an opportunity to reuse code. However, I just realized that, since
I'm using BridgeFactoryFinder (PORTLETBRIDGE-189), I don't need it to be in BridgeUtil anymore.
If we perform bridge discovery with a Factory mechanism as proposed in PORTLETBRIDGE-195,
then this private method would no longer be required in GenericFacesPortlet. Instead, it would
be required in BridgeFactoryFinder, so that it could find an implementation of the finder
in the classpath. So I would be willing to retract this proposal if we do the BridgeFactoryFinder.


> Proposal for 3.0 API: BridgeUtil.getClassPathResourceAsString(String resourcePath)
> ----------------------------------------------------------------------------------
>
>                 Key: PORTLETBRIDGE-199
>                 URL: https://issues.apache.org/jira/browse/PORTLETBRIDGE-199
>             Project: MyFaces Portlet Bridge
>          Issue Type: New Feature
>          Components: General
>    Affects Versions: 3.0.0
>            Reporter: Neil Griffin
>            Assignee: Michael Freedman
>
> Proposal is to introduce a utility method that can load the contents of classpath resources
(like META-INF/services/filename) into a String.
> This will help the API with discovery of the implementation of BridgeFactoryFinder specified
in PORTLETBRIDGE-189
> See the following class for more details:
> http://svn.portletfaces.org/svn/portletfaces/bridge/portletfaces-bridge-api/trunk/src/main/java/org/portletfaces/bridge/BridgeUtil.java

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message