Package de.cuioss.test.jsf.util
Class ConfigurableApplication
- java.lang.Object
-
- javax.faces.application.Application
-
- javax.faces.application.ApplicationWrapper
-
- de.cuioss.test.jsf.util.ConfigurableApplication
-
- All Implemented Interfaces:
FacesWrapper<Application>
public class ConfigurableApplication extends ApplicationWrapper
AnApplicationWrapperthat is capable to do more programmatic configuration compared to the ones provided by myfaces-test- Author:
- Oliver Wolff
-
-
Constructor Summary
Constructors Constructor Description ConfigurableApplication(Application wrapped)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description UIComponentcreateComponent(FacesContext context, String componentType, String rendererType)Intercept invalid argument for MyFaces Api passing null as rendererType -> UiViewRoot#getComponentResourcesstatic ConfigurableApplicationcreateWrapAndRegister(org.apache.myfaces.test.mock.MockFacesContext facesContext)Creates a newConfigurableApplicationby loading the existingApplicationfrom theApplicationFactoryand registers itself again to theApplicationFactoryandMockFacesContextStringgetMessageBundle()ResourceBundlegetResourceBundle(FacesContext ctx, String name)SearchExpressionHandlergetSearchExpressionHandler()ApplicationgetWrapped()booleanisUseIdentityResouceBundle()voidsetSearchExpressionHandler(SearchExpressionHandler searchExpressionHandler)voidsetUseIdentityResouceBundle(boolean useIdentityResouceBundle)-
Methods inherited from class javax.faces.application.ApplicationWrapper
addBehavior, addComponent, addConverter, addConverter, addDefaultValidatorId, addELContextListener, addELResolver, addSearchKeywordResolver, addValidator, createBehavior, createComponent, createComponent, createComponent, createComponent, createComponent, createConverter, createConverter, createMethodBinding, createValidator, createValueBinding, evaluateExpressionGet, getActionListener, getBehaviorIds, getComponentTypes, getConverterIds, getConverterTypes, getDefaultLocale, getDefaultRenderKitId, getDefaultValidatorInfo, getELContextListeners, getELResolver, getExpressionFactory, getFlowHandler, getNavigationHandler, getProjectStage, getPropertyResolver, getResourceHandler, getSearchKeywordResolver, getStateManager, getSupportedLocales, getValidatorIds, getVariableResolver, getViewHandler, publishEvent, publishEvent, removeELContextListener, setActionListener, setDefaultLocale, setDefaultRenderKitId, setFlowHandler, setMessageBundle, setNavigationHandler, setPropertyResolver, setResourceHandler, setStateManager, setSupportedLocales, setVariableResolver, setViewHandler, subscribeToEvent, subscribeToEvent, unsubscribeFromEvent, unsubscribeFromEvent
-
-
-
-
Constructor Detail
-
ConfigurableApplication
public ConfigurableApplication(Application wrapped)
-
-
Method Detail
-
getResourceBundle
public ResourceBundle getResourceBundle(FacesContext ctx, String name)
- Overrides:
getResourceBundlein classApplicationWrapper
-
getMessageBundle
public String getMessageBundle()
- Overrides:
getMessageBundlein classApplicationWrapper
-
createWrapAndRegister
public static final ConfigurableApplication createWrapAndRegister(org.apache.myfaces.test.mock.MockFacesContext facesContext)
Creates a newConfigurableApplicationby loading the existingApplicationfrom theApplicationFactoryand registers itself again to theApplicationFactoryandMockFacesContext- Parameters:
facesContext- to be used for adding the createdConfigurableApplicationto. Must not be null- Returns:
- the created
ConfigurableApplication
-
createComponent
public UIComponent createComponent(FacesContext context, String componentType, String rendererType)
Intercept invalid argument for MyFaces Api passing null as rendererType -> UiViewRoot#getComponentResources- Overrides:
createComponentin classApplicationWrapper
-
getWrapped
public Application getWrapped()
- Specified by:
getWrappedin interfaceFacesWrapper<Application>- Overrides:
getWrappedin classApplicationWrapper
-
isUseIdentityResouceBundle
public boolean isUseIdentityResouceBundle()
-
setUseIdentityResouceBundle
public void setUseIdentityResouceBundle(boolean useIdentityResouceBundle)
-
getSearchExpressionHandler
public SearchExpressionHandler getSearchExpressionHandler()
- Overrides:
getSearchExpressionHandlerin classApplicationWrapper
-
setSearchExpressionHandler
public void setSearchExpressionHandler(SearchExpressionHandler searchExpressionHandler)
- Overrides:
setSearchExpressionHandlerin classApplicationWrapper
-
-