Interface MediaRepository

  • All Superinterfaces:
    Wrapper

    public interface MediaRepository
    extends Wrapper
    Representation of MediaRepository.
    • 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.
      • 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.
        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.
        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​(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
      • 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.
        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 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​(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. Returns true if the source website is shared to the target website, false otherwise.
        Parameters:
        sourceWebsite - Source website
        targetWebsite - Target website
        Returns:
        true if media repository is shared, false otherwise.
      • isUseSharedMediaRepository

        boolean isUseSharedMediaRepository()
        Returns true 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()
        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​(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​(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​(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,
                                  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.