BeanRegistry
, MessageSource
CoreTranslet
public interface Translet extends BeanRegistry, MessageSource
Created: 2008. 7. 5. AM 12:35:44
Modifier and Type | Method | Description |
---|---|---|
boolean |
acceptsProfiles(java.lang.String... profiles) |
Return whether the given profile is active.
|
java.util.Map<java.lang.String,java.lang.Object> |
copyAllParameters() |
Returns the parameter copied to the new instance.
|
void |
dispatch(DispatchResponseRule dispatchResponseRule) |
Dispatch to other resources as the given rule.
|
void |
dispatch(java.lang.String name) |
Dispatch to other resources as the given name.
|
void |
dispatch(java.lang.String name,
boolean immediately) |
Dispatch to other resources as the given name.
|
void |
fillAllParameters(java.util.Map<java.lang.String,java.lang.Object> targetParameters) |
Fills all parameters to the specified map.
|
void |
fillAttributeMap(java.util.Map<java.lang.String,java.lang.Object> attributeMap) |
Fills all attributes to the specified map.
|
void |
forward(ForwardResponseRule forwardResponseRule) |
Forward according to a given rule.
|
void |
forward(java.lang.String transletName) |
Forward to the specified translet immediately.
|
void |
forward(java.lang.String transletName,
boolean immediately) |
Forward to the specified translet.
|
ActivityDataMap |
getActivityDataMap() |
Returns an Activity Data Map containing the activity result data.
|
ActivityDataMap |
getActivityDataMap(boolean prefill) |
Returns an Activity Data Map containing the activity result data.
|
<T> T |
getAfterAdviceResult(java.lang.String aspectId) |
Gets the after advice result.
|
java.util.Map<java.lang.String,java.lang.Object> |
getAllAttributes() |
Return a mutable
Map of the request attributes,
with attribute names as map keys and attribute value as map value. |
java.util.Map<java.lang.String,java.lang.Object> |
getAllParameters() |
Return an immutable Map of the request parameters,
with parameter names as map keys and parameter values as map values.
|
<T> T |
getApplicationAdaptee() |
Returns the adaptee object to provide application information.
|
ApplicationAdapter |
getApplicationAdapter() |
Gets the application adapter.
|
<T> T |
getAroundAdviceResult(java.lang.String aspectId) |
Gets the around advice result.
|
<T> T |
getAspectAdviceBean(java.lang.String aspectId) |
Gets the aspect advice bean.
|
<T> T |
getAttribute(java.lang.String name) |
Returns the value of the named attribute as a given type,
or
null if no attribute of the given name exists. |
java.util.Enumeration<java.lang.String> |
getAttributeNames() |
Returns an
Enumeration containing the
names of the attributes available to this request. |
<T> T |
getBeforeAdviceResult(java.lang.String aspectId) |
Gets the before advice result.
|
java.lang.String |
getDescription() |
Returns a description of this
Translet . |
Environment |
getEnvironment() |
Returns the environment of the current activity context.
|
FileParameter |
getFileParameter(java.lang.String name) |
Returns a
FileParameter object as a given activity's request parameter name,
or null if the parameter does not exist. |
java.util.Enumeration<java.lang.String> |
getFileParameterNames() |
Returns an
Enumeration of String objects containing
the names of the file parameters contained in this request. |
FileParameter[] |
getFileParameterValues(java.lang.String name) |
Returns an array of
FileParameter objects containing all
of the values the given activity's request parameter has,
or null if the parameter does not exist. |
<T> T |
getFinallyAdviceResult(java.lang.String aspectId) |
Gets the finally advice result.
|
java.lang.String |
getMessage(java.lang.String code,
java.lang.Object[] args) |
Try to resolve the message.
|
java.lang.String |
getMessage(java.lang.String code,
java.lang.Object[] args,
java.lang.String defaultMessage) |
Try to resolve the message.
|
java.lang.String |
getName() |
Returns the name of this
Translet . |
java.lang.String |
getParameter(java.lang.String name) |
Returns the value of an activity's request parameter as a
String ,
or null if the parameter does not exist. |
java.util.Enumeration<java.lang.String> |
getParameterNames() |
Returns an
Enumeration of String objects containing
the names of the parameters contained in this request. |
java.lang.String[] |
getParameterValues(java.lang.String name) |
Returns an array of
String objects containing all
of the values the given activity's request parameter has,
or null if the parameter does not exist. |
ProcessResult |
getProcessResult() |
Returns the process result.
|
java.lang.Object |
getProcessResult(java.lang.String actionId) |
Returns a action result for the specified action id from the process result,
or
null if the action does not exist. |
java.lang.Throwable |
getRaisedException() |
Returns the raised exception instance.
|
<T> T |
getRequestAdaptee() |
Returns the adaptee object to provide request information.
|
RequestAdapter |
getRequestAdapter() |
Gets the request adapter.
|
java.lang.String |
getRequestEncoding() |
Returns the request encoding.
|
MethodType |
getRequestMethod() |
Gets the request http method.
|
<T> T |
getResponseAdaptee() |
Returns the adaptee object to provide response information.
|
ResponseAdapter |
getResponseAdapter() |
Gets the response adapter.
|
java.lang.String |
getResponseEncoding() |
Returns the response encoding.
|
java.lang.Throwable |
getRootCauseOfRaisedException() |
Returns the innermost one of the chained (wrapped) exceptions.
|
<T> T |
getSessionAdaptee() |
Returns the adaptee object to provide session information.
|
SessionAdapter |
getSessionAdapter() |
Gets the session adapter.
|
<T> T |
getSetting(java.lang.String settingName) |
Gets the setting value in the translet scope.
|
java.lang.Class<? extends CoreTranslet> |
getTransletImplementationClass() |
Returns an implementation class for the
Translet . |
java.lang.Class<? extends Translet> |
getTransletInterfaceClass() |
Returns an interface class for the
Translet . |
boolean |
isExceptionRaised() |
Returns whether the exception was thrown.
|
void |
redirect(RedirectResponseRule redirectResponseRule) |
Redirect a client according to the given rule.
|
void |
redirect(java.lang.String target) |
Redirect a client to a new target resource.
|
void |
redirect(java.lang.String target,
boolean immediately) |
Redirect a client to a new target resource.
|
void |
redirect(java.lang.String target,
java.util.Map<java.lang.String,java.lang.String> parameters) |
Redirect to the other target resource.
|
void |
removeAttribute(java.lang.String name) |
Removes an attribute from this request.
|
void |
removeFileParameter(java.lang.String name) |
Removes the file parameter with the specified name.
|
void |
response() |
Respond immediately, and the remaining jobs will be canceled.
|
void |
response(Response response) |
Respond immediately, and the remaining jobs will be canceled.
|
void |
setAttribute(java.lang.String name,
java.lang.Object value) |
Stores an attribute in this request.
|
void |
setFileParameter(java.lang.String name,
FileParameter fileParameter) |
Sets the
FileParameter object to the file parameter with the given name. |
void |
setFileParameter(java.lang.String name,
FileParameter[] fileParameters) |
Sets the value to the file parameter with the given name.
|
void |
setParameter(java.lang.String name,
java.lang.String value) |
Sets the value to the parameter with the given name.
|
void |
setParameter(java.lang.String name,
java.lang.String[] values) |
Sets the value to the parameter with the given name.
|
void |
setProcessResult(ProcessResult processResult) |
Sets the process result.
|
ProcessResult |
touchProcessResult() |
Returns the ProcessResult.
|
ProcessResult |
touchProcessResult(java.lang.String contentsName) |
Returns the process result with the contents name.
|
ProcessResult |
touchProcessResult(java.lang.String contentsName,
int initialCapacity) |
Returns the process result with the contents name.
|
void |
transform(TransformRule transformRule) |
Transformation according to a given rule, and transmits this response.
|
containsBean, containsBean, getBean, getBean, getBean, getBean, getConfigBean
getMessage, getMessage
java.lang.String getName()
Translet
.java.lang.String getDescription()
Translet
.Translet
MethodType getRequestMethod()
Environment getEnvironment()
ApplicationAdapter getApplicationAdapter()
SessionAdapter getSessionAdapter()
RequestAdapter getRequestAdapter()
ResponseAdapter getResponseAdapter()
<T> T getApplicationAdaptee()
T
- the type of the application adaptee<T> T getSessionAdaptee()
T
- the type of the session adaptee<T> T getRequestAdaptee()
T
- the type of the request adaptee<T> T getResponseAdaptee()
T
- the type of the response adapteejava.lang.String getRequestEncoding()
java.lang.String getResponseEncoding()
ProcessResult getProcessResult()
java.lang.Object getProcessResult(java.lang.String actionId)
null
if the action does not exist.actionId
- the specified action idvoid setProcessResult(ProcessResult processResult)
processResult
- the new process resultProcessResult touchProcessResult()
ProcessResult touchProcessResult(java.lang.String contentsName)
contentsName
- the contents nameProcessResult touchProcessResult(java.lang.String contentsName, int initialCapacity)
contentsName
- the contents nameinitialCapacity
- the initial capacity of the process resultActivityDataMap getActivityDataMap()
ActivityDataMap getActivityDataMap(boolean prefill)
prefill
- whether data pre-fill.<T> T getSetting(java.lang.String settingName)
T
- the type of the valuesettingName
- the setting namejava.lang.String getParameter(java.lang.String name)
String
,
or null
if the parameter does not exist.name
- a String
specifying the name of the parameterString
representing the
single value of the parametergetParameterValues(java.lang.String)
java.lang.String[] getParameterValues(java.lang.String name)
String
objects containing all
of the values the given activity's request parameter has,
or null
if the parameter does not exist.name
- a String
specifying the name of the parameterString
objects
containing the parameter's valuesgetParameter(java.lang.String)
java.util.Enumeration<java.lang.String> getParameterNames()
Enumeration
of String
objects containing
the names of the parameters contained in this request.
If the request has no parameters, the method returns an empty Enumeration
.Enumeration
of String
objects, each String
containing the name of a request parameter;
or an empty Enumeration
if the request has no parametersvoid setParameter(java.lang.String name, java.lang.String value)
name
- a String
specifying the name of the parametervalue
- a String
representing the
single value of the parametersetParameter(String, String[])
void setParameter(java.lang.String name, java.lang.String[] values)
name
- a String
specifying the name of the parametervalues
- an array of String
objects
containing the parameter's valuessetParameter(java.lang.String, java.lang.String)
java.util.Map<java.lang.String,java.lang.Object> getAllParameters()
java.util.Map<java.lang.String,java.lang.Object> copyAllParameters()
void fillAllParameters(java.util.Map<java.lang.String,java.lang.Object> targetParameters)
targetParameters
- the target parameter map to be filledFileParameter getFileParameter(java.lang.String name)
FileParameter
object as a given activity's request parameter name,
or null
if the parameter does not exist.name
- a String
specifying the name of the file parameterFileParameter
representing the
single value of the parametergetFileParameterValues(java.lang.String)
FileParameter[] getFileParameterValues(java.lang.String name)
FileParameter
objects containing all
of the values the given activity's request parameter has,
or null
if the parameter does not exist.name
- a String
specifying the name of the file parameterFileParameter
objects
containing the parameter's valuesgetFileParameter(java.lang.String)
java.util.Enumeration<java.lang.String> getFileParameterNames()
Enumeration
of String
objects containing
the names of the file parameters contained in this request.
If the request has no parameters, the method returns an empty Enumeration
.Enumeration
of String
objects, each String
containing the name of a file parameter;
or an empty Enumeration
if the request has no file parametersvoid setFileParameter(java.lang.String name, FileParameter fileParameter)
FileParameter
object to the file parameter with the given name.name
- a String
specifying the name of the file parameterfileParameter
- a FileParameter
representing the
single value of the parametersetFileParameter(String, FileParameter[])
void setFileParameter(java.lang.String name, FileParameter[] fileParameters)
name
- a String
specifying the name of the file parameterfileParameters
- an array of FileParameter
objects
containing the file parameter's valuessetFileParameter(java.lang.String, com.aspectran.core.activity.request.parameter.FileParameter)
void removeFileParameter(java.lang.String name)
name
- a String
specifying the name of the file parameter<T> T getAttribute(java.lang.String name)
null
if no attribute of the given name exists.T
- the generic typename
- a String
specifying the name of the attributeObject
containing the value of the attribute,
or null
if the attribute does not existvoid setAttribute(java.lang.String name, java.lang.Object value)
name
- specifying the name of the attributevalue
- the Object
to be storedjava.util.Enumeration<java.lang.String> getAttributeNames()
Enumeration
containing the
names of the attributes available to this request.
This method returns an empty Enumeration
if the request has no attributes available to it.void removeAttribute(java.lang.String name)
name
- a String
specifying the name of the attribute to removejava.util.Map<java.lang.String,java.lang.Object> getAllAttributes()
Map
of the request attributes,
with attribute names as map keys and attribute value as map value.void fillAttributeMap(java.util.Map<java.lang.String,java.lang.Object> attributeMap)
attributeMap
- the attribute mapvoid response()
void response(Response response)
response
- the responsevoid transform(TransformRule transformRule)
transformRule
- the transformation rulevoid dispatch(DispatchResponseRule dispatchResponseRule)
dispatchResponseRule
- the dispatch response rulevoid dispatch(java.lang.String name)
name
- the dispatch namevoid dispatch(java.lang.String name, boolean immediately)
name
- the dispatch nameimmediately
- whether to override the intended dispatch response rulevoid redirect(RedirectResponseRule redirectResponseRule)
redirectResponseRule
- the redirect response rulevoid redirect(java.lang.String target)
target
- the target resourcevoid redirect(java.lang.String target, boolean immediately)
immediately
is true, create a new redirect response rule
and override the intended redirect response rule.target
- the target resourceimmediately
- whether to override the intended redirect response rulevoid redirect(java.lang.String target, java.util.Map<java.lang.String,java.lang.String> parameters)
target
- the redirect targetparameters
- the parametersvoid forward(ForwardResponseRule forwardResponseRule)
forwardResponseRule
- the forward response rulevoid forward(java.lang.String transletName)
transletName
- the translet name of the target to be forwardedvoid forward(java.lang.String transletName, boolean immediately)
transletName
- the translet nameimmediately
- whether forwarding immediatelyboolean isExceptionRaised()
java.lang.Throwable getRaisedException()
java.lang.Throwable getRootCauseOfRaisedException()
java.lang.Class<? extends Translet> getTransletInterfaceClass()
Translet
.java.lang.Class<? extends CoreTranslet> getTransletImplementationClass()
Translet
.boolean acceptsProfiles(java.lang.String... profiles)
profiles
- the profilestrue
if profile is active, otherwise false
<T> T getAspectAdviceBean(java.lang.String aspectId)
T
- the generic typeaspectId
- the aspect id<T> T getBeforeAdviceResult(java.lang.String aspectId)
T
- the generic typeaspectId
- the aspect id<T> T getAfterAdviceResult(java.lang.String aspectId)
T
- the generic typeaspectId
- the aspect id<T> T getAroundAdviceResult(java.lang.String aspectId)
T
- the generic typeaspectId
- the aspect id<T> T getFinallyAdviceResult(java.lang.String aspectId)
T
- the generic typeaspectId
- the aspect idjava.lang.String getMessage(java.lang.String code, java.lang.Object[] args, java.lang.String defaultMessage)
code
- the code to lookup up, such as 'calculator.noRateSet'. Users of
this class are encouraged to base message names on the relevant fully
qualified class name, thus avoiding conflict and ensuring maximum clarity.args
- array of arguments that will be filled in for params within
the message (params look like "{0}", "{1,date}", "{2,time}" within a message),
or null
if none.defaultMessage
- String to return if the lookup failsMessageFormat
java.lang.String getMessage(java.lang.String code, java.lang.Object[] args) throws NoSuchMessageException
code
- the code to lookup up, such as 'calculator.noRateSet'args
- Array of arguments that will be filled in for params within
the message (params look like "{0}", "{1,date}", "{2,time}" within a message),
or null
if none.NoSuchMessageException
- if the message wasn't foundMessageFormat
Copyright © 2008–2018 The Aspectran Project. All rights reserved.