-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
17d0cf6
commit e282676
Showing
10 changed files
with
238 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,47 @@ | ||
package sacip.rest; | ||
|
||
import org.springframework.web.bind.annotation.*; | ||
import java.util.List; | ||
|
||
import org.midas.as.AgentServer; | ||
import org.midas.as.manager.execution.ServiceWrapper; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
@RestController | ||
@RequestMapping("/tutor") | ||
public class RestTutor { | ||
|
||
private String test = "HELLO WORLD"; | ||
private static Logger LOG = LoggerFactory.getLogger(AgentServer.class); | ||
|
||
@GetMapping("/requisitaConteudos") | ||
public String getConteudosRecomendados(){ | ||
return ""; | ||
try { | ||
ServiceWrapper wrapper = AgentServer.require("SACIP", "suggestContent"); | ||
List run = wrapper.run(); | ||
return run.toString(); | ||
} catch (Exception e) { | ||
LOG.error("Falhou criar conta em REST Interface", e); | ||
return "Falhou criar conta: \n"+e.getLocalizedMessage(); | ||
} | ||
} | ||
|
||
@GetMapping("/trilha/{user}") | ||
public String getTrilhaUsuario(String name) { | ||
return test; | ||
} | ||
// @GetMapping("/trilha/{user}") | ||
// public String getTrilhaUsuario(String name) { | ||
// return test; | ||
// } | ||
|
||
@GetMapping("/trilha") | ||
public String getTrilhas(String name) { | ||
return test; | ||
} | ||
// @GetMapping("/trilha") | ||
// public String getTrilhas(String name) { | ||
// return test; | ||
// } | ||
|
||
@GetMapping("/dicas") | ||
public String getDicas(String name) { | ||
return test; | ||
} | ||
// @GetMapping("/dicas") | ||
// public String getDicas(String name) { | ||
// return test; | ||
// } | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.