Class DigitalAsset
java.lang.Object
com.oracle.content.sdk.model.AssetObject
com.oracle.content.sdk.model.AssetLinksObject
com.oracle.content.sdk.model.Asset
com.oracle.content.sdk.model.digital.DigitalAsset
- All Implemented Interfaces:
Serializable
Representation of a digital asset. This extends
Asset
but contains
some methods and models specific to digital asset.
Most methods in this call will only work on full digital assets and not references,
so if Asset.isReferenceOnly()
returns true will need to get
the full Digital asset item to get results from some methods.
Even for references, the Asset.getId()
field will always be set.- See Also:
-
Field Summary
FieldsFields inherited from class com.oracle.content.sdk.model.Asset
createdDate, description, fields, id, language, name, type, typeCategory, updatedDate
Fields inherited from class com.oracle.content.sdk.model.AssetLinksObject
links
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the digital asset fields structure, which contains all of metadata/rendition information for the digital asset.<T extends ContentField>
TgetCustomFieldFromType
(String fieldName, FieldType type) A generic method that will return the custom digital asset attribute field given the specified type.Get the fully qualified url to download the 'native' digital asset.getPreferredRendition
(DigitalAssetPreferredRenditionCriteria renditionCriteria) Will search through the renditions to find a matching rendition based onDigitalAssetPreferredRenditionCriteria
.getRendition
(String rendition) Get the fully qualified url for the given rendition type, which could be native.Get full list of renditions available in the digital asset or null if not available.getRenditionUrl
(RenditionType rendition) Get the fully qualified url for the given rendition type, which could be native.getRenditionUrl
(String rendition) In general usegetRenditionUrl(RenditionType)
unless you are trying to get the name of a custom rendition in which case you can use this method to pass in the raw rendition name.getSize()
Get size in bytes for this digital asset or null if size not availableGet version (if applicable) for the item/asset as a string.boolean
boolean
isImage()
Does this refer to an image? If it's not known whether this is an image because this is only an item reference, it will return null.Methods inherited from class com.oracle.content.sdk.model.Asset
getBooleanField, getContentItemField, getContentType, getCreatedDate, getDateField, getDecimalField, getDescription, getDigitalAssetField, getFieldFromType, getFieldFromValue, getFileExtension, getFileGroup, getId, getIntegerField, getJsonField, getLanguage, getLargeTextField, getMimeType, getName, getReferenceListField, getReferenceListIds, getSlug, getTaxonomies, getTextField, getTranslatable, getType, getTypeCategory, getUpdatedDate, isDigitalAsset, isReferenceOnly
Methods inherited from class com.oracle.content.sdk.model.AssetLinksObject
getLinks
-
Field Details
-
NATIVE_RENDITION
- See Also:
-
-
Constructor Details
-
DigitalAsset
public DigitalAsset()
-
-
Method Details
-
getAssetFields
Get the digital asset fields structure, which contains all of metadata/rendition information for the digital asset.- Returns:
- Digital asset fields
-
isCustomAssetType
public boolean isCustomAssetType() -
getCustomFieldFromType
A generic method that will return the custom digital asset attribute field given the specified type. For example, you could call it like this to get a the field for a content date:ContentFieldDate dateField = item.getFieldFromType("date_field", FieldType.DATE);
- Type Parameters:
T
- the specific ContentField class- Parameters:
fieldName
- field name to matchtype
- The type of field expected- Returns:
- Specific ContentField derived class or null if it doesn't exist
-
getSize
Get size in bytes for this digital asset or null if size not available- Returns:
- size in bytes or null
-
getVersion
Get version (if applicable) for the item/asset as a string.- Returns:
- Version for the item (may be null)
-
isImage
Does this refer to an image? If it's not known whether this is an image because this is only an item reference, it will return null.- Returns:
- true if image reference or null if not known
-
getNativeDownloadUrl
Get the fully qualified url to download the 'native' digital asset. This will return null if this is a reference and not a full digital asset.- Returns:
- Fully qualified url which can be used to download the asset.
-
getRenditionUrl
In general usegetRenditionUrl(RenditionType)
unless you are trying to get the name of a custom rendition in which case you can use this method to pass in the raw rendition name.- Parameters:
rendition
- the rendition name- Returns:
- The matching rendition url or null if no match
-
getRendition
Get the fully qualified url for the given rendition type, which could be native. If this returns null, the full digital asset properties have not been retrieved or there is no matching rendition.- Parameters:
rendition
- The desiredRenditionType
- Returns:
- The matching rendition url or null if no match
-
getRenditionUrl
Get the fully qualified url for the given rendition type, which could be native. If this returns null, the full digital asset properties have not been retrieved or there is no matching rendition.- Parameters:
rendition
- The desiredRenditionType
- Returns:
- The matching rendition url or null if no match
-
getRenditionsList
Get full list of renditions available in the digital asset or null if not available.- Returns:
- list of renditions
-
getPreferredRendition
public DigitalAssetRendition.RenditionFormat getPreferredRendition(DigitalAssetPreferredRenditionCriteria renditionCriteria) Will search through the renditions to find a matching rendition based onDigitalAssetPreferredRenditionCriteria
. This is a convenience method to assist in finding a rendition based on specific criteria. If a RenditionFormat is returned, callDigitalAssetRendition.RenditionFormat.getDownloadUrl()
to get the url to use for download.- Parameters:
renditionCriteria
- criteria for finding a rendition- Returns:
- the best matching
DigitalAssetRendition.RenditionFormat
or null if no renditions
-
getAdvancedVideoInfo
-
getAdvancedVideoInfoProperties
-
getVideoToken
-
isAdvancedVideo
public boolean isAdvancedVideo()
-