webwork.examples.jdom
Class JDOMUrl

java.lang.Object
  extended bywebwork.action.ActionSupport
      extended bywebwork.examples.jdom.JDOMUrl
All Implemented Interfaces:
Action, CommandDriven, IllegalArgumentAware, java.io.Serializable, ServletRequestAware
Direct Known Subclasses:
RssReader

public class JDOMUrl
extends ActionSupport
implements CommandDriven, ServletRequestAware

A simple Action used to fetch a remote URL, parse it using JDOM, and make the result available to the View.

Version:
$Revision: 1.5 $
Author:
Maurice C. Parker (maurice@vineyardenterprise.com)
See Also:
Serialized Form

Field Summary
 
Fields inherited from class webwork.action.ActionSupport
command, errorMap, errorMessages, log
 
Fields inherited from interface webwork.action.Action
ERROR, INPUT, LOGIN, NONE, SUCCESS
 
Constructor Summary
JDOMUrl()
           
 
Method Summary
protected  java.lang.String buildUrl(java.lang.String uri)
           
protected  java.lang.String doExecute()
           
protected  void doValidation()
          Subclasses may override this method to provide validation of input data.
 org.jdom.Document getDocument()
           
 java.lang.String getUrl()
           
 void setServletRequest(javax.servlet.http.HttpServletRequest request)
           
 void setUrl(java.lang.String url)
           
 
Methods inherited from class webwork.action.ActionSupport
addError, addErrorMessage, addIllegalArgumentException, doDefault, execute, getActionName, getErrorMessages, getErrors, getHasErrorMessages, getHasErrors, getLocale, getPropertyEditorMessage, getText, getTexts, getTexts, invalidInput, invokeCommand, isCommand, setCommand, setErrorMessages, setErrors, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface webwork.action.CommandDriven
setCommand
 

Constructor Detail

JDOMUrl

public JDOMUrl()
Method Detail

setUrl

public void setUrl(java.lang.String url)

getUrl

public java.lang.String getUrl()

getDocument

public org.jdom.Document getDocument()

setServletRequest

public void setServletRequest(javax.servlet.http.HttpServletRequest request)
Specified by:
setServletRequest in interface ServletRequestAware

doValidation

protected void doValidation()
Description copied from class: ActionSupport
Subclasses may override this method to provide validation of input data. The execute() method should call validate() in the beginning of its code (which will delegate to this method), so as to check input data before doing the actual processing.

If any application errors arise these should be registered by calling addErrorMessage or addError .

If the validation is dependent on whether a command has been issued, and what that command is, then the isCommand() method should be used.

Overrides:
doValidation in class ActionSupport

doExecute

protected java.lang.String doExecute()
                              throws java.lang.Exception
Overrides:
doExecute in class ActionSupport
Throws:
java.lang.Exception

buildUrl

protected java.lang.String buildUrl(java.lang.String uri)


Copyright © 2001-2003 WebWork All Rights Reserved.