Interface MediaItem
-
- All Superinterfaces:
ContentItem<MediaItemVersion>
,Wrapper
@Indexable public interface MediaItem extends Wrapper, ContentItem<MediaItemVersion>
Representation of MediaItem.
-
-
Field Summary
Fields Modifier and Type Field Description static String
ARTICLE_TYPE
String identifier for article media itemsstatic String
DOWNLOAD_TYPE
String identifier for download media itemsstatic String
IMAGE_TYPE
String identifier for image media itemsstatic String
MULTIMEDIA_TYPE
String identifier for multimedia media itemsstatic String
PAGE_TYPE
String identifier for page media itemsstatic String
PAGEMODEL_TYPE
Deprecated.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
exists()
Returns whether this media item still exists in the media repository.MediaContentType
getContentType()
Retrieves the media content type of the media item.MediaItemVersion
getCurrent()
Returns the current version of this content item.int
getId()
Returns the ID of the wrapped object.Link
getIncontextLink()
Returns the incontext link to this media item.MediaItemVersion
getPlanned()
Returns the planned version of this content item.MediaItemVersion[]
getVersions()
Returns allContentItemVersion
s this content item has.void
updateCurrent()
Update the "Current" (="Active") versions.-
Methods inherited from interface nl.gx.webmanager.cms.core.ContentItem
getCurrent, getEditVersion, getEditVersionInLanguage, getIdentifier, getInternalLink, getLink, getMostRelevantVersion, getOriginId, getPlanned, getVersion, getVersions, getWebsite
-
-
-
-
Field Detail
-
ARTICLE_TYPE
static final String ARTICLE_TYPE
String identifier for article media items- See Also:
- Constant Field Values
-
IMAGE_TYPE
static final String IMAGE_TYPE
String identifier for image media items- See Also:
- Constant Field Values
-
PAGE_TYPE
static final String PAGE_TYPE
String identifier for page media items- See Also:
- Constant Field Values
-
PAGEMODEL_TYPE
@Deprecated static final String PAGEMODEL_TYPE
Deprecated.String identifier for page model media items- See Also:
- Constant Field Values
-
DOWNLOAD_TYPE
static final String DOWNLOAD_TYPE
String identifier for download media items- See Also:
- Constant Field Values
-
MULTIMEDIA_TYPE
static final String MULTIMEDIA_TYPE
String identifier for multimedia media items- See Also:
- Constant Field Values
-
-
Method Detail
-
getId
@ReferField int getId()
Description copied from interface:Wrapper
Returns the ID of the wrapped object.
-
getVersions
MediaItemVersion[] getVersions()
Description copied from interface:ContentItem
Returns allContentItemVersion
s this content item has. AContentItem
must have at least oneContentItemVersion
.In exceptional cases like these, the method returns an empty array:
- The
ContentItem
and therefore its last version has just been deleted within the current session. - The
Content Type
is inactive.
- Specified by:
getVersions
in interfaceContentItem<MediaItemVersion>
- Returns:
- all versions, in exceptional cases only an empty array, never
null
- The
-
getCurrent
MediaItemVersion getCurrent()
Description copied from interface:ContentItem
Returns the current version of this content item. Returns the exact same result asgetCurrent(null)
.- Specified by:
getCurrent
in interfaceContentItem<MediaItemVersion>
- Returns:
- the current version, or
null
if there is no current version - See Also:
ContentItem.getCurrent(Language)
-
getPlanned
MediaItemVersion getPlanned()
Description copied from interface:ContentItem
Returns the planned version of this content item. Returns the exact same result asgetPlanned(null)
.- Specified by:
getPlanned
in interfaceContentItem<MediaItemVersion>
- Returns:
- the planned version, or
null
if there is no planned version - See Also:
ContentItem.getPlanned(Language)
-
getContentType
MediaContentType getContentType()
Retrieves the media content type of the media item. Besides new media content types added by custom media items there are currently eleven types of media content, which are (based on the unique value retrieved byMediaContentType.getValue()
:- article
- image
- page
- download
- multimedia
- Returns:
- The media content type representing what type of content this media item represents.
-
getIncontextLink
Link getIncontextLink()
Returns the incontext link to this media item.- Returns:
- Incontext link to this media item.
-
exists
boolean exists()
Returns whether this media item still exists in the media repository.- Returns:
true
if this media item exists in the media repository.
-
updateCurrent
void updateCurrent()
Update the "Current" (="Active") versions. The current versions might change due to publication status changes and passed publication / expiration dates. There can be at most one "current" version per language.
-
-