Class JpaAsset
- All Implemented Interfaces:
- com.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware,- com.broadleafcommerce.data.tracking.core.ApplicationTrackable<com.broadleafcommerce.data.tracking.jpa.filtering.domain.ApplicationJpaTracking>,- com.broadleafcommerce.data.tracking.core.mapping.BusinessTypeAware,- com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable,- com.broadleafcommerce.data.tracking.core.Trackable,- com.broadleafcommerce.data.tracking.core.TypedTrackable<com.broadleafcommerce.data.tracking.jpa.filtering.domain.ApplicationJpaTracking>,- Serializable
Asset for use with a JPA-supported datastore.- Author:
- Samarth Dhruva (samarthd)
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected booleanbooleanorg.modelmapper.ModelMapperfromMe()Text that corresponds to the HTMLaltattribute that should be used when this asset is rendered in a browser.User who created this asset.Class<?>If and only if thetypeisDefaultAssetType.EMBED, this field holds the HTML to embed.For assets with an externalstorageType, this field is required and names where the external asset is sourced from.Date the file was last updated.Designate this asset to be used in a specificLocaleMIME storageType of the file represented by this asset: image/png, image/jpeg, application/pdf, &c.longgetSize()Size in bytes of the file represented by this asset.Defines where the digital content represented by this asset is stored.getTags()Descriptive or identifying labels.getTitle()Text that corresponds to the HTMLtitleattribute that should be used when this asset is rendered in a browser.com.broadleafcommerce.data.tracking.jpa.filtering.domain.ApplicationJpaTrackinggetType()Describes the general type of the asset.Date the file was uploaded to create this asset.getUrl()Location used to resolve this asset by callers using the service such as "/icon.png" for aninternal assetor "https://www.youtube.com/watch?v=a1S2d3F4" forexternal asset.inthashCode()voidsetAltText(String altText) Text that corresponds to the HTMLaltattribute that should be used when this asset is rendered in a browser.voidsetAttributes(Map<String, String> attributes) voidUser who created this asset.voidsetContextId(String contextId) voidsetEmbedCode(String embedCode) If and only if thetypeisDefaultAssetType.EMBED, this field holds the HTML to embed.voidsetExternalProvider(String externalProvider) For assets with an externalstorageType, this field is required and names where the external asset is sourced from.voidsetFolderContextId(String folderContextId) voidsetLastUpdatedDate(Instant lastUpdatedDate) Date the file was last updated.voidDesignate this asset to be used in a specificLocalevoidsetMimeType(String mimeType) MIME storageType of the file represented by this asset: image/png, image/jpeg, application/pdf, &c.voidsetSize(long size) Size in bytes of the file represented by this asset.voidsetStorageType(String storageType) Defines where the digital content represented by this asset is stored.voidsetTags(List<JpaAssetTag> tags) Descriptive or identifying labels.voidText that corresponds to the HTMLtitleattribute that should be used when this asset is rendered in a browser.voidsetTracking(com.broadleafcommerce.data.tracking.jpa.filtering.domain.ApplicationJpaTracking tracking) voidDescribes the general type of the asset.voidsetUploadDate(Instant uploadDate) Date the file was uploaded to create this asset.voidLocation used to resolve this asset by callers using the service such as "/icon.png" for aninternal assetor "https://www.youtube.com/watch?v=a1S2d3F4" forexternal asset.protected org.modelmapper.Converter<Set<String>,List<JpaAssetTag>> org.modelmapper.ModelMappertoMe()toString()Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappablepostFromMe, postToMe, preFromMe, preToMeMethods inherited from interface com.broadleafcommerce.common.messaging.notification.domain.NotificationStateAwarefindNotificationStateMethods inherited from interface com.broadleafcommerce.data.tracking.core.TrackablegetNotificationStates, getNotificationStates, setNotificationStatesMethods inherited from interface com.broadleafcommerce.data.tracking.core.TypedTrackablesetTracking
- 
Constructor Details- 
JpaAssetpublic JpaAsset()
 
- 
- 
Method Details- 
fromMe@NonNull public org.modelmapper.ModelMapper fromMe()- Specified by:
- fromMein interface- com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable
 
- 
toMe@NonNull public org.modelmapper.ModelMapper toMe()- Specified by:
- toMein interface- com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable
 
- 
tagValuesToTagEntities
- 
getBusinessDomainType- Specified by:
- getBusinessDomainTypein interface- com.broadleafcommerce.data.tracking.core.mapping.BusinessTypeAware
 
- 
getDisplay- Specified by:
- getDisplayin interface- com.broadleafcommerce.data.tracking.core.Trackable
 
- 
getContextId- Specified by:
- getContextIdin interface- com.broadleafcommerce.data.tracking.core.Trackable
 
- 
getUrlLocation used to resolve this asset by callers using the service such as "/icon.png" for aninternal assetor "https://www.youtube.com/watch?v=a1S2d3F4" forexternal asset.- Returns:
- the url for this asset
 
- 
getEmbedCodeIf and only if thetypeisDefaultAssetType.EMBED, this field holds the HTML to embed.Note that urland this field can never both be present.- Returns:
- the HTML to embed
 
- 
getAltTextText that corresponds to the HTMLaltattribute that should be used when this asset is rendered in a browser. This is used as an alternative for screen-readers and as an SEO enhancement describing the asset.- Returns:
- the altText for this asset
 
- 
getTitleText that corresponds to the HTMLtitleattribute that should be used when this asset is rendered in a browser. This is used a tooltip or caption.- Returns:
- the title for this asset
 
- 
getTagsDescriptive or identifying labels. Tags can be used to: - provide a means of designating special purposes for the asset
- group otherwise related assets such as "banners"
- provide a label for some other, arbitrary purpose
 - Returns:
- the tags for this asset
 
- 
getLocaleDesignate this asset to be used in a specificLocale- Returns:
- the locale for this asset
 
- 
getTypeDescribes the general type of the asset. This is used to determine how to render the asset on the frontend. For example, if the type isDefaultAssetType.IMAGE, then the frontend will know to render it in an<img/>tag.For assets with an external storageType, this field is required input. For internal assets, this is inferred from themimeTypeduring upload.- Returns:
- the general type of the asset
- See Also:
- 
- DefaultAssetType
- Asset.type
 
 
- 
getExternalProviderFor assets with an externalstorageType, this field is required and names where the external asset is sourced from. This field should be null for assets with an internalstorageType.- Returns:
- the provider (for example, the name of the CDN) that is hosting the external asset
- See Also:
- 
- Asset.externalProvider
 
 
- 
getMimeTypeMIME storageType of the file represented by this asset: image/png, image/jpeg, application/pdf, &c. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types for more info on MIME types - Returns:
- the mimeType for this asset
 
- 
getSizepublic long getSize()Size in bytes of the file represented by this asset.- Returns:
- the size in bytes for this asset
 
- 
getUploadDateDate the file was uploaded to create this asset.- Returns:
- the uploadDate for this asset
 
- 
getLastUpdatedDateDate the file was last updated.- Returns:
- the lastUpdatedDate for this asset
 
- 
getAuthorUser who created this asset.- Returns:
- the author for this asset
 
- 
getStorageTypeDefines where the digital content represented by this asset is stored. The default types areDefaultAssetStorageType.INTERNALandDefaultAssetStorageType.EXTERNAL.- Returns:
- the storageType for this asset
- See Also:
 
- 
getFolderContextId- Returns:
- the persistent counter-part to Asset.getFolderId()
 
- 
getAttributes- Returns:
- the persisted counter-part of Asset.getAttributes()
 
- 
getTrackingpublic com.broadleafcommerce.data.tracking.jpa.filtering.domain.ApplicationJpaTracking getTracking()- Specified by:
- getTrackingin interface- com.broadleafcommerce.data.tracking.core.Trackable
- Returns:
- the ApplicationJpaTrackinginformation for this
- See Also:
- 
- ApplicationJpaTracking
 
 
- 
setContextId- Specified by:
- setContextIdin interface- com.broadleafcommerce.data.tracking.core.Trackable
 
- 
setUrlLocation used to resolve this asset by callers using the service such as "/icon.png" for aninternal assetor "https://www.youtube.com/watch?v=a1S2d3F4" forexternal asset.- Parameters:
- url- the value to set as the url for this asset
 
- 
setEmbedCodeIf and only if thetypeisDefaultAssetType.EMBED, this field holds the HTML to embed.Note that urland this field can never both be present.- Parameters:
- embedCode- the HTML to embed
 
- 
setAltTextText that corresponds to the HTMLaltattribute that should be used when this asset is rendered in a browser. This is used as an alternative for screen-readers and as an SEO enhancement describing the asset.- Parameters:
- altText- the value to set as the altText for this asset
 
- 
setTitleText that corresponds to the HTMLtitleattribute that should be used when this asset is rendered in a browser. This is used a tooltip or caption.- Parameters:
- title- the value to set as the title for this asset
 
- 
setTagsDescriptive or identifying labels. Tags can be used to: - provide a means of designating special purposes for the asset
- group otherwise related assets such as "banners"
- provide a label for some other, arbitrary purpose
 - Parameters:
- tags- the value to set as the tags for this asset
 
- 
setLocaleDesignate this asset to be used in a specificLocale- Parameters:
- locale- the value to set as the locale for this asset
 
- 
setTypeDescribes the general type of the asset. This is used to determine how to render the asset on the frontend. For example, if the type isDefaultAssetType.IMAGE, then the frontend will know to render it in an<img/>tag.For assets with an external storageType, this field is required input. For internal assets, this is inferred from themimeTypeduring upload.- Parameters:
- type- the general type of the asset
- See Also:
- 
- DefaultAssetType
- Asset.type
 
 
- 
setExternalProviderFor assets with an externalstorageType, this field is required and names where the external asset is sourced from. This field should be null for assets with an internalstorageType.- Parameters:
- externalProvider- the provider (for example, the name of the CDN) that is hosting the external asset
- See Also:
- 
- Asset.externalProvider
 
 
- 
setMimeTypeMIME storageType of the file represented by this asset: image/png, image/jpeg, application/pdf, &c. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types for more info on MIME types - Parameters:
- mimeType- the value to set as the mimeType for this asset
 
- 
setSizepublic void setSize(long size) Size in bytes of the file represented by this asset.- Parameters:
- size- the value to set as the size in bytes for this asset
 
- 
setUploadDateDate the file was uploaded to create this asset.- Parameters:
- uploadDate- the value to set as the uploadDate for this asset
 
- 
setLastUpdatedDateDate the file was last updated.- Parameters:
- lastUpdatedDate- the value to set as the lastUpdatedDate for this asset
 
- 
setAuthorUser who created this asset.- Parameters:
- author- the value to set as the author for this asset
 
- 
setStorageTypeDefines where the digital content represented by this asset is stored. The default types areDefaultAssetStorageType.INTERNALandDefaultAssetStorageType.EXTERNAL.- Parameters:
- storageType- the value to set as the storageType for this asset
- See Also:
 
- 
setFolderContextId- Parameters:
- folderContextId- the persistent counter-part to- Asset.getFolderId()
 
- 
setAttributes- Parameters:
- attributes- the persisted counter-part of- Asset.getAttributes()
 
- 
setTrackingpublic void setTracking(com.broadleafcommerce.data.tracking.jpa.filtering.domain.ApplicationJpaTracking tracking) - Specified by:
- setTrackingin interface- com.broadleafcommerce.data.tracking.core.TypedTrackable<com.broadleafcommerce.data.tracking.jpa.filtering.domain.ApplicationJpaTracking>
- Parameters:
- tracking- the- ApplicationJpaTrackinginformation for this
- See Also:
- 
- ApplicationJpaTracking
 
 
- 
toString
- 
equals
- 
canEqual
- 
hashCodepublic int hashCode()
 
-