public class ContentResource
extends org.springframework.core.io.AbstractResource
Resource
that wraps site contentModifier 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.Resource
exists
in class org.springframework.core.io.AbstractResource
public long contentLength()
contentLength
in interface org.springframework.core.io.Resource
contentLength
in class org.springframework.core.io.AbstractResource
public long lastModified()
lastModified
in interface org.springframework.core.io.Resource
lastModified
in class org.springframework.core.io.AbstractResource
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
Copyright © 2023 CrafterCMS. All rights reserved.