org.apache.myfaces.custom.media.util
Class MediaUtil

java.lang.Object
  extended by org.apache.myfaces.custom.media.util.MediaUtil

public class MediaUtil
extends java.lang.Object

This class acts as a helper for the Media component.


Constructor Summary
MediaUtil()
           
 
Method Summary
static void generateEmbedTag(javax.faces.context.FacesContext context, MediaComponent mediaComponent)
          This method is used for generating the EMBED Tag from the mediaComponent attributes.
static void generateImageTag(javax.faces.context.FacesContext context, MediaComponent mediaComponent)
          This method is used for generating the IMG tag from the mediaComponent attributes.
static boolean isImage(java.lang.String uri)
          This method checks whether the passed uri contains image.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MediaUtil

public MediaUtil()
Method Detail

isImage

public static boolean isImage(java.lang.String uri)
This method checks whether the passed uri contains image.

Parameters:
uri -
Returns:
boolean.

generateEmbedTag

public static void generateEmbedTag(javax.faces.context.FacesContext context,
                                    MediaComponent mediaComponent)
                             throws java.io.IOException
This method is used for generating the EMBED Tag from the mediaComponent attributes.

Parameters:
context -
mediaComponent -
Throws:
java.io.IOException

generateImageTag

public static void generateImageTag(javax.faces.context.FacesContext context,
                                    MediaComponent mediaComponent)
                             throws java.io.IOException
This method is used for generating the IMG tag from the mediaComponent attributes.

Parameters:
context -
mediaComponent -
Throws:
java.io.IOException


Copyright © 2011 The Apache Software Foundation. All Rights Reserved.