org.ejen
Class EjenParamNode

java.lang.Object
  |
  +--org.ejen.EjenChildNode
        |
        +--org.ejen.EjenParamNode
All Implemented Interfaces:
EjenConstants

public class EjenParamNode
extends EjenChildNode

Param node class.

A param node allows to pass a parameter to a stylesheet (filter, template, import or include).

Usage (ant build file)

  <?xml version="1.0" encoding="UTF-8"?>

  <project name="generate" default="build">

    <taskdef name="ejen" classname="org.ejen.EjenTask"/>

    <target name="build">
      <ejen ...>
        ...
        <filter ...>
          ...
          <param name="param1"
                 either
                 select="/ejen/entity-bean"
                 or
                 literal="value"
          />
          ...
        </filter>
        ...
      </ejen>
    </target>

  </project>
 

Parent nodes:

Version:
1.0
Author:
F. Wolff

Field Summary
protected  String _literal
           
protected  String _name
           
protected  String _select
           
 
Fields inherited from class org.ejen.EjenChildNode
_messageIndent
 
Fields inherited from interface org.ejen.EjenConstants
CTX_DOM_SOURCE, CTX_STYLESHEET_HANDLER, CTX_STYLESHEET_ROOT, CTX_TRANSFORMER_FACTORY_IMPL, CTX_TRANSFORMER_IMPL, DEFAULT_XML_DATA, DEFAULT_XML_DATA_ENCODING, DEFAULT_XSL_DATA, LOG_INDENT_STR1, LOG_INDENT_STR2, MSG_DEBUG, MSG_ERR, MSG_INFO, MSG_VERBOSE, MSG_WARN, STATE_AFTER_PROCESS, STATE_BEFORE_PROCESS, STATE_CHECK, STATE_IDLE, STATE_PROCESS, STATES
 
Constructor Summary
EjenParamNode()
           
 
Method Summary
 void check()
          Checks this EjenParamNode for mandatory attributes.
 Properties getAttributes()
          Returns all non null attributes of this EjenParamNode.
 String nodeName()
          Returns the name of this EjenParamNode (always "param").
 void process()
          Executes this EjenParamNode.
 void setLiteral(String literal)
          [mandatory if select is not set] - sets the literal attribute.
 void setName(String name)
          [mandatory/AVT] - sets the name attribute.
 void setSelect(String select)
          [mandatory if literal is not set/AVT] - sets the select attribute.
 
Methods inherited from class org.ejen.EjenChildNode
afterProcess, beforeProcess, cloneContext, evaluateAVT, evaluateAVT, getChildren, getFromContext, getFromContext, getFromGlobalContext, getListener, getState, idle, popContext, pushContext, putInContext, putInGlobalContext, sendMessageEvent, sendMessageEvent, sendStateEvent, sendXSLMessageEvent, sendXSLMessageEvent, setListener, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_name

protected String _name

_select

protected String _select

_literal

protected String _literal
Constructor Detail

EjenParamNode

public EjenParamNode()
Method Detail

nodeName

public String nodeName()
Returns the name of this EjenParamNode (always "param").

Specified by:
nodeName in class EjenChildNode
Returns:
the name of this EjenParamNode.

getAttributes

public Properties getAttributes()
Returns all non null attributes of this EjenParamNode.

Overrides:
getAttributes in class EjenChildNode
Returns:
non null attributes of this EjenParamNode.

setName

public void setName(String name)
[mandatory/AVT] - sets the name attribute.

Parameters:
name - name of the parameter to be passed.

setSelect

public void setSelect(String select)
[mandatory if literal is not set/AVT] - sets the select attribute.

Parameters:
select - an XPATH select expression that gives the value of the parameter to be passed, relative to the current in memory DOM tree.

setLiteral

public void setLiteral(String literal)
[mandatory if select is not set] - sets the literal attribute.

Parameters:
literal - a String that will be passed as the parameter value without interpretation.

check

public void check()
Checks this EjenParamNode for mandatory attributes.

Overrides:
check in class EjenChildNode
Throws:
EjenException - if name attribute is not set or if both select and literal are set or not set together.

process

public void process()
Executes this EjenParamNode.

Overrides:
process in class EjenChildNode
Throws:
EjenException - if something goes wrong...