public class ContentStoreResource
extends org.springframework.core.io.AbstractResource
Resource
for a Crafter content store Content
.Modifier and Type | Field and Description |
---|---|
protected SiteContext |
siteContext |
protected String |
url |
Constructor and Description |
---|
ContentStoreResource(SiteContext siteContext,
String url) |
Modifier and Type | Method and Description |
---|---|
long |
contentLength() |
boolean |
exists() |
protected org.craftercms.core.service.Content |
getContent() |
String |
getDescription() |
File |
getFile() |
String |
getFilename() |
InputStream |
getInputStream() |
URL |
getURL() |
long |
lastModified() |
protected SiteContext siteContext
protected String url
public ContentStoreResource(SiteContext siteContext, String url)
public boolean exists()
exists
in interface org.springframework.core.io.Resource
exists
in class org.springframework.core.io.AbstractResource
public URL getURL() throws IOException
getURL
in interface org.springframework.core.io.Resource
getURL
in class org.springframework.core.io.AbstractResource
IOException
public long contentLength() throws IOException
contentLength
in interface org.springframework.core.io.Resource
contentLength
in class org.springframework.core.io.AbstractResource
IOException
public long lastModified() throws IOException
lastModified
in interface org.springframework.core.io.Resource
lastModified
in class org.springframework.core.io.AbstractResource
IOException
public File getFile() throws IOException
getFile
in interface org.springframework.core.io.Resource
getFile
in class org.springframework.core.io.AbstractResource
IOException
public String getFilename()
getFilename
in interface org.springframework.core.io.Resource
getFilename
in class org.springframework.core.io.AbstractResource
public String getDescription()
public InputStream getInputStream() throws IOException
IOException
protected org.craftercms.core.service.Content getContent()
Copyright © 2023 CrafterCMS. All rights reserved.