info.magnolia.dam.asset
Class AbstractBaseAsset
java.lang.Object
info.magnolia.dam.asset.AbstractBaseAsset
- All Implemented Interfaces:
- Asset
- Direct Known Subclasses:
- JcrAsset
public abstract class AbstractBaseAsset
- extends Object
- implements Asset
Abstract implementation of Asset
.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
name
protected String name
language
protected String language
identifier
protected String identifier
assetProviderIdentifier
protected String assetProviderIdentifier
title
protected String title
mediaType
protected String mediaType
subject
protected String subject
description
protected String description
caption
protected String caption
copyright
protected String copyright
mimeType
protected String mimeType
link
protected String link
path
protected String path
fileExtension
protected String fileExtension
fileName
protected String fileName
comment
protected String comment
lastModified
protected Calendar lastModified
customPropertyMap
protected HashMap<String,Object> customPropertyMap
fileSize
protected long fileSize
contentStream
protected InputStream contentStream
AbstractBaseAsset
public AbstractBaseAsset()
getCustomProperty
public Object getCustomProperty(String propertyName)
- Description copied from interface:
Asset
- Give the ability to access a custom property from the Asset API.
- Specified by:
getCustomProperty
in interface Asset
- Returns:
- The Asset property referred to by the propertyName. Null if not
found.
getName
public String getName()
- Specified by:
getName
in interface Asset
- Returns:
- Name of the Asset.
getLanguage
public String getLanguage()
- Specified by:
getLanguage
in interface Asset
- Returns:
- String representation of Locale http://www.ics.uci.edu/pub/ietf/http/related/iso639.txt.
getIdentifier
public String getIdentifier()
- Description copied from interface:
Asset
- This identifier is the key used by the
DamIdParser
in order to be able to identify
both:
the Asset
the Asset Provider.
- Specified by:
getIdentifier
in interface Asset
- Returns:
- Unique Identifier of the Asset.
getTitle
public String getTitle()
- Specified by:
getTitle
in interface Asset
- Returns:
- Title of the Asset.
getMediaType
public String getMediaType()
- Specified by:
getMediaType
in interface Asset
- Returns:
- The MediaType definition part of the
MediaType
.
getSubject
public String getSubject()
- Specified by:
getSubject
in interface Asset
- Returns:
- The Subject of the Asset.
getDescription
public String getDescription()
- Specified by:
getDescription
in interface Asset
- Returns:
- The Description of Asset.
getCaption
public String getCaption()
- Specified by:
getCaption
in interface Asset
- Returns:
- The Asset Caption.
getCopyright
public String getCopyright()
- Specified by:
getCopyright
in interface Asset
- Returns:
- The Asset Copyright.
getMimeType
public String getMimeType()
- Specified by:
getMimeType
in interface Asset
- Returns:
- The Asset binary content mimeType.
getFileSize
public long getFileSize()
- Specified by:
getFileSize
in interface Asset
- Returns:
- The Asset binary content size.
getContentStream
public InputStream getContentStream()
- Specified by:
getContentStream
in interface Asset
- Returns:
- The Asset binary data as
InputStream
.
getLink
public String getLink()
throws DamException
- Specified by:
getLink
in interface Asset
- Returns:
- Return the Link to the default rendition.
- Throws:
DamException
getPath
public String getPath()
- Specified by:
getPath
in interface Asset
- Returns:
- The Asset path. For JCR this is equivalent to Node.getPath()
getLastModified
public Calendar getLastModified()
- Specified by:
getLastModified
in interface Asset
- Returns:
- The Asset last modified Date.
getFileExtension
public String getFileExtension()
- Specified by:
getFileExtension
in interface Asset
- Returns:
- The Asset Binary content extension.
getFileName
public String getFileName()
- Specified by:
getFileName
in interface Asset
- Returns:
- The Asset Binary content file Name.
getComment
public String getComment()
- Specified by:
getComment
in interface Asset
- Returns:
- The Asset comment.
getAssetProviderIdentifier
public String getAssetProviderIdentifier()
- Specified by:
getAssetProviderIdentifier
in interface Asset
- Returns:
- The related Asset Provider Id.
setName
public void setName(String name)
- Parameters:
name
- the name to set
setLanguage
public void setLanguage(String language)
- Parameters:
language
- the language to set
setIdentifier
public void setIdentifier(String identifier)
- Parameters:
identifier
- the identifier to set
setTitle
public void setTitle(String title)
- Parameters:
title
- the title to set
setMediaType
public void setMediaType(String mediaType)
- Parameters:
mediaType
- the mediaType to set
setSubject
public void setSubject(String subject)
- Parameters:
subject
- the subject to set
setDescription
public void setDescription(String description)
- Parameters:
description
- the description to set
setCaption
public void setCaption(String caption)
- Parameters:
caption
- the caption to set
setCopyright
public void setCopyright(String copyright)
- Parameters:
copyright
- the copyright to set
setMimeType
public void setMimeType(String mimeType)
- Parameters:
mimeType
- the mimeType to set
setLink
public void setLink(String link)
- Parameters:
link
- the link to set
setPath
public void setPath(String path)
- Parameters:
path
- the path to set
setFileExtension
public void setFileExtension(String fileExtension)
- Parameters:
extension
- the extension to set
setFileName
public void setFileName(String fileName)
- Parameters:
fileName
- the fileName to set
setComment
public void setComment(String comment)
- Parameters:
comment
- the comment to set
setLastModified
public void setLastModified(Calendar lastModified)
- Parameters:
lastModified
- the lastModified to set
setFileSize
public void setFileSize(long fileSize)
- Parameters:
size
- the size to set
setContentStream
public void setContentStream(InputStream contentStream)
- Parameters:
contentStream
- the contentStream to set
setAssetProviderIdentifier
public void setAssetProviderIdentifier(String assetProviderIdentifier)
- Parameters:
assetProviderIdentifier
- the assetProviderIdentifier to set
setCustomPropertyMap
public void setCustomPropertyMap(HashMap<String,Object> customPropertyMap)
- Parameters:
customPropertyMap
- the customPropertyMap to set
Copyright © 2014 Magnolia International Ltd.. All Rights Reserved.