Klasse ResourceCollector
java.lang.Object
org.apache.sling.servlets.resolver.internal.helper.AbstractResourceCollector
org.apache.sling.servlets.resolver.internal.helper.ResourceCollector
The
- which is used to find an ordered
collection of
ResourceCollector class provides a single public method -
Ungültige Referenz
#getServlets(ResourceResolver)
Resource instances which may be used to find a
servlet or script to handle a request to the given resource.-
Feldübersicht
FelderModifizierer und TypFeldBeschreibungprotected static final intThe special value returned byif the resource is not suitable to handle the request according to the location prefix, request selectors and request extension (value isUngültige Referenz
#calculatePrefixMethodWeight(Resource, String, boolean)Integer.MIN_VALUE).Von Klasse geerbte Felder org.apache.sling.servlets.resolver.internal.helper.AbstractResourceCollector
baseResourceType, CACHE_KEY_CHILDREN_LIST, CACHE_KEY_RESOURCES, executionPaths, extension, hashCode, resourceSuperType, resourceType, useResourceCaching -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungResourceCollector(String methodName, String baseResourceType, org.apache.sling.api.resource.Resource resource, String[] executionPaths) Veraltet.ResourceCollector(String methodName, String baseResourceType, org.apache.sling.api.resource.Resource resource, String extension, String[] executionPaths, boolean useResourceCaching) Creates aResourceCollectorfinding servlets and scripts for the givenmethodName. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic ResourceCollectorcreate(org.apache.sling.api.resource.Resource resource, String extension, String[] executionPaths, Collection<String> defaultExtensions, String methodName, String[] selectors, boolean useResourceCaching) static ResourceCollectorcreate(org.apache.sling.api.SlingJakartaHttpServletRequest request, String[] executionPaths, Collection<String> defaultExtensions, boolean UseResourceCaching) Creates aResourceCollectorfor the givenrequest.booleanprotected voidgetWeightedResources(Set<org.apache.sling.servlets.resolver.internal.helper.WeightedResource> resources, org.apache.sling.api.resource.Resource location) inthashCode()Von Klasse geerbte Methoden org.apache.sling.servlets.resolver.internal.helper.AbstractResourceCollector
addWeightedResource, clearCache, getResource, getResourceOrNull, getServlets, stringEquals
-
Felddetails
-
WEIGHT_NO_MATCH
protected static final int WEIGHT_NO_MATCHThe special value returned byif the resource is not suitable to handle the request according to the location prefix, request selectors and request extension (value isUngültige Referenz
#calculatePrefixMethodWeight(Resource, String, boolean)Integer.MIN_VALUE).- Siehe auch:
-
-
Konstruktordetails
-
ResourceCollector
@Deprecated public ResourceCollector(String methodName, String baseResourceType, org.apache.sling.api.resource.Resource resource, String[] executionPaths) Veraltet.useinstead.Ungültige Referenz
#ResourceCollector(String, String, Resource, String, String[])Creates aResourceCollectorfinding servlets and scripts for the givenmethodName.- Parameter:
methodName- ThemethodNameused to find scripts for. This must not benull.baseResourceType- The basic resource type to use as a final resource super type. If this isnullthe default valueis assumed.Ungültige Referenz
org.apache.sling.servlets.resolver.internal.ServletResolverConstants#DEFAULT_SERVLET_NAMEresource- the resource to invoke, the resource type and resource super type are taken from this resource.executionPaths- the execution paths to consider
-
ResourceCollector
public ResourceCollector(String methodName, String baseResourceType, org.apache.sling.api.resource.Resource resource, String extension, String[] executionPaths, boolean useResourceCaching) Creates aResourceCollectorfinding servlets and scripts for the givenmethodName.- Parameter:
methodName- ThemethodNameused to find scripts for. This must not benull.baseResourceType- The basic resource type to use as a final resource super type. If this isnullthe default valueis assumed.Ungültige Referenz
org.apache.sling.servlets.resolver.internal.ServletResolverConstants#DEFAULT_SERVLET_NAMEresource- the resource to invoke, the resource type and resource super type are taken from this resource.extension- the extension of the request being processedexecutionPaths- the execution paths to consider
-
-
Methodendetails
-
create
public static ResourceCollector create(org.apache.sling.api.SlingJakartaHttpServletRequest request, String[] executionPaths, Collection<String> defaultExtensions, boolean UseResourceCaching) Creates aResourceCollectorfor the givenrequest. If the request is a GET or HEAD request, a specialized instance is returned which also takes the request selectors and request extension into account for finding servlet resources. Otherwise an instance of this class itself is returned which just takes the resource type and request method name into account.- Parameter:
request- TheSlingHttpServletRequestfor which to return aResourceCollector.- Gibt zurück:
- The
ResourceCollectorto find servlets and scripts suitable for handling therequest.
-
create
public static ResourceCollector create(org.apache.sling.api.resource.Resource resource, String extension, String[] executionPaths, Collection<String> defaultExtensions, String methodName, String[] selectors, boolean useResourceCaching) -
getWeightedResources
protected void getWeightedResources(Set<org.apache.sling.servlets.resolver.internal.helper.WeightedResource> resources, org.apache.sling.api.resource.Resource location) - Angegeben von:
getWeightedResourcesin KlasseAbstractResourceCollector
-
hashCode
public int hashCode()- Setzt außer Kraft:
hashCodein KlasseAbstractResourceCollector
-
equals
- Setzt außer Kraft:
equalsin KlasseAbstractResourceCollector
-
Ungültige Referenz