Package | Description |
---|---|
net.sourceforge.stripes.action |
This package defines the ActionBean interface and related classes and interfaces for
writing ActionBeans.
|
net.sourceforge.stripes.controller |
This package contains classes which form the core internals of Stripes.
|
net.sourceforge.stripes.exception |
Contains interfaces and implementations of exception handling strategy classes.
|
net.sourceforge.stripes.localization |
This package is used by Stripes to provide localization capabilities to application.
|
net.sourceforge.stripes.mock |
Mock objects that implement many of the Servlet and Http Servlet interfaces.
|
net.sourceforge.stripes.tag |
Contains implementation classes for all the Stripes custom tags and interfaces
for overriding the strategy used to (re-)populate tag values and rendering tags
in case of validation errors.
|
net.sourceforge.stripes.util |
This package contains various utility classes that are used to implement Stripes.
|
net.sourceforge.stripes.validation |
This package contains interfaces and implementations of error message classes
and of classes that convert Strings to rich objects, providing validation during
the conversion.
|
net.sourceforge.stripes.validation.expression |
This package provides several classes that give Stripes the ability to execute
EL expressions for validation using various implementations.
|
Modifier and Type | Method and Description |
---|---|
RedirectResolution |
RedirectResolution.flash(ActionBean bean)
Causes the ActionBean supplied to be added to the Flash scope and made available
during the next request cycle.
|
Constructor and Description |
---|
ForwardResolution(java.lang.Class<? extends ActionBean> beanType)
Constructs a ForwardResolution that will forward to the URL appropriate for
the ActionBean supplied.
|
ForwardResolution(java.lang.Class<? extends ActionBean> beanType,
java.lang.String event)
Constructs a ForwardResolution that will forward to the URL appropriate for
the ActionBean supplied.
|
OnwardResolution(java.lang.Class<? extends ActionBean> beanType)
Constructor that will extract the url binding for the ActionBean class supplied and
use that as the path for the resolution.
|
OnwardResolution(java.lang.Class<? extends ActionBean> beanType,
java.lang.String event)
Constructor that will extract the url binding for the ActionBean class supplied and
use that as the path for the resolution and adds a parameter to ensure that the
specified event is invoked.
|
RedirectResolution(java.lang.Class<? extends ActionBean> beanType)
Constructs a RedirectResolution that will redirect to the URL appropriate for
the ActionBean supplied.
|
RedirectResolution(java.lang.Class<? extends ActionBean> beanType,
java.lang.String event)
Constructs a RedirectResolution that will redirect to the URL appropriate for
the ActionBean supplied.
|
Modifier and Type | Class and Description |
---|---|
class |
DefaultViewActionBean
A special purpose ActionBean that is used by the NameBasedActionResolver when a valid
ActionBean cannot be found for a URL.
|
Modifier and Type | Field and Description |
---|---|
protected java.lang.Class<? extends ActionBean> |
UrlBindingParameter.beanClass |
protected java.lang.Class<? extends ActionBean> |
UrlBinding.beanType |
Modifier and Type | Method and Description |
---|---|
ActionBean |
ExecutionContext.getActionBean()
Retrieves the ActionBean instance that is associated with the current request.
|
ActionBean |
ActionResolver.getActionBean(ActionBeanContext context)
Resolves the Class, implementing ActionBean, that should be used to handle the request.
|
ActionBean |
AnnotatedClassActionResolver.getActionBean(ActionBeanContext context)
Gets the logical name of the ActionBean that should handle the request.
|
ActionBean |
ActionResolver.getActionBean(ActionBeanContext context,
java.lang.String path)
Returns the ActionBean class that responds to the path provided.
|
ActionBean |
AnnotatedClassActionResolver.getActionBean(ActionBeanContext context,
java.lang.String path)
Returns the ActionBean class that is bound to the UrlBinding supplied.
|
ActionBean |
NameBasedActionResolver.getActionBean(ActionBeanContext context,
java.lang.String urlBinding)
Overridden to trap the exception that is thrown when a URL cannot be mapped to an
ActionBean and then attempt to construct a dummy ActionBean that will forward the
user to an appropriate view.
|
protected ActionBean |
NameBasedActionResolver.handleActionBeanNotFound(ActionBeanContext context,
java.lang.String urlBinding)
Invoked when no appropriate ActionBean can be located.
|
protected ActionBean |
AnnotatedClassActionResolver.makeNewActionBean(java.lang.Class<? extends ActionBean> type,
ActionBeanContext context)
Helper method to construct and return a new ActionBean instance.
|
Modifier and Type | Method and Description |
---|---|
protected java.util.Set<java.lang.Class<? extends ActionBean>> |
AnnotatedClassActionResolver.findClasses()
Helper method to find implementations of ActionBean in the packages specified in
Configuration using the
ResolverUtil class. |
java.util.Collection<java.lang.Class<? extends ActionBean>> |
ActionResolver.getActionBeanClasses()
Get all the classes implementing
ActionBean that are recognized by this
ActionResolver . |
java.util.Collection<java.lang.Class<? extends ActionBean>> |
AnnotatedClassActionResolver.getActionBeanClasses()
Get all the classes implementing
ActionBean that are recognized by this
ActionResolver . |
java.util.Collection<java.lang.Class<? extends ActionBean>> |
UrlBindingFactory.getActionBeanClasses()
Get all the classes implementing
ActionBean |
protected java.util.Stack<ActionBean> |
DispatcherServlet.getActionBeanStack(javax.servlet.http.HttpServletRequest request,
boolean create)
Fetches, and lazily creates if required, a Stack in the request to store ActionBeans
should the current request involve forwards or includes to other ActionBeans.
|
java.lang.Class<? extends ActionBean> |
ActionResolver.getActionBeanType(java.lang.String path)
Fetches the Class representing the type of ActionBean that has been bound to
the URL contained within the path supplied.
|
java.lang.Class<? extends ActionBean> |
AnnotatedClassActionResolver.getActionBeanType(java.lang.String path)
Fetches the Class representing the type of ActionBean that would respond were a
request made with the path specified.
|
java.lang.Class<? extends ActionBean> |
UrlBindingParameter.getBeanClass()
Get the
ActionBean class to which the UrlBinding applies. |
java.lang.Class<? extends ActionBean> |
UrlBinding.getBeanType()
Get the
ActionBean class to which this binding applies. |
java.util.HashMap<java.lang.String,java.lang.Class<? extends ActionBean>> |
UrlBindingFactory.getPathMap()
Get all the
ActionBean s classes that have been found. |
Modifier and Type | Method and Description |
---|---|
protected void |
AnnotatedClassActionResolver.assertGetContextWorks(ActionBean bean)
Since many down stream parts of Stripes rely on the ActionBean properly returning the
context it is given, we'll just test it up front.
|
ValidationErrors |
ActionBeanPropertyBinder.bind(ActionBean bean,
ActionBeanContext context,
boolean validate)
Populates all the properties in the request which have a matching property in the target
bean.
|
ValidationErrors |
DefaultActionBeanPropertyBinder.bind(ActionBean bean,
ActionBeanContext context,
boolean validate)
Loops through the parameters contained in the request and attempts to bind each one to the
supplied ActionBean.
|
void |
ActionBeanPropertyBinder.bind(ActionBean bean,
java.lang.String propertyName,
java.lang.Object propertyValue)
Bind an individual property with the name specified to the bean supplied.
|
void |
DefaultActionBeanPropertyBinder.bind(ActionBean bean,
java.lang.String propertyName,
java.lang.Object propertyValue)
Attempt to set the named property on the target bean.
|
protected void |
DefaultActionBeanPropertyBinder.bindMissingValuesAsNull(ActionBean bean,
ActionBeanContext context)
Uses a hidden field to determine what (if any) fields were present in the form but did not get
submitted to the server.
|
protected void |
DefaultActionBeanPropertyBinder.bindNonNullValue(ActionBean bean,
PropertyExpressionEvaluation propertyEvaluation,
java.util.List<java.lang.Object> valueOrValues,
java.lang.Class targetType,
java.lang.Class scalarType)
Internal helper method to bind one or more values to a single property on an ActionBean.
|
protected void |
DefaultActionBeanPropertyBinder.bindNullValue(ActionBean bean,
java.lang.String property,
java.lang.Class<?> type)
Internal helper method that determines what to do when no value was supplied for a given form
field (but the field was present on the page).
|
protected java.util.List<java.lang.Object> |
DefaultActionBeanPropertyBinder.convert(ActionBean bean,
ParameterName propertyName,
java.lang.String[] values,
java.lang.Class<?> declaredType,
java.lang.Class<?> scalarType,
ValidationMetadata validationInfo,
java.util.List<ValidationError> errors)
Converts the String[] of values for a given parameter in the HttpServletRequest into the
desired type of Object.
|
protected void |
DefaultActionBeanPropertyBinder.doExpressionValidation(ActionBean bean,
ParameterName name,
java.util.List<java.lang.Object> values,
ValidationMetadata validationInfo,
ValidationErrors errors)
Performs validation of attribute values using a JSP EL expression if one is defined in the
@Validate annotation.
|
protected void |
DefaultActionBeanPropertyBinder.doPostConversionValidations(ActionBean bean,
java.util.Map<ParameterName,java.util.List<java.lang.Object>> convertedValues,
ValidationErrors errors)
Performs basic post-conversion validations on the properties of the ActionBean after they
have been converted to their rich type by the type conversion system.
|
protected java.util.Collection<java.lang.String> |
DefaultActionBeanPropertyBinder.getFieldsPresentInfo(ActionBean bean)
In a lot of cases (and specifically during wizards) the Stripes form field writes out a
hidden field containing a set of field names.
|
protected java.util.SortedMap<ParameterName,java.lang.String[]> |
DefaultActionBeanPropertyBinder.getParameters(ActionBean bean)
Converts the map of parameters in the request into a Map of ParameterName to String[].
|
protected void |
DefaultActionBeanPropertyBinder.handlePropertyBindingError(ActionBean bean,
ParameterName name,
java.util.List<java.lang.Object> values,
java.lang.Exception e,
ValidationErrors errors)
Invoked whenever an exception is thrown when attempting to bind a property to an ActionBean.
|
protected Resolution |
BeforeAfterMethodInterceptor.invoke(ActionBean bean,
java.lang.reflect.Method m,
LifecycleStage stage,
java.lang.Class<? extends java.lang.annotation.Annotation> when)
Helper method that will invoke the supplied method and manage any exceptions and
returns from the object.
|
void |
FlashScope.put(ActionBean bean)
Stores an ActionBean into the flash scope.
|
void |
ExecutionContext.setActionBean(ActionBean actionBean)
Sets the ActionBean associated with the current request.
|
protected void |
AnnotatedClassActionResolver.setActionBeanContext(ActionBean bean,
ActionBeanContext context)
Calls
setContext(ActionBeanContext) with the given context only if
necessary. |
protected void |
DefaultActionBeanPropertyBinder.validateRequiredFields(java.util.Map<ParameterName,java.lang.String[]> parameters,
ActionBean bean,
ValidationErrors errors)
Validates that all required fields have been submitted.
|
Modifier and Type | Method and Description |
---|---|
protected void |
AnnotatedClassActionResolver.addActionBean(java.lang.Class<? extends ActionBean> clazz)
Adds an ActionBean class to the set that this resolver can resolve.
|
void |
UrlBindingFactory.addBinding(java.lang.Class<? extends ActionBean> beanType,
UrlBinding binding)
Map an
ActionBean to a URL. |
static java.lang.reflect.Method[] |
DispatcherHelper.findCustomValidationMethods(java.lang.Class<? extends ActionBean> type)
Finds and returns all methods in the ActionBean class and it's superclasses that
are marked with the ValidationMethod annotation and returns them ordered by
priority (and alphabetically within priorities).
|
protected HttpCache |
HttpCacheInterceptor.getAnnotation(java.lang.reflect.Method method,
java.lang.Class<? extends ActionBean> beanClass)
Look for a
HttpCache annotation on the method first and then on the class and its
superclasses. |
UrlBinding |
UrlBindingFactory.getBindingPrototype(java.lang.Class<? extends ActionBean> type)
Get the
UrlBinding prototype associated with the given ActionBean type. |
java.lang.reflect.Method |
ActionResolver.getDefaultHandler(java.lang.Class<? extends ActionBean> bean)
Locates and returns the default handler method that should be invoked when no specific
event is named.
|
java.lang.reflect.Method |
AnnotatedClassActionResolver.getDefaultHandler(java.lang.Class<? extends ActionBean> bean)
Returns the Method that is the default handler for events in the ActionBean class supplied.
|
java.lang.String |
ActionResolver.getEventName(java.lang.Class<? extends ActionBean> bean,
ActionBeanContext context)
Determines the name of the event fired by the front end.
|
java.lang.String |
AnnotatedClassActionResolver.getEventName(java.lang.Class<? extends ActionBean> bean,
ActionBeanContext context)
Try various means to determine which event is to be executed on the current ActionBean.
|
protected java.lang.String |
AnnotatedClassActionResolver.getEventNameFromEventNameParam(java.lang.Class<? extends ActionBean> bean,
ActionBeanContext context)
Looks to see if there is a single non-empty parameter value for the parameter name
specified by
StripesConstants.URL_KEY_EVENT_NAME . |
protected java.lang.String |
AnnotatedClassActionResolver.getEventNameFromPath(java.lang.Class<? extends ActionBean> bean,
ActionBeanContext context)
Looks to see if there is extra path information beyond simply the url binding of the
bean.
|
protected java.lang.String |
AnnotatedClassActionResolver.getEventNameFromRequestAttribute(java.lang.Class<? extends ActionBean> bean,
ActionBeanContext context)
Checks a special request attribute to get the event name.
|
protected java.lang.String |
AnnotatedClassActionResolver.getEventNameFromRequestParams(java.lang.Class<? extends ActionBean> bean,
ActionBeanContext context)
Loops through the set of known events for the ActionBean to see if the event
names are present as parameter names in the request.
|
protected BeforeAfterMethodInterceptor.FilterMethods |
BeforeAfterMethodInterceptor.getFilterMethods(java.lang.Class<? extends ActionBean> beanClass)
Gets the Before/After methods for the ActionBean.
|
java.lang.reflect.Method |
ActionResolver.getHandler(java.lang.Class<? extends ActionBean> bean,
java.lang.String eventName)
Resolves the Method which handles the named event.
|
java.lang.reflect.Method |
AnnotatedClassActionResolver.getHandler(java.lang.Class<? extends ActionBean> bean,
java.lang.String eventName)
Uses the Maps constructed earlier to locate the Method which can handle the event.
|
java.lang.String |
ActionResolver.getUrlBinding(java.lang.Class<? extends ActionBean> clazz)
Takes a class that implements ActionBean and returns the URL binding of that class.
|
java.lang.String |
AnnotatedClassActionResolver.getUrlBinding(java.lang.Class<? extends ActionBean> clazz)
Takes a class that implements ActionBean and returns the URL binding of that class.
|
java.lang.String |
NameBasedActionResolver.getUrlBinding(java.lang.Class<? extends ActionBean> clazz)
Finds or generates the URL binding for the class supplied.
|
protected ActionBean |
AnnotatedClassActionResolver.makeNewActionBean(java.lang.Class<? extends ActionBean> type,
ActionBeanContext context)
Helper method to construct and return a new ActionBean instance.
|
static UrlBinding |
UrlBindingFactory.parseUrlBinding(java.lang.Class<? extends ActionBean> beanType)
Look for a binding pattern for the given
ActionBean class, specified by the
UrlBinding annotation. |
static UrlBinding |
UrlBindingFactory.parseUrlBinding(java.lang.Class<? extends ActionBean> beanType,
java.lang.String pattern)
Parse the binding pattern and create a
UrlBinding object for the ActionBean
class. |
static UrlBindingParameter |
UrlBindingFactory.parseUrlBindingParameter(java.lang.Class<? extends ActionBean> beanClass,
java.lang.String string)
Parses a parameter specification into name and default value and returns a
UrlBindingParameter with the corresponding name and default value properties set
accordingly. |
protected void |
AnnotatedClassActionResolver.removeActionBean(java.lang.Class<? extends ActionBean> clazz)
Removes an ActionBean class from the set that this resolver can resolve.
|
void |
UrlBindingFactory.removeBinding(java.lang.Class<? extends ActionBean> beanType)
Removes an
ActionBean 's URL binding. |
Constructor and Description |
---|
UrlBinding(java.lang.Class<? extends ActionBean> beanType,
java.lang.String path)
Create a new instance that takes no parameters.
|
UrlBinding(java.lang.Class<? extends ActionBean> beanType,
java.lang.String path,
java.util.List<java.lang.Object> components)
Create a new instance with all its members.
|
UrlBindingParameter(java.lang.Class<? extends ActionBean> beanClass,
java.lang.String name,
java.lang.String value)
Create a new
UrlBindingParameter with the given name and value. |
UrlBindingParameter(java.lang.Class<? extends ActionBean> beanClass,
java.lang.String name,
java.lang.String value,
java.lang.String defaultValue)
Create a new
UrlBindingParameter with the given name, value and default value. |
Modifier and Type | Method and Description |
---|---|
java.lang.Class<? extends ActionBean> |
UrlBindingConflictException.getTargetClass()
Get the
ActionBean class for which a URL was being generated when this exception was
thrown. |
Modifier and Type | Method and Description |
---|---|
protected static java.lang.String |
UrlBindingConflictException.getMessage(java.lang.Class<? extends ActionBean> targetClass,
java.lang.String path,
java.util.Collection<java.lang.String> matches)
Generate the message to pass to the superclass constructor
|
Constructor and Description |
---|
ActionBeanNotFoundException(java.lang.String requestedUrl,
java.util.Map<java.lang.String,java.lang.Class<? extends ActionBean>> registeredBeans) |
ActionBeanNotFoundException(java.lang.String requestedUrl,
java.util.Map<java.lang.String,java.lang.Class<? extends ActionBean>> registeredBeans,
java.lang.Throwable cause) |
UrlBindingConflictException(java.lang.Class<? extends ActionBean> targetClass,
java.lang.String path,
java.util.Collection<java.lang.String> matches)
New exception indicating that the
path does not map to a single ActionBean because it
potentially matches all the URL bindings in the matches collection. |
UrlBindingConflictException(java.lang.String message,
java.lang.Class<? extends ActionBean> targetClass,
java.lang.String path,
java.util.Collection<java.lang.String> matches)
New exception indicating that the
path does not map to a single ActionBean because it
potentially matches all the URL bindings in the matches collection. |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
LocalizationUtility.getLocalizedFieldName(java.lang.String fieldName,
java.lang.String actionPath,
java.lang.Class<? extends ActionBean> beanclass,
java.util.Locale locale)
Fetches the localized name for a form field if one exists in the form field resource bundle.
|
Modifier and Type | Method and Description |
---|---|
<A extends ActionBean> |
MockRoundtrip.getActionBean(java.lang.Class<A> type)
Gets the instance of the ActionBean type provided that was instantiated by Stripes to
handle the request.
|
Constructor and Description |
---|
MockRoundtrip(MockServletContext context,
java.lang.Class<? extends ActionBean> beanType)
Preferred constructor that will manufacture a request.
|
MockRoundtrip(MockServletContext context,
java.lang.Class<? extends ActionBean> beanType,
MockHttpSession session)
Preferred constructor that will manufacture a request.
|
Modifier and Type | Method and Description |
---|---|
ActionBean |
InputTagSupport.getActionBean()
Fetches the ActionBean associated with the form if one is present.
|
protected ActionBean |
FormTag.getActionBean()
Fetches the ActionBean associated with the form if one is present.
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.Class<? extends ActionBean> |
FormTag.getActionBeanClass()
Lazily looks up and returns the type of action bean the form will submit to.
|
protected java.lang.Class<? extends ActionBean> |
StripesTagSupport.getActionBeanType(java.lang.Object nameOrClass)
Helper method that takes an attribute which may be either a String class name
or a Class object and returns the Class representing the appropriate ActionBean.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
ElFunctions.hasErrors(ActionBean actionBean,
java.lang.String field)
Indicates if validation errors exist for the given field of the given
ActionBean . |
Modifier and Type | Method and Description |
---|---|
protected boolean |
WizardFieldsTag.isEventName(java.lang.Class<? extends ActionBean> beanType,
java.lang.String name)
|
Constructor and Description |
---|
UrlBuilder(java.util.Locale locale,
java.lang.Class<? extends ActionBean> beanType,
boolean isForPage)
Constructs a UrlBuilder that references an
ActionBean . |
Modifier and Type | Method and Description |
---|---|
java.lang.Class<? extends ActionBean> |
ValidationError.getBeanclass()
Returns the class of the ActionBean associated to the request.
|
java.lang.Class<? extends ActionBean> |
SimpleError.getBeanclass()
Returns the class of the ActionBean associated to the request.
|
Modifier and Type | Method and Description |
---|---|
void |
ValidationError.setBeanclass(java.lang.Class<? extends ActionBean> clazz)
Provides the message with access to the class of the ActionBean that is bound
to the current request.
|
void |
SimpleError.setBeanclass(java.lang.Class<? extends ActionBean> beanclass)
Sets the class of the ActionBean associated to the request.
|
Modifier and Type | Method and Description |
---|---|
void |
ExpressionExecutorSupport.evaluate(ActionBean bean,
ParameterName name,
java.util.List<java.lang.Object> values,
ValidationMetadata validationInfo,
ValidationErrors errors) |
void |
ExpressionExecutor.evaluate(ActionBean bean,
ParameterName name,
java.util.List<java.lang.Object> values,
ValidationMetadata validationInfo,
ValidationErrors errors)
Performs validation of an ActionBean property using the expression contained
within the validation metadata.
|
static void |
ExpressionValidator.evaluate(ActionBean bean,
ParameterName name,
java.util.List<java.lang.Object> values,
ValidationMetadata validationInfo,
ValidationErrors errors)
Run expression validation on the bean property provided with the values provided.
|
void |
Jsp21ExpressionExecutor.evaluate(ActionBean bean,
ParameterName name,
java.util.List<java.lang.Object> values,
ValidationMetadata validationInfo,
ValidationErrors errors) |
Constructor and Description |
---|
Jsp21ExpressionExecutor.StripesELContext(ActionBean bean)
Constructs a new instance using the ActionBean provided as the source for most
property resolutions.
|
? Copyright 2005-2006, Stripes Development Team.