public final class ApplicationManager extends Object implements ApplicationManagerService
| Modifier and Type | Method and Description |
|---|---|
void |
addCarbonApp(String tenantId,
CarbonApplication carbonApp)
Add a new cApp for a particular tenant.
|
void |
addFaultyCarbonApp(String tenantId,
String carbonApp,
Exception error)
Add a new faulty cApp for a particular tenant.
|
Artifact |
buildAppArtifact(CarbonApplication parentApp,
InputStream artifactXmlStream)
Builds the artifact from the given input steam and adds it as a dependency in the provided
parent carbon application.
|
void |
buildDependencyTree(Artifact rootArtifact,
List<Artifact> allArtifacts)
If the given artifact is a dependent artifact for the rootArtifact, include it as
the actual dependency.
|
void |
cleanupCarbonApps(org.apache.axis2.engine.AxisConfiguration axisConfig) |
void |
deployCarbonApp(String archPath,
org.apache.axis2.engine.AxisConfiguration axisConfig)
Deploy a single app by iterating all handlers and sending apps through the handler
chain..
|
ArrayList<CarbonApplication> |
getCarbonApps(String tenantId)
Get the list of CarbonApplications for the give tenant id.
|
HashMap<String,Exception> |
getFaultyCarbonApps(String tenantId)
Get the list of faulty CarbonApplications for the give tenant id.
|
static ApplicationManager |
getInstance()
ApplicationManager is singleton.
|
CarbonAppPersistenceManager |
getPersistenceManager(org.apache.axis2.engine.AxisConfiguration axisConfig)
Retuns the persistence manger for the given axis config (tenant).
|
void |
init() |
void |
registerDeploymentHandler(AppDeploymentHandler handler)
All app deployers register their deployers throgh this method
|
void |
removeCarbonApp(String tenantId,
CarbonApplication carbonApp)
Remove a cApp for a particular tenant
|
void |
removeFaultyCarbonApp(String tenantId,
String appFilePath)
Remove a faulty cApp for a particular tenant
|
void |
undeployCarbonApp(CarbonApplication carbonApp,
org.apache.axis2.engine.AxisConfiguration axisConfig)
Undeploy the provided carbon App by sending it through the registered undeployment handler
chain..
|
void |
unregisterDeploymentHandler(AppDeploymentHandler handler)
Unregister the specified handler if it is already regitered
|
public void init()
public static ApplicationManager getInstance()
public void registerDeploymentHandler(AppDeploymentHandler handler)
registerDeploymentHandler in interface ApplicationManagerServicehandler - - app deployer which implements the AppDeploymentHandler interfacepublic void unregisterDeploymentHandler(AppDeploymentHandler handler)
unregisterDeploymentHandler in interface ApplicationManagerServicehandler - - input deployer handlerpublic void deployCarbonApp(String archPath, org.apache.axis2.engine.AxisConfiguration axisConfig) throws Exception
deployCarbonApp in interface ApplicationManagerServicearchPath - - carbon app archive pathaxisConfig - - AxisConfiguration of the current tenantException - - error on registry actionspublic Artifact buildAppArtifact(CarbonApplication parentApp, InputStream artifactXmlStream) throws org.wso2.carbon.CarbonException
parentApp - - parent applicationartifactXmlStream - - xml input stream of the artifact.xmlorg.wso2.carbon.CarbonException - - error while buildingpublic void undeployCarbonApp(CarbonApplication carbonApp, org.apache.axis2.engine.AxisConfiguration axisConfig)
undeployCarbonApp in interface ApplicationManagerServicecarbonApp - - CarbonApplication instanceaxisConfig - - AxisConfiguration of the current tenantpublic ArrayList<CarbonApplication> getCarbonApps(String tenantId)
getCarbonApps in interface ApplicationManagerServicetenantId - - tenant id to find cAppspublic HashMap<String,Exception> getFaultyCarbonApps(String tenantId)
getFaultyCarbonApps in interface ApplicationManagerServicetenantId - - tenant id to find faulty cAppspublic void addFaultyCarbonApp(String tenantId, String carbonApp, Exception error)
tenantId - carbonApp - public void removeFaultyCarbonApp(String tenantId, String appFilePath)
tenantId - appFilePath - public void addCarbonApp(String tenantId, CarbonApplication carbonApp)
tenantId - - tenant id of the cAppcarbonApp - - CarbonApplication instancepublic void removeCarbonApp(String tenantId, CarbonApplication carbonApp)
tenantId - - tenant id of the cAppcarbonApp - - CarbonApplication instancepublic void buildDependencyTree(Artifact rootArtifact, List<Artifact> allArtifacts)
rootArtifact - - root to start searchallArtifacts - - all artifacts found under current cApppublic CarbonAppPersistenceManager getPersistenceManager(org.apache.axis2.engine.AxisConfiguration axisConfig)
axisConfig - - AxisConfiguration of the current tenantpublic void cleanupCarbonApps(org.apache.axis2.engine.AxisConfiguration axisConfig)
Copyright © 2018 WSO2 Inc. All rights reserved.