net.sourceforge.openutils.mgnlmedia.media.tags.el
Class MediaEl

java.lang.Object
  extended by net.sourceforge.openutils.mgnlmedia.media.tags.el.MediaEl

public final class MediaEl
extends Object

Class that holds media el functions methods

Version:
$Id: MediaEl.java 2311 2010-04-26 17:04:52Z fgiust $
Author:
molaschi

Method Summary
static String desc(info.magnolia.cms.core.Content media)
          Deprecated. use media.getNodeData("description") or ${media.description}
static String descLoc(info.magnolia.cms.core.Content media, Locale locale)
          Deprecated. use the standard Magnolia i18nContentSupport for this. Please note that versions < 4.2 of the media module used PROPERTY-language instead of PROPERTY_languaga which is now the magnolia standard so you may need to adapt existing repositories
static String[] findMediaUsedInWebPages(info.magnolia.cms.core.Content media)
          Deprecated. 
static String getDescription(info.magnolia.cms.core.Content media)
          Deprecated. 
static String getDescription(info.magnolia.cms.core.Content media, Locale locale)
          Deprecated. 
static info.magnolia.cms.core.Content getNode(Object obj)
          Deprecated. 
static String getPreview(info.magnolia.cms.core.Content media)
          Deprecated. 
protected static info.magnolia.cms.core.Content getResolutionsNode(info.magnolia.cms.core.Content media)
          Returns the "resolutions" node, checking for existence
static String getResolutionUrl(info.magnolia.cms.core.Content media, String resolution)
          Deprecated. 
static int[] getSize(info.magnolia.cms.core.Content media, String resolution)
          Deprecated. 
static String getThumbnail(info.magnolia.cms.core.Content media)
          Deprecated. 
static String getTitle(info.magnolia.cms.core.Content media)
          Deprecated. 
static String getTitle(info.magnolia.cms.core.Content media, Locale locale)
          Deprecated. 
static String getType(info.magnolia.cms.core.Content media)
          Deprecated. 
static String getUrl(info.magnolia.cms.core.Content media)
          Deprecated. 
static String getUrl2(info.magnolia.cms.core.Content media, Map<String,String> options)
          Deprecated. 
static Integer height(info.magnolia.cms.core.Content media)
          Returns the height of the original media, if available.
static String[] listResolutions(info.magnolia.cms.core.Content media)
          Deprecated. 
static MediaModule module()
          Get the media module instance
static info.magnolia.cms.core.Content node(Object obj)
          Get content node for media
static String preview(info.magnolia.cms.core.Content media)
          Get url to media preview
static Object property(info.magnolia.cms.core.Content media, String property)
          Returns a property (nodeData) of the media Content.
static String[] resolutions(info.magnolia.cms.core.Content media)
          Get all resolution strings (i.e.
static int[] size(info.magnolia.cms.core.Content media, String resolution)
          Get size of an image
static String[] tags(info.magnolia.cms.core.Content media)
          Deprecated. use media.getNodeData("tags") or ${media.tags}
static String[] tagsLoc(info.magnolia.cms.core.Content media, Locale locale)
          Deprecated. use the standard Magnolia i18nContentSupport for this. Please note that versions < 4.2 of the media module used PROPERTY-language instead of PROPERTY_languaga which is now the magnolia standard so you may need to adapt existing repositories
static String thumbnail(info.magnolia.cms.core.Content media)
          Get url to thumbnail
static String title(info.magnolia.cms.core.Content media)
          Deprecated. use media.getNodeData("title") or ${media.title}
static String titleLoc(info.magnolia.cms.core.Content media, Locale locale)
          Deprecated. use the standard Magnolia i18nContentSupport for this. Please note that versions < 4.2 of the media module used PROPERTY-language instead of PROPERTY_languaga which is now the magnolia standard so you may need to adapt existing repositories
static String type(info.magnolia.cms.core.Content media)
          Get media type
static String url(info.magnolia.cms.core.Content media)
          Get url for a media
static String urlParams(info.magnolia.cms.core.Content media, Map<String,String> options)
          Get url for a media, passing some parameters
static String urlres(info.magnolia.cms.core.Content media, String resolution)
          Get url for a resolution
static String[] usedInWebPages(info.magnolia.cms.core.Content media)
          Get an array of String(s) containing a list of web pages where this media is used, an empty array otherwise
static Integer width(info.magnolia.cms.core.Content media)
          Returns the width of the original media, if available.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

module

public static MediaModule module()
Get the media module instance

Returns:
media module instance

node

public static info.magnolia.cms.core.Content node(Object obj)
Get content node for media

Parameters:
obj - content node or node UUID or jcr absolute path in media repository
Returns:
content node

descLoc

@Deprecated
public static String descLoc(info.magnolia.cms.core.Content media,
                                        Locale locale)
Deprecated. use the standard Magnolia i18nContentSupport for this. Please note that versions < 4.2 of the media module used PROPERTY-language instead of PROPERTY_languaga which is now the magnolia standard so you may need to adapt existing repositories

Get localized description for a media. If the locale is "it", it searches for a nodedata called description-it, or (if not found) description-en or (if not found) description.

Parameters:
media - media
locale - language
Returns:
description

titleLoc

@Deprecated
public static String titleLoc(info.magnolia.cms.core.Content media,
                                         Locale locale)
Deprecated. use the standard Magnolia i18nContentSupport for this. Please note that versions < 4.2 of the media module used PROPERTY-language instead of PROPERTY_languaga which is now the magnolia standard so you may need to adapt existing repositories

Get localized title for a media. If the locale is "it", it searches for a nodedata called title-it, or (if not found) title-en or (if not found) title.

Parameters:
media - media
locale - language
Returns:
title

tagsLoc

@Deprecated
public static String[] tagsLoc(info.magnolia.cms.core.Content media,
                                          Locale locale)
Deprecated. use the standard Magnolia i18nContentSupport for this. Please note that versions < 4.2 of the media module used PROPERTY-language instead of PROPERTY_languaga which is now the magnolia standard so you may need to adapt existing repositories

Get localized tags for a media. If the locale is "it", it searches for a nodedata called tags-it, or (if not found) tags-en or (if not found) tags.

Parameters:
media - media
locale - language
Returns:
tags

desc

@Deprecated
public static String desc(info.magnolia.cms.core.Content media)
Deprecated. use media.getNodeData("description") or ${media.description}

Get description for a media for the current locale.

Parameters:
media - media
Returns:
description

title

@Deprecated
public static String title(info.magnolia.cms.core.Content media)
Deprecated. use media.getNodeData("title") or ${media.title}

Get title for a media for the current locale.

Parameters:
media - media
Returns:
title

tags

@Deprecated
public static String[] tags(info.magnolia.cms.core.Content media)
Deprecated. use media.getNodeData("tags") or ${media.tags}

Get tags for a media

Parameters:
media - media
Returns:
tags

url

public static String url(info.magnolia.cms.core.Content media)
Get url for a media

Parameters:
media - media
Returns:
url

urlParams

public static String urlParams(info.magnolia.cms.core.Content media,
                               Map<String,String> options)
Get url for a media, passing some parameters

Parameters:
media - media
options - optional parameters
Returns:
url

thumbnail

public static String thumbnail(info.magnolia.cms.core.Content media)
Get url to thumbnail

Parameters:
media - media to get the url for
Returns:
the thumbnail url for this media, null otherwise

type

public static String type(info.magnolia.cms.core.Content media)
Get media type

Parameters:
media - media to get the type
Returns:
the type of this media if existing, null otherwise

resolutions

public static String[] resolutions(info.magnolia.cms.core.Content media)
Get all resolution strings (i.e. 'o200x350;background=45A97B') that generates cached resolutions

Parameters:
media - media to get the resolutions
Returns:
all resolution strings

urlres

public static String urlres(info.magnolia.cms.core.Content media,
                            String resolution)
Get url for a resolution

Parameters:
media - media
resolution - resolution
Returns:
url

size

public static int[] size(info.magnolia.cms.core.Content media,
                         String resolution)
Get size of an image

Parameters:
media - media
resolution - resolution for witch calculate size
Returns:
size of an image

preview

public static String preview(info.magnolia.cms.core.Content media)
Get url to media preview

Parameters:
media - media
Returns:
the preview url for this media if existing, null otherwise

usedInWebPages

public static String[] usedInWebPages(info.magnolia.cms.core.Content media)
Get an array of String(s) containing a list of web pages where this media is used, an empty array otherwise

Parameters:
media - media to search in web pages
Returns:
an array of String(s) containing a list of web pages where this media is used, an empty array otherwise

property

public static Object property(info.magnolia.cms.core.Content media,
                              String property)
Returns a property (nodeData) of the media Content.

Parameters:
media - media Content
property - property name
Returns:
the value of the given nodedata or null if not found

width

public static Integer width(info.magnolia.cms.core.Content media)
Returns the width of the original media, if available.

Parameters:
media - media Content
Returns:
width of the original media, if available

height

public static Integer height(info.magnolia.cms.core.Content media)
Returns the height of the original media, if available.

Parameters:
media - media Content
Returns:
height of the original media, if available

getNode

@Deprecated
public static info.magnolia.cms.core.Content getNode(Object obj)
Deprecated. 


getDescription

@Deprecated
public static String getDescription(info.magnolia.cms.core.Content media,
                                               Locale locale)
Deprecated. 


getDescription

@Deprecated
public static String getDescription(info.magnolia.cms.core.Content media)
Deprecated. 


getTitle

@Deprecated
public static String getTitle(info.magnolia.cms.core.Content media,
                                         Locale locale)
Deprecated. 


getTitle

@Deprecated
public static String getTitle(info.magnolia.cms.core.Content media)
Deprecated. 


getUrl

@Deprecated
public static String getUrl(info.magnolia.cms.core.Content media)
Deprecated. 


getUrl2

@Deprecated
public static String getUrl2(info.magnolia.cms.core.Content media,
                                        Map<String,String> options)
Deprecated. 


getResolutionUrl

@Deprecated
public static String getResolutionUrl(info.magnolia.cms.core.Content media,
                                                 String resolution)
Deprecated. 


listResolutions

@Deprecated
public static String[] listResolutions(info.magnolia.cms.core.Content media)
Deprecated. 


getThumbnail

@Deprecated
public static String getThumbnail(info.magnolia.cms.core.Content media)
Deprecated. 


getPreview

@Deprecated
public static String getPreview(info.magnolia.cms.core.Content media)
Deprecated. 


getType

@Deprecated
public static String getType(info.magnolia.cms.core.Content media)
Deprecated. 


getSize

@Deprecated
public static int[] getSize(info.magnolia.cms.core.Content media,
                                       String resolution)
Deprecated. 


findMediaUsedInWebPages

@Deprecated
public static String[] findMediaUsedInWebPages(info.magnolia.cms.core.Content media)
Deprecated. 


getResolutionsNode

protected static info.magnolia.cms.core.Content getResolutionsNode(info.magnolia.cms.core.Content media)
Returns the "resolutions" node, checking for existence

Parameters:
media -
Returns:


Copyright © 2008-2010 Openmind. All Rights Reserved.