org.mentawai.guice
Class GuiceActionConfig

java.lang.Object
  extended by org.mentawai.core.ActionConfig
      extended by org.mentawai.guice.GuiceActionConfig

public class GuiceActionConfig
extends ActionConfig

ActionConfig to tightly integrate Google Guice. Use this ActionConfig if you want Guice to create your Action instances and resolve all dependencies.

Version:
0.1
Author:
Sven Jacobs

Field Summary
 
Fields inherited from class org.mentawai.core.ActionConfig
actionClass
 
Constructor Summary
GuiceActionConfig(Class<? extends Object> klass, com.google.inject.Injector injector)
           
GuiceActionConfig(String name, Class<? extends Object> klass, com.google.inject.Injector injector)
           
GuiceActionConfig(String name, Class<? extends Object> klass, String innerAction, com.google.inject.Injector injector)
           
 
Method Summary
 Action getAction()
          Returns an action instance to be used with this request.
 
Methods inherited from class org.mentawai.core.ActionConfig
addConsequence, addConsequence, addFilter, addFilter, addFilter, addFilter, addFilter, addFilterFirst, addFilterFirst, addFilterFirst, addFilterFirst, ajaxError, ajaxOk, all, authorize, authorize, bypassAuthentication, catchAll, chainError, chainOk, comeBackAfterLogin, fileUpload, fileUpload, fileUpload, fileUpload, fileUpload, filter, filter, filter, filter, filter, filterFirst, filterFirst, filterFirst, filterFirst, fwdError, fwdOk, getActionClass, getAutoConsequence, getCatchAll, getConsequence, getConsequence, getDirFromClass, getFilters, getFilters, getFirstFilters, getInnerAction, getName, internalOnly, isInternalOnly, methodParams, on, on, on, prettyURLParams, redirError, redirError, redirError, redirOk, redirOk, redirOk, shouldBypassAuthentication, shouldRedirectAfterLogin, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GuiceActionConfig

public GuiceActionConfig(Class<? extends Object> klass,
                         com.google.inject.Injector injector)

GuiceActionConfig

public GuiceActionConfig(String name,
                         Class<? extends Object> klass,
                         com.google.inject.Injector injector)

GuiceActionConfig

public GuiceActionConfig(String name,
                         Class<? extends Object> klass,
                         String innerAction,
                         com.google.inject.Injector injector)
Method Detail

getAction

public Action getAction()
Description copied from class: ActionConfig
Returns an action instance to be used with this request. Mentawai creates a new action instance for each request. You can extend ActionConfig and override this class to integrate Mentawai with other IoC containers, that may want to create the action themselves.

Overrides:
getAction in class ActionConfig
Returns:
The action instance to use for the request.


Copyright © 2013. All Rights Reserved.