Package lumis.service.media
Interface IMediaManager
-
- All Known Implementing Classes:
MediaManager
public interface IMediaManager
Provides media management operations.- Since:
- 7.0.0
- Version:
- $Revision$ $Date$
-
-
Field Summary
Fields Modifier and Type Field Description static int
TYPE_ALL
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Media
get(java.lang.String mediaId)
Returns the MediaConfig for a media with the given id.java.util.Collection<Media>
getChildren(java.lang.String serviceInstanceId, java.lang.String folderId, int type)
Returns the entries in the specified folder.java.util.Collection<java.lang.String>
getFolderIdsByParentAndName(java.lang.String serviceInstanceId, java.lang.String parentFolderId, java.lang.String folderName)
Returns the ids of the folders child of the given parent and with the given name.java.lang.String
getFolderPath(java.lang.String folderId)
Returns the virtual path to the folder.Media
getFromFileId(java.lang.String fileId)
Returns the MediaConfig for given file identifier.java.util.Collection<java.lang.String>
getMediaPublishToPrincipals(java.lang.String mediaId)
Return a the list of principals for which themedia
is published to.void
moveMedia(java.lang.String mediaId, java.lang.String destFolderId)
Moves a media (or a folder) to another folder.void
updateMediaHierarchyPublishTo(java.lang.String mediaId, java.util.Collection<java.lang.String> heritagePrincipalsId)
Update the list of principals themedia
is published to
-
-
-
Field Detail
-
TYPE_ALL
static final int TYPE_ALL
- See Also:
- Constant Field Values
-
-
Method Detail
-
get
Media get(java.lang.String mediaId) throws PortalException
Returns the MediaConfig for a media with the given id.- Parameters:
mediaId
- the id of the media.- Returns:
- the media.
- Throws:
PortalException
-
getFolderIdsByParentAndName
java.util.Collection<java.lang.String> getFolderIdsByParentAndName(java.lang.String serviceInstanceId, java.lang.String parentFolderId, java.lang.String folderName) throws PortalException
Returns the ids of the folders child of the given parent and with the given name.- Parameters:
serviceInstanceId
- the media service instance id.parentFolderId
- the parent folder's id. Null if the folder must not have parent.folderName
- the folder name.- Returns:
- Throws:
PortalException
-
getChildren
java.util.Collection<Media> getChildren(java.lang.String serviceInstanceId, java.lang.String folderId, int type) throws PortalException
Returns the entries in the specified folder.- Parameters:
serviceInstanceId
- the media service instance id.folderId
- the id of the folder.type
- the entry types to be returned. Must beMedia.TYPE_FOLDER
,Media.TYPE_MEDIA
orTYPE_ALL
.- Returns:
- the entries in the specified folder, or an empty collection if none is found.
- Throws:
PortalException
-
getFolderPath
java.lang.String getFolderPath(java.lang.String folderId) throws PortalException
Returns the virtual path to the folder.- Parameters:
folderId
- the id of the folder.- Returns:
- the virtual path to the folder.
- Throws:
PortalException
-
moveMedia
void moveMedia(java.lang.String mediaId, java.lang.String destFolderId) throws PortalException
Moves a media (or a folder) to another folder.- Parameters:
mediaId
- the media's id.destFolderId
- the id of the destination folder.- Throws:
PortalException
-
updateMediaHierarchyPublishTo
void updateMediaHierarchyPublishTo(java.lang.String mediaId, java.util.Collection<java.lang.String> heritagePrincipalsId) throws PortalException
Update the list of principals the
media
is published toWhen the
media
type is afolder
, the entire file tree inside it will also be updated taking into account theirinheritance
.- Parameters:
mediaId
- Themedia identifier
to updateheritagePrincipalsId
- The list of principals to set.- Throws:
PortalException
- Since:
- 10.1.0
-
getMediaPublishToPrincipals
java.util.Collection<java.lang.String> getMediaPublishToPrincipals(java.lang.String mediaId) throws PortalException
Return a the list of principals for which themedia
is published to.- Parameters:
mediaId
- Themedia identifier
- Returns:
- A list containing the identifier of all principals.
- Throws:
PortalException
- Since:
- 10.1.0
-
getFromFileId
Media getFromFileId(java.lang.String fileId) throws PortalException
Returns the MediaConfig for given file identifier.- Parameters:
fileId
- the file identifier.- Returns:
- the MediaConfig for given file identifier.
- Throws:
PortalException
- Since:
- 12.5.0
-
-