Class AbstractApplicationContextHolderStrategy
-
- All Implemented Interfaces:
-
io.github.funofprograming.context.ApplicationContextHolderStrategy
public abstract class AbstractApplicationContextHolderStrategy implements ApplicationContextHolderStrategy
-
-
Constructor Summary
Constructors Constructor Description AbstractApplicationContextHolderStrategy()
-
Method Summary
Modifier and Type Method Description ApplicationContextgetContext(String name)Get a context for given name. ApplicationContextgetContext(String name, Set<Key<?>> permittedKeys)Same as getContext but with permittedKeys. UnitsetContext(ApplicationContext applicationContext){@inheritDoc} ApplicationContextclearContext(String name){@inheritDoc} BooleanexistsContext(String name, Set<Key<?>> permittedKeys)Check if context with given name and permittedKeys exists in this context holder strategy -
-
Method Detail
-
getContext
ApplicationContext getContext(String name)
Get a context for given name. If not available then create one, set in holder and return back.
-
getContext
ApplicationContext getContext(String name, Set<Key<?>> permittedKeys)
Same as getContext but with permittedKeys. If context already exist with different set of keys then this method should throw InvalidKeyException
-
setContext
Unit setContext(ApplicationContext applicationContext)
{@inheritDoc}
-
clearContext
ApplicationContext clearContext(String name)
{@inheritDoc}
-
existsContext
Boolean existsContext(String name, Set<Key<?>> permittedKeys)
Check if context with given name and permittedKeys exists in this context holder strategy
-
-
-
-