Class CurrentActivityDataFactoryBean

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

@AvoidAdvice public class CurrentActivityDataFactoryBean extends Object implements CurrentActivityAware, FactoryBean<ActivityData>
CurrentActivityDataFactoryBean that returns the ActivityData 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. 24.

  • Constructor Details

    • CurrentActivityDataFactoryBean

      public CurrentActivityDataFactoryBean()
  • Method Details

    • isAttributable

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

      public String getAttributeName()
      Returns the attribute name of the current ActivityData 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 ActivityData as an attribute in the request scope.
      Parameters:
      attributeName - the attribute name of the current ActivityData to be registered in the request scope.
    • setCurrentActivity

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

      public ActivityData getObject()
      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<ActivityData>
      Returns:
      an instance of the bean (can be null)