Package lumis.service.media
Interface IMediaManager
-
- All Known Implementing Classes:
MediaManager
public interface IMediaManager
Provides media management operations.- Since:
- 7.0.0
- Version:
- $Revision: 24143 $ $Date: 2020-09-14 19:21:23 -0300 (Mon, 14 Sep 2020) $
-
-
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(String mediaId)
Returns the MediaConfig for a media with the given id.Collection<Media>
getChildren(String serviceInstanceId, String folderId, int type)
Returns the entries in the specified folder.Collection<String>
getFolderIdsByParentAndName(String serviceInstanceId, String parentFolderId, String folderName)
Returns the ids of the folders child of the given parent and with the given name.String
getFolderPath(String folderId)
Returns the virtual path to the folder.Media
getFromFileId(String fileId)
Returns the MediaConfig for given file identifier.Collection<String>
getMediaPublishToPrincipals(String mediaId)
Return a the list of principals for which themedia
is published to.void
moveMedia(String mediaId, String destFolderId)
Moves a media (or a folder) to another folder.void
updateMediaHierarchyPublishTo(String mediaId, Collection<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(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
Collection<String> getFolderIdsByParentAndName(String serviceInstanceId, String parentFolderId, 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
Collection<Media> getChildren(String serviceInstanceId, 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
String getFolderPath(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(String mediaId, 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(String mediaId, Collection<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
Collection<String> getMediaPublishToPrincipals(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(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
-
-