nl.gx.webmanager.cms.mediarepository
Interface MediaItemVersion

All Superinterfaces:
FormBackingObject, WorkflowEnabled, Wrapper
All Known Subinterfaces:
MediaItemAgendaVersion, MediaItemAnnouncementVersion, MediaItemArticleVersion, MediaItemDocumentVersion, MediaItemDownloadVersion, MediaItemFlashVersion, MediaItemImageVersion, MediaItemMultimediaVersion, MediaItemPageVersion, MediaItemRegulationVersion

public interface MediaItemVersion
extends Wrapper, FormBackingObject, WorkflowEnabled

Representation of a version of a media item.


Method Summary
 void addTerm(MediaTerm mediaTerm)
          Set term.
 void createRichTextElements()
          Deprecated. See getElements()
 Image getAttachedLeadImage()
          Return attached lead image.
 Component getComponent()
          Return the component.
 java.lang.String getContentType()
          Returns the content type name of this media item
 java.util.Date getCreationDate()
          Return creation date.
 DiscussionConfiguration getDiscussionConfiguration()
          Returns the discussion configuration for this media item version.
 ElementHolder getElementHolder()
          Returns the element holder for the media item version.
 Element[] getElements()
          Deprecated. This method and a few other methods related to elements in this interface don't belong here and have been deprecated. MediaItemVersion objects which use elements also implement the ElementHolder interface. If you need to call ElementHolder methods on a MediaItemVersion object then make use of instanceof and cast to ElementHolder.
 java.util.Date getExpirationDate()
          Return expiration date.
 java.lang.String getExternalId()
          Return external identifier.
 Forum getForum()
          Return the forum associated with this article or null.
 ForumSettings getForumSettings()
          Return the ForumSettings associated with the Forum or null.
 java.lang.String getFriendlyURLTitle()
          Returns the friendly URL title.
 java.lang.String getHtmlTitle()
          Return the HTML title.
 Element getLastElement()
          Deprecated. See getElements()
 java.util.Date getLastModifiedDate()
          Return last modified date.
 User getLastModifiedUser()
          Return the last modified user of this page version.
 java.lang.String getLead()
          Return lead text.
 Image getLeadImage()
          Return lead image.
 MediaItem getLeadImageMediaItem()
          Return lead image from objectmanager.
 MediaItem getMediaItem()
          Returns media item of the media item version.
 javax.jcr.Node getPrivateNode()
          Get the private node injected
 java.util.Date getPublicationDate()
          Return publication date.
 ResourceInstance[] getResourceInstances()
          Returns an array of the refered ResourceInstances for this article
 Page getTargetPage()
          Return target page.
 MediaTerm[] getTerms()
          Return terms.
 java.lang.String getTitle()
          Return title of this media itemm
 int getTotalVotes()
          Gets the total votes
 float getVotingAverage()
          Get the ranking ( the average of votes )
 VotingModel getVotingModel()
          Return the VotingModel.
 Website getWebsite()
          Return website that owns the media item.
 void insertLastElementAtCursor()
          Deprecated. See getElements()
 boolean isArticle()
          Deprecated. This method is kept around for backward compatibility. Consider using "instanceof ElementHolder" instead.
 boolean isAuthorized()
          Returns true if the current user is authorized to update this media item version.
 boolean isBundle()
          Indicates if the media item is assosiated with a component from a bundle
 boolean isCurrent()
          Returns true if you may view this MediaItemVersion object either because it is public (i.e.
 boolean isPublic()
          Return true if the mediaitemversion state is public.
 void removeTerm(MediaTerm mediaTerm)
          Remove term.
 void setArticle(boolean isArticle)
          Deprecated. This method is kept around for backward compatibility. You won't need it in new code.
 void setAuthorized(boolean isAuthorized)
          Deprecated. Will probably be removed in WM 9.2
 void setComponent(Component component)
          Sets the component.
 void setContentType(java.lang.String contentType)
          Deprecated. 
 void setDiscussionConfiguration(DiscussionConfiguration discConfig)
          Sets the discussion configuration for this media item version.
 void setElementHolder(ElementHolder elementHolder)
          Sets the element holder for the media item version.
 void setElements(Element[] elements)
          Deprecated. See getElements()
 void setExpirationDate(java.util.Date date)
          Set expiration date.
 void setExternalId(java.lang.String value)
          Set external id
 void setForum(Forum forum)
          Set the forum associated with this article or null.
 void setForumSettings(ForumSettings forumSettings)
          Set the ForumSettings associated with the Forum or null.
 void setFriendlyURLTitle(java.lang.String friendlyURLTitle)
          Sets the friendly URL title.
 void setHtmlTitle(java.lang.String title)
          Set title of this media item.
 void setLead(java.lang.String lead)
          Set lead text.
 void setLeadImage(FileResource leadImage)
          Set lead image.
 void setLeadImage(Image leadImage)
          Deprecated. 'The Image type isn't sufficent to specify the contents of an image file.
 void setPrivateNode(javax.jcr.Node node)
          Set the private node injected
 void setPublic(boolean isPublic)
          Deprecated. Will probably be removed in WM 9.2
 void setPublicationDate(java.util.Date publidationDate)
          Set publication date.
 void setResourceInstances(ResourceInstance[] resourceInstances)
          Set the refered ResourceInstances for this article
 void setTargetPage(Page targetPage)
          Set target page.
 void setTerms(MediaTerm[] mediaTerms)
          Set terms.
 void setTitle(java.lang.String title)
          Set title of this media item
 void setWebsite(Website website)
          Set website that owns the media item.
 
Methods inherited from interface nl.gx.webmanager.wrapper.Wrapper
getId, getUUID, setId, setUUID
 
Methods inherited from interface nl.gx.webmanager.springmvc.FormBackingObject
getNestedPath, getUUID
 
Methods inherited from interface nl.gx.webmanager.cms.workflow.WorkflowEnabled
getWorkflowModel, getWorkflowModelInstance
 

Method Detail

getMediaItem

MediaItem getMediaItem()
Returns media item of the media item version.

Returns:
media item of the media item version

getTitle

java.lang.String getTitle()
Return title of this media itemm

Returns:
title of this media item

setTitle

void setTitle(java.lang.String title)
Set title of this media item

Parameters:
title - title of this media item to set

getHtmlTitle

java.lang.String getHtmlTitle()
Return the HTML title. This is a title string which is suitable for use in the HTML TITLE tag. If no HTML title has been explicietly specified for the page then an empty string is returned.

Returns:
HTML title, or "" if none has been specified.

setHtmlTitle

void setHtmlTitle(java.lang.String title)
Set title of this media item.

Parameters:
title -

getPublicationDate

java.util.Date getPublicationDate()
Return publication date. Be aware that this is only accurate to the minute.

Returns:
publication date.

setPublicationDate

void setPublicationDate(java.util.Date publidationDate)
Set publication date.

Parameters:
publidationDate - publication date.

getExpirationDate

java.util.Date getExpirationDate()
Return expiration date. Be aware that this is only accurate to the minute.

Returns:
expiration date.

setExpirationDate

void setExpirationDate(java.util.Date date)
Set expiration date.

Parameters:
date - expiration date.

getLastModifiedDate

java.util.Date getLastModifiedDate()
Return last modified date.

Returns:
last modified date

getLead

java.lang.String getLead()
Return lead text.

Returns:
lead text.

setLead

void setLead(java.lang.String lead)
Set lead text.

Parameters:
lead - lead text.

getLeadImage

Image getLeadImage()
Return lead image.

Returns:
lead image.

getAttachedLeadImage

Image getAttachedLeadImage()
Return attached lead image.

Returns:
lead image.

getLeadImageMediaItem

MediaItem getLeadImageMediaItem()
Return lead image from objectmanager.

Returns:
objectmanager image.

setLeadImage

void setLeadImage(FileResource leadImage)
Set lead image.

Parameters:
leadImage - lead image.

setLeadImage

@Deprecated
void setLeadImage(Image leadImage)
Deprecated. 'The Image type isn't sufficent to specify the contents of an image file.

Set lead image.

Parameters:
leAdImage - lead image.

getWebsite

Website getWebsite()
Return website that owns the media item. Use the PresentationContext to find the WebSite the media item is displayed on.

Returns:
website that owns the media item.

setWebsite

void setWebsite(Website website)
Set website that owns the media item.

Parameters:
website - website that owns the media item.

getTargetPage

Page getTargetPage()
Return target page.

Returns:
target page.

setTargetPage

void setTargetPage(Page targetPage)
Set target page.

Parameters:
targetPage - target page.

isPublic

boolean isPublic()
Return true if the mediaitemversion state is public.

Returns:
true if the mediaitemversion state is public

setPublic

@Deprecated
void setPublic(boolean isPublic)
Deprecated. Will probably be removed in WM 9.2

Set true if the mediaitemversion state is public.

Parameters:
isPublic - true if the mediaitemversion state is public

getTerms

MediaTerm[] getTerms()
Return terms.

Returns:
terms

setTerms

void setTerms(MediaTerm[] mediaTerms)
Set terms.

Parameters:
mediaTerms - terms

addTerm

void addTerm(MediaTerm mediaTerm)
Set term.

Parameters:
mediaTerm - term

removeTerm

void removeTerm(MediaTerm mediaTerm)
Remove term.

Parameters:
mediaTerm - term

isAuthorized

boolean isAuthorized()
Returns true if the current user is authorized to update this media item version.

Returns:
true if the current user is authorized to update this media item version

setAuthorized

@Deprecated
void setAuthorized(boolean isAuthorized)
Deprecated. Will probably be removed in WM 9.2

Sets true if the current user is authorized to update this media item version.

Parameters:
isAuthorized - true if the current user is authorized to update this media item version

isBundle

boolean isBundle()
Indicates if the media item is assosiated with a component from a bundle

Returns:

isArticle

@Deprecated
boolean isArticle()
Deprecated. This method is kept around for backward compatibility. Consider using "instanceof ElementHolder" instead.

Indicates if the media item is an article. An article contains an element holder which may contain zero or more elements. A non-article does not have an element holder nor elements.

Returns:
true if this media item is an article, false otherwise

setArticle

@Deprecated
void setArticle(boolean isArticle)
Deprecated. This method is kept around for backward compatibility. You won't need it in new code.

Set if the media item is an article. An article contains an element holder which may contain zero or more elements. A non-article does not have an element holder nor elements.

Parameters:
isArticle - true if this media item is an article, false otherwise

getContentType

java.lang.String getContentType()
Returns the content type name of this media item

Returns:

setContentType

@Deprecated
void setContentType(java.lang.String contentType)
Deprecated. 

Set the content type name of this media item

Parameters:
contentType - content type of this media item to set

setPrivateNode

void setPrivateNode(javax.jcr.Node node)
Set the private node injected

Parameters:
node -

getPrivateNode

javax.jcr.Node getPrivateNode()
Get the private node injected

Returns:
The private node

getElements

@Deprecated
Element[] getElements()
Deprecated. This method and a few other methods related to elements in this interface don't belong here and have been deprecated. MediaItemVersion objects which use elements also implement the ElementHolder interface. If you need to call ElementHolder methods on a MediaItemVersion object then make use of instanceof and cast to ElementHolder.

Return elements in this media item version. May be null.

Returns:
elements in this media item version. May be null.

setElements

@Deprecated
void setElements(Element[] elements)
Deprecated. See getElements()

Set elements in this media item version. May be null.

Parameters:
elements - elements in this media item version. May be null.

getElementHolder

ElementHolder getElementHolder()
Returns the element holder for the media item version. May be null. It is often assumed in WM that the element holder object is stored in the JCR and implements the FileResourceSecurityCheckPoint interface, and hence, can be used in combination with a secure download.

Returns:
the element holder for the media item version. May be null.

setElementHolder

void setElementHolder(ElementHolder elementHolder)
Sets the element holder for the media item version. May be null.

Parameters:
elementHolder - the element holder for the media item version. May be null.

createRichTextElements

@Deprecated
void createRichTextElements()
Deprecated. See getElements()

Make sure between every content element is a richText element for wysiwyg editting


getLastElement

@Deprecated
Element getLastElement()
Deprecated. See getElements()

Returns the last element that is currently assigned to the MediaItemVersion object, or null if no element is assigned to the MediaItemVersion.

Returns:
the last element that is currently assigned to the MediaItemVersion object, or null if no element is assigned to the MediaItemVersion

insertLastElementAtCursor

@Deprecated
void insertLastElementAtCursor()
Deprecated. See getElements()

Move the new ( last ) element to the cursor position


getComponent

Component getComponent()
Return the component.


setComponent

void setComponent(Component component)
Sets the component.

Parameters:
component - Component to set.

getVotingModel

VotingModel getVotingModel()
Return the VotingModel. Retrieves the Votingmodel from the current MediaItem. returns null if MediaItem does not contains a VotingModel.


getVotingAverage

float getVotingAverage()
Get the ranking ( the average of votes )


getTotalVotes

int getTotalVotes()
Gets the total votes


getForum

Forum getForum()
Return the forum associated with this article or null.

Returns:
the forum associated with this article or null.

getForumSettings

ForumSettings getForumSettings()
Return the ForumSettings associated with the Forum or null.

Returns:
the ForumSettings associated with the Forum or null.

setForum

void setForum(Forum forum)
Set the forum associated with this article or null. Note: Currently not implemented.

Parameters:
forum - the forum associated with this article or null.

setForumSettings

void setForumSettings(ForumSettings forumSettings)
Set the ForumSettings associated with the Forum or null. Note: Currently isn't implemented.

Parameters:
forumSettings - the ForumSettings associated with the Forum or null.

getResourceInstances

ResourceInstance[] getResourceInstances()
Returns an array of the refered ResourceInstances for this article

Returns:
an array of the refered ResourceInstances for this article

setResourceInstances

void setResourceInstances(ResourceInstance[] resourceInstances)
Set the refered ResourceInstances for this article

Parameters:
resourceInstances - an array of the refered ResourceInstances for this article

getCreationDate

java.util.Date getCreationDate()
Return creation date. Be aware that this is only accurate to the minute.

Returns:
creation date.

getExternalId

java.lang.String getExternalId()
Return external identifier.

Returns:
external identifier.

setExternalId

void setExternalId(java.lang.String value)
Set external id

Parameters:
value - external id

getDiscussionConfiguration

DiscussionConfiguration getDiscussionConfiguration()
Returns the discussion configuration for this media item version.

Returns:
The discussion configuration of this media item version.

setDiscussionConfiguration

void setDiscussionConfiguration(DiscussionConfiguration discConfig)
Sets the discussion configuration for this media item version.

Parameters:
discConfig - The discussion configuration to set

isCurrent

boolean isCurrent()
Returns true if you may view this MediaItemVersion object either because it is public (i.e. the current version) or because you're in the preview mode and have the required workflow based authorization.

Returns:
True if you may view this MediaItemVersion object either because it is public (i.e. the current version) or because you're in the preview mode and have the required workflow based authorization.

getLastModifiedUser

User getLastModifiedUser()
Return the last modified user of this page version.

Returns:
The user object who modified this page last.

getFriendlyURLTitle

java.lang.String getFriendlyURLTitle()
Returns the friendly URL title. Not to be used in URLs directly. The returned string reflects the URL title as entered by an editor in the meta data section of an article. This URL title edit box is only visible in case website_settings.friendly_url_setting equals urltitle. The returned string is used by the SEOService to normalize and store it in the friendly URL store.

Returns:
Friendly URL title.

setFriendlyURLTitle

void setFriendlyURLTitle(java.lang.String friendlyURLTitle)
Sets the friendly URL title.

Parameters:
friendlyURLTitle - Friendly URL title to set.


Copyright © 2007-2011 GX Software BV. All Rights Reserved.