public class CMAAssetFile
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
CMAAssetFile.Details
Read only structure, detailing the content of the asset uploaded.
|
| Constructor and Description |
|---|
CMAAssetFile() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getContentType()
Get the content type stored here.
|
CMAAssetFile.Details |
getDetails() |
java.lang.String |
getFileName() |
CMALink |
getUploadFrom() |
java.lang.String |
getUploadUrl() |
java.lang.String |
getUrl()
Return the public accessible url of this asset.
|
CMAAssetFile |
setContentType(java.lang.String contentType)
Set what content type is stored in this asset.
|
CMAAssetFile |
setFileName(java.lang.String fileName)
Set a filename to be used for identifying the file.
|
CMAAssetFile |
setUploadFrom(CMALink uploadFrom)
Set a link to a Contentful Upload entry, to be used for processing the binary data from.
|
CMAAssetFile |
setUploadUrl(java.lang.String upload)
Set a public accessible url to be used for processing the binary data from.
|
java.lang.String |
toString() |
public java.lang.String getUrl()
This url only exists, if the asset is uploaded and processed
ModuleAssets.process(CMAAsset, String).
public java.lang.String getUploadUrl()
public CMAAssetFile setUploadUrl(java.lang.String upload)
Warning: Setting an upload url will also erase the url, details and
uploadFrom, until the asset got processed again.
upload - the remote url of the upload.public CMALink getUploadFrom()
ModuleUploadspublic CMAAssetFile setUploadFrom(CMALink uploadFrom)
Warning: Setting an upload from will also erase the url, details and
upload, until the asset got processed again.
uploadFrom - a link to an uploaded resource.ModuleUploadspublic CMAAssetFile.Details getDetails()
public java.lang.String getFileName()
public CMAAssetFile setFileName(java.lang.String fileName)
fileName - the name of the file.public java.lang.String getContentType()
Constants.DEFAULT_CONTENT_TYPE,
Constants.OCTET_STREAM_CONTENT_TYPEpublic CMAAssetFile setContentType(java.lang.String contentType)
contentType - the content type used for this file.Constants.DEFAULT_CONTENT_TYPE,
Constants.OCTET_STREAM_CONTENT_TYPEpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2019 Contentful, GmbH.. All Rights Reserved.