Package org.apache.sling.resourceresolver.impl.legacy

# Class LegacyResourceProviderAdapter

java.lang.Object
org.apache.sling.spi.resource.provider.ResourceProvider<Object>
org.apache.sling.resourceresolver.impl.legacy.LegacyResourceProviderAdapter

All Implemented Interfaces:
  `Closeable`, `AutoCloseable`

public class LegacyResourceProviderAdapter extends org.apache.sling.spi.resource.provider.ResourceProvider<Object> implements Closeable

## Field Summary

### Fields inherited from class org.apache.sling.spi.resource.provider.ResourceProvider

`AUTH_ADMIN, AUTH_CLONE, AUTH_SERVICE_BUNDLE, AUTHENTICATE_LAZY, AUTHENTICATE_NO, AUTHENTICATE_REQUIRED, MODE_OVERLAY, MODE_PASSTHROUGH, PROPERTY_ADAPTABLE, PROPERTY_ATTRIBUTABLE, PROPERTY_AUTHENTICATE, PROPERTY_MODE, PROPERTY_MODIFIABLE, PROPERTY_NAME, PROPERTY_REFRESHABLE, PROPERTY_ROOT, PROPERTY_USE_RESOURCE_ACCESS_SECURITY, RESOURCE_TYPE_SYNTHETIC`

## Constructor Summary

Constructors
Constructor
Description
`LegacyResourceProviderAdapter(org.apache.sling.api.resource.ResourceProvider rp, String[] languages, boolean ownsRoot)`

## Method Summary

Modifier and Type
Method
Description
`<AdapterType>
AdapterType`
`adaptTo(@NotNull org.apache.sling.spi.resource.provider.ResolveContext<Object> ctx, @NotNull Class<AdapterType> type)`
`void`
`close()`
`void`
`commit(@NotNull org.apache.sling.spi.resource.provider.ResolveContext<Object> ctx)`
`org.apache.sling.api.resource.Resource`
`create(@NotNull org.apache.sling.spi.resource.provider.ResolveContext<Object> ctx, String path, Map<String,Object> properties)`
`void`
`delete(@NotNull org.apache.sling.spi.resource.provider.ResolveContext<Object> ctx, @NotNull org.apache.sling.api.resource.Resource resource)`
`Object`
`getAttribute(@NotNull org.apache.sling.spi.resource.provider.ResolveContext<Object> ctx, @NotNull String name)`
`Collection<String>`
`getAttributeNames(@NotNull org.apache.sling.spi.resource.provider.ResolveContext<Object> ctx)`
`@Nullable org.apache.sling.spi.resource.provider.QueryLanguageProvider<Object>`
`getQueryLanguageProvider()`
`org.apache.sling.api.resource.Resource`
`getResource(org.apache.sling.spi.resource.provider.ResolveContext<Object> ctx, String path, org.apache.sling.spi.resource.provider.ResourceContext resourceContext, org.apache.sling.api.resource.Resource parent)`
`boolean`
`hasChanges(@NotNull org.apache.sling.spi.resource.provider.ResolveContext<Object> ctx)`
`boolean`
`isLive(@NotNull org.apache.sling.spi.resource.provider.ResolveContext<Object> ctx)`
`Iterator<org.apache.sling.api.resource.Resource>`
`listChildren(org.apache.sling.spi.resource.provider.ResolveContext<Object> ctx, org.apache.sling.api.resource.Resource parent)`
`void`
`logout(@NotNull Object state)`
`void`
`refresh(@NotNull org.apache.sling.spi.resource.provider.ResolveContext<Object> ctx)`
`void`
`revert(@NotNull org.apache.sling.spi.resource.provider.ResolveContext<Object> ctx)`
`String`
`toString()`

### Methods inherited from class org.apache.sling.spi.resource.provider.ResourceProvider

`authenticate, copy, getParent, getProviderContext, move, orderBefore, start, stop, update`

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

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

## Constructor Details

### LegacyResourceProviderAdapter

public LegacyResourceProviderAdapter(org.apache.sling.api.resource.ResourceProvider rp, String[] languages, boolean ownsRoot)

## Method Details

### getResource

public org.apache.sling.api.resource.Resource getResource(org.apache.sling.spi.resource.provider.ResolveContext<Object> ctx, String path, org.apache.sling.spi.resource.provider.ResourceContext resourceContext, org.apache.sling.api.resource.Resource parent)

Specified by:
  `getResource` in class `org.apache.sling.spi.resource.provider.ResourceProvider<Object>`

### listChildren

public Iterator<org.apache.sling.api.resource.Resource> listChildren(org.apache.sling.spi.resource.provider.ResolveContext<Object> ctx, org.apache.sling.api.resource.Resource parent)

Specified by:
  `listChildren` in class `org.apache.sling.spi.resource.provider.ResourceProvider<Object>`

### refresh

public void refresh(@NotNull @NotNull org.apache.sling.spi.resource.provider.ResolveContext<Object> ctx)

Overrides:
  `refresh` in class `org.apache.sling.spi.resource.provider.ResourceProvider<Object>`

### getQueryLanguageProvider

@Nullable public @Nullable org.apache.sling.spi.resource.provider.QueryLanguageProvider<Object> getQueryLanguageProvider()

Overrides:
  `getQueryLanguageProvider` in class `org.apache.sling.spi.resource.provider.ResourceProvider<Object>`

### getAttributeNames

public Collection<String> getAttributeNames(@NotNull @NotNull org.apache.sling.spi.resource.provider.ResolveContext<Object> ctx)

Overrides:
  `getAttributeNames` in class `org.apache.sling.spi.resource.provider.ResourceProvider<Object>`

### getAttribute

public Object getAttribute(@NotNull @NotNull org.apache.sling.spi.resource.provider.ResolveContext<Object> ctx, @NotNull @NotNull String name)

Overrides:
  `getAttribute` in class `org.apache.sling.spi.resource.provider.ResourceProvider<Object>`

### isLive

public boolean isLive(@NotNull @NotNull org.apache.sling.spi.resource.provider.ResolveContext<Object> ctx)

Overrides:
  `isLive` in class `org.apache.sling.spi.resource.provider.ResourceProvider<Object>`

### logout

public void logout(@NotNull @NotNull Object state)

Overrides:
  `logout` in class `org.apache.sling.spi.resource.provider.ResourceProvider<Object>`

### close

public void close() throws IOException

Specified by:
  `close` in interface `AutoCloseable`
Specified by:
  `close` in interface `Closeable`
Throws:
  `IOException`

### create

public org.apache.sling.api.resource.Resource create(@NotNull @NotNull org.apache.sling.spi.resource.provider.ResolveContext<Object> ctx, String path, Map<String,Object> properties) throws org.apache.sling.api.resource.PersistenceException

Overrides:
  `create` in class `org.apache.sling.spi.resource.provider.ResourceProvider<Object>`
Throws:
  `org.apache.sling.api.resource.PersistenceException`

### delete

public void delete(@NotNull @NotNull org.apache.sling.spi.resource.provider.ResolveContext<Object> ctx, @NotNull @NotNull org.apache.sling.api.resource.Resource resource) throws org.apache.sling.api.resource.PersistenceException

Overrides:
  `delete` in class `org.apache.sling.spi.resource.provider.ResourceProvider<Object>`
Throws:
  `org.apache.sling.api.resource.PersistenceException`

### revert

public void revert(@NotNull @NotNull org.apache.sling.spi.resource.provider.ResolveContext<Object> ctx)

Overrides:
  `revert` in class `org.apache.sling.spi.resource.provider.ResourceProvider<Object>`

### commit

public void commit(@NotNull @NotNull org.apache.sling.spi.resource.provider.ResolveContext<Object> ctx) throws org.apache.sling.api.resource.PersistenceException

Overrides:
  `commit` in class `org.apache.sling.spi.resource.provider.ResourceProvider<Object>`
Throws:
  `org.apache.sling.api.resource.PersistenceException`

### hasChanges

public boolean hasChanges(@NotNull @NotNull org.apache.sling.spi.resource.provider.ResolveContext<Object> ctx)

Overrides:
  `hasChanges` in class `org.apache.sling.spi.resource.provider.ResourceProvider<Object>`

### adaptTo

public <AdapterType> AdapterType adaptTo(@NotNull @NotNull org.apache.sling.spi.resource.provider.ResolveContext<Object> ctx, @NotNull @NotNull Class<AdapterType> type)

Overrides:
  `adaptTo` in class `org.apache.sling.spi.resource.provider.ResourceProvider<Object>`

### toString

public String toString()

Overrides:
  `toString` in class `Object`