Skip to content

Commit

Permalink
adicionando novos servicos de conexao
Browse files Browse the repository at this point in the history
  • Loading branch information
AdsonEsteves committed Oct 27, 2020
1 parent a04585a commit 0c0d786
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 17 deletions.
31 changes: 23 additions & 8 deletions services.xml
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,27 @@
<scope>components</scope>
<organization>SACIP</organization>
</service>
<service>
<name>storeStudentUseData</name>
<description>guard os dados de uso do usuario no banco de dados</description>
<entity>DBConnection</entity>
<scope>components</scope>
<organization>SACIP</organization>
</service>
<service>
<name>editStudentListAttr</name>
<description>guard os dados de uso do usuario no banco de dados</description>
<entity>DBConnection</entity>
<scope>components</scope>
<organization>SACIP</organization>
</service>
<service>
<name>storeStudentContentUse</name>
<description>guard os dados de uso do usuario no banco de dados</description>
<entity>DBConnection</entity>
<scope>components</scope>
<organization>SACIP</organization>
</service>
<service>
<name>createContent</name>
<description>registra um novo conteudo no banco de dados</description>
Expand Down Expand Up @@ -190,12 +211,6 @@
<scope>components</scope>
<organization>SACIP</organization>
</service>
<service>
<name>storeStudentUseData</name>
<description>guard os dados de uso do usuario no banco de dados</description>
<entity>DBConnection</entity>
<scope>components</scope>
<organization>SACIP</organization>
</service>



</services>
4 changes: 1 addition & 3 deletions src/main/java/sacip/Launcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@

@SpringBootApplication
public class Launcher {
public static void main(String[] args)
{
public static void main(String[] args) {
// Inicializando Arquitetura via C�digo
// (não mostra a tela de gerenciamento)
System.out.println("testes");
AgentServer.initialize(true, true);
SpringApplication.run(Launcher.class, args);
}
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/sacip/sti/components/DBConnection.java
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,8 @@ private String editUser(String name, String atributeName, String newValue)
try
{
var result = cypher.writequery("MATCH (n:USER { name: $name })"+
"SET n.$atribute = $newValue"+
"RETURN n.name, n.$atribute"
"SET n."+atributeName+" = $newValue"+
"RETURN n.name, n."+atributeName+""
, Map.of("name", name, "atribute", atributeName, "newValue", newValue));
return result.toString();
}
Expand All @@ -289,8 +289,8 @@ private String editUserListAttr(String name, String atributeName, JsonNode newVa
try
{
var result = cypher.writequery("MATCH (n:USER { name: $name })"+
"\nSET n.$atribute = coalesce(n.$atribute, []) + $newvalue"+
"\nRETURN n.name, n.$atribute"
"\nSET n."+atributeName+" = coalesce(n."+atributeName+", []) + $newValue"+
"\nRETURN n.name, n."+atributeName
, Map.of("name", name, "atribute", atributeName, "newValue", newValue.toString()));
return result.toString();
}
Expand Down
4 changes: 2 additions & 2 deletions structure.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<localPort>7101</localPort>

<serverPort>7100</serverPort>
<!--<serverAddress>127.0.0.1</serverAddress>-->
<serverAddress>35.192.97.232</serverAddress>
<serverAddress>127.0.0.1</serverAddress>
<!--<serverAddress>35.192.97.232</serverAddress>-->

<organizations>
<organization>
Expand Down

0 comments on commit 0c0d786

Please sign in to comment.