Package com.day.cq.wcm.foundation.forms
Class MergedMultiResource
java.lang.Object
org.apache.sling.api.adapter.SlingAdaptable
org.apache.sling.api.resource.AbstractResource
org.apache.sling.api.resource.SyntheticResource
com.day.cq.wcm.foundation.forms.MergedMultiResource
MergedMultiResource is a synthetic resource that presents a
merged view on multiple resources. This is done by providing a
ValueMap in adaptTo(Class) that merges the values of all
resources, ie. provide a null value for a key if the value is not the same in
all resurces and only present a value if that one is present in exactly all
of the resources.-
Field Summary
Fields inherited from interface org.apache.sling.api.resource.Resource
RESOURCE_TYPE_NON_EXISTING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<AdapterType>
AdapterTypeCalls into the registeredAdapterManagerto adapt this object to the desiredtype.Methods inherited from class org.apache.sling.api.resource.SyntheticResource
getPath, getResourceMetadata, getResourceResolver, getResourceSuperType, getResourceType, toStringMethods inherited from class org.apache.sling.api.resource.AbstractResource
getChild, getChildren, getName, getParent, getValueMap, hasChildren, isResourceType, listChildrenMethods inherited from class org.apache.sling.api.adapter.SlingAdaptable
setAdapterManager, unsetAdapterManager
-
Constructor Details
-
MergedMultiResource
-
-
Method Details
-
adaptTo
Description copied from class:SlingAdaptableCalls into the registeredAdapterManagerto adapt this object to the desiredtype.This method implements a cache of adapters to improve performance. That is repeated calls to this method with the same class will result in the same object to be returned.
- Specified by:
adaptToin interfaceAdaptable- Overrides:
adaptToin classSlingAdaptable- Type Parameters:
AdapterType- The generic type to which this resource is adapted to- Parameters:
type- The Class object of the target type, such asjavax.jcr.Node.classorjava.io.File.class- Returns:
- The adapter target or
nullif the resource cannot adapt to the requested type
-