Package com.aspectran.core.support
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.
-
Field Summary
Fields inherited from interface com.aspectran.core.component.bean.ablility.FactoryBean
FACTORY_METHOD_NAME
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the attribute name of the currentActivityData
specified to register in the request scope.Return an instance (possibly shared or independent) of the object managed by this factory.boolean
Returns whether the currentActivityData
is registered as an attribute in the request scope.void
setAttributeName
(String attributeName) Specifies the attribute name for registering the currentActivityData
as an attribute in the request scope.void
setCurrentActivity
(Activity activity)
-
Constructor Details
-
CurrentActivityDataFactoryBean
public CurrentActivityDataFactoryBean()
-
-
Method Details
-
isAttributable
public boolean isAttributable()Returns whether the currentActivityData
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
Returns the attribute name of the currentActivityData
specified to register in the request scope.- Returns:
- the attribute name
-
setAttributeName
Specifies the attribute name for registering the currentActivityData
as an attribute in the request scope.- Parameters:
attributeName
- the attribute name of the currentActivityData
to be registered in the request scope.
-
setCurrentActivity
- Specified by:
setCurrentActivity
in interfaceCurrentActivityAware
-
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 interfaceFactoryBean<ActivityData>
- Returns:
- an instance of the bean (can be null)
-