public class ContentResource
extends org.springframework.core.io.AbstractResource
Resource that wraps site content| Modifier and Type | Field and Description |
|---|---|
protected ContentService |
contentService
The content service
|
protected String |
path
The relative path of the content
|
protected String |
site
The site id
|
| Constructor and Description |
|---|
ContentResource(ContentService contentService,
String site,
String path) |
| Modifier and Type | Method and Description |
|---|---|
long |
contentLength() |
boolean |
exists() |
String |
getDescription() |
String |
getFilename() |
InputStream |
getInputStream() |
long |
lastModified() |
protected ContentService contentService
protected String site
protected String path
public ContentResource(ContentService contentService, String site, String path)
public boolean exists()
exists in interface org.springframework.core.io.Resourceexists in class org.springframework.core.io.AbstractResourcepublic long contentLength()
contentLength in interface org.springframework.core.io.ResourcecontentLength in class org.springframework.core.io.AbstractResourcepublic long lastModified()
lastModified in interface org.springframework.core.io.ResourcelastModified in class org.springframework.core.io.AbstractResourcepublic String getFilename()
getFilename in interface org.springframework.core.io.ResourcegetFilename in class org.springframework.core.io.AbstractResourcepublic String getDescription()
public InputStream getInputStream() throws IOException
IOExceptionCopyright © 2023 CrafterCMS. All rights reserved.