use of org.talend.camel.designer.ui.view.handler.BuildBundleHandler in project tesb-studio-se by Talend.
the class RouteOSGiBundleBuildProvider method createBuildExportHandler.
/* (non-Javadoc)
* @see org.talend.core.runtime.repository.build.AbstractBuildProvider#createBuildExportHandler(java.util.Map)
*/
@Override
public IBuildExportHandler createBuildExportHandler(Map<String, Object> parameters) {
if (parameters == null || parameters.isEmpty()) {
return null;
}
final Object item = parameters.get(ITEM);
if (item == null || !(item instanceof ProcessItem)) {
return null;
}
final Object version = parameters.get(VERSION);
if (version == null) {
return null;
}
final Object contextGroup = parameters.get(CONTEXT_GROUP);
if (contextGroup == null) {
return null;
}
Object choiceOption = parameters.get(CHOICE_OPTION);
if (choiceOption == null) {
choiceOption = Collections.emptyMap();
}
if (!(choiceOption instanceof Map)) {
return null;
}
IBuildJobHandler buildHandler = new BuildBundleHandler((ProcessItem) item, version.toString(), contextGroup.toString(), (Map<ExportChoice, Object>) choiceOption);
return buildHandler;
}
Aggregations