public interface ActContext<CTX_TYPE extends ActContext>
extends org.osgl.mvc.util.ParamValueProvider
Modifier and Type | Interface and Description |
---|---|
static class |
ActContext.Base<CTX extends ActContext.Base> |
static interface |
ActContext.Listener |
Modifier and Type | Method and Description |
---|---|
String |
_act_i18n(String msgId,
Object... args) |
org.osgl.http.H.Format |
accept() |
CTX_TYPE |
accept(org.osgl.http.H.Format fmt) |
CTX_TYPE |
addDestroyable(Destroyable resource) |
CTX_TYPE |
addListener(ActContext.Listener listener) |
CTX_TYPE |
addViolation(String property,
javax.validation.ConstraintViolation violation) |
CTX_TYPE |
addViolations(Map<String,javax.validation.ConstraintViolation> violations) |
App |
app() |
<T> T |
attribute(String name) |
CTX_TYPE |
attribute(String name,
Object attr) |
Map<String,Object> |
attributes() |
Template |
cachedTemplate() |
CTX_TYPE |
cacheTemplate(Template template) |
AppConfig |
config() |
boolean |
hasViolation() |
String |
i18n(boolean ignoreError,
Class<?> bundleSpec,
String msgId,
Object... args) |
String |
i18n(boolean ignoreError,
String msgId,
Object... args) |
Map<String,Object> |
i18n(Class<?> bundleSpec,
Class<? extends Enum> enumClass) |
Map<String,Object> |
i18n(Class<?> bundleSpec,
Class<? extends Enum> enumClass,
boolean outputProperties) |
String |
i18n(Class<?> bundleSpec,
Enum<?> msgId) |
String |
i18n(Class<?> bundleSpec,
String msgId,
Object... args) |
Map<String,Object> |
i18n(Class<? extends Enum> enumClass) |
Map<String,Object> |
i18n(Class<? extends Enum> enumClass,
boolean outputProperties) |
String |
i18n(Enum<?> msgId) |
String |
i18n(String msgId,
Object... args) |
Locale |
locale() |
Locale |
locale(boolean required) |
CTX_TYPE |
locale(Locale locale) |
String |
methodPath() |
CTX_TYPE |
removeAttribute(String name) |
<T> T |
renderArg(String name) |
CTX_TYPE |
renderArg(String name,
Object val) |
Map<String,Object> |
renderArgs()
Returns all render arguments
|
org.osgl.util.S.Buffer |
strBuf()
Returns a reusable
S.Buffer instance |
String |
templateContext()
Returns the template context
|
CTX_TYPE |
templateContext(String context)
Set template context
|
String |
templatePath()
If
template path has been set before then return the template path |
CTX_TYPE |
templatePath(String path)
Set path to template file
|
boolean |
templatePathIsImplicit()
Check if the template path is implicit i.e.
|
javax.validation.ConstraintViolation |
violation(String property) |
Map<String,javax.validation.ConstraintViolation> |
violations() |
App app()
AppConfig config()
CTX_TYPE accept(org.osgl.http.H.Format fmt)
org.osgl.http.H.Format accept()
Locale locale()
Locale locale(boolean required)
String templatePath()
If template path has been set before
then return the template path
CTX_TYPE templatePath(String path)
Set path to template file
path
- the path to template fileAppContext
String templateContext()
Returns the template context
CTX_TYPE templateContext(String context)
Set template context
context
- the path to template contextActContext
boolean templatePathIsImplicit()
Check if the template path is implicit i.e. derived from methodPath()
true
if template path is implicit; false
otherwiseTemplate cachedTemplate()
<T> T renderArg(String name)
CTX_TYPE addListener(ActContext.Listener listener)
CTX_TYPE addDestroyable(Destroyable resource)
<T> T attribute(String name)
boolean hasViolation()
javax.validation.ConstraintViolation violation(String property)
Map<String,Object> i18n(Class<?> bundleSpec, Class<? extends Enum> enumClass, boolean outputProperties)
String methodPath()
org.osgl.util.S.Buffer strBuf()
Returns a reusable S.Buffer
instance
Copyright © 2014-2017 ActFramework. All Rights Reserved.