Class ResourceWithMetadata
java.lang.Object
com.broadleafcommerce.asset.storage.provider.service.ResourceWithMetadata
- All Implemented Interfaces:
Serializable
The
Resource
wrapper that contains the additional resource metadata.- Author:
- Dima Myroniuk (dmyroniuk)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
Any additional metadata for this resource.The Content-Disposition HTTP header value of the resource if known when reading it.long
The Content-Length HTTP header value indicating the size of the associated object in bytes.The content type of the resource if known when reading it.Returnsfilename
if it is not blank or theResource filename
.org.springframework.core.io.Resource
The resource descriptor.int
hashCode()
void
setAdditionalMetadata
(Map<String, Object> additionalMetadata) Any additional metadata for this resource.void
setContentDisposition
(String contentDisposition) The Content-Disposition HTTP header value of the resource if known when reading it.void
setContentLength
(long contentLength) The Content-Length HTTP header value indicating the size of the associated object in bytes.void
setContentType
(String contentType) The content type of the resource if known when reading it.void
setFilename
(String filename) The file name.void
setResource
(org.springframework.core.io.Resource resource) The resource descriptor.toString()
-
Constructor Details
-
ResourceWithMetadata
public ResourceWithMetadata() -
ResourceWithMetadata
-
-
Method Details
-
getFilename
Returnsfilename
if it is not blank or theResource filename
.- Returns:
- the file name of this resource or null if this type of resource does not have a filename
-
getResource
public org.springframework.core.io.Resource getResource()The resource descriptor. -
getContentType
The content type of the resource if known when reading it. -
getContentDisposition
The Content-Disposition HTTP header value of the resource if known when reading it. -
getContentLength
public long getContentLength()The Content-Length HTTP header value indicating the size of the associated object in bytes. -
getAdditionalMetadata
Any additional metadata for this resource. -
setResource
public void setResource(org.springframework.core.io.Resource resource) The resource descriptor. -
setFilename
The file name. Typically, the last part of the path — for example, "myfile.txt". -
setContentType
The content type of the resource if known when reading it. -
setContentDisposition
The Content-Disposition HTTP header value of the resource if known when reading it. -
setContentLength
public void setContentLength(long contentLength) The Content-Length HTTP header value indicating the size of the associated object in bytes. -
setAdditionalMetadata
Any additional metadata for this resource. -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-