org.struts.velocity.demo.context
Class PrepareContext

java.lang.Object
  extended byorg.apache.struts.action.Action
      extended byorg.strutsit.architecture.struts.StrutsitActionBase
          extended byorg.struts.velocity.demo.context.PrepareContext
All Implemented Interfaces:
org.strutsit.architecture.struts.StrutsitAction

public class PrepareContext
extends org.strutsit.architecture.struts.StrutsitActionBase
implements org.strutsit.architecture.struts.StrutsitAction

Example of a pre-processed action in case of using the struts-it architecture framework. This pre-processed action creates a Hibernate session for this thread.

Responsibilities:

Since:
JDK 1.4
Version:
$Revision: 1.8 $
Author:
Manfred Wolff

Field Summary
(package private) static java.lang.String nothing
           
 
Fields inherited from class org.apache.struts.action.Action
defaultLocale, servlet
 
Constructor Summary
PrepareContext()
           
 
Method Summary
 boolean execute(org.strutsit.architecture.context.StrutsitContext context)
          Execute-Methods for Struts-It Actions.
 java.lang.String getUseCase()
          Gets the corresponded use case for this action.
 
Methods inherited from class org.strutsit.architecture.struts.StrutsitActionBase
getService, getService, setFailure, setInput, setSucceeded
 
Methods inherited from class org.apache.struts.action.Action
addErrors, addMessages, execute, execute, generateToken, getDataSource, getDataSource, getErrors, getLocale, getMessages, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, resetToken, saveErrors, saveErrors, saveMessages, saveMessages, saveToken, setLocale, setServlet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nothing

static final java.lang.String nothing
See Also:
Constant Field Values
Constructor Detail

PrepareContext

public PrepareContext()
Method Detail

execute

public boolean execute(org.strutsit.architecture.context.StrutsitContext context)
                throws java.lang.Exception
Execute-Methods for Struts-It Actions. This Action prepares the context in that way, that the hibernate session of this session is always set.

Specified by:
execute in interface org.strutsit.architecture.struts.StrutsitAction
Parameters:
context - The Context for this usecase
Returns:
True, if the request is fulfilled. In this case the context has to return the next step. False, if the request is not fulfilled yet.
Throws:
java.lang.Exception

getUseCase

public java.lang.String getUseCase()
Gets the corresponded use case for this action. In this case it returns nothing.

Specified by:
getUseCase in interface org.strutsit.architecture.struts.StrutsitAction
Returns:
An empty String


Copyright © 2005 Struts-it comunity. All Rights Reserved.