Commit ffd41d35ff9704ab9322ac9bbc0cc95f40b0fc0c

Authored by andre.guimaraes
1 parent 652c2cb1

Corrige testes de conexoes

Alterações nos serviços de info que faziam testes de conexão com os
bancos utilizados pelo SEI-Broker, adicionado teste de conexão com o SEI
e atualização da documentação.
@@ -34,5 +34,7 @@ @@ -34,5 +34,7 @@
34 <attribute name="maven.pomderived" value="true"/> 34 <attribute name="maven.pomderived" value="true"/>
35 </attributes> 35 </attributes>
36 </classpathentry> 36 </classpathentry>
  37 + <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
  38 + <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
37 <classpathentry kind="output" path="target/classes"/> 39 <classpathentry kind="output" path="target/classes"/>
38 </classpath> 40 </classpath>
WebContent/META-INF/MANIFEST.MF 0 → 100644
@@ -0,0 +1,3 @@ @@ -0,0 +1,3 @@
  1 +Manifest-Version: 1.0
  2 +Class-Path:
  3 +
WebContent/WEB-INF/beans.xml 0 → 100644
@@ -0,0 +1,9 @@ @@ -0,0 +1,9 @@
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee"
  3 + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4 + xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/beans_1_1.xsd"
  5 + version="1.1" bean-discovery-mode="annotated">
  6 +
  7 +
  8 +
  9 +</beans>
0 \ No newline at end of file 10 \ No newline at end of file
src/main/java/br/gov/ans/integracao/sei/rest/InfoResource.java
@@ -19,13 +19,15 @@ import javax.ws.rs.Path; @@ -19,13 +19,15 @@ import javax.ws.rs.Path;
19 import javax.ws.rs.Produces; 19 import javax.ws.rs.Produces;
20 import javax.ws.rs.QueryParam; 20 import javax.ws.rs.QueryParam;
21 import javax.ws.rs.core.MediaType; 21 import javax.ws.rs.core.MediaType;
22 -import javax.xml.bind.annotation.XmlRootElement;  
23 22
24 import org.jboss.logging.Logger; 23 import org.jboss.logging.Logger;
25 24
26 import br.gov.ans.dao.DAO; 25 import br.gov.ans.dao.DAO;
27 import br.gov.ans.exceptions.BusinessException; 26 import br.gov.ans.exceptions.BusinessException;
28 import br.gov.ans.factories.qualifiers.PropertiesInfo; 27 import br.gov.ans.factories.qualifiers.PropertiesInfo;
  28 +import br.gov.ans.integracao.sei.client.SeiPortTypeProxy;
  29 +import br.gov.ans.integracao.sei.modelo.Operacao;
  30 +import br.gov.ans.integracao.sei.utils.Constantes;
29 import br.gov.ans.modelo.LogIntegracaoSistemica; 31 import br.gov.ans.modelo.LogIntegracaoSistemica;
30 import br.gov.ans.utils.MessageUtils; 32 import br.gov.ans.utils.MessageUtils;
31 33
@@ -42,6 +44,9 @@ public class InfoResource { @@ -42,6 +44,9 @@ public class InfoResource {
42 @Inject 44 @Inject
43 private MessageUtils messages; 45 private MessageUtils messages;
44 46
  47 + @Inject
  48 + private SeiPortTypeProxy seiNativeService;
  49 +
45 @Inject 50 @Inject
46 @PropertiesInfo(file="config.properties", key="versao.sistema") 51 @PropertiesInfo(file="config.properties", key="versao.sistema")
47 public String versao; 52 public String versao;
@@ -77,7 +82,7 @@ public class InfoResource { @@ -77,7 +82,7 @@ public class InfoResource {
77 */ 82 */
78 @GET 83 @GET
79 @Path("/versao") 84 @Path("/versao")
80 - @Produces(MediaType.APPLICATION_JSON) 85 + @Produces(MediaType.TEXT_PLAIN)
81 public String getNumeroVersao(){ 86 public String getNumeroVersao(){
82 return versao; 87 return versao;
83 } 88 }
@@ -104,14 +109,12 @@ public class InfoResource { @@ -104,14 +109,12 @@ public class InfoResource {
104 */ 109 */
105 @GET 110 @GET
106 @Path("/conexoes/mysql") 111 @Path("/conexoes/mysql")
107 - @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})  
108 - public Banco testMySQLConnection() throws Exception{ 112 + @Produces(MediaType.TEXT_PLAIN)
  113 + public String testMySQLConnection() throws Exception{
109 Query query = emMySQL.createNativeQuery("SELECT version()"); 114 Query query = emMySQL.createNativeQuery("SELECT version()");
110 - Banco banco = new Banco();  
111 115
112 try{ 116 try{
113 - banco.setVersao((String) query.getSingleResult());  
114 - return banco; 117 + return((String) query.getSingleResult());
115 }catch(Exception ex){ 118 }catch(Exception ex){
116 logger.error(messages.getMessage("erro.testar.mysql")); 119 logger.error(messages.getMessage("erro.testar.mysql"));
117 throw new Exception(messages.getMessage("erro.testar.mysql")); 120 throw new Exception(messages.getMessage("erro.testar.mysql"));
@@ -119,7 +122,7 @@ public class InfoResource { @@ -119,7 +122,7 @@ public class InfoResource {
119 } 122 }
120 123
121 /** 124 /**
122 - * @api {get} /info/conexoes/oracle Testar conexão MySQL 125 + * @api {get} /info/conexoes/oracle Testar conexão Oracle
123 * @apiName testOracleConnection 126 * @apiName testOracleConnection
124 * @apiGroup Info 127 * @apiGroup Info
125 * @apiVersion 2.0.0 128 * @apiVersion 2.0.0
@@ -140,37 +143,30 @@ public class InfoResource { @@ -140,37 +143,30 @@ public class InfoResource {
140 */ 143 */
141 @GET 144 @GET
142 @Path("/conexoes/oracle") 145 @Path("/conexoes/oracle")
143 - @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})  
144 - public Banco testOracleConnection() throws Exception{  
145 - Query query = emOracle.createNativeQuery("SELECT * FROM V$VERSION WHERE ROWNUM = 1");  
146 - Banco banco = new Banco(); 146 + @Produces(MediaType.TEXT_PLAIN)
  147 + public String testOracleConnection() throws Exception{
  148 + Query query = emOracle.createNativeQuery("SELECT BANNER FROM V$VERSION WHERE ROWNUM = 1");
147 149
148 try{ 150 try{
149 - banco.setVersao((String) query.getSingleResult());  
150 - return banco; 151 + return ((String) query.getSingleResult());
151 }catch(Exception ex){ 152 }catch(Exception ex){
152 logger.error(messages.getMessage("erro.testar.oracle"),ex); 153 logger.error(messages.getMessage("erro.testar.oracle"),ex);
153 throw new Exception(messages.getMessage("erro.testar.oracle")); 154 throw new Exception(messages.getMessage("erro.testar.oracle"));
154 } 155 }
155 } 156 }
156 - 157 +
157 /** 158 /**
158 - * @api {get} /info Informações  
159 - * @apiName getInfo 159 + * @api {get} /info/conexoes/sei Testar conexão SEI
  160 + * @apiName testSEIConnection
160 * @apiGroup Info 161 * @apiGroup Info
161 * @apiVersion 2.0.0 162 * @apiVersion 2.0.0
162 * 163 *
163 - * @apiDescription Retorna informações da aplicação 164 + * @apiDescription Testa a conexão com o SEI fazendo uma consulta ao serviço listar unidades.
164 * 165 *
165 * @apiExample {curl} Exemplo de requisição: 166 * @apiExample {curl} Exemplo de requisição:
166 - * curl -i http://<host>/sei-broker/service/info 167 + * curl -i http://<host>/sei-broker/service/info/conexoes/sei
167 * 168 *
168 - * @apiSuccess {Info} info Informações da aplicação.  
169 - * @apiSuccess {Banco} info.oracle Informações da conexão Oracle.  
170 - * @apiSuccess {String} info.oracle.versao Versão do banco.  
171 - * @apiSuccess {Banco} info.mysql Informações da conexão MySQL.  
172 - * @apiSuccess {String} info.mysql.versao Versão do banco.  
173 - * @apiSuccess {String} info.versao Versão do SEI-Broker. 169 + * @apiSuccess {String} mensagem Mensagem de sucesso.
174 * 170 *
175 * @apiErrorExample {json} Error-Response: 171 * @apiErrorExample {json} Error-Response:
176 * HTTP/1.1 500 Internal Server Error 172 * HTTP/1.1 500 Internal Server Error
@@ -180,15 +176,17 @@ public class InfoResource { @@ -180,15 +176,17 @@ public class InfoResource {
180 * } 176 * }
181 */ 177 */
182 @GET 178 @GET
183 - @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})  
184 - public Info getInfo() throws Exception{  
185 - Info info = new Info();  
186 -  
187 - info.setVersao(getNumeroVersao());  
188 - info.setMySql(testMySQLConnection());  
189 - info.setOracle(testOracleConnection());  
190 -  
191 - return info; 179 + @Path("/conexoes/sei")
  180 + @Produces(MediaType.TEXT_PLAIN)
  181 + public String testSEIConnection() throws Exception{
  182 + try{
  183 + seiNativeService.listarUnidades(Constantes.SEI_BROKER, Operacao.LISTAR_UNIDADES, null, null);
  184 +
  185 + return "SEI respondeu com sucesso.";
  186 + }catch(Exception ex){
  187 + logger.error(messages.getMessage("erro.testar.sei"),ex);
  188 + throw new Exception(messages.getMessage("erro.testar.sei"));
  189 + }
192 } 190 }
193 191
194 @SuppressWarnings("unchecked") 192 @SuppressWarnings("unchecked")
@@ -202,81 +200,5 @@ public class InfoResource { @@ -202,81 +200,5 @@ public class InfoResource {
202 200
203 return query.getResultList(); 201 return query.getResultList();
204 } 202 }
205 -  
206 - @GET  
207 - @Produces(MediaType.TEXT_HTML)  
208 - public String getInfoHTML() throws Exception{  
209 - StringBuilder html = new StringBuilder();  
210 - Info informacoes = getInfo();  
211 - List<LogIntegracaoSistemica> requests = getUltimosRequests("1", "10");  
212 -  
213 - html.append("<html>");  
214 - html.append("<head><title>SEI-Broker - informações</title></head>");  
215 - html.append("<body>");  
216 - html.append("<h3>Informações</h3>");  
217 - html.append("<table border='1'>");  
218 - html.append("<tr><td>SEI-Broker</td><td>"+informacoes.getVersao()+"</td></tr>");  
219 - html.append("<tr><td>Oracle</td><td>"+informacoes.getOracle().getVersao()+"</td></tr>");  
220 - html.append("<tr><td>MySQL</td><td>"+informacoes.getMySql().getVersao()+"</td></tr>");  
221 - html.append("</table>");  
222 - html.append("</br>");  
223 - html.append("<h3>Últimos requests</h3>");  
224 - html.append("<table border='1'>");  
225 -  
226 - html.append("<tr><th>DATA</th><th>ORIGEM</th></th><th>DESTINO</th></tr>");  
227 - for(LogIntegracaoSistemica l : requests){  
228 - html.append("<tr><td>"+l.getData()+"</td><td>"+l.getOrigem()+"</td></td><td>"+l.getDestino()+"</td></tr>");  
229 - }  
230 -  
231 - html.append("</table>");  
232 - html.append("</body>");  
233 - html.append("</html>");  
234 -  
235 - return html.toString();  
236 - }  
237 -  
238 -  
239 - @XmlRootElement  
240 - public static class Banco {  
241 - private String versao;  
242 -  
243 - public String getVersao() {  
244 - return versao;  
245 - }  
246 -  
247 - public void setVersao(String versao) {  
248 - this.versao = versao;  
249 - }  
250 - }  
251 -  
252 - @XmlRootElement  
253 - public static class Info {  
254 - private String versao;  
255 - private Banco oracle;  
256 - private Banco mySql;  
257 -  
258 - public String getVersao() {  
259 - return versao;  
260 - }  
261 -  
262 - public void setVersao(String versao) {  
263 - this.versao = versao;  
264 - }  
265 -  
266 - public Banco getOracle() {  
267 - return oracle;  
268 - }  
269 -  
270 - public void setOracle(Banco oracle) {  
271 - this.oracle = oracle;  
272 - }  
273 203
274 - public Banco getMySql() {  
275 - return mySql;  
276 - }  
277 -  
278 - public void setMySql(Banco mySql) {  
279 - this.mySql = mySql;  
280 - }  
281 - }  
282 } 204 }
src/main/resources/messages.properties
@@ -61,6 +61,7 @@ erro.template.documento.recebido = O uso de templates é vedado a documentos gera @@ -61,6 +61,7 @@ erro.template.documento.recebido = O uso de templates é vedado a documentos gera
61 erro.template.nao.encontrado = Template {0} não encontrado. 61 erro.template.nao.encontrado = Template {0} não encontrado.
62 erro.testar.mysql = Erro ao testar conexao MySQL. 62 erro.testar.mysql = Erro ao testar conexao MySQL.
63 erro.testar.oracle = Erro ao testar conexao Oracle. 63 erro.testar.oracle = Erro ao testar conexao Oracle.
  64 +erro.testar.sei = Erro ao testar conexao com SEI.
64 erro.tipo.documento.nao.encontrado = Nenhum tipo de documento foi encontrado. 65 erro.tipo.documento.nao.encontrado = Nenhum tipo de documento foi encontrado.
65 erro.tipo.pessoa.invalido = Tipo de pessoa inválido. 66 erro.tipo.pessoa.invalido = Tipo de pessoa inválido.
66 erro.unidade.nao.encontrada = Unidade {0} não encontrada. 67 erro.unidade.nao.encontrada = Unidade {0} não encontrada.
src/main/webapp/api-docs/api_data.js
@@ -1325,8 +1325,8 @@ define({ &quot;api&quot;: [ @@ -1325,8 +1325,8 @@ define({ &quot;api&quot;: [
1325 "url": "", 1325 "url": "",
1326 "version": "0.0.0", 1326 "version": "0.0.0",
1327 "filename": "sei-broker/src/main/webapp/api-docs/main.js", 1327 "filename": "sei-broker/src/main/webapp/api-docs/main.js",
1328 - "group": "C__ANS_sei_broker_Fontes_branches_desenvolvimento_versao_3_sei_broker_src_main_webapp_api_docs_main_js",  
1329 - "groupTitle": "C__ANS_sei_broker_Fontes_branches_desenvolvimento_versao_3_sei_broker_src_main_webapp_api_docs_main_js", 1328 + "group": "C__git_sei_broker_src_main_webapp_api_docs_main_js",
  1329 + "groupTitle": "C__git_sei_broker_src_main_webapp_api_docs_main_js",
1330 "name": "" 1330 "name": ""
1331 }, 1331 },
1332 { 1332 {
@@ -1352,9 +1352,9 @@ define({ &quot;api&quot;: [ @@ -1352,9 +1352,9 @@ define({ &quot;api&quot;: [
1352 "type": "", 1352 "type": "",
1353 "url": "", 1353 "url": "",
1354 "version": "0.0.0", 1354 "version": "0.0.0",
1355 - "filename": "sei-broker/target/sei-broker-2.4.2/api-docs/main.js",  
1356 - "group": "C__ANS_sei_broker_Fontes_branches_desenvolvimento_versao_3_sei_broker_target_sei_broker_2_4_2_api_docs_main_js",  
1357 - "groupTitle": "C__ANS_sei_broker_Fontes_branches_desenvolvimento_versao_3_sei_broker_target_sei_broker_2_4_2_api_docs_main_js", 1355 + "filename": "sei-broker/target/sei-broker-2.5/api-docs/main.js",
  1356 + "group": "C__git_sei_broker_target_sei_broker_2_5_api_docs_main_js",
  1357 + "groupTitle": "C__git_sei_broker_target_sei_broker_2_5_api_docs_main_js",
1358 "name": "" 1358 "name": ""
1359 }, 1359 },
1360 { 1360 {
@@ -4893,16 +4893,16 @@ define({ &quot;api&quot;: [ @@ -4893,16 +4893,16 @@ define({ &quot;api&quot;: [
4893 }, 4893 },
4894 { 4894 {
4895 "type": "get", 4895 "type": "get",
4896 - "url": "/info",  
4897 - "title": "Informações",  
4898 - "name": "getInfo", 4896 + "url": "/info/versao",
  4897 + "title": "Consultar versão",
  4898 + "name": "getNumeroVersao",
4899 "group": "Info", 4899 "group": "Info",
4900 "version": "2.0.0", 4900 "version": "2.0.0",
4901 - "description": "<p>Retorna informações da aplicação</p>", 4901 + "description": "<p>Este método realiza uma consulta para saber a versão do sei-broker que está disponível.</p>",
4902 "examples": [ 4902 "examples": [
4903 { 4903 {
4904 "title": "Exemplo de requisição:", 4904 "title": "Exemplo de requisição:",
4905 - "content": "curl -i http://<host>/sei-broker/service/info", 4905 + "content": "curl -i http://<host>/sei-broker/service/info/versao",
4906 "type": "curl" 4906 "type": "curl"
4907 } 4907 }
4908 ], 4908 ],
@@ -4911,45 +4911,10 @@ define({ &quot;api&quot;: [ @@ -4911,45 +4911,10 @@ define({ &quot;api&quot;: [
4911 "Success 200": [ 4911 "Success 200": [
4912 { 4912 {
4913 "group": "Success 200", 4913 "group": "Success 200",
4914 - "type": "Info",  
4915 - "optional": false,  
4916 - "field": "info",  
4917 - "description": "<p>Informações da aplicação.</p>"  
4918 - },  
4919 - {  
4920 - "group": "Success 200",  
4921 - "type": "Banco",  
4922 - "optional": false,  
4923 - "field": "info.oracle",  
4924 - "description": "<p>Informações da conexão Oracle.</p>"  
4925 - },  
4926 - {  
4927 - "group": "Success 200",  
4928 - "type": "String",  
4929 - "optional": false,  
4930 - "field": "info.oracle.versao",  
4931 - "description": "<p>Versão do banco.</p>"  
4932 - },  
4933 - {  
4934 - "group": "Success 200",  
4935 - "type": "Banco",  
4936 - "optional": false,  
4937 - "field": "info.mysql",  
4938 - "description": "<p>Informações da conexão MySQL.</p>"  
4939 - },  
4940 - {  
4941 - "group": "Success 200",  
4942 "type": "String", 4914 "type": "String",
4943 "optional": false, 4915 "optional": false,
4944 - "field": "info.mysql.versao",  
4945 - "description": "<p>Versão do banco.</p>"  
4946 - },  
4947 - {  
4948 - "group": "Success 200",  
4949 - "type": "String",  
4950 - "optional": false,  
4951 - "field": "info.versao",  
4952 - "description": "<p>Versão do SEI-Broker.</p>" 4916 + "field": "versao",
  4917 + "description": "<p>Número da versão.</p>"
4953 } 4918 }
4954 ] 4919 ]
4955 } 4920 }
@@ -4968,16 +4933,16 @@ define({ &quot;api&quot;: [ @@ -4968,16 +4933,16 @@ define({ &quot;api&quot;: [
4968 }, 4933 },
4969 { 4934 {
4970 "type": "get", 4935 "type": "get",
4971 - "url": "/info/versao",  
4972 - "title": "Consultar versão",  
4973 - "name": "getNumeroVersao", 4936 + "url": "/info/conexoes/mysql",
  4937 + "title": "Testar conexão MySQL",
  4938 + "name": "testMySQLConnection",
4974 "group": "Info", 4939 "group": "Info",
4975 "version": "2.0.0", 4940 "version": "2.0.0",
4976 - "description": "<p>Este método realiza uma consulta para saber a versão do sei-broker que está disponível.</p>", 4941 + "description": "<p>Testa a conexão com o MySQL e retorna o número de versão do banco.</p>",
4977 "examples": [ 4942 "examples": [
4978 { 4943 {
4979 "title": "Exemplo de requisição:", 4944 "title": "Exemplo de requisição:",
4980 - "content": "curl -i http://<host>/sei-broker/service/info/versao", 4945 + "content": "curl -i http://<host>/sei-broker/service/info/conexoes/mysql",
4981 "type": "curl" 4946 "type": "curl"
4982 } 4947 }
4983 ], 4948 ],
@@ -4989,7 +4954,7 @@ define({ &quot;api&quot;: [ @@ -4989,7 +4954,7 @@ define({ &quot;api&quot;: [
4989 "type": "String", 4954 "type": "String",
4990 "optional": false, 4955 "optional": false,
4991 "field": "versao", 4956 "field": "versao",
4992 - "description": "<p>Número da versão.</p>" 4957 + "description": "<p>Número de versão do MySQL.</p>"
4993 } 4958 }
4994 ] 4959 ]
4995 } 4960 }
@@ -5008,16 +4973,16 @@ define({ &quot;api&quot;: [ @@ -5008,16 +4973,16 @@ define({ &quot;api&quot;: [
5008 }, 4973 },
5009 { 4974 {
5010 "type": "get", 4975 "type": "get",
5011 - "url": "/info/conexoes/mysql",  
5012 - "title": "Testar conexão MySQL",  
5013 - "name": "testMySQLConnection", 4976 + "url": "/info/conexoes/oracle",
  4977 + "title": "Testar conexão Oracle",
  4978 + "name": "testOracleConnection",
5014 "group": "Info", 4979 "group": "Info",
5015 "version": "2.0.0", 4980 "version": "2.0.0",
5016 - "description": "<p>Testa a conexão com o MySQL e retorna o número de versão do banco.</p>", 4981 + "description": "<p>Testa a conexão com o Oracle e retorna o número de versão do banco.</p>",
5017 "examples": [ 4982 "examples": [
5018 { 4983 {
5019 "title": "Exemplo de requisição:", 4984 "title": "Exemplo de requisição:",
5020 - "content": "curl -i http://<host>/sei-broker/service/info/conexoes/mysql", 4985 + "content": "curl -i http://<host>/sei-broker/service/info/conexoes/oracle",
5021 "type": "curl" 4986 "type": "curl"
5022 } 4987 }
5023 ], 4988 ],
@@ -5029,7 +4994,7 @@ define({ &quot;api&quot;: [ @@ -5029,7 +4994,7 @@ define({ &quot;api&quot;: [
5029 "type": "String", 4994 "type": "String",
5030 "optional": false, 4995 "optional": false,
5031 "field": "versao", 4996 "field": "versao",
5032 - "description": "<p>Número de versão do MySQL.</p>" 4997 + "description": "<p>Número de versão do Oracle.</p>"
5033 } 4998 }
5034 ] 4999 ]
5035 } 5000 }
@@ -5048,16 +5013,16 @@ define({ &quot;api&quot;: [ @@ -5048,16 +5013,16 @@ define({ &quot;api&quot;: [
5048 }, 5013 },
5049 { 5014 {
5050 "type": "get", 5015 "type": "get",
5051 - "url": "/info/conexoes/oracle",  
5052 - "title": "Testar conexão MySQL",  
5053 - "name": "testOracleConnection", 5016 + "url": "/info/conexoes/sei",
  5017 + "title": "Testar conexão SEI",
  5018 + "name": "testSEIConnection",
5054 "group": "Info", 5019 "group": "Info",
5055 "version": "2.0.0", 5020 "version": "2.0.0",
5056 - "description": "<p>Testa a conexão com o Oracle e retorna o número de versão do banco.</p>", 5021 + "description": "<p>Testa a conexão com o SEI fazendo uma consulta ao serviço listar unidades.</p>",
5057 "examples": [ 5022 "examples": [
5058 { 5023 {
5059 "title": "Exemplo de requisição:", 5024 "title": "Exemplo de requisição:",
5060 - "content": "curl -i http://<host>/sei-broker/service/info/conexoes/oracle", 5025 + "content": "curl -i http://<host>/sei-broker/service/info/conexoes/sei",
5061 "type": "curl" 5026 "type": "curl"
5062 } 5027 }
5063 ], 5028 ],
@@ -5068,8 +5033,8 @@ define({ &quot;api&quot;: [ @@ -5068,8 +5033,8 @@ define({ &quot;api&quot;: [
5068 "group": "Success 200", 5033 "group": "Success 200",
5069 "type": "String", 5034 "type": "String",
5070 "optional": false, 5035 "optional": false,
5071 - "field": "versao",  
5072 - "description": "<p>Número de versão do Oracle.</p>" 5036 + "field": "mensagem",
  5037 + "description": "<p>Mensagem de sucesso.</p>"
5073 } 5038 }
5074 ] 5039 ]
5075 } 5040 }
src/main/webapp/api-docs/api_data.json
@@ -1325,8 +1325,8 @@ @@ -1325,8 +1325,8 @@
1325 "url": "", 1325 "url": "",
1326 "version": "0.0.0", 1326 "version": "0.0.0",
1327 "filename": "sei-broker/src/main/webapp/api-docs/main.js", 1327 "filename": "sei-broker/src/main/webapp/api-docs/main.js",
1328 - "group": "C__ANS_sei_broker_Fontes_branches_desenvolvimento_versao_3_sei_broker_src_main_webapp_api_docs_main_js",  
1329 - "groupTitle": "C__ANS_sei_broker_Fontes_branches_desenvolvimento_versao_3_sei_broker_src_main_webapp_api_docs_main_js", 1328 + "group": "C__git_sei_broker_src_main_webapp_api_docs_main_js",
  1329 + "groupTitle": "C__git_sei_broker_src_main_webapp_api_docs_main_js",
1330 "name": "" 1330 "name": ""
1331 }, 1331 },
1332 { 1332 {
@@ -1352,9 +1352,9 @@ @@ -1352,9 +1352,9 @@
1352 "type": "", 1352 "type": "",
1353 "url": "", 1353 "url": "",
1354 "version": "0.0.0", 1354 "version": "0.0.0",
1355 - "filename": "sei-broker/target/sei-broker-2.4.2/api-docs/main.js",  
1356 - "group": "C__ANS_sei_broker_Fontes_branches_desenvolvimento_versao_3_sei_broker_target_sei_broker_2_4_2_api_docs_main_js",  
1357 - "groupTitle": "C__ANS_sei_broker_Fontes_branches_desenvolvimento_versao_3_sei_broker_target_sei_broker_2_4_2_api_docs_main_js", 1355 + "filename": "sei-broker/target/sei-broker-2.5/api-docs/main.js",
  1356 + "group": "C__git_sei_broker_target_sei_broker_2_5_api_docs_main_js",
  1357 + "groupTitle": "C__git_sei_broker_target_sei_broker_2_5_api_docs_main_js",
1358 "name": "" 1358 "name": ""
1359 }, 1359 },
1360 { 1360 {
@@ -4893,16 +4893,16 @@ @@ -4893,16 +4893,16 @@
4893 }, 4893 },
4894 { 4894 {
4895 "type": "get", 4895 "type": "get",
4896 - "url": "/info",  
4897 - "title": "Informações",  
4898 - "name": "getInfo", 4896 + "url": "/info/versao",
  4897 + "title": "Consultar versão",
  4898 + "name": "getNumeroVersao",
4899 "group": "Info", 4899 "group": "Info",
4900 "version": "2.0.0", 4900 "version": "2.0.0",
4901 - "description": "<p>Retorna informações da aplicação</p>", 4901 + "description": "<p>Este método realiza uma consulta para saber a versão do sei-broker que está disponível.</p>",
4902 "examples": [ 4902 "examples": [
4903 { 4903 {
4904 "title": "Exemplo de requisição:", 4904 "title": "Exemplo de requisição:",
4905 - "content": "curl -i http://<host>/sei-broker/service/info", 4905 + "content": "curl -i http://<host>/sei-broker/service/info/versao",
4906 "type": "curl" 4906 "type": "curl"
4907 } 4907 }
4908 ], 4908 ],
@@ -4911,45 +4911,10 @@ @@ -4911,45 +4911,10 @@
4911 "Success 200": [ 4911 "Success 200": [
4912 { 4912 {
4913 "group": "Success 200", 4913 "group": "Success 200",
4914 - "type": "Info",  
4915 - "optional": false,  
4916 - "field": "info",  
4917 - "description": "<p>Informações da aplicação.</p>"  
4918 - },  
4919 - {  
4920 - "group": "Success 200",  
4921 - "type": "Banco",  
4922 - "optional": false,  
4923 - "field": "info.oracle",  
4924 - "description": "<p>Informações da conexão Oracle.</p>"  
4925 - },  
4926 - {  
4927 - "group": "Success 200",  
4928 - "type": "String",  
4929 - "optional": false,  
4930 - "field": "info.oracle.versao",  
4931 - "description": "<p>Versão do banco.</p>"  
4932 - },  
4933 - {  
4934 - "group": "Success 200",  
4935 - "type": "Banco",  
4936 - "optional": false,  
4937 - "field": "info.mysql",  
4938 - "description": "<p>Informações da conexão MySQL.</p>"  
4939 - },  
4940 - {  
4941 - "group": "Success 200",  
4942 "type": "String", 4914 "type": "String",
4943 "optional": false, 4915 "optional": false,
4944 - "field": "info.mysql.versao",  
4945 - "description": "<p>Versão do banco.</p>"  
4946 - },  
4947 - {  
4948 - "group": "Success 200",  
4949 - "type": "String",  
4950 - "optional": false,  
4951 - "field": "info.versao",  
4952 - "description": "<p>Versão do SEI-Broker.</p>" 4916 + "field": "versao",
  4917 + "description": "<p>Número da versão.</p>"
4953 } 4918 }
4954 ] 4919 ]
4955 } 4920 }
@@ -4968,16 +4933,16 @@ @@ -4968,16 +4933,16 @@
4968 }, 4933 },
4969 { 4934 {
4970 "type": "get", 4935 "type": "get",
4971 - "url": "/info/versao",  
4972 - "title": "Consultar versão",  
4973 - "name": "getNumeroVersao", 4936 + "url": "/info/conexoes/mysql",
  4937 + "title": "Testar conexão MySQL",
  4938 + "name": "testMySQLConnection",
4974 "group": "Info", 4939 "group": "Info",
4975 "version": "2.0.0", 4940 "version": "2.0.0",
4976 - "description": "<p>Este método realiza uma consulta para saber a versão do sei-broker que está disponível.</p>", 4941 + "description": "<p>Testa a conexão com o MySQL e retorna o número de versão do banco.</p>",
4977 "examples": [ 4942 "examples": [
4978 { 4943 {
4979 "title": "Exemplo de requisição:", 4944 "title": "Exemplo de requisição:",
4980 - "content": "curl -i http://<host>/sei-broker/service/info/versao", 4945 + "content": "curl -i http://<host>/sei-broker/service/info/conexoes/mysql",
4981 "type": "curl" 4946 "type": "curl"
4982 } 4947 }
4983 ], 4948 ],
@@ -4989,7 +4954,7 @@ @@ -4989,7 +4954,7 @@
4989 "type": "String", 4954 "type": "String",
4990 "optional": false, 4955 "optional": false,
4991 "field": "versao", 4956 "field": "versao",
4992 - "description": "<p>Número da versão.</p>" 4957 + "description": "<p>Número de versão do MySQL.</p>"
4993 } 4958 }
4994 ] 4959 ]
4995 } 4960 }
@@ -5008,16 +4973,16 @@ @@ -5008,16 +4973,16 @@
5008 }, 4973 },
5009 { 4974 {
5010 "type": "get", 4975 "type": "get",
5011 - "url": "/info/conexoes/mysql",  
5012 - "title": "Testar conexão MySQL",  
5013 - "name": "testMySQLConnection", 4976 + "url": "/info/conexoes/oracle",
  4977 + "title": "Testar conexão Oracle",
  4978 + "name": "testOracleConnection",
5014 "group": "Info", 4979 "group": "Info",
5015 "version": "2.0.0", 4980 "version": "2.0.0",
5016 - "description": "<p>Testa a conexão com o MySQL e retorna o número de versão do banco.</p>", 4981 + "description": "<p>Testa a conexão com o Oracle e retorna o número de versão do banco.</p>",
5017 "examples": [ 4982 "examples": [
5018 { 4983 {
5019 "title": "Exemplo de requisição:", 4984 "title": "Exemplo de requisição:",
5020 - "content": "curl -i http://<host>/sei-broker/service/info/conexoes/mysql", 4985 + "content": "curl -i http://<host>/sei-broker/service/info/conexoes/oracle",
5021 "type": "curl" 4986 "type": "curl"
5022 } 4987 }
5023 ], 4988 ],
@@ -5029,7 +4994,7 @@ @@ -5029,7 +4994,7 @@
5029 "type": "String", 4994 "type": "String",
5030 "optional": false, 4995 "optional": false,
5031 "field": "versao", 4996 "field": "versao",
5032 - "description": "<p>Número de versão do MySQL.</p>" 4997 + "description": "<p>Número de versão do Oracle.</p>"
5033 } 4998 }
5034 ] 4999 ]
5035 } 5000 }
@@ -5048,16 +5013,16 @@ @@ -5048,16 +5013,16 @@
5048 }, 5013 },
5049 { 5014 {
5050 "type": "get", 5015 "type": "get",
5051 - "url": "/info/conexoes/oracle",  
5052 - "title": "Testar conexão MySQL",  
5053 - "name": "testOracleConnection", 5016 + "url": "/info/conexoes/sei",
  5017 + "title": "Testar conexão SEI",
  5018 + "name": "testSEIConnection",
5054 "group": "Info", 5019 "group": "Info",
5055 "version": "2.0.0", 5020 "version": "2.0.0",
5056 - "description": "<p>Testa a conexão com o Oracle e retorna o número de versão do banco.</p>", 5021 + "description": "<p>Testa a conexão com o SEI fazendo uma consulta ao serviço listar unidades.</p>",
5057 "examples": [ 5022 "examples": [
5058 { 5023 {
5059 "title": "Exemplo de requisição:", 5024 "title": "Exemplo de requisição:",
5060 - "content": "curl -i http://<host>/sei-broker/service/info/conexoes/oracle", 5025 + "content": "curl -i http://<host>/sei-broker/service/info/conexoes/sei",
5061 "type": "curl" 5026 "type": "curl"
5062 } 5027 }
5063 ], 5028 ],
@@ -5068,8 +5033,8 @@ @@ -5068,8 +5033,8 @@
5068 "group": "Success 200", 5033 "group": "Success 200",
5069 "type": "String", 5034 "type": "String",
5070 "optional": false, 5035 "optional": false,
5071 - "field": "versao",  
5072 - "description": "<p>Número de versão do Oracle.</p>" 5036 + "field": "mensagem",
  5037 + "description": "<p>Mensagem de sucesso.</p>"
5073 } 5038 }
5074 ] 5039 ]
5075 } 5040 }
src/main/webapp/api-docs/api_project.js
@@ -8,7 +8,7 @@ define({ @@ -8,7 +8,7 @@ define({
8 "apidoc": "0.2.0", 8 "apidoc": "0.2.0",
9 "generator": { 9 "generator": {
10 "name": "apidoc", 10 "name": "apidoc",
11 - "time": "2018-04-09T12:23:09.782Z", 11 + "time": "2018-04-25T13:34:37.392Z",
12 "url": "http://apidocjs.com", 12 "url": "http://apidocjs.com",
13 "version": "0.15.1" 13 "version": "0.15.1"
14 } 14 }
src/main/webapp/api-docs/api_project.json
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 "apidoc": "0.2.0", 8 "apidoc": "0.2.0",
9 "generator": { 9 "generator": {
10 "name": "apidoc", 10 "name": "apidoc",
11 - "time": "2018-04-09T12:23:09.782Z", 11 + "time": "2018-04-25T13:34:37.392Z",
12 "url": "http://apidocjs.com", 12 "url": "http://apidocjs.com",
13 "version": "0.15.1" 13 "version": "0.15.1"
14 } 14 }