org.primefaces.extensions.component.importconstants
Class ImportConstantsTagHandler

java.lang.Object
  extended by javax.faces.view.facelets.TagHandler
      extended by org.primefaces.extensions.component.importconstants.ImportConstantsTagHandler
All Implemented Interfaces:
javax.faces.view.facelets.FaceletHandler

public class ImportConstantsTagHandler
extends javax.faces.view.facelets.TagHandler

TagHandler for the ImportConstants component.

Since:
0.5
Version:
$Revision$
Author:
Thomas Andraschko / last modified by $Author$

Field Summary
 
Fields inherited from class javax.faces.view.facelets.TagHandler
nextHandler, tag, tagId
 
Constructor Summary
ImportConstantsTagHandler(javax.faces.view.facelets.TagConfig config)
          Default constructor.
 
Method Summary
 void apply(javax.faces.view.facelets.FaceletContext ctx, javax.faces.component.UIComponent parent)
          
protected  java.util.Map<java.lang.String,java.lang.Object> collectConstants(java.lang.Class<?> clazz)
          Collects all constants of the given Class.
protected  java.lang.Class<?> getClassFromAttribute(javax.faces.view.facelets.TagAttribute attribute, javax.faces.view.facelets.FaceletContext ctx)
          Gets the Class from the TagAttribute.
protected  java.util.Map<java.lang.String,java.lang.Object> getConstants(java.lang.Class<?> clazz)
          Get all constants of the given Class.
 
Methods inherited from class javax.faces.view.facelets.TagHandler
getAttribute, getRequiredAttribute, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ImportConstantsTagHandler

public ImportConstantsTagHandler(javax.faces.view.facelets.TagConfig config)
Default constructor.

Parameters:
config - The TagConfig.
Method Detail

apply

public void apply(javax.faces.view.facelets.FaceletContext ctx,
                  javax.faces.component.UIComponent parent)
           throws java.io.IOException

Throws:
java.io.IOException

getClassFromAttribute

protected java.lang.Class<?> getClassFromAttribute(javax.faces.view.facelets.TagAttribute attribute,
                                                   javax.faces.view.facelets.FaceletContext ctx)
Gets the Class from the TagAttribute.

Parameters:
attribute - The TagAttribute.
ctx - The FaceletContext.
Returns:
The Class.

getConstants

protected java.util.Map<java.lang.String,java.lang.Object> getConstants(java.lang.Class<?> clazz)
Get all constants of the given Class.

Parameters:
clazz - The class which includes the constants.
Returns:
A Map with the constants.

collectConstants

protected java.util.Map<java.lang.String,java.lang.Object> collectConstants(java.lang.Class<?> clazz)
Collects all constants of the given Class.

Parameters:
clazz - The class which includes the constants.
Returns:
A Map with the found constants.


Copyright © 2011-2013. All Rights Reserved.