Package org.apache.sling.resourcemerger.api

## Interface ResourceMergerService

All Known Implementing Classes:
  `SearchPathBasedResourcePicker`

    @Deprecated
    @ProviderType
    public interface ResourceMergerService

Deprecated.
Service to handle merged resources.

### Method Summary

All Methods Instance Methods Abstract Methods Deprecated Methods
`@Nullable org.apache.sling.api.resource.Resource` `getMergedResource​(org.apache.sling.api.resource.Resource resource)` Deprecated. Returns a merged resource if the provided resource is from one of the search paths and the resource is not hidden.
`@NotNull String` `getMergedResourcePath​(String relativePath)` Deprecated. Returns the absolute path for the provided relative path.
`@NotNull String` `getResourcePath​(@NotNull String searchPath, @NotNull String mergedResourcePath)` Deprecated. Return a resource path by taking the path of the merged resource, removing the mount point and replacing it with the search path.
`boolean` `isMergedResource​(org.apache.sling.api.resource.Resource resource)` Deprecated. Returns `true` if the provided `Resource` is a merged resource.

### Method Detail

#### getMergedResourcePath

    @NotNull
    @NotNull String getMergedResourcePath​(String relativePath)

Deprecated.
Returns the absolute path for the provided relative path.

Parameters:
  `relativePath` - The relative path
Returns:
  Returns the merged resource path
Throws:
  `IllegalArgumentException` - if relativePath is `null` or absolute

#### getMergedResource

    @Nullable
    @Nullable org.apache.sling.api.resource.Resource getMergedResource​(org.apache.sling.api.resource.Resource resource)

Deprecated.
Returns a merged resource if the provided resource is from one of the search paths and the resource is not hidden. If the resource is `null`, `null` is returned.

Parameters:
  `resource` - The resource
Returns:
  Returns the merged resource or `null`

#### isMergedResource

    boolean isMergedResource​(org.apache.sling.api.resource.Resource resource)

Deprecated.
Returns `true` if the provided `Resource` is a merged resource. If the resource is `null`, `false` is returned.

Parameters:
  `resource` - The resource
Returns:
  Returns `true` if the provided `Resource` is a merged resource.

#### getResourcePath

    @NotNull
    @NotNull String getResourcePath​(@NotNull
                                    @NotNull String searchPath,
                                    @NotNull
                                    @NotNull String mergedResourcePath)

Deprecated.
Return a resource path by taking the path of the merged resource, removing the mount point and replacing it with the search path. For example, if the provided search path is "/apps/" and the merged resource path is "/mnt/overlay/my/resource", the result will be "/apps/my/resource".

Parameters:
  `searchPath` - The search path, this is an absolute path ending with a slash as returned by the resource resolver
  `mergedResourcePath` - An absolute path to a merged resource
Returns:
  The path to the resource
Throws:
  `IllegalArgumentException` - If search path is not absolute or does not end with a slash or if the merged resource path is not within the space of the merged resources.
Since:
  1.1