Class AbstractActivityContextBuilder
- java.lang.Object
-
- com.aspectran.core.context.builder.AbstractActivityContextBuilder
-
- All Implemented Interfaces:
ActivityContextBuilder
- Direct Known Subclasses:
HybridActivityContextBuilder
public abstract class AbstractActivityContextBuilder extends java.lang.Object implements ActivityContextBuilder
-
-
Field Summary
-
Fields inherited from interface com.aspectran.core.context.builder.ActivityContextBuilder
DEBUG_MODE_PROPERTY_NAME, USE_APON_TO_LOAD_XML_PROPERTY_NAME
-
-
Constructor Summary
Constructors Constructor Description AbstractActivityContextBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPropertyItemRule(ItemRuleMap propertyItemRuleMap)protected ActivityContextcreateActivityContext(ContextRuleAssistant assistant)Returns a new instance of ActivityContext.protected ApplicationAdaptercreateApplicationAdapter()protected ContextEnvironmentcreateContextEnvironment()java.lang.String[]getActiveProfiles()AspectranClassLoadergetAspectranClassLoader()AspectranParametersgetAspectranParameters()java.lang.String[]getBasePackages()Returns the base packages to scan for annotated components.java.lang.StringgetBasePath()ContextConfiggetContextConfig()java.lang.String[]getDefaultProfiles()java.lang.StringgetEncoding()ItemRuleMapgetPropertyItemRuleMap()java.lang.String[]getResourceLocations()java.lang.StringgetRootFile()ServiceControllergetServiceController()booleanisDebugMode()booleanisHardReload()protected booleanisUseAponToLoadXml()voidsetActiveProfiles(java.lang.String... activeProfiles)voidsetAspectranParameters(AspectranParameters aspectranParameters)voidsetBasePackages(java.lang.String... basePackages)Sets the base packages to scan for annotated components.voidsetBasePath(java.lang.String basePath)voidsetContextConfig(ContextConfig contextConfig)voidsetDebugMode(boolean debugMode)voidsetDefaultProfiles(java.lang.String... defaultProfiles)voidsetEncoding(java.lang.String encoding)voidsetHardReload(boolean hardReload)voidsetPropertyItemRuleMap(ItemRuleMap propertyItemRuleMap)voidsetResourceLocations(java.lang.String... resourceLocations)voidsetRootFile(java.lang.String rootFile)voidsetServiceController(ServiceController serviceController)voidsetUseAponToLoadXml(boolean useAponToLoadXml)protected voidstartReloadingTimer()protected voidstopReloadingTimer()
-
-
-
Method Detail
-
getContextConfig
public ContextConfig getContextConfig()
- Specified by:
getContextConfigin interfaceActivityContextBuilder
-
getAspectranParameters
public AspectranParameters getAspectranParameters()
- Specified by:
getAspectranParametersin interfaceActivityContextBuilder
-
setAspectranParameters
public void setAspectranParameters(AspectranParameters aspectranParameters)
- Specified by:
setAspectranParametersin interfaceActivityContextBuilder
-
getBasePath
public java.lang.String getBasePath()
- Specified by:
getBasePathin interfaceActivityContextBuilder
-
setBasePath
public void setBasePath(java.lang.String basePath)
- Specified by:
setBasePathin interfaceActivityContextBuilder
-
getRootFile
public java.lang.String getRootFile()
- Specified by:
getRootFilein interfaceActivityContextBuilder
-
setRootFile
public void setRootFile(java.lang.String rootFile)
- Specified by:
setRootFilein interfaceActivityContextBuilder
-
getEncoding
public java.lang.String getEncoding()
- Specified by:
getEncodingin interfaceActivityContextBuilder
-
setEncoding
public void setEncoding(java.lang.String encoding)
- Specified by:
setEncodingin interfaceActivityContextBuilder
-
getResourceLocations
public java.lang.String[] getResourceLocations()
- Specified by:
getResourceLocationsin interfaceActivityContextBuilder
-
setResourceLocations
public void setResourceLocations(java.lang.String... resourceLocations)
- Specified by:
setResourceLocationsin interfaceActivityContextBuilder
-
getBasePackages
public java.lang.String[] getBasePackages()
Description copied from interface:ActivityContextBuilderReturns the base packages to scan for annotated components.- Specified by:
getBasePackagesin interfaceActivityContextBuilder- Returns:
- the base packages
-
setBasePackages
public void setBasePackages(java.lang.String... basePackages)
Description copied from interface:ActivityContextBuilderSets the base packages to scan for annotated components.- Specified by:
setBasePackagesin interfaceActivityContextBuilder- Parameters:
basePackages- the base packages to scan
-
getActiveProfiles
public java.lang.String[] getActiveProfiles()
- Specified by:
getActiveProfilesin interfaceActivityContextBuilder
-
setActiveProfiles
public void setActiveProfiles(java.lang.String... activeProfiles)
- Specified by:
setActiveProfilesin interfaceActivityContextBuilder
-
getDefaultProfiles
public java.lang.String[] getDefaultProfiles()
- Specified by:
getDefaultProfilesin interfaceActivityContextBuilder
-
setDefaultProfiles
public void setDefaultProfiles(java.lang.String... defaultProfiles)
- Specified by:
setDefaultProfilesin interfaceActivityContextBuilder
-
getPropertyItemRuleMap
public ItemRuleMap getPropertyItemRuleMap()
- Specified by:
getPropertyItemRuleMapin interfaceActivityContextBuilder
-
setPropertyItemRuleMap
public void setPropertyItemRuleMap(ItemRuleMap propertyItemRuleMap)
- Specified by:
setPropertyItemRuleMapin interfaceActivityContextBuilder
-
addPropertyItemRule
public void addPropertyItemRule(ItemRuleMap propertyItemRuleMap)
- Specified by:
addPropertyItemRulein interfaceActivityContextBuilder
-
isHardReload
public boolean isHardReload()
- Specified by:
isHardReloadin interfaceActivityContextBuilder
-
setHardReload
public void setHardReload(boolean hardReload)
- Specified by:
setHardReloadin interfaceActivityContextBuilder
-
getServiceController
public ServiceController getServiceController()
- Specified by:
getServiceControllerin interfaceActivityContextBuilder
-
setServiceController
public void setServiceController(ServiceController serviceController)
- Specified by:
setServiceControllerin interfaceActivityContextBuilder
-
getAspectranClassLoader
public AspectranClassLoader getAspectranClassLoader()
- Specified by:
getAspectranClassLoaderin interfaceActivityContextBuilder
-
setContextConfig
public void setContextConfig(ContextConfig contextConfig) throws InvalidResourceException
- Specified by:
setContextConfigin interfaceActivityContextBuilder- Throws:
InvalidResourceException
-
isUseAponToLoadXml
protected boolean isUseAponToLoadXml()
-
setUseAponToLoadXml
public void setUseAponToLoadXml(boolean useAponToLoadXml)
- Specified by:
setUseAponToLoadXmlin interfaceActivityContextBuilder
-
isDebugMode
public boolean isDebugMode()
-
setDebugMode
public void setDebugMode(boolean debugMode)
- Specified by:
setDebugModein interfaceActivityContextBuilder
-
createApplicationAdapter
protected ApplicationAdapter createApplicationAdapter() throws InvalidResourceException
- Throws:
InvalidResourceException
-
createContextEnvironment
protected ContextEnvironment createContextEnvironment()
-
createActivityContext
protected ActivityContext createActivityContext(ContextRuleAssistant assistant) throws BeanReferenceException, IllegalRuleException
Returns a new instance of ActivityContext.- Parameters:
assistant- the context rule assistant- Returns:
- the activity context
- Throws:
BeanReferenceException- will be thrown when cannot resolve reference to beanIllegalRuleException- if an illegal rule is found
-
startReloadingTimer
protected void startReloadingTimer()
-
stopReloadingTimer
protected void stopReloadingTimer()
-
-