org.apache.commons.scaffold.util
Interface ProcessBean
- All Known Subinterfaces:
- StorageBean
- All Known Implementing Classes:
- ProcessBeanBase, ScrollerBeanBase, StorageBeanBase
public interface ProcessBean
Simple helper bean that can be used to encapsulate a method
representing a business process.
The business logic should be implemented in one of the supplied
execute methods, or by another method called by one of these.
A concrete subclass may return a default scope and attribute
name to use when storing the bean (if applicable).
The preferred approach is to implement the Object
execute(Object)
signature, and use execute() to pass
null, some other default value. If a default value is not
possible, it is recommended that execute() throw an
or throw a UnsupportedOperationException.
Known implementations: BusinessBeanBase.
- Version:
- $Revision: 155464 $ $Date: 2005-02-26 13:26:54 +0000 (Sat, 26 Feb 2005) $
- Author:
- Ted Husted
Field Summary |
static String |
USER_PROFILE_KEY
The session attribute key for our user profile bean ["userProfile"]. |
USER_PROFILE_KEY
static final String USER_PROFILE_KEY
- The session attribute key for our user profile bean ["userProfile"].
- See Also:
- Constant Field Values
getLocale
Locale getLocale()
- Return the locale for this bean instance.
- Returns:
- the locale
setLocale
void setLocale(Locale locale)
- Set the locale for this bean instance.
- Parameters:
locale
- The new locale
getRemoteNode
Integer getRemoteNode()
- Return the network address of the client for this bean instance.
- Returns:
- the network address.
setRemoteNode
void setRemoteNode(Integer remoteNode)
- Set the network address of the client for this bean instance.
- Parameters:
remoteNode
- The new remoteNode.
getRemoteServer
Object getRemoteServer()
- The remote server object for this bean instance, if any.
This is often an application-scope object that can be used
to process a JDBC query or equivalent.
By default, the ProcessAction
will set this to any
application scope object found under the key
BaseAction.REMOTE_SERVER
or to null.
- Returns:
- the remote server
setRemoteServer
void setRemoteServer(Object server)
- Set the remote server
- Parameters:
server
- The new server
getParameter
String getParameter()
- Return the parameter.
setParameter
void setParameter(String parameter)
- Set the parameter.
- Parameters:
parameter
- The new parameter
execute
Object execute()
throws Exception
- Perform business logic for this bean, often by passing default
values to the
Object execute(Object)
signature.
If there is no default, it is recommended that a subclass throw
an UnsupportedOperationException instead.
- Throws:
Throws
- Exception on any error. A subclass of
ChainedException is recommended.
Exception
execute
Object execute(Object parameters)
throws Exception
- Perform business logic for this, by retrieving any settings from
the parameters object and returning a result object.
- Parameters:
parameters
- The map or other object to use with this operation
- Throws:
Throws
- Exception on any error. A subclass of
ChainedException
is recommended.
Exception
Copyright © 2001-2010 The Apache Software Foundation. All Rights Reserved.