|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface MediaRepositoryManagementService
This class offers APIs for operations with media items.
| Method Summary | |
|---|---|
MediaItem |
copyMediaItem(MediaItem mediaItem)
Copies the given media item. |
MediaItem |
copyMediaItem(Website website,
MediaItem mediaItem)
Copies the given media item to the target website. |
MediaTermClassification |
createClassification(java.lang.String classification)
Creates a new term classification and returns it. |
MediaItem |
createDownloadMediaItem(Website website)
Creates a new download media item (also referred to as a download stored in the ObjectManager) and returns it. |
MediaItem |
createFlashMediaItem(Website website)
Creates a new flash media item (also referred to as a download stored in the ObjectManager) and returns it. |
MediaItem |
createImageMediaItem(Website website)
Creates a new image media item (also referred to as an image stored in the ObjectManager) and returns it. |
MediaItem |
createMediaItem(Website website,
java.lang.String type)
Creates a new media item of the specified type and returns it. |
MediaItemVersion |
createMediaItemVersion(MediaItemVersion original)
Creates a new MediaItemVersion based on the original version. |
MediaTerm |
createMediaTerm(Website website,
java.lang.String termName)
Creates a new media term with the specified term name. |
MediaItem |
createPageMediaItem(Website website,
Page page)
Creates a new page media item; a page that is stored in the media repository. |
MediaItem |
createPageModelMediaItem(Website website,
PageModel pageModel)
Create a new media item based on a page model. |
void |
deleteClassification(MediaTermClassification classification)
Persistently deletes the given MediaTermClassification object from the MediaRepository. |
boolean |
deleteMediaItem(MediaItem mediaItem)
Deletes the given media item. |
boolean |
deleteMediaItemVersion(MediaItemVersion mediaItemVersion)
Deletes the given media item version. |
void |
deleteMediaTerm(MediaTerm mediaTerm)
Deletes a media term. |
MediaItem[] |
getAllMediaItems(java.lang.String mediaType)
NB: THIS METHOD UNCONDITIONALLY RETRIEVES ALL MEDIAITEMS OF A PARTICULAR TYPE. |
MediaItemFilter |
getMediaItemFilterInstance()
Creates and returns an instance of a MediaItemFilter with default values. |
MediaSearchResult |
getMediaItems(Website website,
MediaItemFilter filter,
MediaItemSortOptions sortOptions)
Performs the search of media items based on filter search criteria. |
MediaItemSortOptions |
getMediaItemSortOptionsInstance()
Creates an instance of MediaItemSortOptions. |
void |
performPostUpdateActions(MediaItemVersion mediaItemVersion)
Tells WebManager a media item version has been updated. |
void |
performWorkflowAction(MediaItemVersion mediaItemVersion,
WorkflowAction workflowAction)
Performs the given workflowAction to progress this mediaItemVersion to the next state. |
boolean |
reorderElements(MediaItemArticleVersion mediaItemArticleVersion,
Element[] elements)
Reorders all the elements of a media item article version. |
| Method Detail |
|---|
MediaItem createDownloadMediaItem(Website website)
website - Website for which to create the download media item
null if an error occurredMediaItem createImageMediaItem(Website website)
website - Website for which to create the image media item
null if an error occurredMediaItem createFlashMediaItem(Website website)
website - Website for which to create the flash media item
null if an error occurred
MediaItem createPageMediaItem(Website website,
Page page)
website - Website for which to create the page media itempage - Page that should be assigned to the new media item
null if an error occurred
MediaItem createPageModelMediaItem(Website website,
PageModel pageModel)
website - Website for which to create the media item.pageModel - The page model to base the media item on.
null if an error occurred
MediaItem createMediaItem(Website website,
java.lang.String type)
website - Website for which to create the flash media itemtype - String identifying the type of media item (see
nl.gx.webmanager.cms.mediarepository.MediaItem for static definitions of all available
types) NB: Cannot be used for media items of type page or page model.
null if an error occurred
MediaTerm createMediaTerm(Website website,
java.lang.String termName)
website - The website for which to create the media term.termName - The name of the term to create.
MediaTermClassification createClassification(java.lang.String classification)
classification - The name of the classification to create
void deleteClassification(MediaTermClassification classification)
MediaTermClassification object from the MediaRepository.
classification - The MediaTermClassification which should be deleted.
MediaItem copyMediaItem(MediaItem mediaItem)
throws NoAuthorizationException
Regarding authorization an user needs to have CREATE permission on the media repository. If and only if the media item contains elements each element requires CREATE permission for the user, and the user needs UPDATE permission on the media repository.
Steps performed:
Event.Type.PRE media item event of type MediaItemEvent.COPY is firedEvent>Type.POST media item event of type MediaItemEvent.CREATE is fired
Event.Type.POST media item event of type MediaItemEvent.COPY is firedNote: currently only supports article, page model and media items of a custom content type, and NOT page, multimedia, image, download, flash, announcement, regulation and document types.
mediaItem - Media item to copy.
NoAuthorizationException - If user has no rights to copy the media item.ElementManagementService#copyElement(Element, MediaItemArticleVersion)}
MediaItemVersion createMediaItemVersion(MediaItemVersion original)
throws NoAuthorizationException
original - the original MediaItemVersion to base the new version on
NoAuthorizationException - if there is no authorization
MediaItem copyMediaItem(Website website,
MediaItem mediaItem)
throws NoAuthorizationException
For a detailed description see copyMediaItem(MediaItem).
website - Website which will be the owner of the copy.mediaItem - Media item to copy.
NoAuthorizationException - If user has no rights to copy the media item.ElementManagementService#copyElement(Element, MediaItemArticleVersion)}boolean deleteMediaItem(MediaItem mediaItem)
mediaItem - Media item to delete
true if deleting the media item succeeded, false otherwiseboolean deleteMediaItemVersion(MediaItemVersion mediaItemVersion)
mediaItemVersion - Media item version to delete
true if deleting the media item version succeeded, false otherwisevoid deleteMediaTerm(MediaTerm mediaTerm)
mediaTerm - Media term to delete.MediaItem[] getAllMediaItems(java.lang.String mediaType)
mediaType - Media type to retrieve the media items from
boolean reorderElements(MediaItemArticleVersion mediaItemArticleVersion,
Element[] elements)
mediaItemArticleVersion - The media item article version which elements should be reordered.elements - Elements that defines the new ordering of the media item article version's elements.
true if reorder succeeded, false otherwise.MediaItemFilter getMediaItemFilterInstance()
MediaItemFilter with default values.The default values of the created instance are :
MediaItemSortOptions getMediaItemSortOptionsInstance()
MediaSearchResult getMediaItems(Website website,
MediaItemFilter filter,
MediaItemSortOptions sortOptions)
website - Source web site from which the media repository is accessed.filter - the search criteriasortOptions - the sort options
void performWorkflowAction(MediaItemVersion mediaItemVersion,
WorkflowAction workflowAction)
throws UnExecutableWorkflowActionException
mediaItemVersion - the mediaItemVersionworkflowAction - the workflowAction
UnExecutableWorkflowActionException - If the given workflow action is invalid.void performPostUpdateActions(MediaItemVersion mediaItemVersion)
Currently the SEO service (Search Engine Optimization) is instructed to update the media item version's friendly URL if necessary.
mediaItemVersion - The media item version that has been updated.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||