Interface Resource<I extends org.xwiki.filter.input.InputSource>

  • Type Parameters:
    I - the type of the InputSource

    public interface Resource<I extends org.xwiki.filter.input.InputSource>
    Since:
    7.0M1
    Version:
    $Id: d2a94674a99041a4a70fc7366898fe02ed4f5712 $
    • Method Detail

      • getRepository

        ResourceRepository getRepository()
        Returns:
        the repository containing the resource
      • getId

        String getId()
        Returns:
        the unique identifier of the resource
      • getPath

        String getPath()
        Returns:
        the path of the resource
      • getResourceName

        String getResourceName()
        Returns:
        the name of the resource (usually a relative path)
        Since:
        8.3RC1
      • getInputSource

        I getInputSource()
                  throws Exception
        Provide an InputSource to read the resource.
        Returns:
        an InputSource to read the resource
        Throws:
        Exception - when failing to create a InputSource for the resource
      • getInstant

        @Unstable
        default Instant getInstant()
                            throws Exception
        Returns:
        the instant that resource was last modified or null if it's unknown
        Throws:
        Exception - when failing to get the instant of the resource
        Since:
        15.8RC1
      • getURL

        String getURL​(boolean forceSkinAction)
               throws Exception
        Create a URL for the resource.
        Parameters:
        forceSkinAction - true if a dynamic skin URL should be forced
        Returns:
        a URL to the resource
        Throws:
        Exception - when failing to create a URL for the resource