Package com.aspectran.core.support
Class CurrentTransletFactoryBean
- java.lang.Object
-
- com.aspectran.core.support.CurrentTransletFactoryBean
-
- All Implemented Interfaces:
FactoryBean<Translet>,Aware,CurrentActivityAware
@AvoidAdvice public class CurrentTransletFactoryBean extends java.lang.Object implements CurrentActivityAware, FactoryBean<Translet>
CurrentTransletFactoryBeanthat returns theTransletfor the current request. It should be declared as arequestorprototypebean because it is intended to use the value that the currentTranslethas.Created: 2017. 10. 22.
-
-
Field Summary
-
Fields inherited from interface com.aspectran.core.component.bean.ablility.FactoryBean
FACTORY_METHOD_NAME
-
-
Constructor Summary
Constructors Constructor Description CurrentTransletFactoryBean()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetAttributeName()Returns the attribute name of the currentTransletspecified to register in the request scope.TransletgetObject()Return an instance (possibly shared or independent) of the object managed by this factory.booleanisAttributable()Returns whether the currentTransletis registered as an attribute in the request scope.voidsetAttributeName(java.lang.String attributeName)Specifies the attribute name for registering the currentTransletas an attribute in the request scope.voidsetCurrentActivity(Activity activity)
-
-
-
Method Detail
-
isAttributable
public boolean isAttributable()
Returns whether the currentTransletis registered as an attribute in the request scope.- Returns:
- true if the current
Transletis registered as an attribute in the request scope; false otherwise
-
getAttributeName
public java.lang.String getAttributeName()
Returns the attribute name of the currentTransletspecified to register in the request scope.- Returns:
- the attribute name
-
setAttributeName
public void setAttributeName(java.lang.String attributeName)
Specifies the attribute name for registering the currentTransletas an attribute in the request scope.- Parameters:
attributeName- the attribute name of the currentTransletto be registered in the request scope.
-
setCurrentActivity
public void setCurrentActivity(Activity activity)
- Specified by:
setCurrentActivityin interfaceCurrentActivityAware
-
getObject
public Translet getObject() throws java.lang.Exception
Description copied from interface:FactoryBeanReturn 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:
getObjectin interfaceFactoryBean<Translet>- Returns:
- an instance of the bean (can be null)
- Throws:
java.lang.Exception- in case of creation errors
-
-