org.apache.beehive.netui.pageflow.annotations
Annotation Type Jpf.Controller


@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 PageFlowControllers).
 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.
 

catches

public abstract 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.

Default:
{}

customValidatorConfigs

public abstract 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.

Default:
{}

forwards

public abstract 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. 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.

Default:
{}

loginRequired

public abstract 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. The default LoginHandler simply calls getUserPrincipal on HttpServletRequest.

Default:
false

longLived

public abstract boolean longLived
If set to true, then this page flow does not get discarded when another page flow is hit (only valid for PageFlowControllers). 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).

Default:
false

messageBundles

public abstract Jpf.MessageBundle[] messageBundles
Array of message bundles used by this controller. Any message key (like those in validation messages) refers to a message in one of the listed bundles.

Default:
{}

multipartHandler

public abstract Jpf.MultipartHandler multipartHandler
A value that determines the type of multipart handling for actions (Jpf.Action or Jpf.SimpleAction) in this controller. For security, multipart handling is disabled by default..

Default:
disabled

nested

public abstract boolean nested
If set to 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).

Default:
false

readOnly

public abstract 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. 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.

Default:
false

rolesAllowed

public abstract String[] rolesAllowed
Array of roles allowed to access actions in this controller. If this array is non-empty, then two exceptions may be thrown when an action (Jpf.Action or Jpf.SimpleAction) in this controller is raised:

Default:
{}

sharedFlowRefs

public abstract Jpf.SharedFlowRef[] sharedFlowRefs
Array of shared flow references used by a page flow. Each one maps a local shared flow name to an actual shared flow type. Referenced shared flows add common actions (addressed in the form "shared-flow-name.shared-flow-action-name") and fallback exception handlers, and can provide a location for shared state.

Default:
{}

simpleActions

public abstract Jpf.SimpleAction[] simpleActions
Array of simple actions.

Default:
{}

strutsMerge

public abstract String strutsMerge
Location of the "Struts merge" file, whose elements/attributes override those in the Struts config XML file generated from this controller. The path is relative to this controller, or, if it starts with '/', is relative to a source root.

Default:
""

tilesDefinitionsConfigs

public abstract String[] tilesDefinitionsConfigs
Array of webapp-relative paths to Tiles Definitions Config XML files. Definitions within these files may be referenced in Jpf.ConditionalForward.tilesDefinition(), Jpf.SimpleAction.tilesDefinition(), or Jpf.ConditionalForward.tilesDefinition().

Default:
{}

validatableBeans

public abstract Jpf.ValidatableBean[] validatableBeans
Array of validation rules on a per-bean (class) basis. An action (Jpf.Action or Jpf.SimpleAction) that accepts a form bean can trigger validation rules for any of these bean types.

See Also:
Jpf.ValidateRequired, Jpf.ValidateMinLength, Jpf.ValidateMaxLength, Jpf.ValidateMask, Jpf.ValidateType, Jpf.ValidateDate, Jpf.ValidateRange, Jpf.ValidateCreditCard, Jpf.ValidateEmail, Jpf.ValidateValidWhen, Jpf.ValidateCustomRule
Default:
{}

validatorMerge

public abstract String validatorMerge
Location of the "Validator merge" file, whose elements/attributes override those in the ValidatorPlugIn config XML file generated from this controller. The path is relative to this controller, or, if it starts with '/', is relative to a source root.

Default:
""

validatorVersion

public abstract Jpf.ValidatorVersion validatorVersion
The version of the commons-validator DTD to use for the ValidatorPlugIn config XML generated from this controller.

Default:
oneZero

inheritLocalPaths

public abstract 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. 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.

Default:
false