@Component public class PersistentTermInitializer extends DefaultTermInitializer
IVocabularyStore
.
To initialize the store the TermLoader
and the IVocabularyStore
are injected via spring and the initializeTerms method is called as an init-method (@PostConstruct).Modifier and Type | Field and Description |
---|---|
protected org.springframework.transaction.PlatformTransactionManager |
transactionManager |
protected org.springframework.transaction.support.DefaultTransactionDefinition |
txDefinition |
protected ITermVocabularyDao |
vocabularyDao |
termLoader
Constructor and Description |
---|
PersistentTermInitializer() |
Modifier and Type | Method and Description |
---|---|
void |
doInitialize() |
void |
initialize()
Initializes the IVocabularStore by making sure that all basic terms that are
loaded by the TermLoader are available afterwards.
|
protected void |
initializeAndStore(VocabularyEnum vocType,
java.util.Map<java.util.UUID,DefinedTermBase> terms,
java.util.Map<java.util.UUID,TermVocabulary<?>> vocabularyMap)
Initializes the static fields of the
TermVocabulary classes. |
boolean |
isOmit() |
void |
setOmit(boolean omit) |
void |
setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager) |
void |
setVocabularyDao(ITermVocabularyDao vocabularyDao) |
setDefinedTerms
protected ITermVocabularyDao vocabularyDao
protected org.springframework.transaction.PlatformTransactionManager transactionManager
protected org.springframework.transaction.support.DefaultTransactionDefinition txDefinition
public void setOmit(boolean omit)
setOmit
in class DefaultTermInitializer
public boolean isOmit()
isOmit
in class DefaultTermInitializer
@Autowired public void setVocabularyDao(ITermVocabularyDao vocabularyDao)
@Autowired public void setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)
@PostConstruct public void initialize()
ITermInitializer
initialize
in interface ITermInitializer
initialize
in class DefaultTermInitializer
public void doInitialize()
doInitialize
in class DefaultTermInitializer
protected void initializeAndStore(VocabularyEnum vocType, java.util.Map<java.util.UUID,DefinedTermBase> terms, java.util.Map<java.util.UUID,TermVocabulary<?>> vocabularyMap)
TermVocabulary
classes.clazz
- the Class
of the vocabularyvocabularyUuid
- the UUID
of the vocabularyterms
- a Map
containing all already
loaded terms with their UUID
as keyvocabularyMap
- Copyright © 2007-2020 EDIT. All Rights Reserved.