Package com.aspectran.embed.service
Class DefaultEmbeddedAspectran
- java.lang.Object
-
- com.aspectran.core.service.AbstractServiceController
-
- com.aspectran.core.service.AbstractCoreService
-
- com.aspectran.core.service.AspectranCoreService
-
- com.aspectran.embed.service.AbstractEmbeddedAspectran
-
- com.aspectran.embed.service.DefaultEmbeddedAspectran
-
- All Implemented Interfaces:
CoreService
,ServiceController
,EmbeddedAspectran
public class DefaultEmbeddedAspectran extends AbstractEmbeddedAspectran
Provides an interface that can be used by embedding Aspectran in Java applications.- Since:
- 3.0.0
-
-
Constructor Summary
Constructors Constructor Description DefaultEmbeddedAspectran()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <V> V
execute(InstantAction<V> instantAction)
Executes an instant activity.java.lang.String
render(java.lang.String templateId)
Renders the template without the supplied variables.java.lang.String
render(java.lang.String templateId, ParameterMap parameterMap)
Renders the template with the given parameters.java.lang.String
render(java.lang.String templateId, ParameterMap parameterMap, java.util.Map<java.lang.String,java.lang.Object> attributeMap)
Renders the template with the given parameters and attributes.java.lang.String
render(java.lang.String templateId, java.util.Map<java.lang.String,java.lang.Object> attributeMap)
Renders the template with the given attributes.Translet
translate(java.lang.String name)
Executes the translet.Translet
translate(java.lang.String name, ParameterMap parameterMap)
Executes the translet with the given parameters.Translet
translate(java.lang.String name, ParameterMap parameterMap, java.util.Map<java.lang.String,java.lang.Object> attributeMap)
Executes the translet with the given parameters and attributes.Translet
translate(java.lang.String name, MethodType method)
Executes the translet without the supplied variables.Translet
translate(java.lang.String name, MethodType method, ParameterMap parameterMap)
Executes the translet with the given parameters.Translet
translate(java.lang.String name, MethodType method, ParameterMap parameterMap, java.util.Map<java.lang.String,java.lang.Object> attributeMap, java.lang.String body)
Executes the translet with the given parameters and attributes.Translet
translate(java.lang.String name, MethodType method, java.util.Map<java.lang.String,java.lang.Object> attributeMap)
Executes the translet with the given attributes.Translet
translate(java.lang.String name, java.lang.String body)
Executes the translet.Translet
translate(java.lang.String name, java.util.Map<java.lang.String,java.lang.Object> attributeMap)
Executes the translet with the given parameters.-
Methods inherited from class com.aspectran.embed.service.AbstractEmbeddedAspectran
containsBean, containsBean, containsBean, destroySessionManager, getBean, getBean, getBean, getEnvironment, getMessage, getMessage, initSessionManager, isExposable, newSessionAdapter, release
-
Methods inherited from class com.aspectran.core.service.AspectranCoreService
afterContextLoaded, beforeContextDestroy, doPause, doPause, doResume, doStart, doStop
-
Methods inherited from class com.aspectran.core.service.AbstractCoreService
destroyActivityContext, determineBasePath, getActivityContext, getAspectranClassLoader, getAspectranConfig, getBasePath, getDefaultActivity, getSchedulerService, getServiceController, isDerived, isHardReload, isLateStart, joinDerivedService, leaveFromRootService, loadActivityContext, prepare, setActivityContext, setBasePath, setExposals, withdrawDerivedService
-
Methods inherited from class com.aspectran.core.service.AbstractServiceController
clearDerivedService, getLock, getServiceName, isActive, isBusy, joinDerivedService, pause, pause, restart, restart, resume, setServiceStateListener, start, stop, withdrawDerivedService
-
-
-
-
Method Detail
-
execute
public <V> V execute(InstantAction<V> instantAction)
Description copied from interface:EmbeddedAspectran
Executes an instant activity.- Parameters:
instantAction
- the instant action- Returns:
- An object that is the result of performing an instant activity
-
translate
public Translet translate(java.lang.String name)
Description copied from interface:EmbeddedAspectran
Executes the translet.- Parameters:
name
- the translet name- Returns:
- the
Translet
object
-
translate
public Translet translate(java.lang.String name, java.lang.String body)
Description copied from interface:EmbeddedAspectran
Executes the translet.- Parameters:
name
- the translet namebody
- the request body- Returns:
- the
Translet
object
-
translate
public Translet translate(java.lang.String name, ParameterMap parameterMap)
Description copied from interface:EmbeddedAspectran
Executes the translet with the given parameters.- Parameters:
name
- the translet nameparameterMap
- the parameter map- Returns:
- the
Translet
object
-
translate
public Translet translate(java.lang.String name, ParameterMap parameterMap, java.util.Map<java.lang.String,java.lang.Object> attributeMap)
Description copied from interface:EmbeddedAspectran
Executes the translet with the given parameters and attributes.- Parameters:
name
- the translet nameparameterMap
- the parameter mapattributeMap
- the attribute map- Returns:
- the
Translet
object
-
translate
public Translet translate(java.lang.String name, java.util.Map<java.lang.String,java.lang.Object> attributeMap)
Description copied from interface:EmbeddedAspectran
Executes the translet with the given parameters.- Parameters:
name
- the translet nameattributeMap
- the attribute map- Returns:
- the
Translet
object
-
translate
public Translet translate(java.lang.String name, MethodType method)
Description copied from interface:EmbeddedAspectran
Executes the translet without the supplied variables.- Parameters:
name
- the translet namemethod
- the request method- Returns:
- the
Translet
object
-
translate
public Translet translate(java.lang.String name, MethodType method, ParameterMap parameterMap)
Description copied from interface:EmbeddedAspectran
Executes the translet with the given parameters.- Parameters:
name
- the translet namemethod
- the request methodparameterMap
- the parameter map- Returns:
- the
Translet
object
-
translate
public Translet translate(java.lang.String name, MethodType method, java.util.Map<java.lang.String,java.lang.Object> attributeMap)
Description copied from interface:EmbeddedAspectran
Executes the translet with the given attributes.- Parameters:
name
- the translet namemethod
- the request methodattributeMap
- the attribute map- Returns:
- the
Translet
object
-
translate
public Translet translate(java.lang.String name, MethodType method, ParameterMap parameterMap, java.util.Map<java.lang.String,java.lang.Object> attributeMap, java.lang.String body)
Description copied from interface:EmbeddedAspectran
Executes the translet with the given parameters and attributes.- Parameters:
name
- the translet namemethod
- the request methodparameterMap
- the parameter mapattributeMap
- the attribute mapbody
- the request body- Returns:
- the
Translet
object
-
render
public java.lang.String render(java.lang.String templateId)
Description copied from interface:EmbeddedAspectran
Renders the template without the supplied variables.- Parameters:
templateId
- the template id- Returns:
- the output string of the template
-
render
public java.lang.String render(java.lang.String templateId, ParameterMap parameterMap)
Description copied from interface:EmbeddedAspectran
Renders the template with the given parameters.- Parameters:
templateId
- the template idparameterMap
- the parameter map- Returns:
- the output string of the template
-
render
public java.lang.String render(java.lang.String templateId, java.util.Map<java.lang.String,java.lang.Object> attributeMap)
Description copied from interface:EmbeddedAspectran
Renders the template with the given attributes.- Parameters:
templateId
- the template idattributeMap
- the attribute map- Returns:
- the output string of the template
-
render
public java.lang.String render(java.lang.String templateId, ParameterMap parameterMap, java.util.Map<java.lang.String,java.lang.Object> attributeMap)
Description copied from interface:EmbeddedAspectran
Renders the template with the given parameters and attributes.- Parameters:
templateId
- the template idparameterMap
- the parameter mapattributeMap
- the attribute map- Returns:
- the output string of the template
-
-