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.Resourceexists in class org.springframework.core.io.AbstractResourcepublic URL getURL() throws IOException
getURL in interface org.springframework.core.io.ResourcegetURL in class org.springframework.core.io.AbstractResourceIOExceptionpublic long contentLength()
throws IOException
contentLength in interface org.springframework.core.io.ResourcecontentLength in class org.springframework.core.io.AbstractResourceIOExceptionpublic long lastModified()
throws IOException
lastModified in interface org.springframework.core.io.ResourcelastModified in class org.springframework.core.io.AbstractResourceIOExceptionpublic File getFile() throws IOException
getFile in interface org.springframework.core.io.ResourcegetFile in class org.springframework.core.io.AbstractResourceIOExceptionpublic String getFilename()
getFilename in interface org.springframework.core.io.ResourcegetFilename in class org.springframework.core.io.AbstractResourcepublic String getDescription()
public InputStream getInputStream() throws IOException
IOExceptionprotected org.craftercms.core.service.Content getContent()
Copyright © 2023 CrafterCMS. All rights reserved.