Class 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
    • Field Detail

      • path

        protected final String path
      • name

        protected final String name
      • values

        protected org.apache.sling.api.resource.ValueMap values
      • children

        protected Map<String,​org.apache.sling.api.resource.Resource> children
      • 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 interface org.apache.sling.api.resource.Resource
        Overrides:
        getPath in class org.apache.sling.api.resource.SyntheticResource
      • getName

        @NotNull
        public @NotNull String getName()
        Specified by:
        getName in interface org.apache.sling.api.resource.Resource
        Overrides:
        getName in class org.apache.sling.api.resource.AbstractResource
      • getParent

        @Nullable
        public @Nullable org.apache.sling.api.resource.Resource getParent()
        Specified by:
        getParent in interface org.apache.sling.api.resource.Resource
        Overrides:
        getParent in class org.apache.sling.api.resource.AbstractResource
      • hasChildren

        public boolean hasChildren()
        Specified by:
        hasChildren in interface org.apache.sling.api.resource.Resource
        Overrides:
        hasChildren in class org.apache.sling.api.resource.AbstractResource
      • listChildren

        @NotNull
        public @NotNull Iterator<org.apache.sling.api.resource.Resource> listChildren()
        Specified by:
        listChildren in interface org.apache.sling.api.resource.Resource
        Overrides:
        listChildren in class org.apache.sling.api.resource.AbstractResource
      • getChildren

        @NotNull
        public @NotNull Iterable<org.apache.sling.api.resource.Resource> getChildren()
        Specified by:
        getChildren in interface org.apache.sling.api.resource.Resource
        Overrides:
        getChildren in class org.apache.sling.api.resource.AbstractResource
      • getChild

        @Nullable
        public @Nullable org.apache.sling.api.resource.Resource getChild​(@NotNull
                                                                         @NotNull String relPath)
        Specified by:
        getChild in interface org.apache.sling.api.resource.Resource
        Overrides:
        getChild in class org.apache.sling.api.resource.AbstractResource
      • getResourceType

        @NotNull
        public @NotNull String getResourceType()
        Specified by:
        getResourceType in interface org.apache.sling.api.resource.Resource
        Overrides:
        getResourceType in class org.apache.sling.api.resource.SyntheticResource
      • getResourceSuperType

        @Nullable
        public @Nullable String getResourceSuperType()
        Specified by:
        getResourceSuperType in interface org.apache.sling.api.resource.Resource
        Overrides:
        getResourceSuperType in class org.apache.sling.api.resource.SyntheticResource
      • isResourceType

        public boolean isResourceType​(String resourceType)
        Specified by:
        isResourceType in interface org.apache.sling.api.resource.Resource
        Overrides:
        isResourceType in class org.apache.sling.api.resource.AbstractResource
      • getResourceResolver

        @NotNull
        public @NotNull org.apache.sling.api.resource.ResourceResolver getResourceResolver()
        Specified by:
        getResourceResolver in interface org.apache.sling.api.resource.Resource
        Overrides:
        getResourceResolver in class org.apache.sling.api.resource.SyntheticResource
      • getResourceMetadata

        @NotNull
        public @NotNull org.apache.sling.api.resource.ResourceMetadata getResourceMetadata()
        Specified by:
        getResourceMetadata in interface org.apache.sling.api.resource.Resource
        Overrides:
        getResourceMetadata in class org.apache.sling.api.resource.SyntheticResource
      • getValueMap

        @NotNull
        public @NotNull org.apache.sling.api.resource.ValueMap getValueMap()
        Specified by:
        getValueMap in interface org.apache.sling.api.resource.Resource
        Overrides:
        getValueMap in class org.apache.sling.api.resource.AbstractResource
      • adaptTo

        @Nullable
        public <AdapterType> AdapterType adaptTo​(@NotNull
                                                 @NotNull Class<AdapterType> type)
        Specified by:
        adaptTo in interface org.apache.sling.api.adapter.Adaptable
        Overrides:
        adaptTo in class org.apache.sling.api.adapter.SlingAdaptable