Package org.apache.sling.models.impl.via
Class OriginalResourceTypeViaProvider
- java.lang.Object
-
- org.apache.sling.models.impl.via.OriginalResourceTypeViaProvider
-
- All Implemented Interfaces:
org.apache.sling.models.spi.ViaProvider
public class OriginalResourceTypeViaProvider extends Object implements org.apache.sling.models.spi.ViaProvider
ThisViaProviderimplements the counterpart of theForcedResourceTypeViaProviderand theResourceSuperTypeViaProvider. It is in particular helpful in models that want to inject another model using the originalResource's orSlingHttpServletRequest's resource type instead of the one forced by either of the above-mentionedViaProvidersThe implementation simply unwraps the
ResourceWrapperorSlingHttpServletRequestWrapperused by theForcedResourceTypeViaProviderandResourceSuperTypeViaProvider.
-
-
Constructor Summary
Constructors Constructor Description OriginalResourceTypeViaProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectgetAdaptable(Object original, String value)Class<? extends org.apache.sling.models.annotations.ViaProviderType>getType()
-
-
-
Method Detail
-
getType
public Class<? extends org.apache.sling.models.annotations.ViaProviderType> getType()
- Specified by:
getTypein interfaceorg.apache.sling.models.spi.ViaProvider
-
-