Class ThemeAutoImporter
- java.lang.Object
-
- com.flowable.platform.engine.impl.configuration.ThemeAutoImporter
-
- All Implemented Interfaces:
EventListener,Aware,ApplicationContextAware,ApplicationListener<ContextRefreshedEvent>,Ordered
public class ThemeAutoImporter extends Object implements ApplicationListener<ContextRefreshedEvent>, Ordered, ApplicationContextAware
- Author:
- Filip Hrisafov
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classThemeAutoImporter.ThemeDocumentprotected static classThemeAutoImporter.ThemeImportDocument
-
Field Summary
Fields Modifier and Type Field Description protected ApplicationContextapplicationContextstatic intDEFAULT_ORDERprotected CommonAutoDeploymentPropertiesdeploymentPropertiesprotected booleanforceOverwriteprotected org.slf4j.Loggerloggerprotected intorderprotected PlatformEngineplatformEngineprotected Collection<Resource>themeResources-
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
-
Constructor Summary
Constructors Constructor Description ThemeAutoImporter(PlatformEngine platformEngine, CommonAutoDeploymentProperties deploymentProperties, Collection<Resource> themeResources, boolean forceOverwrite)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringdetermineLockName()intgetOrder()protected List<Theme>importDocument(ThemeAutoImporter.ThemeImportDocument document)protected ThemeimportTheme(ThemeAutoImporter.ThemeDocument themeDocument, String tenantId, boolean overwrite)protected voidimportThemes()protected List<Theme>importThemes(Collection<ThemeAutoImporter.ThemeDocument> themeDocuments, String tenantId, boolean overwrite)protected voidimportThemesInTransaction()voidonApplicationEvent(ContextRefreshedEvent event)voidsetApplicationContext(ApplicationContext applicationContext)protected voidsetDefaultTheme(String defaultTheme, String tenantId, boolean overwrite)
-
-
-
Field Detail
-
DEFAULT_ORDER
public static final int DEFAULT_ORDER
- See Also:
- Constant Field Values
-
order
protected int order
-
logger
protected final org.slf4j.Logger logger
-
platformEngine
protected final PlatformEngine platformEngine
-
deploymentProperties
protected final CommonAutoDeploymentProperties deploymentProperties
-
themeResources
protected final Collection<Resource> themeResources
-
forceOverwrite
protected final boolean forceOverwrite
-
applicationContext
protected ApplicationContext applicationContext
-
-
Constructor Detail
-
ThemeAutoImporter
public ThemeAutoImporter(PlatformEngine platformEngine, CommonAutoDeploymentProperties deploymentProperties, Collection<Resource> themeResources, boolean forceOverwrite)
-
-
Method Detail
-
setApplicationContext
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException
- Specified by:
setApplicationContextin interfaceApplicationContextAware- Throws:
BeansException
-
onApplicationEvent
public void onApplicationEvent(ContextRefreshedEvent event)
- Specified by:
onApplicationEventin interfaceApplicationListener<ContextRefreshedEvent>
-
determineLockName
protected String determineLockName()
-
importThemes
protected void importThemes()
-
importThemesInTransaction
protected void importThemesInTransaction()
-
importDocument
protected List<Theme> importDocument(ThemeAutoImporter.ThemeImportDocument document)
-
setDefaultTheme
protected void setDefaultTheme(String defaultTheme, String tenantId, boolean overwrite)
-
importThemes
protected List<Theme> importThemes(Collection<ThemeAutoImporter.ThemeDocument> themeDocuments, String tenantId, boolean overwrite)
-
importTheme
protected Theme importTheme(ThemeAutoImporter.ThemeDocument themeDocument, String tenantId, boolean overwrite)
-
-