public DataSetEditWorkflow edit ( final DataSetProviderType type ) { final boolean isSQL = type != null && DataSetProviderType . SQL . equals ( type ) ; final boolean isBean = type != null && DataSetProviderType . BEAN . equals ( type ) ; final boolean isCSV = type != null && DataSetProviderType . CSV . equals ( type ) ; final boolean isEL = type != null && DataSetProviderType . ELASTICSEARCH . equals ( type ) ; Class workflowClass = null ; if ( isSQL ) { workflowClass = SQLDataSetEditWorkflow . class ; } else if ( isCSV ) { workflowClass = CSVDataSetEditWorkflow . class ; } else if ( isBean ) { workflowClass = BeanDataSetEditWorkflow . class ; } else if ( isEL ) { workflowClass = ElasticSearchDataSetEditWorkflow . class ; } return ( DataSetEditWorkflow ) beanManager . lookupBean ( workflowClass ) . newInstance ( ) ; }
Obtain the bean for editing a data set definition for a given type .