Class MediaUtil


  • public final class MediaUtil
    extends java.lang.Object
    Media related utility methods.
    Since:
    17.0.0
    Version:
    $Revision$ $Date$
    • Method Detail

      • clearNonExistentLinkedSourcesAndFields

        public static void clearNonExistentLinkedSourcesAndFields​(SessionConfig sessionConfig,
                                                                  ServiceConfig serviceConfig,
                                                                  org.w3c.dom.Node douiDefinitionNode,
                                                                  ITransaction transaction)
                                                           throws PortalException
        Clear non-existent linked sources and fields.
        Parameters:
        sessionConfig - the user session information.
        serviceConfig - the service being registered.
        douiDefinitionNode - the doui definition node.
        transaction - the transaction.
        Throws:
        PortalException
        Since:
        17.0.0
      • processAddedContent

        public static void processAddedContent​(Source<?> s,
                                               ISourceField field,
                                               SourcePostAddDataEvent event,
                                               java.util.Collection<java.lang.String> referencedMedia)
                                        throws PortalException
        Processes the added content.
        Parameters:
        s - the source
        field - the field
        event - the event
        referencedMedia - the referenced media (if any)
        Throws:
        PortalException
        Since:
        17.0.0
      • processUpdatedContent

        public static void processUpdatedContent​(Source<?> s,
                                                 ISourceField field,
                                                 SourcePostUpdateDataEvent event,
                                                 java.util.Collection<java.lang.String> referencedMedia)
                                          throws PortalException
        Processes the updated content.
        Parameters:
        s - the source
        field - the field
        event - the event
        referencedMedia - the referenced media (if any)
        Throws:
        PortalException
        Since:
        17.0.0
      • checkFileIsMedia

        public static java.lang.String checkFileIsMedia​(java.lang.String fileId)
                                                 throws PortalException
        Check if a file is a media file
        Parameters:
        fileId -
        Returns:
        Throws:
        PortalException
        Since:
        17.0.0