use of org.talend.repository.ui.processor.ValidationRuleTypeProcessor in project tdi-studio-se by Talend.
the class DatabaseTypeFilter method createTypeProcessor.
/**
* bqian create the correct TypeProcessor according to the type.
*
* @return
*/
private IRepositoryTypeProcessor createTypeProcessor() {
for (IRepositoryContentHandler handler : RepositoryContentManager.getHandlers()) {
IRepositoryTypeProcessor processor = handler.getRepositoryTypeProcessor(repositoryType);
if (processor != null) {
return processor;
}
}
if (repositoryType != null && repositoryType.contains("|")) {
//$NON-NLS-1$
//$NON-NLS-1$
String[] repTypes = repositoryType.split("\\|");
IRepositoryTypeProcessor hadoopTypeProcessor = getHadoopSubMultiRepTypeProcessor(repTypes);
if (hadoopTypeProcessor != null) {
return hadoopTypeProcessor;
}
}
if (type == null && repositoryTypes != null) {
return new MetadataMultiTypeProcessor(repositoryTypes);
}
if (type == ERepositoryObjectType.PROCESS) {
return new JobTypeProcessor(repositoryType);
}
if (type == ERepositoryObjectType.METADATA) {
return new RepositoryTypeProcessor(repositoryType);
}
if (type == ERepositoryObjectType.METADATA_CON_TABLE) {
return new SchemaTypeProcessor(repositoryType);
}
if (type == ERepositoryObjectType.METADATA_CON_QUERY) {
return new QueryTypeProcessor(repositoryType);
}
if (type == ERepositoryObjectType.METADATA_SAP_FUNCTION) {
return new SAPFunctionProcessor(repositoryType);
}
if (type == ERepositoryObjectType.CONTEXT) {
return new ContextTypeProcessor(repositoryType);
}
if (type == ERepositoryObjectType.METADATA_HEADER_FOOTER) {
return new HeaderFooterTypeProcessor(repositoryType);
}
if (type == ERepositoryObjectType.METADATA_VALIDATION_RULES) {
return new ValidationRuleTypeProcessor(repositoryType, elem);
}
//$NON-NLS-1$
throw new IllegalArgumentException(Messages.getString("RepositoryReviewDialog.0", type));
}
Aggregations