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 void
addPropertyItemRule(ItemRuleMap propertyItemRuleMap)
protected ActivityContext
createActivityContext(ContextRuleAssistant assistant)
Returns a new instance of ActivityContext.protected ApplicationAdapter
createApplicationAdapter()
protected ContextEnvironment
createContextEnvironment()
java.lang.String[]
getActiveProfiles()
AspectranClassLoader
getAspectranClassLoader()
AspectranParameters
getAspectranParameters()
java.lang.String[]
getBasePackages()
Returns the base packages to scan for annotated components.java.lang.String
getBasePath()
ContextConfig
getContextConfig()
java.lang.String[]
getDefaultProfiles()
java.lang.String
getEncoding()
ItemRuleMap
getPropertyItemRuleMap()
java.lang.String[]
getResourceLocations()
java.lang.String
getRootFile()
ServiceController
getServiceController()
boolean
isDebugMode()
boolean
isHardReload()
protected boolean
isUseAponToLoadXml()
void
setActiveProfiles(java.lang.String... activeProfiles)
void
setAspectranParameters(AspectranParameters aspectranParameters)
void
setBasePackages(java.lang.String... basePackages)
Sets the base packages to scan for annotated components.void
setBasePath(java.lang.String basePath)
void
setContextConfig(ContextConfig contextConfig)
void
setDebugMode(boolean debugMode)
void
setDefaultProfiles(java.lang.String... defaultProfiles)
void
setEncoding(java.lang.String encoding)
void
setHardReload(boolean hardReload)
void
setPropertyItemRuleMap(ItemRuleMap propertyItemRuleMap)
void
setResourceLocations(java.lang.String... resourceLocations)
void
setRootFile(java.lang.String rootFile)
void
setServiceController(ServiceController serviceController)
void
setUseAponToLoadXml(boolean useAponToLoadXml)
protected void
startReloadingTimer()
protected void
stopReloadingTimer()
-
-
-
Method Detail
-
getContextConfig
public ContextConfig getContextConfig()
- Specified by:
getContextConfig
in interfaceActivityContextBuilder
-
getAspectranParameters
public AspectranParameters getAspectranParameters()
- Specified by:
getAspectranParameters
in interfaceActivityContextBuilder
-
setAspectranParameters
public void setAspectranParameters(AspectranParameters aspectranParameters)
- Specified by:
setAspectranParameters
in interfaceActivityContextBuilder
-
getBasePath
public java.lang.String getBasePath()
- Specified by:
getBasePath
in interfaceActivityContextBuilder
-
setBasePath
public void setBasePath(java.lang.String basePath)
- Specified by:
setBasePath
in interfaceActivityContextBuilder
-
getRootFile
public java.lang.String getRootFile()
- Specified by:
getRootFile
in interfaceActivityContextBuilder
-
setRootFile
public void setRootFile(java.lang.String rootFile)
- Specified by:
setRootFile
in interfaceActivityContextBuilder
-
getEncoding
public java.lang.String getEncoding()
- Specified by:
getEncoding
in interfaceActivityContextBuilder
-
setEncoding
public void setEncoding(java.lang.String encoding)
- Specified by:
setEncoding
in interfaceActivityContextBuilder
-
getResourceLocations
public java.lang.String[] getResourceLocations()
- Specified by:
getResourceLocations
in interfaceActivityContextBuilder
-
setResourceLocations
public void setResourceLocations(java.lang.String... resourceLocations)
- Specified by:
setResourceLocations
in interfaceActivityContextBuilder
-
getBasePackages
public java.lang.String[] getBasePackages()
Description copied from interface:ActivityContextBuilder
Returns the base packages to scan for annotated components.- Specified by:
getBasePackages
in interfaceActivityContextBuilder
- Returns:
- the base packages
-
setBasePackages
public void setBasePackages(java.lang.String... basePackages)
Description copied from interface:ActivityContextBuilder
Sets the base packages to scan for annotated components.- Specified by:
setBasePackages
in interfaceActivityContextBuilder
- Parameters:
basePackages
- the base packages to scan
-
getActiveProfiles
public java.lang.String[] getActiveProfiles()
- Specified by:
getActiveProfiles
in interfaceActivityContextBuilder
-
setActiveProfiles
public void setActiveProfiles(java.lang.String... activeProfiles)
- Specified by:
setActiveProfiles
in interfaceActivityContextBuilder
-
getDefaultProfiles
public java.lang.String[] getDefaultProfiles()
- Specified by:
getDefaultProfiles
in interfaceActivityContextBuilder
-
setDefaultProfiles
public void setDefaultProfiles(java.lang.String... defaultProfiles)
- Specified by:
setDefaultProfiles
in interfaceActivityContextBuilder
-
getPropertyItemRuleMap
public ItemRuleMap getPropertyItemRuleMap()
- Specified by:
getPropertyItemRuleMap
in interfaceActivityContextBuilder
-
setPropertyItemRuleMap
public void setPropertyItemRuleMap(ItemRuleMap propertyItemRuleMap)
- Specified by:
setPropertyItemRuleMap
in interfaceActivityContextBuilder
-
addPropertyItemRule
public void addPropertyItemRule(ItemRuleMap propertyItemRuleMap)
- Specified by:
addPropertyItemRule
in interfaceActivityContextBuilder
-
isHardReload
public boolean isHardReload()
- Specified by:
isHardReload
in interfaceActivityContextBuilder
-
setHardReload
public void setHardReload(boolean hardReload)
- Specified by:
setHardReload
in interfaceActivityContextBuilder
-
getServiceController
public ServiceController getServiceController()
- Specified by:
getServiceController
in interfaceActivityContextBuilder
-
setServiceController
public void setServiceController(ServiceController serviceController)
- Specified by:
setServiceController
in interfaceActivityContextBuilder
-
getAspectranClassLoader
public AspectranClassLoader getAspectranClassLoader()
- Specified by:
getAspectranClassLoader
in interfaceActivityContextBuilder
-
setContextConfig
public void setContextConfig(ContextConfig contextConfig) throws InvalidResourceException
- Specified by:
setContextConfig
in interfaceActivityContextBuilder
- Throws:
InvalidResourceException
-
isUseAponToLoadXml
protected boolean isUseAponToLoadXml()
-
setUseAponToLoadXml
public void setUseAponToLoadXml(boolean useAponToLoadXml)
- Specified by:
setUseAponToLoadXml
in interfaceActivityContextBuilder
-
isDebugMode
public boolean isDebugMode()
-
setDebugMode
public void setDebugMode(boolean debugMode)
- Specified by:
setDebugMode
in 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()
-
-