Class SyntheticResource

    • Constructor Detail

      • SyntheticResource

        public SyntheticResource​(@NotNull
                                 @NotNull ResourceResolver resourceResolver,
                                 @NotNull
                                 @NotNull java.lang.String path,
                                 @NotNull
                                 @NotNull java.lang.String resourceType)
        Creates a synthetic resource with the given path and resourceType.
        Parameters:
        resourceResolver - The resource resolver
        path - The resource path
        resourceType - The type of the resource
      • SyntheticResource

        public SyntheticResource​(@NotNull
                                 @NotNull ResourceResolver resourceResolver,
                                 @NotNull
                                 @NotNull ResourceMetadata rm,
                                 @NotNull
                                 @NotNull java.lang.String resourceType)
        Creates a synthetic resource with the given ResourceMetadata and resourceType.
        Parameters:
        resourceResolver - The resource resolver
        rm - The resource meta data
        resourceType - The type of the resource
    • Method Detail

      • getPath

        @NotNull
        public @NotNull java.lang.String getPath()
        Description copied from interface: Resource
        Returns the absolute path of this resource in the resource tree.
        Returns:
        The resource path
        See Also:
        Resource.getPath()
      • getResourceType

        @NotNull
        public @NotNull java.lang.String getResourceType()
        Description copied from interface: Resource
        The resource type is meant to point to rendering/processing scripts, editing dialogs, etc. It is usually a path in the repository, where scripts and other tools definitions are found, but the ResourceResolver is free to set this to any suitable value such as the primary node type of the JCR node from which the resource is created.

        If the resource instance represents a resource which is not actually existing, this method returns Resource.RESOURCE_TYPE_NON_EXISTING.

        Returns:
        The resource type
        See Also:
        Resource.getResourceType()
      • getResourceSuperType

        public java.lang.String getResourceSuperType()
        Synthetic resources by default do not have a resource super type.
        Returns:
        The super type of the resource or null.
      • getResourceResolver

        @NotNull
        public @NotNull ResourceResolver getResourceResolver()
        Returns the ResourceResolver with which this synthetic resource is related or null if none.
        Returns:
        The resource resolver
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object