@ApplicationScoped public class DeploymentScanner extends Object implements org.jboss.dashboard.annotation.Startable
This class implements the deployment scanner for dashbuilder webapp.
This class reads the files present in a given folder at startup and import all the assets found, such as:
datasource
kpis
workspace
The default directory to scan at startup is WEB-INF/deployments
.
You can change the default directory to scan by the system property -DdeploymentFolder
.
Modifier and Type | Field and Description |
---|---|
protected File |
baseAppDirectory |
protected String |
deploymentFolder |
protected static String |
INITIAL_MODULES_NAMESPACE_DATASOURCE |
protected static String |
INITIAL_MODULES_NAMESPACE_KPI |
protected static String |
INITIAL_MODULES_NAMESPACE_WORKSPACE |
protected org.jboss.dashboard.initialModule.InitialModuleRegistry |
initialModuleRegistry |
protected org.slf4j.Logger |
log |
protected static int |
VERSION |
Constructor and Description |
---|
DeploymentScanner() |
Modifier and Type | Method and Description |
---|---|
protected void |
doDeployDataSources()
Look into the deployment directory and processes any datasource definition file found.
|
protected void |
doDeployKPIs()
Look into the deployment directory and processes any kpi or datasource definition file found.
|
protected void |
doDeployWorkspaces()
Look into the deployment directory and processes any workspace definition file found.
|
org.jboss.dashboard.annotation.Priority |
getPriority() |
protected String |
getRelativePathtoWebappBase(String path)
Given an absolute path returns the relative path from the webapp base path.
|
void |
init() |
protected String |
removeExtension(String fileName)
Return the file name without the extension suffix.
|
void |
start() |
protected static final String INITIAL_MODULES_NAMESPACE_KPI
protected static final String INITIAL_MODULES_NAMESPACE_WORKSPACE
protected static final String INITIAL_MODULES_NAMESPACE_DATASOURCE
protected static final int VERSION
@Inject protected transient org.slf4j.Logger log
@Inject protected String deploymentFolder
protected File baseAppDirectory
@Inject protected org.jboss.dashboard.initialModule.InitialModuleRegistry initialModuleRegistry
@PostConstruct public void init()
public org.jboss.dashboard.annotation.Priority getPriority()
getPriority
in interface org.jboss.dashboard.annotation.Startable
public void start() throws Exception
start
in interface org.jboss.dashboard.annotation.Startable
Exception
protected void doDeployDataSources()
protected void doDeployKPIs()
protected void doDeployWorkspaces()
protected String removeExtension(String fileName)
fileName
- The file name.Copyright © 2012-2015 JBoss by Red Hat. All Rights Reserved.