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:
com.aspectran.core.service.CoreService,com.aspectran.core.service.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> Vexecute(java.util.concurrent.Callable<V> instantAction)Executes an instant activity.java.lang.Stringrender(java.lang.String templateId)Renders the template without the supplied variables.java.lang.Stringrender(java.lang.String templateId, com.aspectran.core.activity.request.ParameterMap parameterMap)Renders the template with the given parameters.java.lang.Stringrender(java.lang.String templateId, com.aspectran.core.activity.request.ParameterMap parameterMap, java.util.Map<java.lang.String,java.lang.Object> attributeMap)Renders the template with the given parameters and attributes.java.lang.Stringrender(java.lang.String templateId, java.util.Map<java.lang.String,java.lang.Object> attributeMap)Renders the template with the given attributes.com.aspectran.core.activity.Translettranslate(java.lang.String name)Executes the translet.com.aspectran.core.activity.Translettranslate(java.lang.String name, com.aspectran.core.activity.request.ParameterMap parameterMap)Executes the translet with the given parameters.com.aspectran.core.activity.Translettranslate(java.lang.String name, com.aspectran.core.activity.request.ParameterMap parameterMap, java.util.Map<java.lang.String,java.lang.Object> attributeMap)Executes the translet with the given parameters and attributes.com.aspectran.core.activity.Translettranslate(java.lang.String name, com.aspectran.core.context.rule.type.MethodType method)Executes the translet without the supplied variables.com.aspectran.core.activity.Translettranslate(java.lang.String name, com.aspectran.core.context.rule.type.MethodType method, com.aspectran.core.activity.request.ParameterMap parameterMap)Executes the translet with the given parameters.com.aspectran.core.activity.Translettranslate(java.lang.String name, com.aspectran.core.context.rule.type.MethodType method, com.aspectran.core.activity.request.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.com.aspectran.core.activity.Translettranslate(java.lang.String name, com.aspectran.core.context.rule.type.MethodType method, java.util.Map<java.lang.String,java.lang.Object> attributeMap)Executes the translet with the given attributes.com.aspectran.core.activity.Translettranslate(java.lang.String name, java.lang.String body)Executes the translet.com.aspectran.core.activity.Translettranslate(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
destroySessionManager, 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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.aspectran.core.service.CoreService
getActivityContext, getAspectranClassLoader, getAspectranConfig, getBasePath, getDefaultActivity, getSchedulerService, getServiceController, isDerived, isHardReload, isLateStart, joinDerivedService, leaveFromRootService, withdrawDerivedService
-
-
-
-
Method Detail
-
execute
public <V> V execute(java.util.concurrent.Callable<V> instantAction)
Description copied from interface:EmbeddedAspectranExecutes an instant activity.- Parameters:
instantAction- the instant action- Returns:
- An object that is the result of performing an instant activity
-
translate
public com.aspectran.core.activity.Translet translate(java.lang.String name)
Description copied from interface:EmbeddedAspectranExecutes the translet.- Parameters:
name- the translet name- Returns:
- the
Transletobject
-
translate
public com.aspectran.core.activity.Translet translate(java.lang.String name, java.lang.String body)Description copied from interface:EmbeddedAspectranExecutes the translet.- Parameters:
name- the translet namebody- the request body- Returns:
- the
Transletobject
-
translate
public com.aspectran.core.activity.Translet translate(java.lang.String name, com.aspectran.core.activity.request.ParameterMap parameterMap)Description copied from interface:EmbeddedAspectranExecutes the translet with the given parameters.- Parameters:
name- the translet nameparameterMap- the parameter map- Returns:
- the
Transletobject
-
translate
public com.aspectran.core.activity.Translet translate(java.lang.String name, com.aspectran.core.activity.request.ParameterMap parameterMap, java.util.Map<java.lang.String,java.lang.Object> attributeMap)Description copied from interface:EmbeddedAspectranExecutes the translet with the given parameters and attributes.- Parameters:
name- the translet nameparameterMap- the parameter mapattributeMap- the attribute map- Returns:
- the
Transletobject
-
translate
public com.aspectran.core.activity.Translet translate(java.lang.String name, java.util.Map<java.lang.String,java.lang.Object> attributeMap)Description copied from interface:EmbeddedAspectranExecutes the translet with the given parameters.- Parameters:
name- the translet nameattributeMap- the attribute map- Returns:
- the
Transletobject
-
translate
public com.aspectran.core.activity.Translet translate(java.lang.String name, com.aspectran.core.context.rule.type.MethodType method)Description copied from interface:EmbeddedAspectranExecutes the translet without the supplied variables.- Parameters:
name- the translet namemethod- the request method- Returns:
- the
Transletobject
-
translate
public com.aspectran.core.activity.Translet translate(java.lang.String name, com.aspectran.core.context.rule.type.MethodType method, com.aspectran.core.activity.request.ParameterMap parameterMap)Description copied from interface:EmbeddedAspectranExecutes the translet with the given parameters.- Parameters:
name- the translet namemethod- the request methodparameterMap- the parameter map- Returns:
- the
Transletobject
-
translate
public com.aspectran.core.activity.Translet translate(java.lang.String name, com.aspectran.core.context.rule.type.MethodType method, java.util.Map<java.lang.String,java.lang.Object> attributeMap)Description copied from interface:EmbeddedAspectranExecutes the translet with the given attributes.- Parameters:
name- the translet namemethod- the request methodattributeMap- the attribute map- Returns:
- the
Transletobject
-
translate
public com.aspectran.core.activity.Translet translate(java.lang.String name, com.aspectran.core.context.rule.type.MethodType method, com.aspectran.core.activity.request.ParameterMap parameterMap, java.util.Map<java.lang.String,java.lang.Object> attributeMap, java.lang.String body)Description copied from interface:EmbeddedAspectranExecutes 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
Transletobject
-
render
public java.lang.String render(java.lang.String templateId)
Description copied from interface:EmbeddedAspectranRenders 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, com.aspectran.core.activity.request.ParameterMap parameterMap)Description copied from interface:EmbeddedAspectranRenders 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:EmbeddedAspectranRenders 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, com.aspectran.core.activity.request.ParameterMap parameterMap, java.util.Map<java.lang.String,java.lang.Object> attributeMap)Description copied from interface:EmbeddedAspectranRenders 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
-
-