@Entity public class StaticAssetImpl extends Object implements StaticAsset, AdminMainEntity, StaticAssetAdminPresentation
StaticAssetAdminPresentation.FieldOrder, StaticAssetAdminPresentation.GroupName, StaticAssetAdminPresentation.GroupOrder, StaticAssetAdminPresentation.TabName, StaticAssetAdminPresentation.TabOrder| Modifier and Type | Field and Description |
|---|---|
protected String |
altText |
protected Map<String,StaticAssetDescription> |
contentMessageValues |
protected String |
fileExtension |
protected Long |
fileSize |
protected String |
fullUrl |
protected Long |
id |
protected String |
mimeType |
protected String |
name |
protected String |
storageType |
protected String |
title |
MAIN_ENTITY_NAME_PROPERTY| Constructor and Description |
|---|
StaticAssetImpl() |
| Modifier and Type | Method and Description |
|---|---|
<G extends StaticAsset> |
createOrRetrieveCopyInstance(MultiTenantCopyContext context)
Clone this entity for the purpose of multiple tenancy.
|
String |
getAltText()
Returns the altText of this asset.
|
Map<String,StaticAssetDescription> |
getContentMessageValues() |
String |
getFileExtension()
Returns the file extension of the asset.
|
Long |
getFileSize()
Filesize of the asset.
|
String |
getFullUrl()
URL used to retrieve this asset.
|
Long |
getId()
Returns the id of the static asset.
|
String |
getMainEntityName() |
String |
getMimeType()
Returns the mimeType of the asset.
|
String |
getName()
The name of the static asset.
|
StorageType |
getStorageType()
Returns how the underlying asset is stored.
|
String |
getTitle()
Returns the title of this asset.
|
void |
setAltText(String altText)
Set the altText of the static asset.
|
void |
setContentMessageValues(Map<String,StaticAssetDescription> contentMessageValues) |
void |
setFileExtension(String fileExtension)
Sets the fileExtension of the asset.
|
void |
setFileSize(Long fileSize)
Sets the filesize of the asset
|
void |
setFullUrl(String fullUrl)
Sets the URL for the asset
|
void |
setId(Long id)
Sets the id of the static asset.
|
void |
setMimeType(String mimeType)
Sets the mimeType of the asset.
|
void |
setName(String name)
Sets the name of the static asset.
|
void |
setStorageType(StorageType storageType)
Returns how the asset was stored in the backend (e.g.
|
void |
setTitle(String title)
Set the title of the static asset.
|
protected Long id
protected String name
protected String fullUrl
protected String title
protected String altText
protected String mimeType
protected Long fileSize
protected String fileExtension
protected Map<String,StaticAssetDescription> contentMessageValues
protected String storageType
public String getFullUrl()
StaticAssetgetFullUrl in interface StaticAssetpublic void setFullUrl(String fullUrl)
StaticAssetsetFullUrl in interface StaticAssetpublic String getTitle()
StaticAssetgetTitle in interface StaticAssetpublic void setTitle(String title)
StaticAssetsetTitle in interface StaticAssetpublic String getAltText()
StaticAssetgetAltText in interface StaticAssetpublic void setAltText(String altText)
StaticAssetsetAltText in interface StaticAssetpublic Long getFileSize()
StaticAssetgetFileSize in interface StaticAssetpublic void setFileSize(Long fileSize)
StaticAssetsetFileSize in interface StaticAssetpublic Map<String,StaticAssetDescription> getContentMessageValues()
getContentMessageValues in interface StaticAssetpublic void setContentMessageValues(Map<String,StaticAssetDescription> contentMessageValues)
setContentMessageValues in interface StaticAssetpublic String getMimeType()
StaticAssetgetMimeType in interface StaticAssetpublic void setMimeType(String mimeType)
StaticAssetsetMimeType in interface StaticAssetpublic String getFileExtension()
StaticAssetgetFileExtension in interface StaticAssetpublic void setFileExtension(String fileExtension)
StaticAssetsetFileExtension in interface StaticAssetpublic Long getId()
StaticAssetgetId in interface StaticAssetpublic void setId(Long id)
StaticAssetsetId in interface StaticAssetpublic String getName()
StaticAssetgetName in interface StaticAssetpublic void setName(String name)
StaticAssetsetName in interface StaticAssetpublic StorageType getStorageType()
StaticAssetStorageType.DATABASE for backwards compatibility.getStorageType in interface StaticAssetStaticAssetService}public void setStorageType(StorageType storageType)
StaticAssetsetStorageType in interface StaticAssetpublic <G extends StaticAsset> CreateResponse<G> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException
MultiTenantCloneable
public CreateResponse<MyClass> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException {
CreateResponse<MyClass> createResponse = super.createOrRetrieveCopyInstance(context);
if (createResponse.isAlreadyPopulated()) {
return createResponse;
}
MyClass myClone = createResponse.getClone();
//copy extended field values on myClone here
return createResponse;
}
Support should also be added for @Embeddable classes that contribute fields (collections or basic) to a cloneable entity:
public CreateResponse<G extends MyClass> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException {
CreateResponse createResponse = context.createOrRetrieveCopyInstance(this);
MyClass myClone = createResponse.getClone();
//copy extended field values on myClone here
return createResponse;
}
createOrRetrieveCopyInstance in interface MultiTenantCloneable<StaticAsset>context - a context object providing persistence and library functionality for copying entitiesCloneNotSupportedException - if there's a problem detected with the cloning configurationpublic String getMainEntityName()
getMainEntityName in interface AdminMainEntityCopyright © 2019. All rights reserved.