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

Carsten Ziegeler edited comment on SLING-5201 at 10/27/15 1:35 PM:
-------------------------------------------------------------------

I refactored the API in rev 1710797:
- ResolveContext renamed to ResolverContext - this context holds all 
information related to the current resource resolver (user session) and can 
therefore be cached per resource resolver instance
- ResourceContext - all additional information for resolving a resource, 
getResolveParameters() is the only method
- Most methods in ResourceProvider simply take a ResolverContext, getResource 
additionally gets a ResourceContext


was (Author: cziegeler):
I refactored the API in rev 1710797:
- getParentResourceProvider moved to ProviderContext
- ResolveContext renamed to ResolverContext - this context holds all 
information related to the current resource resolver (user session) and can 
therefore be cached per resource resolver instance
- ResourceContext - all additional information for resolving a resource, 
getResolveParameters() is the only method
- Most methods in ResourceProvider simply take a ResolverContext, getResource 
additionally gets a ResourceContext

> Improve resource provider resolving
> -----------------------------------
>
>                 Key: SLING-5201
>                 URL: https://issues.apache.org/jira/browse/SLING-5201
>             Project: Sling
>          Issue Type: Improvement
>          Components: ResourceResolver
>            Reporter: Carsten Ziegeler
>             Fix For: API 2.10.0, Resource Resolver 1.2.8
>
>
> With the new implementation, whenever the best matching resource provider for 
> a path is searched, the implementation calls:
> CombinedResourceProvider#getMatchingProviders(path) which returns a list and 
> then the first element from the list is fetched (through the head method).
> I think we could and should avoid creating the unnecessary intermediate list 
> object, and simply return the most matching provider (which is the last one 
> matching)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to