org.norther.tammi.spray.media.tool
Class MediaTool
java.lang.Object
org.norther.tammi.core.pool.RecyclableSupport
org.norther.tammi.core.pool.PoolableSupport
org.norther.tammi.spray.engine.tool.GlobalTool
org.norther.tammi.spray.engine.tool.ContextTool
org.norther.tammi.spray.media.tool.MediaTool
- All Implemented Interfaces:
- Serializable, Cloneable, EventListener, Poolable, Recyclable, ContextBindingListener
- Direct Known Subclasses:
- LinkTool, SkinTool
public class MediaTool
- extends ContextTool
A request context tool supporting creation of links to hosts and services.
- Version:
- $Id: MediaTool.java,v 1.17 2010-03-30 16:01:28 cvsimp Exp $
- Author:
- Ilkka Priha
- See Also:
- Serialized Form
Constructor Summary |
MediaTool()
Constructs a new content. |
Method Summary |
String |
toMediaFile(String type,
int... index)
Returns a virtual media file. |
String |
toURL(String path)
Returns a URL pointing to the specified media content. |
String |
toURL(String path,
boolean localized)
Returns a URL pointing to the localized media content if the localized
flag is set. |
MediaTool
public MediaTool()
- Constructs a new content.
toURL
public String toURL(String path)
- Returns a URL pointing to the specified media content.
- Parameters:
path
- a path to the content.
- Returns:
- the media content URL.
toURL
public String toURL(String path,
boolean localized)
- Returns a URL pointing to the localized media content if the localized
flag is set. Otherwise the content is supposed to be non-localized.
Note that search for localized URLs is available only if the content
filter is configured to support localized content.
- Parameters:
path
- a path to the content.localized
- true for localized, false otherwise.
- Returns:
- the media content URL.
toMediaFile
public String toMediaFile(String type,
int... index)
- Returns a virtual media file.
- Parameters:
type
- the content type.index
- an optional index.
- Returns:
- the virtual file.
Copyright © 2004 The Norther Organization. All rights reserved.