Class CurrentTransletFactoryBean

java.lang.Object
com.aspectran.core.support.CurrentTransletFactoryBean
All Implemented Interfaces:
FactoryBean<Translet>, Aware, CurrentActivityAware

@AvoidAdvice public class CurrentTransletFactoryBean extends Object implements CurrentActivityAware, FactoryBean<Translet>
CurrentTransletFactoryBean that returns the Translet for the current request. It should be declared as a request or prototype bean because it is intended to use the value that the current Translet has.

Created: 2017. 10. 22.

  • Constructor Details

    • CurrentTransletFactoryBean

      public CurrentTransletFactoryBean()
  • Method Details

    • isAttributable

      public boolean isAttributable()
      Returns whether the current Translet is registered as an attribute in the request scope.
      Returns:
      true if the current Translet is registered as an attribute in the request scope; false otherwise
    • getAttributeName

      public String getAttributeName()
      Returns the attribute name of the current Translet specified to register in the request scope.
      Returns:
      the attribute name
    • setAttributeName

      public void setAttributeName(String attributeName)
      Specifies the attribute name for registering the current Translet as an attribute in the request scope.
      Parameters:
      attributeName - the attribute name of the current Translet to be registered in the request scope.
    • setCurrentActivity

      public void setCurrentActivity(@NonNull Activity activity)
      Specified by:
      setCurrentActivity in interface CurrentActivityAware
    • getObject

      public Translet getObject() throws Exception
      Description copied from interface: FactoryBean
      Return an instance (possibly shared or independent) of the object managed by this factory. As with a BeanFactory, this allows support for both the Singleton and Prototype design pattern.
      Specified by:
      getObject in interface FactoryBean<Translet>
      Returns:
      an instance of the bean (can be null)
      Throws:
      Exception - in case of creation errors