diff --git a/nepomuk/pom.xml b/nepomuk/pom.xml index adb1840..ae1e815 100644 --- a/nepomuk/pom.xml +++ b/nepomuk/pom.xml @@ -11,11 +11,12 @@ 0.4.1-SNAPSHOT 1.7.5 - 4.3.1.RELEASE + 4.3.2.RELEASE 4.1.3.RELEASE - 0.6 - 0.4.2 - 0.2 + 0.10 + 0.4.3 + 0.3 + 0.1 $2a$04$NXKVTx9XrpEST6CLn/ps7eP8YsK3t.5A/mvAoYpg.X8QqgOKtc1za @@ -62,8 +63,8 @@ - edu.asu.diging.giles-eco - requests + edu.asu.diging + giles-eco-requests ${geco.requests.version} @@ -76,6 +77,11 @@ september-util ${geco.september.util.version} + + edu.asu.diging.giles-eco + kafka-util + ${geco.kafka-util.version} + diff --git a/nepomuk/src/main/java/edu/asu/diging/gilesecosystem/nepomuk/core/kafka/impl/StorageRequestReceiver.java b/nepomuk/src/main/java/edu/asu/diging/gilesecosystem/nepomuk/core/kafka/impl/StorageRequestReceiver.java index f597ed7..0585d9e 100644 --- a/nepomuk/src/main/java/edu/asu/diging/gilesecosystem/nepomuk/core/kafka/impl/StorageRequestReceiver.java +++ b/nepomuk/src/main/java/edu/asu/diging/gilesecosystem/nepomuk/core/kafka/impl/StorageRequestReceiver.java @@ -2,8 +2,6 @@ import java.io.IOException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.PropertySource; import org.springframework.kafka.annotation.KafkaListener; @@ -19,14 +17,12 @@ @PropertySource("classpath:/config.properties") public class StorageRequestReceiver { - private final Logger logger = LoggerFactory.getLogger(getClass()); - @Autowired private IRequestProcessor requestProcessor; - + @Autowired private ISystemMessageHandler messageHandler; - + @KafkaListener(topics = "${topic_storage_request}") public void receiveMessage(String message) { ObjectMapper mapper = new ObjectMapper(); @@ -35,10 +31,10 @@ public void receiveMessage(String message) { request = mapper.readValue(message, StorageRequest.class); } catch (IOException e) { messageHandler.handleMessage("Could not unmarshall request.", e, MessageType.ERROR); - // FIXME: handel this case + // FIXME: handle this case return; } - + requestProcessor.processRequest(request); } } diff --git a/nepomuk/src/main/java/edu/asu/diging/gilesecosystem/nepomuk/web/controller/admin/AddRegisteredAppController.java b/nepomuk/src/main/java/edu/asu/diging/gilesecosystem/nepomuk/web/controller/admin/AddRegisteredAppController.java index 18e0c97..0ecfd4a 100755 --- a/nepomuk/src/main/java/edu/asu/diging/gilesecosystem/nepomuk/web/controller/admin/AddRegisteredAppController.java +++ b/nepomuk/src/main/java/edu/asu/diging/gilesecosystem/nepomuk/web/controller/admin/AddRegisteredAppController.java @@ -23,13 +23,13 @@ @Controller public class AddRegisteredAppController { - + @Autowired private IRegisteredAppManager appManager; @Autowired private ISystemMessageHandler messageHandler; - + @InitBinder("app") public void init(WebDataBinder binder) { binder.addValidators(new RegisteredAppValidator()); @@ -40,16 +40,17 @@ public String showRegisterAppPage(Model model) { model.addAttribute("app", new RegisteredApp()); return "admin/apps/register"; } - + @RequestMapping(value = "/admin/apps/register", method = RequestMethod.POST) - public String registerApp(@Validated @ModelAttribute("app") RegisteredApp app, BindingResult results, Model model, RedirectAttributes redirectAttrs) { - + public String registerApp(@Validated @ModelAttribute("app") RegisteredApp app, BindingResult results, Model model, + RedirectAttributes redirectAttrs) { + if (results.hasErrors()) { return "admin/apps/register"; } - + IRegisteredApp newApp = appManager.storeApp(app); - + IAppToken token = null; try { token = appManager.createToken(newApp); @@ -57,10 +58,10 @@ public String registerApp(@Validated @ModelAttribute("app") RegisteredApp app, B messageHandler.handleMessage("Token generation failed.", e, MessageType.ERROR); redirectAttrs.addFlashAttribute("show_alert", true); redirectAttrs.addFlashAttribute("alert_type", "danger"); - redirectAttrs.addFlashAttribute("alert_msg", "You app has been registered, but token generation failed."); + redirectAttrs.addFlashAttribute("alert_msg", "You app has been registered, but token generation failed."); } redirectAttrs.addFlashAttribute("token", token); - + return "redirect:/admin/apps/" + app.getId(); } } diff --git a/nepomuk/src/main/resources/log4j.xml b/nepomuk/src/main/resources/log4j.xml index 13b01a9..5b8ec51 100755 --- a/nepomuk/src/main/resources/log4j.xml +++ b/nepomuk/src/main/resources/log4j.xml @@ -9,6 +9,14 @@ + + + + + + + + @@ -44,6 +52,7 @@ + diff --git a/nepomuk/src/main/webapp/WEB-INF/spring/appServlet/servlet-context.xml b/nepomuk/src/main/webapp/WEB-INF/spring/appServlet/servlet-context.xml index b72e813..a3601c7 100644 --- a/nepomuk/src/main/webapp/WEB-INF/spring/appServlet/servlet-context.xml +++ b/nepomuk/src/main/webapp/WEB-INF/spring/appServlet/servlet-context.xml @@ -12,7 +12,7 @@ http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.2.xsd"> - + diff --git a/nepomuk/src/main/webapp/WEB-INF/tiles/skeleton.jsp b/nepomuk/src/main/webapp/WEB-INF/tiles/skeleton.jsp index cc9b77f..160741a 100755 --- a/nepomuk/src/main/webapp/WEB-INF/tiles/skeleton.jsp +++ b/nepomuk/src/main/webapp/WEB-INF/tiles/skeleton.jsp @@ -63,6 +63,8 @@
  • ">Admin Password
  • +
  • + ">Kafka