Interface MediaRepository
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
deleteMediaFileFromDisk(String filename, Website website)
Deletes the given media file from disk.boolean
deleteMediaItem(MediaItemVersion mediaItem)
Deprecated.MediaContentType[]
getAllContentTypes()
Returns all installed (active or non-active) media content types.WorkflowModelState[]
getAllPublicStates()
Returns all workflow model states defined to be public.String
getAndCreateMediaUploadDirectory(String filename, Website website)
Returns the target media upload directory for the given filename.MediaContentType[]
getAvailableContentTypes()
Returns all available media content types.String
getCentralMode()
Deprecated.MediaContentType
getContentType(int contentType)
Returns the media content type for the given content type id.MediaContentType
getContentType(String contentType)
Returns the media content type for the given content type string identifier.int
getContentTypeId(String contentType)
Deprecated.UsegetContentType(String)
to obtain an instance ofMediaContentType
, and callMediaContentType.getId()
on that instance.DataSource
getDataSource()
Returns datasource of media repository.String
getDataSourceName()
Returns data source name of media repository.MediaTerm
getMediaTerm(String name)
Returns theMediaTerm
object with the given name.MediaTerm
getMediaTerm(String name, Website website)
MediaTermClassification
getMediaTermClassification(String name)
Returns theMediaTermClassification
object with the given name.MediaTermClassification[]
getMediaTermClassifications()
Returns allMediaTermClassification
objects.MediaTerm[]
getMediaTerms()
MediaTerm[]
getMediaTerms(String prefix)
MediaTerm[]
getMediaTerms(MediaTermClassification classification)
MediaTerm[]
getMediaTerms(MediaTermClassification classification, String prefix)
MediaMultimediaFormat[]
getMultimediaFormats()
Returns the list of all available multimedia formats which can be used in combination with the multimedia media item type.String
getObjectLibraryCentralMode()
Deprecated.String[]
getPublicStates()
Deprecated.UsegetAllPublicStates()
instead.String
getUrl(String fileName, Website website)
Returns the URL for a media repository related resource.String
getUrl(String fileName, Website website, javax.servlet.http.HttpServletRequest req)
Deprecated.UsegetUrl(String, Website)
instead.WorkflowModel
getWorkflowModel()
Returns the workflow model that is associated with the media repository as a whole.WorkflowModel
getWorkflowModel(String contentType)
Deprecated.UsegetWorkflowModel(MediaContentType)
instead.WorkflowModel
getWorkflowModel(MediaContentType contentType)
Returns the workflow model for a particular content type within this media repository.boolean
isShared(Website sourceWebsite, Website targetWebsite)
Checks whether the media repository is shared.boolean
isUseSharedMediaRepository()
Returnstrue
in case this MediaRepository has accepted access to a shared MediaRepository from another Website,false
otherwise.
-
-
-
Method Detail
-
getDataSourceName
String getDataSourceName()
Returns data source name of media repository.- Returns:
- data source name of media repository.
-
getDataSource
DataSource getDataSource()
Returns datasource of media repository.- Returns:
- datasource of media repository.
-
getPublicStates
@Deprecated String[] getPublicStates()
Deprecated.UsegetAllPublicStates()
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 String getUrl(String fileName, Website website, javax.servlet.http.HttpServletRequest req)
Deprecated.UsegetUrl(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
String getUrl(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.- 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
@Deprecated String getObjectLibraryCentralMode()
Deprecated.Returns id of centralmode object for object library.- Returns:
- id of centralmode object for object library.
-
getCentralMode
@Deprecated String getCentralMode()
Deprecated.Returns the id of the centralmode object of mediabank content.- Returns:
- id of centralmode object for object mediabank content.
-
getAllContentTypes
MediaContentType[] getAllContentTypes()
Returns all installed (active or non-active) media content types.- Returns:
- Array of all media content types
-
getContentTypeId
@Deprecated int getContentTypeId(String contentType)
Deprecated.UsegetContentType(String)
to obtain an instance ofMediaContentType
, and callMediaContentType.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(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.Returnstrue
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(String contentType)
Deprecated.UsegetWorkflowModel(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
String getAndCreateMediaUploadDirectory(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 returnedwebsite
- 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(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 associated with this media file
-
isShared
boolean isShared(Website sourceWebsite, Website targetWebsite)
Checks whether the media repository is shared. Returnstrue
if the source website is shared to the target website,false
otherwise.- Parameters:
sourceWebsite
- Source websitetargetWebsite
- Target website- Returns:
true
if media repository is shared,false
otherwise.
-
isUseSharedMediaRepository
boolean isUseSharedMediaRepository()
Returnstrue
in case this MediaRepository has accepted access to a shared MediaRepository from another Website,false
otherwise.- Returns:
true
in case this MediaRepository has accepted access to a shared MediaRepository from another Website,false
otherwise
-
getAvailableContentTypes
MediaContentType[] getAvailableContentTypes()
Returns all available media content types.- Returns:
- Array of available media content types
-
getMediaTerms
MediaTerm[] getMediaTerms()
-
getMediaTerms
MediaTerm[] getMediaTerms(MediaTermClassification classification)
Returns allMediaTerm
objects which can be accessed from the activeWebsite
which have the given classification assigned. Returns an empty array if no objects are found.- Parameters:
classification
-MediaTermClassification
which is assigned to the returnedMediaTerm
objects.- Returns:
- All
MediaTerm
objects which can be accessed from the activeWebsite
which have the given classification assigned. Returns an empty array if no objects are found.
-
getMediaTerms
MediaTerm[] getMediaTerms(MediaTermClassification classification, String prefix)
Returns allMediaTerm
objects which can be accessed from the activeWebsite
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 returnedMediaTerm
objects.prefix
- String with which returnedMediaTerm
objects start.- Returns:
- All
MediaTerm
objects which can be accessed from the activeWebsite
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(String name)
Returns theMediaTermClassification
object with the given name. Return null if noMediaTermClassification
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 noMediaTermClassification
object exists with the given name.
-
getMediaTermClassifications
MediaTermClassification[] getMediaTermClassifications()
Returns allMediaTermClassification
objects. Returns an empty array if no objects exist.- Returns:
- All
MediaTermClassification
objects. Returns an empty array if no objects exist.
-
-