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 booleanbooleanAny additional metadata for this resource.The Content-Disposition HTTP header value of the resource if known when reading it.longThe 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.Returnsfilenameif it is not blank or theResource filename.org.springframework.core.io.ResourceThe resource descriptor.inthashCode()voidsetAdditionalMetadata(Map<String, Object> additionalMetadata) Any additional metadata for this resource.voidsetContentDisposition(String contentDisposition) The Content-Disposition HTTP header value of the resource if known when reading it.voidsetContentLength(long contentLength) The Content-Length HTTP header value indicating the size of the associated object in bytes.voidsetContentType(String contentType) The content type of the resource if known when reading it.voidsetFilename(String filename) The file name.voidsetResource(org.springframework.core.io.Resource resource) The resource descriptor.toString()
-
Constructor Details
-
ResourceWithMetadata
public ResourceWithMetadata() -
ResourceWithMetadata
-
-
Method Details
-
getFilename
Returnsfilenameif 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
-