nl.gx.webmanager.cms.mediarepository
Interface MediaRepository

All Superinterfaces:
Wrapper

public interface MediaRepository
extends Wrapper

Representation of MediaRepository.


Method Summary
 int copyMediaItem(MediaItemVersion mediaItem)
          Deprecated. use MediaRepositoryManagementService.copyMediaItem(MediaItem) instead.
 int createContent()
          Deprecated. Use MediaRepositoryManagementService.createMediaItem(Website, String) instead.
 void deleteMediaFileFromDisk(java.lang.String filename, Website website)
          Deletes the given media file from disk.
 boolean deleteMediaItem(MediaItemVersion mediaItem)
          Deprecated. Use MediaRepositoryManagementService.deleteMediaItem(MediaItem) instead.
 MediaContentType[] getAllContentTypes()
          Returns all installed (active or non-active) media content types.
 WorkflowModelState[] getAllPublicStates()
          Returns all workflow model states defined to be public.
 java.lang.String getAndCreateMediaUploadDirectory(java.lang.String filename, Website website)
          Returns the target media upload directory for the given filename.
 MediaContentType[] getAvailableContentTypes()
          Returns all available media content types.
 java.lang.String getCentralMode()
          Returns the id of the centralmode object of mediabank content.
 MediaContentType getContentType(int contentType)
          Returns the media content type for the given content type id.
 MediaContentType getContentType(java.lang.String contentType)
          Returns the media content type for the given content type string identifier.
 int getContentTypeId(java.lang.String contentType)
          Deprecated. Use getContentType(String) to obtain an instance of MediaContentType, and call MediaContentType.getId() on that instance.
 javax.sql.DataSource getDataSource()
          Returns datasource of media repository.
 java.lang.String getDataSourceName()
          Returns data source name of media repository.
 MediaTerm getMediaTerm(java.lang.String name)
          Returns the MediaTerm object with the given name.
 MediaTerm getMediaTerm(java.lang.String name, Website website)
          Returns the MediaTerm object with the given name from the specified Website.
 MediaTermClassification getMediaTermClassification(java.lang.String name)
          Returns the MediaTermClassification object with the given name.
 MediaTermClassification[] getMediaTermClassifications()
          Returns all MediaTermClassification objects.
 MediaTerm[] getMediaTerms()
          Returns all MediaTerm objects which can be accessed from the active Website.
 MediaTerm[] getMediaTerms(MediaTermClassification classification)
          Returns all MediaTerm objects which can be accessed from the active Website which have the given classification assigned.
 MediaTerm[] getMediaTerms(MediaTermClassification classification, java.lang.String prefix)
          Returns all MediaTerm objects which can be accessed from the active Website which have the given classification assigned and with names starting with the given prefix.
 MediaTerm[] getMediaTerms(java.lang.String prefix)
          Returns all MediaTerm objects which can be accessed from the active Website with names starting with the given prefix.
 MediaMultimediaFormat[] getMultimediaFormats()
          Returns the list of all available multimedia formats which can be used in combination with the multimedia media item type.
 java.lang.String getObjectLibraryCentralMode()
          Returns id of centralmode object for object library.
 java.lang.String[] getPublicStates()
          Deprecated. Use getAllPublicStates() instead.
 java.lang.String getUrl(java.lang.String fileName, Website website)
          Returns the URL for a media repository related resource.
 java.lang.String getUrl(java.lang.String fileName, Website website, javax.servlet.http.HttpServletRequest req)
          Deprecated. Use getUrl(String, Website) instead.
 WorkflowModel getWorkflowModel()
          Returns the workflow model that is associated with the media repository as a whole.
 WorkflowModel getWorkflowModel(MediaContentType contentType)
          Returns the workflow model for a particular content type within this media repository.
 WorkflowModel getWorkflowModel(java.lang.String contentType)
          Deprecated. Use getWorkflowModel(MediaContentType) instead.
 void updateMediaItem()
          Updates a media item.
 
Methods inherited from interface nl.gx.webmanager.wrapper.Wrapper
getId, getUUID, setId, setUUID
 

Method Detail

getDataSourceName

java.lang.String getDataSourceName()
Returns data source name of media repository.

Returns:
data source name of media repository.

getDataSource

javax.sql.DataSource getDataSource()
Returns datasource of media repository.

Returns:
datasource of media repository.

getPublicStates

@Deprecated
java.lang.String[] getPublicStates()
Deprecated. Use getAllPublicStates() instead.

Returns all public states.

Returns:
all public states.

getAllPublicStates

WorkflowModelState[] getAllPublicStates()
Returns all workflow model states defined to be public. These are all workflow model states from the different workflow repository models from all websites. Only media items that have assigned one of these states should be available on the website.

Returns:
all workflow model states defined to be public.

getUrl

@Deprecated
java.lang.String getUrl(java.lang.String fileName,
                                   Website website,
                                   javax.servlet.http.HttpServletRequest req)
Deprecated. Use getUrl(String, Website) instead.

Returns URL for a specific file.

Parameters:
fileName - The name of the file to setup an URL for.
website - The URL should be setup with this website's specific URL settings.
req - The request object - unused.
Returns:
URL for a specific file.

getUrl

java.lang.String getUrl(java.lang.String fileName,
                        Website website)
Returns the URL for a media repository related resource. This includes the media item's lead image, instances of media item image and it's thumbnail and resized variants, and media item flash and it's backup image.

Parameters:
fileName - The name of the file to setup an URL for.
website - The URL should be setup with this website's specific URL settings.
Returns:
the URL for a media repository related resource.

getObjectLibraryCentralMode

java.lang.String getObjectLibraryCentralMode()
Returns id of centralmode object for object library.

Returns:
id of centralmode object for object library.

getCentralMode

java.lang.String getCentralMode()
Returns the id of the centralmode object of mediabank content.

Returns:
id of centralmode object for object mediabank content.

createContent

@Deprecated
int createContent()
Deprecated. Use MediaRepositoryManagementService.createMediaItem(Website, String) instead.

Returns the id for the createdContent.

Returns:
the id for the createdContent

copyMediaItem

@Deprecated
int copyMediaItem(MediaItemVersion mediaItem)
Deprecated. use MediaRepositoryManagementService.copyMediaItem(MediaItem) instead.

Returns the id of the copied Content.

Parameters:
mediaItem - The media item to copy.
Returns:
the id of the copied Content

updateMediaItem

void updateMediaItem()
Updates a media item. Uses the request to determine which media item should be updated.


getAllContentTypes

MediaContentType[] getAllContentTypes()
Returns all installed (active or non-active) media content types.

Returns:
Array of all media content types

getContentTypeId

@Deprecated
int getContentTypeId(java.lang.String contentType)
Deprecated. Use getContentType(String) to obtain an instance of MediaContentType, and call MediaContentType.getId() on that instance.

Returns the content type id for the given content type string identifier.

Parameters:
contentType - String identifier of the content type
Returns:
Id of the content type

getContentType

MediaContentType getContentType(int contentType)
Returns the media content type for the given content type id.

Parameters:
contentType - Id of the content type
Returns:
The media content type

getContentType

MediaContentType getContentType(java.lang.String contentType)
Returns the media content type for the given content type string identifier.

Parameters:
contentType - String identifier of the content type
Returns:
The media content type

deleteMediaItem

@Deprecated
boolean deleteMediaItem(MediaItemVersion mediaItem)
Deprecated. Use MediaRepositoryManagementService.deleteMediaItem(MediaItem) instead.

Returns true if the media item, retrieved from the request, was successfully deleted.

Parameters:
mediaItem - The media item version to delete.
Returns:
true if the media item, retrieve from the request, was succesfully deleted

getMultimediaFormats

MediaMultimediaFormat[] getMultimediaFormats()
Returns the list of all available multimedia formats which can be used in combination with the multimedia media item type.

Returns:
All available media formats.

getWorkflowModel

WorkflowModel getWorkflowModel()
Returns the workflow model that is associated with the media repository as a whole.

Returns:
the workflow model that is associated with the media repository as a whole

getWorkflowModel

@Deprecated
WorkflowModel getWorkflowModel(java.lang.String contentType)
Deprecated. Use getWorkflowModel(MediaContentType) instead.

Returns the workflow model for a particular content type within this media repository.

Parameters:
contentType - String identifier of the media item type for which the Workflow model should be retrieved
Returns:
The workflow model associated with the specified content type

getWorkflowModel

WorkflowModel getWorkflowModel(MediaContentType contentType)
Returns the workflow model for a particular content type within this media repository.

Parameters:
contentType - String identifier of the media item type for which the Workflow model should be retrieved
Returns:
The workflow model associated with the specified content type

getAndCreateMediaUploadDirectory

java.lang.String getAndCreateMediaUploadDirectory(java.lang.String filename,
                                                  Website website)
Returns the target media upload directory for the given filename. This method hashes the filename and postfixes the media upload directory with directories three levels deep, generated from this hash. It creates the directory if it does not exist

Parameters:
filename - Filename for which the upload media directory should be returned
website - Website for which the upload media directory should be returned
Returns:
Full path name of the media upload directory of the given file

deleteMediaFileFromDisk

void deleteMediaFileFromDisk(java.lang.String filename,
                             Website website)
Deletes the given media file from disk.

Parameters:
filename - The filename of the media file in the upload_mm directory that should be removed. Note that this should only be the filename, it should not include the path.
website - Website of the media item that is assosiated with this media file

getAvailableContentTypes

MediaContentType[] getAvailableContentTypes()
Returns all available media content types.

Returns:
Array of available media content types

getMediaTerms

MediaTerm[] getMediaTerms()
Returns all MediaTerm objects which can be accessed from the active Website. Returns an empty array if no objects are found.

Returns:
All MediaTerm objects which can be accessed from the active Website. Returns an empty array if no objects are found.

getMediaTerms

MediaTerm[] getMediaTerms(java.lang.String prefix)
Returns all MediaTerm objects which can be accessed from the active Website with names starting with the given prefix. Returns an empty array if no objects are found.

Parameters:
prefix - String with which returned MediaTerm objects start.
Returns:
All MediaTerm objects which can be accessed from the active Website with names starting with the given prefix. Returns an empty array if no objects are found.

getMediaTerm

MediaTerm getMediaTerm(java.lang.String name)
Returns the MediaTerm object with the given name. Return null if no MediaTerm object with the given name can be accessed from the active Website.

Parameters:
name - String which is used to match with.
Returns:
The MediaTerm object with the given name. Return null if no MediaTerm object with the given name can be accessed from the active Website.

getMediaTerm

MediaTerm getMediaTerm(java.lang.String name,
                       Website website)
Returns the MediaTerm object with the given name from the specified Website. Returns null if no MediaTerm object with the given name is available on the specified Website.

Parameters:
name - String which is used to match with.
website - The website to retrieve the media term for
Returns:
The MediaTerm object with the given name. Return null if no MediaTerm object with the given name can be accessed from the active Website.

getMediaTerms

MediaTerm[] getMediaTerms(MediaTermClassification classification)
Returns all MediaTerm objects which can be accessed from the active Website which have the given classification assigned. Returns an empty array if no objects are found.

Parameters:
classification - MediaTermClassification which is assigned to the returned MediaTerm objects.
Returns:
All MediaTerm objects which can be accessed from the active Website which have the given classification assigned. Returns an empty array if no objects are found.

getMediaTerms

MediaTerm[] getMediaTerms(MediaTermClassification classification,
                          java.lang.String prefix)
Returns all MediaTerm objects which can be accessed from the active Website which have the given classification assigned and with names starting with the given prefix. Returns an empty array if no objects are found.

Parameters:
classification - MediaTermClassification which is assigned to the returned MediaTerm objects.
prefix - String with which returned MediaTerm objects start.
Returns:
All MediaTerm objects which can be accessed from the active Website which have the given classification assigned and with names starting with the given prefix. Returns an empty array if no objects are found.

getMediaTermClassification

MediaTermClassification getMediaTermClassification(java.lang.String name)
Returns the MediaTermClassification object with the given name. Return null if no MediaTermClassification object exists with the given name.

Parameters:
name - String which is used to match with.
Returns:
The MediaTermClassification object with the given name. Return null if no MediaTermClassification object exists with the given name.

getMediaTermClassifications

MediaTermClassification[] getMediaTermClassifications()
Returns all MediaTermClassification objects. Returns an empty array if no objects exist.

Returns:
All MediaTermClassification objects. Returns an empty array if no objects exist.


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