|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Target(value=TYPE) @Retention(value=RUNTIME) public static @interface Jpf.Controller
Main class-level annotation required to be present on all page flow
(PageFlowController
-derived) and shared flow
(SharedFlowController
-derived) classes.
Optional Element Summary | |
---|---|
Jpf.Catch[] |
catches
Array of declarative catches, which can reroute to a page or to a handler method ( Jpf.ExceptionHandler )
when a particular exception is thrown. |
String[] |
customValidatorConfigs
Array of additional webapp-relative file paths to be added to the pathnames property of the
ValidatorPlugIn initialization in the generated Struts config XML for this controller. |
Jpf.Forward[] |
forwards
Array of Forwards that can be used from any action ( Jpf.Action or Jpf.SimpleAction ) or
exception handler (Jpf.ExceptionHandler ) in this controller. |
boolean |
inheritLocalPaths
This relates to any local path (does not start with "/") inherited from a Jpf.SimpleAction ,
Jpf.Action , Jpf.ConditionalForward , etc. in a base class. |
boolean |
loginRequired
If set to true , a NotLoggedInException will be thrown
for any action (Jpf.Action or Jpf.SimpleAction ) in this controller when the current
LoginHandler returns null for
getUserPrincipal . |
boolean |
longLived
If set to true , then this page flow does not get discarded when another page flow is hit
(only valid for PageFlowController s). |
Jpf.MessageBundle[] |
messageBundles
Array of message bundles used by this controller. |
Jpf.MultipartHandler |
multipartHandler
A value that determines the type of multipart handling for actions ( Jpf.Action or Jpf.SimpleAction )
in this controller. |
boolean |
nested
If set to true , then this is a reusable, modular flow that can be "nested" during other flows. |
boolean |
readOnly
If set to true , then by default all actions (Jpf.Action or Jpf.SimpleAction ) in this
controller have "promised" that they will not modify member data. |
String[] |
rolesAllowed
Array of roles allowed to access actions in this controller. |
Jpf.SharedFlowRef[] |
sharedFlowRefs
Array of shared flow references used by a page flow. |
Jpf.SimpleAction[] |
simpleActions
Array of simple actions. |
String |
strutsMerge
Location of the "Struts merge" file, whose elements/attributes override those in the Struts config XML file generated from this controller. |
String[] |
tilesDefinitionsConfigs
Array of webapp-relative paths to Tiles Definitions Config XML files. |
Jpf.ValidatableBean[] |
validatableBeans
Array of validation rules on a per-bean (class) basis. |
String |
validatorMerge
Location of the "Validator merge" file, whose elements/attributes override those in the ValidatorPlugIn config XML file generated from this controller. |
Jpf.ValidatorVersion |
validatorVersion
The version of the commons-validator DTD to use for the ValidatorPlugIn config XML generated from this controller. |
public abstract Jpf.Catch[] catches
Jpf.ExceptionHandler
)
when a particular exception is thrown.
public abstract String[] customValidatorConfigs
pathnames
property of the
ValidatorPlugIn initialization in the generated Struts config XML for this controller.
public abstract Jpf.Forward[] forwards
Jpf.Action
or Jpf.SimpleAction
) or
exception handler (Jpf.ExceptionHandler
) in this controller. An action or exception handler method
uses a forward by returning a Forward
object whose name matches
the one in the Forward annotation. A simple action uses a forward by naming it in the
Jpf.SimpleAction.forwardRef()
attribute.
public abstract boolean loginRequired
true
, a NotLoggedInException
will be thrown
for any action (Jpf.Action
or Jpf.SimpleAction
) in this controller when the current
LoginHandler
returns null
for
getUserPrincipal
. The default LoginHandler simply calls getUserPrincipal
on
HttpServletRequest
.
public abstract boolean longLived
true
, then this page flow does not get discarded when another page flow is hit
(only valid for PageFlowController
s). It ramains stored in the
background, and is reinstated when it is requested again. Long-lived page flows may be deleted using
PageFlowUtils.removeLongLivedPageFlow(java.lang.String, javax.servlet.http.HttpServletRequest)
.
public abstract Jpf.MessageBundle[] messageBundles
public abstract Jpf.MultipartHandler multipartHandler
Jpf.Action
or Jpf.SimpleAction
)
in this controller. For security, multipart handling is disabled by default..
public abstract boolean nested
true
, then this is a reusable, modular flow that can be "nested" during other flows.
It has entry points (actions with optional form bean arguments), and exit points (Jpf.ConditionalForward
,
Jpf.SimpleAction
, or Jpf.ConditionalForward
annotations that have returnAction
attributes).
public abstract boolean readOnly
true
, then by default all actions (Jpf.Action
or Jpf.SimpleAction
) in this
controller have "promised" that they will not modify member data. In containers that support clustering,
this allows the framework to avoid serializing the controller instance for session failover after the
method is run. This is a performance optimization; it does not have an effect on the behavior of the
action itself.
public abstract String[] rolesAllowed
Jpf.Action
or Jpf.SimpleAction
) in this controller is
raised:
NotLoggedInException
will be thrown when the current
LoginHandler
returns null
for
getUserPrincipal
. The default LoginHandler simply calls
getUserPrincipal
on HttpServletRequest
.
UnfulfilledRolesException
will be thrown when the
current LoginHandler
returns
false
from isUserInRole
for each of the roles in the list. The
default LoginHandler simply calls isUserInRole
on
HttpServletRequest
.
public abstract Jpf.SharedFlowRef[] sharedFlowRefs
public abstract Jpf.SimpleAction[] simpleActions
public abstract String strutsMerge
public abstract String[] tilesDefinitionsConfigs
Jpf.ConditionalForward.tilesDefinition()
, Jpf.SimpleAction.tilesDefinition()
, or
Jpf.ConditionalForward.tilesDefinition()
.
public abstract Jpf.ValidatableBean[] validatableBeans
Jpf.Action
or Jpf.SimpleAction
)
that accepts a form bean can trigger validation rules for any of these bean types.
Jpf.ValidateRequired
,
Jpf.ValidateMinLength
,
Jpf.ValidateMaxLength
,
Jpf.ValidateMask
,
Jpf.ValidateType
,
Jpf.ValidateDate
,
Jpf.ValidateRange
,
Jpf.ValidateCreditCard
,
Jpf.ValidateEmail
,
Jpf.ValidateValidWhen
,
Jpf.ValidateCustomRule
public abstract String validatorMerge
public abstract Jpf.ValidatorVersion validatorVersion
public abstract boolean inheritLocalPaths
Jpf.SimpleAction
,
Jpf.Action
, Jpf.ConditionalForward
, etc. in a base class. Normally, this path would be relative to the
current controller. When this value is set to true
, then the path is
relative to the base class controller.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |