1 package org.smartcomps.twister.deployer.priv;
2
3 import org.smartcomps.twister.common.util.StringUtil;
4 import org.smartcomps.twister.common.util.logger.Logger;
5 import org.smartcomps.twister.deployer.exception.DeploymentException;
6
7 public class ActivityDeployerFactory {
8
9 private static Logger log = Logger.getLogger(ActivityDeployerFactory.class);
10
11 public static ActivityDeployer getActivityDeployer(String activityName) throws DeploymentException {
12 Object activityDeployer = null;
13 try {
14 String strActivityName = StringUtil.capitalizeFirstCharacter(activityName);
15 log.debug("Instantiate : " + "org.smartcomps.twister.deployer.priv." + strActivityName + "Deployer");
16 activityDeployer = Class.forName("org.smartcomps.twister.deployer.priv." + strActivityName + "Deployer").newInstance();
17 } catch (Exception e) {
18 throw new DeploymentException("Unable to instanciate the activity deployer due to " + e.getMessage(), e);
19 }
20 return (ActivityDeployer) activityDeployer;
21 }
22
23 }
This page was automatically generated by Maven