pulse - the web application framework Get pulse at SourceForge.net. Fast, secure and Free Open Source software downloads Ohloh project report for pulse-java

org.torweg.pulse.site
Class CaseDrivenRedirectConfig

java.lang.Object
  extended by org.torweg.pulse.configuration.AbstractConfigBean
      extended by org.torweg.pulse.site.CaseDrivenRedirectConfig
All Implemented Interfaces:
java.io.Serializable, ConfigBean
Direct Known Subclasses:
CaseDrivenRedirectAndEmailConfig

public class CaseDrivenRedirectConfig
extends AbstractConfigBean

provides functionality to manage a number of redirects by case as defined in configuration-XML.

configuration-XML:

&lt;cases&gt;<br/> &#160;&lt;switch case="name of the case"&gt;<br/> &#160;&#160;&lt;redirects&gt;<br/> &#160;&#160;&#160;&lt;redirect name="name of the redirect"&gt;<br/> &#160;&#160;&#160;&#160;&lt;command action="name of the action" bundle="name of the bundle"&gt;<br/> &#160;&#160;&#160;&#160;&#160;&lt;parameter name="name of the parameter"&gt;<br/> &#160;&#160;&#160;&#160;&#160;&#160;&lt;value&gt;the value&lt;/value&gt;<br/> &#160;&#160;&#160;&#160;&#160;&lt;/parameter&gt;<br/> &#160;&#160;&#160;&#160;&#160;...<br/> &#160;&#160;&#160;&#160;&lt;/command&gt;<br/> &#160;&#160;&#160;&#160;...<br/> &#160;&#160;&#160;&lt;/redirect&gt;<br/> or<br/> &#160;&#160;&#160;&lt;redirect uri="http://www...."&gt;<br/> &#160;&#160;&#160;...<br/> &#160;&#160;&lt;/redirects&gt;<br/> &#160;&lt;/switch&gt;<br/> &#160;...<br/> &lt;/cases><br/>

Version:
$Revision: 1499 $
Author:
Daniel Dietz
See Also:
Serialized Form

Field Summary
protected static org.slf4j.Logger LOGGER
          the logger.
 
Constructor Summary
CaseDrivenRedirectConfig()
           
 
Method Summary
 CommandBuilder getRedirectCommandBuilder(java.lang.String c, java.lang.String n)
          returns the redirect CommandBuilder specified by name.
 java.lang.String getRedirectURI(java.lang.String c, java.lang.String n)
          returns the redirect URI specified by name.
 void init(org.jdom.Element conf)
          configures the bean from the given JDOM element.
 
Methods inherited from class org.torweg.pulse.configuration.AbstractConfigBean
buildClass, buildInstance, lastModified, setLastModified
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOGGER

protected static final org.slf4j.Logger LOGGER
the logger.

Constructor Detail

CaseDrivenRedirectConfig

public CaseDrivenRedirectConfig()
Method Detail

getRedirectURI

public final java.lang.String getRedirectURI(java.lang.String c,
                                             java.lang.String n)
returns the redirect URI specified by name.

Parameters:
c - the name of the case
n - the name of the redirect-URI used in the configuration-XML
Returns:
the URI

getRedirectCommandBuilder

public final CommandBuilder getRedirectCommandBuilder(java.lang.String c,
                                                      java.lang.String n)
returns the redirect CommandBuilder specified by name.

Parameters:
c - the name of the case
n - the name of the redirect-URI used in the configuration-XML
Returns:
the CommandBuilder

init

public void init(org.jdom.Element conf)
Description copied from interface: ConfigBean
configures the bean from the given JDOM element.

Parameters:
conf - the configuration-XML
See Also:
ConfigBean.init(org.jdom.Element)