Interface MediaItemImageVersion
-
- All Superinterfaces:
ContentItemVersion<MediaItem>
,FormBackingObject
,MediaItemVersion
,PublicationStatusEnabled
,WorkflowEnabled
,Wrapper
@Indexable public interface MediaItemImageVersion extends MediaItemVersion
Representation of image media item.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface nl.gx.webmanager.cms.mediarepository.MediaItemVersion
MediaItemVersion.SearchEngineInclude
-
-
Field Summary
Fields Modifier and Type Field Description static Collection<String>
VALID_IMAGE_TYPES
-
Fields inherited from interface nl.gx.webmanager.cms.core.ContentItemVersion
LABELCATEGORY_NOCATEGORY, LABELCATEGORY_NOLABEL
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default boolean
attachFile(File file, String originalFileName, String mimeType)
Attaches a file to this image media item version.boolean
attachFile(org.springframework.web.multipart.MultipartFile multipartFile)
Attaches a image to this image media item versionboolean
detachFile()
Detaches a file from this image media item versionString
getAlternativeText()
Get the alternative text of this image media item version.Image
getImage()
Return the image.default String
getImagePrefix()
Returns the prefix added by XC to the filenameImage
getResizedImage(int sizeId)
Deprecated.use image.getSizedImage(width,height) Return the image for a particular size.Image
getResizedImage(int width, int height)
Deprecated.use image.getSizedImage(width,height) Return the image for a width and height.ImageSizeModel
getSizeModel()
Get the size model associated with this media item image.Image
getThumbNailImage()
Return the thumbnail image.boolean
isEditableAlternativeText()
Returns a boolean indicating whether the alternative text may be edited at the element the image media item is assigned to .void
setAlternativeText(String text)
Set the alternative text of this image media item version.void
setEditableAlternativeText(boolean editableText)
Set boolean indicating whether the alternative text may be edited at the element the image mediavoid
setSizeModel(ImageSizeModel sizeModel)
Set the size model associated with this media item image.-
Methods inherited from interface nl.gx.webmanager.cms.core.ContentItemVersion
createNewRevision, deleteRevisions, getAttachedLeadImage, getContentItem, getContentLabelCategories, getContentLabels, getCreationDate, getCreationUser, getHasLead, getIdentifier, getLanguage, getLastModifiedDate, getLastModifiedUser, getLead, getLeadImage, getLeadImageMediaItem, getLeadImageThumbnail, getPreviousRevisions, getRemark, getRevisionCount, getTitle, isEditable, isInContextCurrent, removeAttachedLeadImage, setAttachedLeadImage, setAttachedLeadImageFocusPoint, setEditable, setLead, setLeadImageMediaItem, setRemark
-
Methods inherited from interface nl.gx.webmanager.springmvc.FormBackingObject
getNestedPath, getUUID
-
Methods inherited from interface nl.gx.webmanager.cms.mediarepository.MediaItemVersion
addTerm, createRichTextElements, exists, getComponent, getContentType, getCopyrightNotice, getDiscussionConfiguration, getElementHolder, getElements, getExternalId, getForum, getForumSettings, getFriendlyURLTitle, getHtmlTitle, getIncludeInSearchEngine, getLastElement, getMediaItem, getMetaDescription, getMetaKeywords, getMetaTags, getPrivateNode, getReferencedContentItems, getResourceInstances, getSEOPriority, getSEOUpdateFrequency, getTargetPage, getTerms, getTotalVotes, getVotingAverage, getVotingModel, getWebsite, insertLastElementAtCursor, isArticle, isAuthorized, isAuthorizedToPreview, isBundle, isCurrent, removeTerm, setArticle, setAuthorized, setComponent, setContentType, setCopyrightNotice, setDiscussionConfiguration, setElementHolder, setElements, setExternalId, setForum, setForumSettings, setFriendlyURLTitle, setHtmlTitle, setIncludeInSearchEngine, setLanguage, setLastModifiedDate, setLastModifiedUser, setLeadImage, setLeadImage, setMetaDescription, setMetaKeywords, setPrivateNode, setPublic, setResourceInstances, setSEOPriority, setSEOUpdateFrequency, setTargetPage, setTerms, setTitle, setTitleVolatile, setWebsite
-
Methods inherited from interface nl.gx.webmanager.cms.core.PublicationStatusEnabled
getExpirationDate, getPublicationDate, getPublicationStatus, getPublicationStatus, setExpirationDate, setPublicationDate
-
Methods inherited from interface nl.gx.webmanager.cms.workflow.WorkflowEnabled
getWorkflowModel, getWorkflowModelInstance, isPublic
-
-
-
-
Field Detail
-
VALID_IMAGE_TYPES
static final Collection<String> VALID_IMAGE_TYPES
-
-
Method Detail
-
getAlternativeText
@Field(body=true) String getAlternativeText()
Get the alternative text of this image media item version.- Returns:
- alternative text
-
setAlternativeText
void setAlternativeText(String text)
Set the alternative text of this image media item version.- Parameters:
text
- The text to set
-
getSizeModel
ImageSizeModel getSizeModel()
Get the size model associated with this media item image.- Returns:
- the size model, or
null
-
setSizeModel
void setSizeModel(ImageSizeModel sizeModel)
Set the size model associated with this media item image.- Parameters:
sizeModelId
- an identifier of an existing sizeModel, or<=0
to un-assign the current model.
-
getThumbNailImage
@Document Image getThumbNailImage()
Return the thumbnail image.- Returns:
- the thumbnail image.
-
getResizedImage
@Deprecated Image getResizedImage(int sizeId)
Deprecated.use image.getSizedImage(width,height) Return the image for a particular size.- Returns:
- the image for a particular size.
-
getResizedImage
@Deprecated Image getResizedImage(int width, int height)
Deprecated.use image.getSizedImage(width,height) Return the image for a width and height.- Returns:
- the image for a width and height.
-
isEditableAlternativeText
boolean isEditableAlternativeText()
Returns a boolean indicating whether the alternative text may be edited at the element the image media item is assigned to .- Returns:
- a boolean.
-
setEditableAlternativeText
void setEditableAlternativeText(boolean editableText)
Set boolean indicating whether the alternative text may be edited at the element the image media- Parameters:
editableText
- boolean if the text can be editted
-
attachFile
boolean attachFile(org.springframework.web.multipart.MultipartFile multipartFile)
Attaches a image to this image media item version- Parameters:
multipartFile
- The file to attach- Returns:
- true if attaching the file succeeded, false otherwise
-
attachFile
default boolean attachFile(File file, String originalFileName, String mimeType)
Attaches a file to this image media item version.- Parameters:
file
- the actual file to attachoriginalFileName
- the original file name to attachmimeType
- the mimeType of the file to attach- Returns:
- true if attaching the file succeeded, false otherwise
-
detachFile
boolean detachFile()
Detaches a file from this image media item version- Returns:
- true if attaching the file succeeded, false otherwise
-
getImagePrefix
default String getImagePrefix()
Returns the prefix added by XC to the filename- Returns:
- The xc prefix used for the image filename
-
-