public class ThemeAutoImporter extends Object implements ApplicationListener<ContextRefreshedEvent>, Ordered, ApplicationContextAware
Modifier and Type | Class and Description |
---|---|
protected static class |
ThemeAutoImporter.ThemeDocument |
protected static class |
ThemeAutoImporter.ThemeImportDocument |
Modifier and Type | Field and 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 |
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Constructor and Description |
---|
ThemeAutoImporter(PlatformEngine platformEngine,
CommonAutoDeploymentProperties deploymentProperties,
Collection<Resource> themeResources,
boolean forceOverwrite) |
Modifier and Type | Method and 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) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forPayload
public static final int DEFAULT_ORDER
protected int order
protected final org.slf4j.Logger logger
protected final PlatformEngine platformEngine
protected final CommonAutoDeploymentProperties deploymentProperties
protected final Collection<Resource> themeResources
protected final boolean forceOverwrite
protected ApplicationContext applicationContext
public ThemeAutoImporter(PlatformEngine platformEngine, CommonAutoDeploymentProperties deploymentProperties, Collection<Resource> themeResources, boolean forceOverwrite)
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException
setApplicationContext
in interface ApplicationContextAware
BeansException
public void onApplicationEvent(ContextRefreshedEvent event)
onApplicationEvent
in interface ApplicationListener<ContextRefreshedEvent>
protected String determineLockName()
protected void importThemes()
protected void importThemesInTransaction()
protected List<Theme> importDocument(ThemeAutoImporter.ThemeImportDocument document)
protected void setDefaultTheme(String defaultTheme, String tenantId, boolean overwrite)
protected List<Theme> importThemes(Collection<ThemeAutoImporter.ThemeDocument> themeDocuments, String tenantId, boolean overwrite)
protected Theme importTheme(ThemeAutoImporter.ThemeDocument themeDocument, String tenantId, boolean overwrite)