org.apache.commons.jelly.tags.util
Class AvailableTag

java.lang.Object
  extended byorg.apache.commons.jelly.TagSupport
      extended byorg.apache.commons.jelly.tags.util.AvailableTag
All Implemented Interfaces:
org.apache.commons.jelly.Tag

public class AvailableTag
extends org.apache.commons.jelly.TagSupport

A tag which evaluates its body if the given file is available. The file can be specified via a File object or via a relative or absolute URI from the current Jelly script.

Version:
$Revision: 155420 $
Author:
James Strachan

Field Summary
 
Fields inherited from class org.apache.commons.jelly.TagSupport
body, context, hasTrimmed, parent, shouldTrim
 
Constructor Summary
AvailableTag()
           
 
Method Summary
 void doTag(org.apache.commons.jelly.XMLOutput output)
           
 java.io.File getFile()
          Returns the file.
 java.lang.String getUri()
          Returns the uri.
 void setFile(java.io.File file)
          Sets the file to use to test whether it exists or not.
 void setUri(java.lang.String uri)
          Sets the URI to use to test for availability.
 
Methods inherited from class org.apache.commons.jelly.TagSupport
findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getContext, getParent, invokeBody, isEscapeText, isTrim, setBody, setContext, setEscapeText, setParent, setTrim, trimBody
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AvailableTag

public AvailableTag()
Method Detail

doTag

public void doTag(org.apache.commons.jelly.XMLOutput output)
           throws org.apache.commons.jelly.JellyTagException
Throws:
org.apache.commons.jelly.JellyTagException

getFile

public java.io.File getFile()
Returns the file.

Returns:
File

getUri

public java.lang.String getUri()
Returns the uri.

Returns:
String

setFile

public void setFile(java.io.File file)
Sets the file to use to test whether it exists or not.

Parameters:
file - the file to test for

setUri

public void setUri(java.lang.String uri)
Sets the URI to use to test for availability. The URI can be a full file based URL or a relative URI or an absolute URI from the root context.

Parameters:
uri - the URI of the file to test


Copyright © 2002-2006 Apache Software Foundation. All Rights Reserved.