use of org.talend.resource.EResourceConstant in project tdq-studio-se by Talend.
the class ActionHandleFactory method createDuplicateHandle.
public IDuplicateHandle createDuplicateHandle(IRepositoryNode node) throws BusinessException {
IDuplicateHandle handle = null;
EResourceConstant typedConstant = EResourceConstant.getTypedConstant(node.getObject().getProperty().getItem());
if (typedConstant == null) {
BusinessException createBusinessException = ExceptionFactory.getInstance().createBusinessException(// $NON-NLS-1$
DefaultMessagesImpl.getString("ActionHandleFactory.duplicateFail", node.getLabel()));
throw createBusinessException;
} else {
switch(typedConstant) {
case DB_CONNECTIONS:
handle = new DBConnectionDuplicateHandle();
break;
case JRXML_TEMPLATE:
handle = new JrxmlFileDuplicateHandle(node);
break;
case ANALYSIS:
handle = new AnalysisDuplicateHandle();
break;
case REPORTS:
handle = new ReportDuplicateHandle();
break;
case PATTERNS:
case RULES_PARSER:
case RULES_SQL:
case RULES_MATCHER:
handle = new ModelElementDuplicateHandle();
break;
case INDICATORS:
handle = new IndicatorDuplicateHandle();
break;
case SOURCE_FILES:
handle = new SourceFileDuplicateHandle(node);
break;
case CONTEXT:
handle = new ContextDuplicateHandle(node);
default:
break;
}
}
return handle;
}
Aggregations