本文整理汇总了Java中org.apache.axis2.deployment.DeploymentException类的典型用法代码示例。如果您正苦于以下问题:Java DeploymentException类的具体用法?Java DeploymentException怎么用?Java DeploymentException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DeploymentException类属于org.apache.axis2.deployment包,在下文中一共展示了DeploymentException类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: deploy
import org.apache.axis2.deployment.DeploymentException; //导入依赖的package包/类
@Override
public void deploy(DeploymentFileData deploymentFileData) throws DeploymentException {
try {
DeviceTypeConfiguration deviceTypeConfiguration = getDeviceTypeConfiguration(
deploymentFileData.getFile().getAbsoluteFile());
String deviceType = deviceTypeConfiguration.getName();
String tenantDomain = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain(true);
if (deviceType != null && !deviceType.isEmpty() && tenantDomain != null
&& !tenantDomain.isEmpty()) {
DeviceTypeConfigIdentifier deviceTypeConfigIdentifier = new DeviceTypeConfigIdentifier(deviceType,
tenantDomain);
ServiceRegistration serviceRegistration = registerDeviceType(deviceTypeConfigIdentifier,
deviceTypeConfiguration);
this.deviceTypeServiceRegistrations.put(deploymentFileData.getAbsolutePath(), serviceRegistration);
this.deviceTypeConfigurationDataMap.put(deploymentFileData.getAbsolutePath(),
deviceTypeConfigIdentifier);
}
} catch (Throwable e) {
log.error("Cannot deploy deviceType : " + deploymentFileData.getName(), e);
throw new DeploymentException("Device type file " + deploymentFileData.getName() + " is not deployed ", e);
}
}
开发者ID:wso2,项目名称:carbon-device-mgt,代码行数:24,代码来源:DeviceTypePluginDeployer.java
示例2: createHumanTaskRepository
import org.apache.axis2.deployment.DeploymentException; //导入依赖的package包/类
private void createHumanTaskRepository(ConfigurationContext configCtx) throws DeploymentException {
String axisRepoPath = configCtx.getAxisConfiguration().getRepository().getPath();
if (CarbonUtils.isURL(axisRepoPath)) {
throw new DeploymentException("URL Repositories are not supported: " + axisRepoPath);
}
File tenantsRepository = new File(axisRepoPath);
File humanTaskRepo = new File(tenantsRepository, HumanTaskConstants.HUMANTASK_REPO_DIRECTORY);
if (!humanTaskRepo.exists()) {
boolean status = humanTaskRepo.mkdir();
if (!status) {
throw new DeploymentException("Failed to create HumanTask repository directory " +
humanTaskRepo.getAbsolutePath() + ".");
}
}
}
开发者ID:wso2,项目名称:carbon-business-process,代码行数:17,代码来源:HumanTaskDeployer.java
示例3: createBPELRepository
import org.apache.axis2.deployment.DeploymentException; //导入依赖的package包/类
private File createBPELRepository(ConfigurationContext configCtx) throws DeploymentException {
String axisRepoPath = configCtx.getAxisConfiguration().getRepository().getPath();
if (CarbonUtils.isURL(axisRepoPath)) {
throw new DeploymentException("URL Repositories are not supported: " + axisRepoPath);
}
File tenantsRepository = new File(axisRepoPath);
File bpelRepo = new File(tenantsRepository, BPELConstants.BPEL_REPO_DIRECTORY);
if (!bpelRepo.exists()) {
boolean status = bpelRepo.mkdir();
if (!status) {
throw new DeploymentException("Failed to create BPEL repository directory " +
bpelRepo.getAbsolutePath() + ".");
}
}
return bpelRepo;
}
开发者ID:wso2,项目名称:carbon-business-process,代码行数:19,代码来源:BPELDeployer.java
示例4: undeploy
import org.apache.axis2.deployment.DeploymentException; //导入依赖的package包/类
public void undeploy(String bpelArchivePath) throws DeploymentException {
File bpelArchiveFile = new File(bpelArchivePath);
if (bpelArchiveFile.exists()) {
if (log.isTraceEnabled()) {
log.trace("Assumption: this as an update of the bpel package: " + bpelArchivePath +
", Therefore no need to do undeploy");
}
// We assume this as an update of the bpel package, Therefore no need to do anything
// here
return;
}
log.info("Undeploying BPEL archive " + bpelArchivePath);
try {
String archiveName = bpelArchivePath.substring(bpelArchivePath.
lastIndexOf(File.separator) + 1);
String bpelPackageName = archiveName.substring(0, archiveName.lastIndexOf("." +
BPELConstants.BPEL_PACKAGE_EXTENSION));
tenantProcessStore.undeploy(bpelPackageName);
} catch (Exception e) {
String errMsg = "BPEL Package: " + bpelArchivePath + " undeployment failed.";
log.error(errMsg, e);
throw new DeploymentException(errMsg, e);
}
}
开发者ID:wso2,项目名称:carbon-business-process,代码行数:27,代码来源:BPELDeployer.java
示例5: getScriptServicesDirectory
import org.apache.axis2.deployment.DeploymentException; //导入依赖的package包/类
/**
* Gets the repo directory for the scripts. The scripts directory is a
* sub-directory of the Axis2 repository directory. Its name may be defined
* by a 'scriptServicesDir' property in the axis2.xml otherwise it defaults
* a to a directory named 'scriptServices'.
*/
protected File getScriptServicesDirectory(AxisConfiguration axisConfig) throws DeploymentException {
try {
URL axis2Repository = axisConfig.getRepository();
Parameter scriptsDirParam = axisConfig.getParameter("scriptServicesDir");
String scriptsDir = scriptsDirParam == null ? "scriptServices" : (String)scriptsDirParam.getValue();
String path = URLDecoder.decode(axis2Repository.getPath(), defaultEncoding);
java.io.File repoDir =
new java.io.File(path.replace('/', File.separatorChar).replace('|', ':'));
return new File(repoDir, scriptsDir);
} catch (UnsupportedEncodingException e) {
throw new DeploymentException("UnsupportedEncodingException getting script service directory", e);
}
}
开发者ID:wso2,项目名称:wso2-axis2,代码行数:23,代码来源:ScriptModule.java
示例6: processModuleRefs
import org.apache.axis2.deployment.DeploymentException; //导入依赖的package包/类
/**
* Gets the list of modules that is required to be engaged globally.
* If the required module is not found this will return the error code 1: which is
* "Error 1: Required module is not found"
*
* @param moduleRefs <code>java.util.Iterator</code>
* @throws org.apache.axis2.deployment.DeploymentException
* <code>DeploymentException</code>
*/
protected void processModuleRefs(Iterator moduleRefs)
throws DeploymentException {
while (moduleRefs.hasNext()) {
OMElement moduleref = (OMElement) moduleRefs.next();
OMAttribute moduleRefAttribute = moduleref
.getAttribute(new QName(TAG_REFERENCE));
if (moduleRefAttribute != null) {
String refName = moduleRefAttribute.getAttributeValue();
if (axisConfig.getModule(refName) == null) {
throw new DeploymentException(MODULE_NOT_FOUND_ERROR);
} else {
service.addModuleref(refName);
}
}
}
}
开发者ID:wso2,项目名称:wso2-axis2,代码行数:28,代码来源:OSGiServiceBuilder.java
示例7: processOperationModuleRefs
import org.apache.axis2.deployment.DeploymentException; //导入依赖的package包/类
/**
* If the required module is not found this will return the error code 1: which is
* "Error 1: Required module is not found"
*
* @param moduleRefs moduleRefs
* @param operation operation
* @throws DeploymentException DeploymentException
*/
protected void processOperationModuleRefs(Iterator moduleRefs,
AxisOperation operation) throws DeploymentException {
while (moduleRefs.hasNext()) {
OMElement moduleref = (OMElement) moduleRefs.next();
OMAttribute moduleRefAttribute = moduleref
.getAttribute(new QName(TAG_REFERENCE));
if (moduleRefAttribute != null) {
String refName = moduleRefAttribute.getAttributeValue();
if (axisConfig.getModule(refName) == null) {
throw new DeploymentException(MODULE_NOT_FOUND_ERROR + refName);
} else {
operation.addModule(refName);
}
}
}
}
开发者ID:wso2,项目名称:wso2-axis2,代码行数:27,代码来源:OSGiServiceBuilder.java
示例8: populateAxisConfiguration
import org.apache.axis2.deployment.DeploymentException; //导入依赖的package包/类
public AxisConfiguration populateAxisConfiguration(InputStream in) throws DeploymentException {
axisConfig = new AxisConfiguration();
AxisConfigBuilder builder =
new AxisConfigBuilder(in, axisConfig, this);
builder.populateConfig();
try {
if (in != null) {
in.close();
}
} catch (IOException e) {
String msg = "Error in closing input stream";
throw new DeploymentException(msg, e);
}
//TODO: if module deployer neede to set it should be set here.
return axisConfig;
}
开发者ID:wso2,项目名称:wso2-axis2,代码行数:17,代码来源:OSGiServerConfigurator.java
示例9: processModuleRefs
import org.apache.axis2.deployment.DeploymentException; //导入依赖的package包/类
/**
* Gets the list of modules that is required to be engaged globally.
* If the required module is not found this will return the error code 1: which is
* "Error 1: Required module is not found"
*
* @param moduleRefs <code>java.util.Iterator</code>
* @throws org.apache.axis2.deployment.DeploymentException
* <code>DeploymentException</code>
*/
protected void processModuleRefs(Iterator moduleRefs, AxisServiceGroup axisServiceGroup)
throws DeploymentException {
while (moduleRefs.hasNext()) {
OMElement moduleref = (OMElement) moduleRefs.next();
OMAttribute moduleRefAttribute = moduleref.getAttribute(new QName(TAG_REFERENCE));
if (moduleRefAttribute != null) {
String refName = moduleRefAttribute.getAttributeValue();
if (axisConfig.getModule(refName) == null) {
throw new DeploymentException(MODULE_NOT_FOUND_ERROR + refName);
} else {
axisServiceGroup.addModuleref(refName);
}
}
}
}
开发者ID:wso2,项目名称:wso2-axis2,代码行数:27,代码来源:OSGiServiceGroupBuilder.java
示例10: copyPhase
import org.apache.axis2.deployment.DeploymentException; //导入依赖的package包/类
/**
* To copy phase information from one to another
*
* @param phase
*/
private Phase copyPhase(Phase phase) throws DeploymentException {
Phase newPhase = new Phase(phase.getPhaseName());
Iterator<Handler> handlers = phase.getHandlers().iterator();
while (handlers.hasNext()) {
try {
Handler handlerDescription = (Handler) handlers.next();
newPhase.addHandler(handlerDescription.getHandlerDesc());
} catch (PhaseException e) {
throw new DeploymentException(e);
}
}
return newPhase;
}
开发者ID:wso2,项目名称:wso2-axis2,代码行数:22,代码来源:PhasesInfo.java
示例11: getGlobalInflow
import org.apache.axis2.deployment.DeploymentException; //导入依赖的package包/类
public List<Phase> getGlobalInflow() throws DeploymentException {
ArrayList<Phase> globalphase = new ArrayList<Phase>();
boolean foundDispatchPhase = false;
for (int i = 0; i < INPhases.size(); i++) {
Phase phase = (Phase) INPhases.get(i);
String phaseName = phase.getPhaseName();
if (!foundDispatchPhase) {
if (PhaseMetadata.PHASE_DISPATCH.equals(phaseName)) {
foundDispatchPhase = true;
}
globalphase.add(phase);
}
}
if (!foundDispatchPhase) {
throw new DeploymentException(
Messages.getMessage(DeploymentErrorMsgs.DISPATCH_PHASE_NOT_FOUND));
}
return globalphase;
}
开发者ID:wso2,项目名称:wso2-axis2,代码行数:20,代码来源:PhasesInfo.java
示例12: getGlobalOutPhaseList
import org.apache.axis2.deployment.DeploymentException; //导入依赖的package包/类
public List<Phase> getGlobalOutPhaseList() throws DeploymentException {
/**
* I have assumed that PolicyDetermination and MessageProcessing are global out phase
*/
ArrayList<Phase> globalPhaseList = new ArrayList<Phase>();
boolean messageOut = false;
for (int i = 0; i < OUTPhases.size(); i++) {
Phase phase = (Phase) OUTPhases.get(i);
String phaseName = phase.getPhaseName();
if (!messageOut) {
if (PhaseMetadata.PHASE_MESSAGE_OUT.equals(phaseName)) {
messageOut = true;
globalPhaseList.add(copyPhase(phase));
}
} else {
globalPhaseList.add(phase);
}
}
return globalPhaseList;
}
开发者ID:wso2,项目名称:wso2-axis2,代码行数:22,代码来源:PhasesInfo.java
示例13: getOUT_FaultPhases
import org.apache.axis2.deployment.DeploymentException; //导入依赖的package包/类
public List<Phase> getOUT_FaultPhases() throws DeploymentException {
ArrayList<Phase> globalPhaseList = new ArrayList<Phase>();
boolean messageOut = false;
for (int i = 0; i < OUT_FaultPhases.size(); i++) {
Phase phase = (Phase) OUT_FaultPhases.get(i);
String phaseName = phase.getPhaseName();
if (!messageOut) {
if (PhaseMetadata.PHASE_MESSAGE_OUT.equals(phaseName)) {
messageOut = true;
globalPhaseList.add(copyPhase(phase));
}
} else {
globalPhaseList.add(copyPhase(phase));
}
}
return globalPhaseList;
}
开发者ID:wso2,项目名称:wso2-axis2,代码行数:18,代码来源:PhasesInfo.java
示例14: getGlobalInFaultPhases
import org.apache.axis2.deployment.DeploymentException; //导入依赖的package包/类
public List<Phase> getGlobalInFaultPhases() throws DeploymentException {
ArrayList<Phase> globalInfaultphase = new ArrayList<Phase>();
boolean foundDispatchPhase = false;
for (int i = 0; i < IN_FaultPhases.size(); i++) {
Phase phase = (Phase) IN_FaultPhases.get(i);
String phaseName = phase.getPhaseName();
if (!foundDispatchPhase) {
if (PhaseMetadata.PHASE_DISPATCH.equals(phaseName)) {
foundDispatchPhase = true;
}
globalInfaultphase.add(phase);
}
}
if (!foundDispatchPhase) {
throw new DeploymentException(
Messages.getMessage(DeploymentErrorMsgs.DISPATCH_PHASE_NOT_FOUND));
}
return globalInfaultphase;
}
开发者ID:wso2,项目名称:wso2-axis2,代码行数:20,代码来源:PhasesInfo.java
示例15: deploy
import org.apache.axis2.deployment.DeploymentException; //导入依赖的package包/类
/**
* Process a file and add it to the configuration
*
* @param deploymentFileData the DeploymentFileData object to deploy
* @throws org.apache.axis2.deployment.DeploymentException
* if there is a problem
*/
public void deploy(DeploymentFileData deploymentFileData) throws DeploymentException {
log.info("Deploying - " + deploymentFileData.getName());
try {
FileInputStream fis = new FileInputStream(deploymentFileData.getFile());
int x= fis.available();
byte b[]= new byte[x];
fis.read(b);
String content = new String(b);
if (content.indexOf("George") > -1) georgeDeployed = true;
if (content.indexOf("Mary") > -1) maryDeployed = true;
deployedItems++;
super.deploy(deploymentFileData);
} catch (Exception e) {
throw new DeploymentException(e);
}
}
开发者ID:wso2,项目名称:wso2-axis2,代码行数:24,代码来源:CustomDeployer.java
示例16: deployArtifacts
import org.apache.axis2.deployment.DeploymentException; //导入依赖的package包/类
/**
* Deploy the data source artifacts and add them to datasources.
*
* @param carbonApp - store info in this object after deploying
* @param axisConfig - AxisConfiguration of the current tenant
*/
@Override
public void deployArtifacts(CarbonApplication carbonApp, AxisConfiguration axisConfig) throws DeploymentException {
if (log.isDebugEnabled()) {
log.debug("Deploying carbon application - " + carbonApp.getAppName());
}
ApplicationConfiguration appConfig = carbonApp.getAppConfig();
List<Artifact.Dependency> deps = appConfig.getApplicationArtifact().getDependencies();
List<Artifact> artifacts = new ArrayList<Artifact>();
for (Artifact.Dependency dep : deps) {
if (dep.getArtifact() != null) {
artifacts.add(dep.getArtifact());
}
}
deployUnDeployDataSources(true, artifacts);
}
开发者ID:wso2,项目名称:carbon-commons,代码行数:23,代码来源:DataSourceCappDeployer.java
示例17: undeployArtifacts
import org.apache.axis2.deployment.DeploymentException; //导入依赖的package包/类
/**
* Un-deploy the data sources and remove them from datasources.
*
* @param carbonApp - all information about the existing artifacts are in this instance.
* @param axisConfig - AxisConfiguration of the current tenant.
*/
@Override
public void undeployArtifacts(CarbonApplication carbonApp, AxisConfiguration axisConfig)
throws DeploymentException {
if (log.isDebugEnabled()) {
log.debug("Un-Deploying carbon application - " + carbonApp.getAppName());
}
ApplicationConfiguration appConfig = carbonApp.getAppConfig();
List<Artifact.Dependency> deps = appConfig.getApplicationArtifact().getDependencies();
List<Artifact> artifacts = new ArrayList<Artifact>();
for (Artifact.Dependency dep : deps) {
if (dep.getArtifact() != null) {
artifacts.add(dep.getArtifact());
}
}
deployUnDeployDataSources(false, artifacts);
}
开发者ID:wso2,项目名称:carbon-commons,代码行数:24,代码来源:DataSourceCappDeployer.java
示例18: undeploy
import org.apache.axis2.deployment.DeploymentException; //导入依赖的package包/类
/**
* Trigger un-deploying of a deployed file. Removes the deleted user store from chain
*
* @param fileName: domain name --> file name
* @throws org.apache.axis2.deployment.DeploymentException for any errors
*/
public void undeploy(String fileName) throws DeploymentException {
if (fileName != null) {
String ext = FilenameUtils.getExtension(fileName);
if (!UserStoreConfigurationConstants.ENC_EXTENSION.equalsIgnoreCase(ext)) {
UserStoreDeploymentManager userStoreDeploymentManager = new UserStoreDeploymentManager();
userStoreDeploymentManager.undeploy(fileName);
}
}
}
开发者ID:wso2,项目名称:carbon-identity-framework,代码行数:17,代码来源:UserStoreConfigurationDeployer.java
示例19: deployArtifacts
import org.apache.axis2.deployment.DeploymentException; //导入依赖的package包/类
@Override
public void deployArtifacts(CarbonApplication carbonApplication, AxisConfiguration axisConfig)
throws DeploymentException {
List<Artifact.Dependency> artifacts =
carbonApplication.getAppConfig().getApplicationArtifact().getDependencies();
for (Artifact.Dependency dep : artifacts) {
Artifact artifact = dep.getArtifact();
if (!validateArtifact(artifact)) {
continue;
}
addArtifact(artifact);
}
try {
deployTypeSpecifiedArtifacts(deviceTypeUIs, axisConfig, null,
DeviceTypePluginConstants.CDMF_UI_TYPE_DIR);
deployTypeSpecifiedArtifacts(deviceTypePlugins, axisConfig,
DeviceTypePluginConstants.CDMF_PLUGIN_TYPE_EXTENSION,
DeviceTypePluginConstants.CDMF_PLUGIN_TYPE_DIR);
} catch (Exception e) {
throw new DeploymentException(e.getMessage(), e);
} finally {
deviceTypePlugins.clear();
deviceTypeUIs.clear();
}
}
开发者ID:wso2,项目名称:carbon-device-mgt,代码行数:30,代码来源:DeviceTypeCAppDeployer.java
示例20: deployTypeSpecifiedArtifacts
import org.apache.axis2.deployment.DeploymentException; //导入依赖的package包/类
protected void deployTypeSpecifiedArtifacts(List<Artifact> artifacts, AxisConfiguration axisConfig,
String fileType, String directory) throws DeploymentException {
for (Artifact artifact : artifacts) {
Deployer deployer = AppDeployerUtils.getArtifactDeployer(axisConfig, directory, fileType);
if (deployer != null) {
deploy(deployer, artifact);
}
}
}
开发者ID:wso2,项目名称:carbon-device-mgt,代码行数:10,代码来源:DeviceTypeCAppDeployer.java
注:本文中的org.apache.axis2.deployment.DeploymentException类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论