com.windgazer.util.io.taglib
Class FileIsTypeTag

java.lang.Object
  |
  +--javax.servlet.jsp.tagext.TagSupport
        |
        +--com.windgazer.util.io.taglib.FileBooleanAttributeTag
              |
              +--com.windgazer.util.io.taglib.FileIsTypeTag
All Implemented Interfaces:
javax.servlet.jsp.tagext.IterationTag, java.io.Serializable, javax.servlet.jsp.tagext.Tag

public class FileIsTypeTag
extends FileBooleanAttributeTag

FileIsDirectoryTag is an implementation of FileBooleanAttributeTag.

Version:
1.1
Author:
Martin 'Kemanorel' Reurings
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
FileIsTypeTag()
           
 
Method Summary
 boolean getTagBoolean(java.io.File myFile)
          Implementation of FileBooleanAttributeTag.
 void setFileType(java.lang.String sFileTypeIn)
          The filetype you want to check against.
 
Methods inherited from class com.windgazer.util.io.taglib.FileBooleanAttributeTag
doEndTag, doStartTag, setReverse
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileIsTypeTag

public FileIsTypeTag()
Method Detail

setFileType

public void setFileType(java.lang.String sFileTypeIn)
The filetype you want to check against. Currently this check is implemented lazy. It checks if an occurance of current file's extension can be found in the list in such a simple way that, for instance, htm would match if you want to match against html.

Parameters:
sFileTypeIn - a list of file-extentions.

getTagBoolean

public boolean getTagBoolean(java.io.File myFile)
Implementation of FileBooleanAttributeTag.

Specified by:
getTagBoolean in class FileBooleanAttributeTag
Parameters:
myFile - The File returned by the surrounding FileProvider.
Returns:
true if current extension is matched in given string.
See Also:
FileBooleanAttributeTag.getTagBoolean(File)


Copyright © 2003 Windgazer Design. All Rights Reserved.