Class 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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <V> V execute​(java.util.concurrent.Callable<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, com.aspectran.core.activity.request.ParameterMap parameterMap)
      Renders the template with the given parameters.
      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)
      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.
      com.aspectran.core.activity.Translet translate​(java.lang.String name)
      Executes the translet.
      com.aspectran.core.activity.Translet translate​(java.lang.String name, com.aspectran.core.activity.request.ParameterMap parameterMap)
      Executes the translet with the given parameters.
      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)
      Executes the translet with the given parameters and attributes.
      com.aspectran.core.activity.Translet translate​(java.lang.String name, com.aspectran.core.context.rule.type.MethodType method)
      Executes the translet without the supplied variables.
      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)
      Executes the translet with the given parameters.
      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)
      Executes the translet with the given parameters and attributes.
      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)
      Executes the translet with the given attributes.
      com.aspectran.core.activity.Translet translate​(java.lang.String name, java.lang.String body)
      Executes the translet.
      com.aspectran.core.activity.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.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
    • Constructor Detail

      • DefaultEmbeddedAspectran

        public DefaultEmbeddedAspectran()
    • Method Detail

      • execute

        public <V> V execute​(java.util.concurrent.Callable<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 com.aspectran.core.activity.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 com.aspectran.core.activity.Translet translate​(java.lang.String name,
                                                              java.lang.String body)
        Description copied from interface: EmbeddedAspectran
        Executes the translet.
        Parameters:
        name - the translet name
        body - the request body
        Returns:
        the Translet object
      • translate

        public com.aspectran.core.activity.Translet translate​(java.lang.String name,
                                                              com.aspectran.core.activity.request.ParameterMap parameterMap)
        Description copied from interface: EmbeddedAspectran
        Executes the translet with the given parameters.
        Parameters:
        name - the translet name
        parameterMap - the parameter map
        Returns:
        the Translet object
      • 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: EmbeddedAspectran
        Executes the translet with the given parameters and attributes.
        Parameters:
        name - the translet name
        parameterMap - the parameter map
        attributeMap - the attribute map
        Returns:
        the Translet object
      • 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: EmbeddedAspectran
        Executes the translet with the given parameters.
        Parameters:
        name - the translet name
        attributeMap - the attribute map
        Returns:
        the Translet object
      • translate

        public com.aspectran.core.activity.Translet translate​(java.lang.String name,
                                                              com.aspectran.core.context.rule.type.MethodType method)
        Description copied from interface: EmbeddedAspectran
        Executes the translet without the supplied variables.
        Parameters:
        name - the translet name
        method - the request method
        Returns:
        the Translet object
      • 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: EmbeddedAspectran
        Executes the translet with the given parameters.
        Parameters:
        name - the translet name
        method - the request method
        parameterMap - the parameter map
        Returns:
        the Translet object
      • 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: EmbeddedAspectran
        Executes the translet with the given attributes.
        Parameters:
        name - the translet name
        method - the request method
        attributeMap - the attribute map
        Returns:
        the Translet object
      • 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: EmbeddedAspectran
        Executes the translet with the given parameters and attributes.
        Parameters:
        name - the translet name
        method - the request method
        parameterMap - the parameter map
        attributeMap - the attribute map
        body - 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,
                                       com.aspectran.core.activity.request.ParameterMap parameterMap)
        Description copied from interface: EmbeddedAspectran
        Renders the template with the given parameters.
        Parameters:
        templateId - the template id
        parameterMap - 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 id
        attributeMap - 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: EmbeddedAspectran
        Renders the template with the given parameters and attributes.
        Parameters:
        templateId - the template id
        parameterMap - the parameter map
        attributeMap - the attribute map
        Returns:
        the output string of the template