Class ContentStoreResource

java.lang.Object
org.springframework.core.io.AbstractResource
org.craftercms.engine.util.spring.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
  • Field Details

  • Constructor Details

    • ContentStoreResource

      public ContentStoreResource(SiteContext siteContext, String url)
  • Method Details

    • 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()
    • getInputStream

      public InputStream getInputStream() throws IOException
      Throws:
      IOException
    • getContent

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