Class ThemeAutoImporter
java.lang.Object
com.flowable.platform.engine.impl.configuration.ThemeAutoImporter
- All Implemented Interfaces:
java.util.EventListener,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware,org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>,org.springframework.core.Ordered
public class ThemeAutoImporter
extends java.lang.Object
implements org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>, org.springframework.core.Ordered, org.springframework.context.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 org.springframework.context.ApplicationContextapplicationContextstatic intDEFAULT_ORDERprotected org.flowable.common.spring.CommonAutoDeploymentPropertiesdeploymentPropertiesprotected booleanforceOverwriteprotected org.slf4j.Loggerloggerprotected intorderprotected PlatformEngineplatformEngineprotected java.util.Collection<org.springframework.core.io.Resource>themeResources -
Constructor Summary
Constructors Constructor Description ThemeAutoImporter(PlatformEngine platformEngine, org.flowable.common.spring.CommonAutoDeploymentProperties deploymentProperties, java.util.Collection<org.springframework.core.io.Resource> themeResources, boolean forceOverwrite) -
Method Summary
Modifier and Type Method Description protected java.lang.StringdetermineLockName()intgetOrder()protected java.util.List<Theme>importDocument(ThemeAutoImporter.ThemeImportDocument document)protected ThemeimportTheme(ThemeAutoImporter.ThemeDocument themeDocument, java.lang.String tenantId, boolean overwrite)protected voidimportThemes()protected java.util.List<Theme>importThemes(java.util.Collection<ThemeAutoImporter.ThemeDocument> themeDocuments, java.lang.String tenantId, boolean overwrite)protected voidimportThemesInTransaction()voidonApplicationEvent(org.springframework.context.event.ContextRefreshedEvent event)voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext)protected voidsetDefaultTheme(java.lang.String defaultTheme, java.lang.String tenantId, boolean overwrite)
-
Field Details
-
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
-
deploymentProperties
protected final org.flowable.common.spring.CommonAutoDeploymentProperties deploymentProperties -
themeResources
protected final java.util.Collection<org.springframework.core.io.Resource> themeResources -
forceOverwrite
protected final boolean forceOverwrite -
applicationContext
protected org.springframework.context.ApplicationContext applicationContext
-
-
Constructor Details
-
ThemeAutoImporter
public ThemeAutoImporter(PlatformEngine platformEngine, org.flowable.common.spring.CommonAutoDeploymentProperties deploymentProperties, java.util.Collection<org.springframework.core.io.Resource> themeResources, boolean forceOverwrite)
-
-
Method Details
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException- Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
getOrder
public int getOrder()- Specified by:
getOrderin interfaceorg.springframework.core.Ordered
-
onApplicationEvent
public void onApplicationEvent(org.springframework.context.event.ContextRefreshedEvent event)- Specified by:
onApplicationEventin interfaceorg.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>
-
determineLockName
protected java.lang.String determineLockName() -
importThemes
protected void importThemes() -
importThemesInTransaction
protected void importThemesInTransaction() -
importDocument
-
setDefaultTheme
protected void setDefaultTheme(java.lang.String defaultTheme, java.lang.String tenantId, boolean overwrite) -
importThemes
protected java.util.List<Theme> importThemes(java.util.Collection<ThemeAutoImporter.ThemeDocument> themeDocuments, java.lang.String tenantId, boolean overwrite) -
importTheme
protected Theme importTheme(ThemeAutoImporter.ThemeDocument themeDocument, java.lang.String tenantId, boolean overwrite)
-