use of org.talend.repository.hadoopcluster.ui.viewer.handler.IHadoopSubnodeRepositoryContentHandler in project tbd-studio-se by Talend.
the class HCRepositoryUtil method getRepositoryTypeOfHadoopSubItem.
public static String getRepositoryTypeOfHadoopSubItem(Item item) {
if (item instanceof DatabaseConnectionItem) {
DatabaseConnectionItem dbItem = (DatabaseConnectionItem) item;
DatabaseConnection dbConnection = (DatabaseConnection) dbItem.getConnection();
return dbConnection.getDatabaseType().toUpperCase();
}
for (IHadoopSubnodeRepositoryContentHandler handler : HadoopSubnodeRepositoryContentManager.getHandlers()) {
if (handler.isProcess(item) && handler.getProcessType() != null) {
return handler.getProcessType().getType().toUpperCase();
}
}
return null;
}
Aggregations