Commit 79d05282b92f4ee4597ebaad106b080cc5a59935

Authored by Carlos Alberto
1 parent 49481095
Exists in master

Correção da criação de Widgets

cit-portal-web/src/main/java/br/com/centralit/listener/StartupListener.java
@@ -1475,7 +1475,7 @@ public class StartupListener extends UtilStartup implements ApplicationListener< @@ -1475,7 +1475,7 @@ public class StartupListener extends UtilStartup implements ApplicationListener<
1475 this.widgetParametroService.saveListIfNotExist(listaWidgetParametrosHigChart); 1475 this.widgetParametroService.saveListIfNotExist(listaWidgetParametrosHigChart);
1476 1476
1477 Widget widgetGoogleChart = new Widget("Google Chart", "Google Chart", this.dominioService.findByChaveAndCodigo("tipoWidget", 5L), Boolean.TRUE); 1477 Widget widgetGoogleChart = new Widget("Google Chart", "Google Chart", this.dominioService.findByChaveAndCodigo("tipoWidget", 5L), Boolean.TRUE);
1478 - this.widgetService.saveIfNotExist(widgetGoogleChart); 1478 + widgetGoogleChart = this.widgetService.saveIfNotExist(widgetGoogleChart);
1479 1479
1480 List<WidgetParametro> listaParametrosGoogleCharts = new LinkedList<WidgetParametro>(); 1480 List<WidgetParametro> listaParametrosGoogleCharts = new LinkedList<WidgetParametro>();
1481 listaParametrosGoogleCharts.add(new WidgetParametro("hAxis titulo", this.dominioService.findByChaveAndNome("tipoDado", "TEXT_FIELD"), null, null, null, null, null, null, widgetGoogleChart)); 1481 listaParametrosGoogleCharts.add(new WidgetParametro("hAxis titulo", this.dominioService.findByChaveAndNome("tipoDado", "TEXT_FIELD"), null, null, null, null, null, null, widgetGoogleChart));
@@ -1486,10 +1486,9 @@ public class StartupListener extends UtilStartup implements ApplicationListener&lt; @@ -1486,10 +1486,9 @@ public class StartupListener extends UtilStartup implements ApplicationListener&lt;
1486 this.widgetParametroService.saveListIfNotExist(listaParametrosGoogleCharts); 1486 this.widgetParametroService.saveListIfNotExist(listaParametrosGoogleCharts);
1487 1487
1488 Widget widgetGoogleGouge = new Widget("Google Chart Gauge", "Google Chart Gauge", this.dominioService.findByChaveAndCodigo("tipoWidget", 6L), Boolean.TRUE); 1488 Widget widgetGoogleGouge = new Widget("Google Chart Gauge", "Google Chart Gauge", this.dominioService.findByChaveAndCodigo("tipoWidget", 6L), Boolean.TRUE);
  1489 + widgetGoogleGouge = this.widgetService.saveIfNotExist(widgetGoogleGouge);
1489 1490
1490 - this.widgetService.saveIfNotExist(widgetGoogleGouge);  
1491 List<WidgetParametro> listaParametroGoogleGouge = new LinkedList<WidgetParametro>(); 1491 List<WidgetParametro> listaParametroGoogleGouge = new LinkedList<WidgetParametro>();
1492 -  
1493 listaParametroGoogleGouge.add(new WidgetParametro("max", this.dominioService.findByChaveAndNome("tipoDado", "NUMBER"), null, null, 100L, null, null, null, widgetGoogleGouge)); 1492 listaParametroGoogleGouge.add(new WidgetParametro("max", this.dominioService.findByChaveAndNome("tipoDado", "NUMBER"), null, null, 100L, null, null, null, widgetGoogleGouge));
1494 listaParametroGoogleGouge.add(new WidgetParametro("yellowFrom", this.dominioService.findByChaveAndNome("tipoDado", "NUMBER"), null, null, 70L, null, null, null, widgetGoogleGouge)); 1493 listaParametroGoogleGouge.add(new WidgetParametro("yellowFrom", this.dominioService.findByChaveAndNome("tipoDado", "NUMBER"), null, null, 70L, null, null, null, widgetGoogleGouge));
1495 listaParametroGoogleGouge.add(new WidgetParametro("yellowTo", this.dominioService.findByChaveAndNome("tipoDado", "NUMBER"), null, null, 80L, null, null, null, widgetGoogleGouge)); 1494 listaParametroGoogleGouge.add(new WidgetParametro("yellowTo", this.dominioService.findByChaveAndNome("tipoDado", "NUMBER"), null, null, 80L, null, null, null, widgetGoogleGouge));
@@ -1501,23 +1500,19 @@ public class StartupListener extends UtilStartup implements ApplicationListener&lt; @@ -1501,23 +1500,19 @@ public class StartupListener extends UtilStartup implements ApplicationListener&lt;
1501 this.widgetParametroService.saveListIfNotExist(listaParametroGoogleGouge); 1500 this.widgetParametroService.saveListIfNotExist(listaParametroGoogleGouge);
1502 1501
1503 Widget widgetHtml = new Widget("Html", "Html", this.dominioService.findByChaveAndCodigo("tipoWidget", 7L), Boolean.TRUE); 1502 Widget widgetHtml = new Widget("Html", "Html", this.dominioService.findByChaveAndCodigo("tipoWidget", 7L), Boolean.TRUE);
1504 -  
1505 - this.widgetService.saveIfNotExist(widgetHtml); 1503 + widgetHtml = this.widgetService.saveIfNotExist(widgetHtml);
1506 1504
1507 Widget widgetNoticia = new Widget("Notícia", "Notícia", this.dominioService.findByChaveAndCodigo("tipoWidget", 4L), Boolean.TRUE); 1505 Widget widgetNoticia = new Widget("Notícia", "Notícia", this.dominioService.findByChaveAndCodigo("tipoWidget", 4L), Boolean.TRUE);
1508 -  
1509 - this.widgetService.saveIfNotExist(widgetNoticia); 1506 + widgetNoticia = this.widgetService.saveIfNotExist(widgetNoticia);
1510 1507
1511 Widget widgetTemperatura = new Widget("Temperatura", "Temperatura", this.dominioService.findByChaveAndCodigo("tipoWidget", 3L), Boolean.TRUE); 1508 Widget widgetTemperatura = new Widget("Temperatura", "Temperatura", this.dominioService.findByChaveAndCodigo("tipoWidget", 3L), Boolean.TRUE);
1512 -  
1513 - this.widgetService.saveIfNotExist(widgetTemperatura); 1509 + widgetTemperatura = this.widgetService.saveIfNotExist(widgetTemperatura);
1514 1510
1515 Widget widgetlink = new Widget("Link", "Link", this.dominioService.findByChaveAndCodigo("tipoWidget", 2L), Boolean.TRUE); 1511 Widget widgetlink = new Widget("Link", "Link", this.dominioService.findByChaveAndCodigo("tipoWidget", 2L), Boolean.TRUE);
1516 -  
1517 - this.widgetService.saveIfNotExist(widgetlink); 1512 + widgetlink = this.widgetService.saveIfNotExist(widgetlink);
1518 1513
1519 Widget widgetBpeTask = new Widget("Tarefas Workflow", "Tarefas Workflow", this.dominioService.findByChaveAndCodigo("tipoWidget", 8L), Boolean.FALSE); 1514 Widget widgetBpeTask = new Widget("Tarefas Workflow", "Tarefas Workflow", this.dominioService.findByChaveAndCodigo("tipoWidget", 8L), Boolean.FALSE);
1520 - this.widgetService.saveIfNotExist(widgetBpeTask); 1515 + widgetBpeTask = this.widgetService.saveIfNotExist(widgetBpeTask);
1521 1516
1522 List<WidgetParametro> listaParametrosBpeTask = new LinkedList<WidgetParametro>(); 1517 List<WidgetParametro> listaParametrosBpeTask = new LinkedList<WidgetParametro>();
1523 listaParametrosBpeTask.add(new WidgetParametro("Nome da tarefa", "taskName", this.dominioService.findByChaveAndNome("tipoDado", "TEXT_FIELD"), null, null, null, null, null, null, widgetBpeTask)); 1518 listaParametrosBpeTask.add(new WidgetParametro("Nome da tarefa", "taskName", this.dominioService.findByChaveAndNome("tipoDado", "TEXT_FIELD"), null, null, null, null, null, null, widgetBpeTask));