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
This `ViaProvider` implements the counterpart of the `ForcedResourceTypeViaProvider` and the `ResourceSuperTypeViaProvider`. It is in particular helpful in models that want to inject another model using the original `Resource`'s, `SlingJakartaHttpServletRequest`'s or `SlingHttpServletRequest`'s resource type instead of the one forced by either of the above-mentioned `ViaProvider`s

The implementation simply unwraps the `ResourceWrapper`, `SlingJakartaHttpServletRequestWrapper` or `SlingHttpServletRequestWrapper` used by the `ForcedResourceTypeViaProvider` and `ResourceSuperTypeViaProvider`.

## Field Summary

### Fields inherited from interface org.apache.sling.models.spi.ViaProvider

`ORIGINAL`

## Constructor Summary

Constructors
Constructor
Description
`OriginalResourceTypeViaProvider()`

## Method Summary

Modifier and Type
Method
Description
`Object`
`getAdaptable(Object original, String value)`
`Class<? extends org.apache.sling.models.annotations.ViaProviderType>`
`getType()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### OriginalResourceTypeViaProvider

public OriginalResourceTypeViaProvider()

## Method Details

### getType

public Class<? extends org.apache.sling.models.annotations.ViaProviderType> getType()

Specified by:
  `getType` in interface `org.apache.sling.models.spi.ViaProvider`

### getAdaptable

public Object getAdaptable(Object original, String value)

Specified by:
  `getAdaptable` in interface `org.apache.sling.models.spi.ViaProvider`