Class RemoteResource
- java.lang.Object
-
- org.apache.sling.api.adapter.SlingAdaptable
-
- org.apache.sling.api.resource.AbstractResource
-
- org.apache.sling.api.resource.SyntheticResource
-
- com.composum.sling.nodes.mount.remote.RemoteResource
-
- All Implemented Interfaces:
org.apache.sling.api.adapter.Adaptable,org.apache.sling.api.resource.Resource
- Direct Known Subclasses:
RemoteResource.NonExisting
public class RemoteResource extends org.apache.sling.api.resource.SyntheticResource
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRemoteResource.NonExisting
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,org.apache.sling.api.resource.Resource>childrenprotected org.apache.sling.api.resource.ResourceMetadatametadataprotected org.apache.sling.api.resource.ModifiableValueMapmodifiedValuesprotected Stringnameprotected Stringpathstatic StringREMOTE_TYPEprotected RemoteResolverresolverprotected org.apache.sling.api.resource.ValueMapvalues
-
Constructor Summary
Constructors Modifier Constructor Description RemoteResource(@NotNull RemoteResolver resolver, @NotNull String path)protectedRemoteResource(@NotNull RemoteResource template, @NotNull String path)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <AdapterType>
AdapterTypeadaptTo(@NotNull Class<AdapterType> type)protected @NotNull Map<String,org.apache.sling.api.resource.Resource>children()the set of children is lazy loaded; initially this set is 'null' which marks the resource as 'not loaded completely';@Nullable org.apache.sling.api.resource.ResourcegetChild(@NotNull String relPath)@NotNull Iterable<org.apache.sling.api.resource.Resource>getChildren()@NotNull StringgetName()@Nullable org.apache.sling.api.resource.ResourcegetParent()@NotNull StringgetPath()@NotNull org.apache.sling.api.resource.ResourceMetadatagetResourceMetadata()@NotNull org.apache.sling.api.resource.ResourceResolvergetResourceResolver()@Nullable StringgetResourceSuperType()@NotNull StringgetResourceType()@NotNull org.apache.sling.api.resource.ValueMapgetValueMap()booleanhasChildren()booleanisResourceType(String resourceType)@NotNull Iterator<org.apache.sling.api.resource.Resource>listChildren()
-
-
-
Field Detail
-
REMOTE_TYPE
public static final String REMOTE_TYPE
- See Also:
- Constant Field Values
-
resolver
protected RemoteResolver resolver
-
path
protected final String path
-
name
protected final String name
-
values
protected org.apache.sling.api.resource.ValueMap values
-
modifiedValues
protected org.apache.sling.api.resource.ModifiableValueMap modifiedValues
-
metadata
protected org.apache.sling.api.resource.ResourceMetadata metadata
-
-
Constructor Detail
-
RemoteResource
public RemoteResource(@NotNull @NotNull RemoteResolver resolver, @NotNull @NotNull String path)
-
RemoteResource
protected RemoteResource(@NotNull @NotNull RemoteResource template, @NotNull @NotNull String path)
-
-
Method Detail
-
children
@NotNull protected @NotNull Map<String,org.apache.sling.api.resource.Resource> children()
the set of children is lazy loaded; initially this set is 'null' which marks the resource as 'not loaded completely';- Returns:
- the set of children, loaded if not done already
-
getPath
@NotNull public @NotNull String getPath()
- Specified by:
getPathin interfaceorg.apache.sling.api.resource.Resource- Overrides:
getPathin classorg.apache.sling.api.resource.SyntheticResource
-
getName
@NotNull public @NotNull String getName()
- Specified by:
getNamein interfaceorg.apache.sling.api.resource.Resource- Overrides:
getNamein classorg.apache.sling.api.resource.AbstractResource
-
getParent
@Nullable public @Nullable org.apache.sling.api.resource.Resource getParent()
- Specified by:
getParentin interfaceorg.apache.sling.api.resource.Resource- Overrides:
getParentin classorg.apache.sling.api.resource.AbstractResource
-
hasChildren
public boolean hasChildren()
- Specified by:
hasChildrenin interfaceorg.apache.sling.api.resource.Resource- Overrides:
hasChildrenin classorg.apache.sling.api.resource.AbstractResource
-
listChildren
@NotNull public @NotNull Iterator<org.apache.sling.api.resource.Resource> listChildren()
- Specified by:
listChildrenin interfaceorg.apache.sling.api.resource.Resource- Overrides:
listChildrenin classorg.apache.sling.api.resource.AbstractResource
-
getChildren
@NotNull public @NotNull Iterable<org.apache.sling.api.resource.Resource> getChildren()
- Specified by:
getChildrenin interfaceorg.apache.sling.api.resource.Resource- Overrides:
getChildrenin classorg.apache.sling.api.resource.AbstractResource
-
getChild
@Nullable public @Nullable org.apache.sling.api.resource.Resource getChild(@NotNull @NotNull String relPath)- Specified by:
getChildin interfaceorg.apache.sling.api.resource.Resource- Overrides:
getChildin classorg.apache.sling.api.resource.AbstractResource
-
getResourceType
@NotNull public @NotNull String getResourceType()
- Specified by:
getResourceTypein interfaceorg.apache.sling.api.resource.Resource- Overrides:
getResourceTypein classorg.apache.sling.api.resource.SyntheticResource
-
getResourceSuperType
@Nullable public @Nullable String getResourceSuperType()
- Specified by:
getResourceSuperTypein interfaceorg.apache.sling.api.resource.Resource- Overrides:
getResourceSuperTypein classorg.apache.sling.api.resource.SyntheticResource
-
isResourceType
public boolean isResourceType(String resourceType)
- Specified by:
isResourceTypein interfaceorg.apache.sling.api.resource.Resource- Overrides:
isResourceTypein classorg.apache.sling.api.resource.AbstractResource
-
getResourceResolver
@NotNull public @NotNull org.apache.sling.api.resource.ResourceResolver getResourceResolver()
- Specified by:
getResourceResolverin interfaceorg.apache.sling.api.resource.Resource- Overrides:
getResourceResolverin classorg.apache.sling.api.resource.SyntheticResource
-
getResourceMetadata
@NotNull public @NotNull org.apache.sling.api.resource.ResourceMetadata getResourceMetadata()
- Specified by:
getResourceMetadatain interfaceorg.apache.sling.api.resource.Resource- Overrides:
getResourceMetadatain classorg.apache.sling.api.resource.SyntheticResource
-
getValueMap
@NotNull public @NotNull org.apache.sling.api.resource.ValueMap getValueMap()
- Specified by:
getValueMapin interfaceorg.apache.sling.api.resource.Resource- Overrides:
getValueMapin classorg.apache.sling.api.resource.AbstractResource
-
adaptTo
@Nullable public <AdapterType> AdapterType adaptTo(@NotNull @NotNull Class<AdapterType> type)- Specified by:
adaptToin interfaceorg.apache.sling.api.adapter.Adaptable- Overrides:
adaptToin classorg.apache.sling.api.adapter.SlingAdaptable
-
-