public class MediaManager extends Object implements IMediaManager
TYPE_ALL
Constructor and Description |
---|
MediaManager() |
Modifier and Type | Method and 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.
|
Set<String> |
getMediaPublishToPrincipals(String parentFolderId)
Return a the list of principals for which the
media 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 the
media is published to |
public Media get(String mediaId) throws PortalException
IMediaManager
get
in interface IMediaManager
mediaId
- the id of the media.PortalException
public Collection<String> getFolderIdsByParentAndName(String serviceInstanceId, String parentFolderId, String folderName) throws PortalException
IMediaManager
getFolderIdsByParentAndName
in interface IMediaManager
serviceInstanceId
- the media service instance id.parentFolderId
- the parent folder's id. Null if the folder must not have parent.folderName
- the folder name.PortalException
public Collection<Media> getChildren(String serviceInstanceId, String folderId, int type) throws PortalException
IMediaManager
getChildren
in interface IMediaManager
serviceInstanceId
- the media service instance id.folderId
- the id of the folder.type
- the entry types to be returned. Must be Media.TYPE_FOLDER
, Media.TYPE_MEDIA
or IMediaManager.TYPE_ALL
.PortalException
public String getFolderPath(String folderId) throws PortalException
IMediaManager
getFolderPath
in interface IMediaManager
folderId
- the id of the folder.PortalException
public void moveMedia(String mediaId, String destFolderId) throws PortalException
IMediaManager
moveMedia
in interface IMediaManager
mediaId
- the media's id.destFolderId
- the id of the destination folder.PortalException
public void updateMediaHierarchyPublishTo(String mediaId, Collection<String> heritagePrincipalsId) throws PortalException
IMediaManager
Update the list of principals the media
is published to
When the media
type is a folder
, the entire file tree
inside it will also be updated taking into account their inheritance
.
updateMediaHierarchyPublishTo
in interface IMediaManager
mediaId
- The media identifier
to updateheritagePrincipalsId
- The list of principals to set.PortalException
public Set<String> getMediaPublishToPrincipals(String parentFolderId) throws PortalException
IMediaManager
media
is published to.getMediaPublishToPrincipals
in interface IMediaManager
parentFolderId
- The media identifier
PortalException
LumisXP 12.4.0.200625 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.