Search in sources :

Example 1 with MetadataMultiTypeProcessor

use of org.talend.repository.ui.processor.MetadataMultiTypeProcessor 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));
}
Also used : IRepositoryTypeProcessor(org.talend.core.model.repository.IRepositoryTypeProcessor) RepositoryTypeProcessor(org.talend.repository.ui.processor.RepositoryTypeProcessor) SchemaTypeProcessor(org.talend.repository.ui.processor.SchemaTypeProcessor) IRepositoryContentHandler(org.talend.core.model.repository.IRepositoryContentHandler) MetadataMultiTypeProcessor(org.talend.repository.ui.processor.MetadataMultiTypeProcessor) HeaderFooterTypeProcessor(org.talend.repository.ui.processor.HeaderFooterTypeProcessor) ValidationRuleTypeProcessor(org.talend.repository.ui.processor.ValidationRuleTypeProcessor) JobTypeProcessor(org.talend.repository.ui.processor.JobTypeProcessor) SAPFunctionProcessor(org.talend.repository.ui.processor.SAPFunctionProcessor) IRepositoryTypeProcessor(org.talend.core.model.repository.IRepositoryTypeProcessor) ContextTypeProcessor(org.talend.repository.ui.processor.ContextTypeProcessor) QueryTypeProcessor(org.talend.repository.ui.processor.QueryTypeProcessor)

Aggregations

IRepositoryContentHandler (org.talend.core.model.repository.IRepositoryContentHandler)1 IRepositoryTypeProcessor (org.talend.core.model.repository.IRepositoryTypeProcessor)1 ContextTypeProcessor (org.talend.repository.ui.processor.ContextTypeProcessor)1 HeaderFooterTypeProcessor (org.talend.repository.ui.processor.HeaderFooterTypeProcessor)1 JobTypeProcessor (org.talend.repository.ui.processor.JobTypeProcessor)1 MetadataMultiTypeProcessor (org.talend.repository.ui.processor.MetadataMultiTypeProcessor)1 QueryTypeProcessor (org.talend.repository.ui.processor.QueryTypeProcessor)1 RepositoryTypeProcessor (org.talend.repository.ui.processor.RepositoryTypeProcessor)1 SAPFunctionProcessor (org.talend.repository.ui.processor.SAPFunctionProcessor)1 SchemaTypeProcessor (org.talend.repository.ui.processor.SchemaTypeProcessor)1 ValidationRuleTypeProcessor (org.talend.repository.ui.processor.ValidationRuleTypeProcessor)1