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 class
ThemeAutoImporter.ThemeDocument
protected static class
ThemeAutoImporter.ThemeImportDocument
-
Field Summary
Fields Modifier and Type Field Description protected ApplicationContext
applicationContext
static int
DEFAULT_ORDER
protected CommonAutoDeploymentProperties
deploymentProperties
protected boolean
forceOverwrite
protected org.slf4j.Logger
logger
protected int
order
protected PlatformEngine
platformEngine
protected 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 String
determineLockName()
int
getOrder()
protected List<Theme>
importDocument(ThemeAutoImporter.ThemeImportDocument document)
protected Theme
importTheme(ThemeAutoImporter.ThemeDocument themeDocument, String tenantId, boolean overwrite)
protected void
importThemes()
protected List<Theme>
importThemes(Collection<ThemeAutoImporter.ThemeDocument> themeDocuments, String tenantId, boolean overwrite)
protected void
importThemesInTransaction()
void
onApplicationEvent(ContextRefreshedEvent event)
void
setApplicationContext(ApplicationContext applicationContext)
protected void
setDefaultTheme(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:
setApplicationContext
in interfaceApplicationContextAware
- Throws:
BeansException
-
onApplicationEvent
public void onApplicationEvent(ContextRefreshedEvent event)
- Specified by:
onApplicationEvent
in 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)
-
-