Class ContextResource
- java.lang.Object
-
- org.apache.sling.caconfig.resource.spi.ContextResource
-
@ProviderType public final class ContextResource extends java.lang.Object
Holds reference to a context root resource and configuration reference path that was detected for the configuration context.
-
-
Constructor Summary
Constructors Constructor Description ContextResource(@NotNull Resource resource, java.lang.String configRef)Deprecated.ContextResource(@NotNull Resource resource, java.lang.String configRef, int serviceRanking)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)@Nullable java.lang.StringgetConfigRef()@NotNull ResourcegetResource()intgetServiceRanking()inthashCode()
-
-
-
Constructor Detail
-
ContextResource
public ContextResource(@NotNull @NotNull Resource resource, java.lang.String configRef, int serviceRanking)- Parameters:
resource- Context root resourceconfigRef- Config reference (normally a resource path). May be null if theConfigurationResourceResolvingStrategyhas it's own concept of detecting the matching configuration.serviceRanking- Service ranking of the context path strategy implementation
-
ContextResource
@Deprecated public ContextResource(@NotNull @NotNull Resource resource, java.lang.String configRef)Deprecated.- Parameters:
resource- Context root resourceconfigRef- Config reference (normally a resource path). May be null if theConfigurationResourceResolvingStrategyhas it's own concept of detecting the matching configuration.
-
-
Method Detail
-
getResource
@NotNull public @NotNull Resource getResource()
- Returns:
- Context root resource
-
getConfigRef
@Nullable public @Nullable java.lang.String getConfigRef()
- Returns:
- Config reference (normally a resource path).
May be null if the
ConfigurationResourceResolvingStrategyhas it's own concept of detecting the matching configuration.
-
getServiceRanking
public int getServiceRanking()
- Returns:
- Service ranking of the context path strategy implementation
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-