Acciente Company Logo

Parameter Injection Quick Reference - I

  1. Parameter Injection Quick Reference - I
    1. Controllers
      1. Controller CONSTRUCTOR
      2. Controller METHODS : commonly used parameter types
      3. Controller METHODS : less commonly used parameter types
    2. Interceptors
      1. Interceptor CONSTRUCTOR
      2. Interceptor METHODS : commonly used parameter types
      3. Interceptor METHODS : less commonly used parameter types
    3. Views
      1. View CONSTRUCTOR: commonly used parameter types
      2. View CONSTRUCTOR: less commonly used parameter types
    4. Models
      1. Model CONSTRUCTOR: commonly used parameter types
      2. Model CONSTRUCTOR: less commonly used parameter types

This document is intended as quick reference to determine what parameter values are available for injection in different contexts in Induction.

Controllers

This section documents the parameter types available in controllers.

Controller CONSTRUCTOR

Since controller methods are expected to be thread-safe, parameter injection into controller construtors is very limited.

Type Package Description
ServletConfig javax.servlet access to the ServletConfig object provided by the web container

Controller METHODS : commonly used parameter types

Type Package Description
<model_class_name> <any_package> instance of a developer provided model class, the instance is managed to conform to a user specified lifecycle (also referred to as scope)
Form com.acciente.induction.controller provides access to the HTML form (if any) submitted with this request
HttpServletRequest javax.servlet.http access to the standard servlet request
HttpServletResponse javax.servlet.http access to the standard servlet response
Request com.acciente.induction.controller facade to the servlet request, extends javax.servlet.http.HttpServletRequest
Response com.acciente.induction.controller facade to the servlet response, extends javax.servlet.http.HttpServletResponse

Controller METHODS : less commonly used parameter types

Type Package Description
ClassLoader java.lang access to the main classloader used by Induction to load classes (returns the reloading classloader if it is in use) (not used by typical applications)
ControllerResolver.Resolution com.acciente.induction.resolver provides access to the controller resolution object (useful for writing generic parameterized controllers) (not used by typical applications)
TemplatingEngine com.acciente.induction.template access to the the templating engine configured for Induction (not used by typical applications)

Interceptors

Interceptor CONSTRUCTOR

Since controller methods are expected to be thread-safe, parameter injection into controller construtors is very limited.

Type Package Description
<model_class_name> <any_package> instance of a developer provided application scope model class
Config.RequestInterceptors com.acciente.induction.init.config the configuration data for the request interceptors
ClassLoader java.lang access to the main classloader used by Induction to load classes (returns the reloading classloader if it is in use)
ServletConfig javax.servlet access to the ServletConfig object provided by the web container

Interceptor METHODS : commonly used parameter types

Type Package Description
<model_class_name> <any_package> instance of a developer provided model class, the instance is managed to conform to a user specified lifecycle (also referred to as scope)
Form com.acciente.induction.controller provides access to the HTML form (if any) submitted with this request
HttpServletRequest javax.servlet.http access to the standard servlet request
HttpServletResponse javax.servlet.http access to the standard servlet response
Request com.acciente.induction.controller facade to the servlet request, extends javax.servlet.http.HttpServletRequest
Response com.acciente.induction.controller facade to the servlet response, extends javax.servlet.http.HttpServletResponse

Interceptor METHODS : less commonly used parameter types

Type Package Description
ClassLoader java.lang access to the main classloader used by Induction to load classes (returns the reloading classloader if it is in use) (not used by typical applications)
ControllerResolver.Resolution com.acciente.induction.resolver provides access to the controller resolution object (useful for writing generic parameterized interceptors)
TemplatingEngine com.acciente.induction.template access to the the templating engine configured for Induction (not used by typical applications)
ViewResolver.Resolution com.acciente.induction.resolver provides access to the view resolution object (useful for writing generic parameterized interceptors)

Views

This section documents the parameter types available in views.

View CONSTRUCTOR: commonly used parameter types

Type Package Description
<model_class_name> <any_package> instance of a developer provided model class, the instance is managed to conform to a user specified lifecycle (also referred to as scope)

View CONSTRUCTOR: less commonly used parameter types

Type Package Description
ClassLoader java.lang access to the main classloader used by Induction to load classes (returns the reloading classloader if it is in use)
Form com.acciente.induction.controller provides access to the HTML form (if any) submitted with this request
HttpServletRequest javax.servlet.http access to the standard servlet request
HttpServletResponse javax.servlet.http access to the standard servlet response
Request com.acciente.induction.controller facade to the servlet request, extends javax.servlet.http.HttpServletRequest
Response com.acciente.induction.controller facade to the servlet response, extends javax.servlet.http.HttpServletResponse
TemplatingEngine com.acciente.induction.template access to the the templating engine configured for Induction
ViewResolver.Resolution com.acciente.induction.resolver provides access to the view resolution object (useful for writing generic parameterized controllers)

Models

This section documents the parameter types available in models.

Model CONSTRUCTOR: commonly used parameter types

Type Package Description
<model_class_name> <any_package> a reference to another model class, the instance of the other model class, say A, is managed to conform scope defined for the model class A. The ability inject one model into another model in Induction is referred to as model-to-model injection

Model CONSTRUCTOR: less commonly used parameter types

Type Package Description
Config.ModelDefs.ModelDef com.acciente.induction.init.config the configuration data specified to setup this model (not typically used)
ClassLoader java.lang access to the main classloader used by Induction to load classes (returns the reloading classloader if it is in use)
Form com.acciente.induction.controller (for request scope models only) provides access to the HTML form (if any) submitted with this request
HttpServletRequest javax.servlet.http (for request scope models only) access to the standard servlet request
ServletConfig javax.servlet access to the ServletConfig object provided by the web container
TemplatingEngine com.acciente.induction.template access to the the templating engine configured for Induction (not used by typical applications)