[jira] [Commented] (MYFACES-4098) Implement ResourceHandler.getViewResources(...)
[ https://issues.apache.org/jira/browse/MYFACES-4098?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15900545#comment-15900545 ] Leonardo Uribe commented on MYFACES-4098: - After thinking about it, the SPI can be too much, because the code behind this has been already tested before (in libraryVersion / resourceVersion). Better to close this issue for now. > Implement ResourceHandler.getViewResources(...) > --- > > Key: MYFACES-4098 > URL: https://issues.apache.org/jira/browse/MYFACES-4098 > Project: MyFaces Core > Issue Type: New Feature > Components: JSR-372 >Reporter: Leonardo Uribe >Assignee: Leonardo Uribe > -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (MYFACES-4098) Implement ResourceHandler.getViewResources(...)
[ https://issues.apache.org/jira/browse/MYFACES-4098?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15895237#comment-15895237 ] Leonardo Uribe commented on MYFACES-4098: - Committed part 2, which is the algorithm body and some tests. There are still some things to do, for example review each loader has the proper filters to avoid unauthorized access to resources and so on, but the solution proposed is good. There are some methods to implement in ViewHandler ( getViews(...) ). It is getting long to solve this point, but there are some considerations with the solution. In the past we have had problems with scanning jar files, because server applications could do some tricks there. So, we need to study here if it is necessary an SPI interface for this kind of tree traversing. The solution committed works but solve this point is far from over. > Implement ResourceHandler.getViewResources(...) > --- > > Key: MYFACES-4098 > URL: https://issues.apache.org/jira/browse/MYFACES-4098 > Project: MyFaces Core > Issue Type: New Feature > Components: JSR-372 >Reporter: Leonardo Uribe >Assignee: Leonardo Uribe > -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (MYFACES-4098) Implement ResourceHandler.getViewResources(...)
[ https://issues.apache.org/jira/browse/MYFACES-4098?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15889113#comment-15889113 ] Leonardo Uribe commented on MYFACES-4098: - Committed part 1 iterators for each ResourceLoader instance. Implementing part 2 which is the Iterator that group all of them together, with the same rules createViewResource(...) works. This is the black box test done to check how this feature works: Stream stream = facesContext.getApplication() .getResourceHandler().getViewResources(facesContext, "/", 2); stream.forEach(s -> { System.out.println(s); }); /helloWorld.xhtml /home.xhtml /page2.xhtml /converter/index.xhtml /managedproperty/managedproperty1.xhtml /managedproperty/managedproperty1_1.xhtml /model/facesdatamodel1.xhtml /websocket/clockAjax.xhtml /websocket/testws.xhtml /websocket/websocket.xhtml Stream stream = facesContext.getApplication() .getResourceHandler().getViewResources(facesContext, "/", 1); stream.forEach(s -> { System.out.println(s); }); /helloWorld.xhtml /home.xhtml /page2.xhtml Stream stream = facesContext.getApplication().getResourceHandler().getViewResources( facesContext, "/websocket", 2, ResourceVisitOption.TOP_LEVEL_VIEWS_ONLY); stream.forEach(s -> { System.out.println(s); }); /websocket/clockAjax.xhtml /websocket/testws.xhtml /websocket/websocket.xhtml Stream stream = facesContext.getApplication().getResourceHandler().getViewResources( facesContext, "/websocket/", 2, ResourceVisitOption.TOP_LEVEL_VIEWS_ONLY); stream.forEach(s -> { System.out.println(s); }); /websocket/clockAjax.xhtml /websocket/testws.xhtml /websocket/websocket.xhtml > Implement ResourceHandler.getViewResources(...) > --- > > Key: MYFACES-4098 > URL: https://issues.apache.org/jira/browse/MYFACES-4098 > Project: MyFaces Core > Issue Type: New Feature > Components: JSR-372 >Reporter: Leonardo Uribe >Assignee: Leonardo Uribe > -- This message was sent by Atlassian JIRA (v6.3.15#6346)