Class ContentStoreResource

  • All Implemented Interfaces:
    org.springframework.core.io.InputStreamSource, org.springframework.core.io.Resource

    public class ContentStoreResource
    extends org.springframework.core.io.AbstractResource
    A Resource for a Crafter content store Content.
    Author:
    avasquez
    • Constructor Detail

      • ContentStoreResource

        public ContentStoreResource​(SiteContext siteContext,
                                    String url)
    • Method Detail

      • exists

        public boolean exists()
        Specified by:
        exists in interface org.springframework.core.io.Resource
        Overrides:
        exists in class org.springframework.core.io.AbstractResource
      • getURL

        public URL getURL()
                   throws IOException
        Specified by:
        getURL in interface org.springframework.core.io.Resource
        Overrides:
        getURL in class org.springframework.core.io.AbstractResource
        Throws:
        IOException
      • contentLength

        public long contentLength()
                           throws IOException
        Specified by:
        contentLength in interface org.springframework.core.io.Resource
        Overrides:
        contentLength in class org.springframework.core.io.AbstractResource
        Throws:
        IOException
      • lastModified

        public long lastModified()
                          throws IOException
        Specified by:
        lastModified in interface org.springframework.core.io.Resource
        Overrides:
        lastModified in class org.springframework.core.io.AbstractResource
        Throws:
        IOException
      • getFile

        public File getFile()
                     throws IOException
        Specified by:
        getFile in interface org.springframework.core.io.Resource
        Overrides:
        getFile in class org.springframework.core.io.AbstractResource
        Throws:
        IOException
      • getFilename

        public String getFilename()
        Specified by:
        getFilename in interface org.springframework.core.io.Resource
        Overrides:
        getFilename in class org.springframework.core.io.AbstractResource
      • getDescription

        public String getDescription()
      • getContent

        protected org.craftercms.core.service.Content getContent()