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 class
RemoteResource.NonExisting
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,org.apache.sling.api.resource.Resource>
children
protected org.apache.sling.api.resource.ResourceMetadata
metadata
protected org.apache.sling.api.resource.ModifiableValueMap
modifiedValues
protected String
name
protected String
path
static String
REMOTE_TYPE
protected RemoteResolver
resolver
protected org.apache.sling.api.resource.ValueMap
values
-
Constructor Summary
Constructors Modifier Constructor Description RemoteResource(@NotNull RemoteResolver resolver, @NotNull String path)
protected
RemoteResource(@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.Resource
getChild(@NotNull String relPath)
@NotNull Iterable<org.apache.sling.api.resource.Resource>
getChildren()
@NotNull String
getName()
@Nullable org.apache.sling.api.resource.Resource
getParent()
@NotNull String
getPath()
@NotNull org.apache.sling.api.resource.ResourceMetadata
getResourceMetadata()
@NotNull org.apache.sling.api.resource.ResourceResolver
getResourceResolver()
@Nullable String
getResourceSuperType()
@NotNull String
getResourceType()
@NotNull org.apache.sling.api.resource.ValueMap
getValueMap()
boolean
hasChildren()
boolean
isResourceType(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:
getPath
in interfaceorg.apache.sling.api.resource.Resource
- Overrides:
getPath
in classorg.apache.sling.api.resource.SyntheticResource
-
getName
@NotNull public @NotNull String getName()
- Specified by:
getName
in interfaceorg.apache.sling.api.resource.Resource
- Overrides:
getName
in classorg.apache.sling.api.resource.AbstractResource
-
getParent
@Nullable public @Nullable org.apache.sling.api.resource.Resource getParent()
- Specified by:
getParent
in interfaceorg.apache.sling.api.resource.Resource
- Overrides:
getParent
in classorg.apache.sling.api.resource.AbstractResource
-
hasChildren
public boolean hasChildren()
- Specified by:
hasChildren
in interfaceorg.apache.sling.api.resource.Resource
- Overrides:
hasChildren
in classorg.apache.sling.api.resource.AbstractResource
-
listChildren
@NotNull public @NotNull Iterator<org.apache.sling.api.resource.Resource> listChildren()
- Specified by:
listChildren
in interfaceorg.apache.sling.api.resource.Resource
- Overrides:
listChildren
in classorg.apache.sling.api.resource.AbstractResource
-
getChildren
@NotNull public @NotNull Iterable<org.apache.sling.api.resource.Resource> getChildren()
- Specified by:
getChildren
in interfaceorg.apache.sling.api.resource.Resource
- Overrides:
getChildren
in classorg.apache.sling.api.resource.AbstractResource
-
getChild
@Nullable public @Nullable org.apache.sling.api.resource.Resource getChild(@NotNull @NotNull String relPath)
- Specified by:
getChild
in interfaceorg.apache.sling.api.resource.Resource
- Overrides:
getChild
in classorg.apache.sling.api.resource.AbstractResource
-
getResourceType
@NotNull public @NotNull String getResourceType()
- Specified by:
getResourceType
in interfaceorg.apache.sling.api.resource.Resource
- Overrides:
getResourceType
in classorg.apache.sling.api.resource.SyntheticResource
-
getResourceSuperType
@Nullable public @Nullable String getResourceSuperType()
- Specified by:
getResourceSuperType
in interfaceorg.apache.sling.api.resource.Resource
- Overrides:
getResourceSuperType
in classorg.apache.sling.api.resource.SyntheticResource
-
isResourceType
public boolean isResourceType(String resourceType)
- Specified by:
isResourceType
in interfaceorg.apache.sling.api.resource.Resource
- Overrides:
isResourceType
in classorg.apache.sling.api.resource.AbstractResource
-
getResourceResolver
@NotNull public @NotNull org.apache.sling.api.resource.ResourceResolver getResourceResolver()
- Specified by:
getResourceResolver
in interfaceorg.apache.sling.api.resource.Resource
- Overrides:
getResourceResolver
in classorg.apache.sling.api.resource.SyntheticResource
-
getResourceMetadata
@NotNull public @NotNull org.apache.sling.api.resource.ResourceMetadata getResourceMetadata()
- Specified by:
getResourceMetadata
in interfaceorg.apache.sling.api.resource.Resource
- Overrides:
getResourceMetadata
in classorg.apache.sling.api.resource.SyntheticResource
-
getValueMap
@NotNull public @NotNull org.apache.sling.api.resource.ValueMap getValueMap()
- Specified by:
getValueMap
in interfaceorg.apache.sling.api.resource.Resource
- Overrides:
getValueMap
in classorg.apache.sling.api.resource.AbstractResource
-
adaptTo
@Nullable public <AdapterType> AdapterType adaptTo(@NotNull @NotNull Class<AdapterType> type)
- Specified by:
adaptTo
in interfaceorg.apache.sling.api.adapter.Adaptable
- Overrides:
adaptTo
in classorg.apache.sling.api.adapter.SlingAdaptable
-
-