resource
.If the name of the resource does not meet the requirements for matching resources the special value {@link #WEIGHT_NO_MATCH} is returned.Otherwise the actual method/prefix weight to use is returned. The requirements for resource names to be accepted are:
optionalLocationPrefix
is false
, the resource name must be prefixed with the locationPrefix
.locationPrefix
and the request extension is html
.resource
whose name is to be checked
@param locationPrefix The prefix to be matched by resources.
@param optionalLocationPrefix Whether the resources must start with thelocationPrefix
or not. If this is true
, the resources name need not start with the prefix.
@return The method/prefix weight to assign a {@link WeightedResource}based on the given resource
or {@link #WEIGHT_NO_MATCH} if the resource name does not meet abovelisted requirements.
|
|