integrace s egovernmentem na 2 řádky - openalt · apache camel “ apache camel is a powerful...

20
Integrace s eGovernmentem na 2 ř ádky Josef Ludvíček Sotware engineer @Wandera

Upload: others

Post on 04-Jun-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Integrace s eGovernmentem na 2 řádky - OpenAlt · Apache Camel “ Apache Camel is a powerful open source integration framework based on known Enterprise Integration Patterns with

Integrace s eGovernmentemna 2 řádky

Josef LudvíčekSotware engineer @Wandera

Page 2: Integrace s eGovernmentem na 2 řádky - OpenAlt · Apache Camel “ Apache Camel is a powerful open source integration framework based on known Enterprise Integration Patterns with

Czech eGovernment

zákon č. 365/2000 Sb.

zákon č. 300/2008 Sb.

zákon č. 111/2009 Sb.

Page 3: Integrace s eGovernmentem na 2 řádky - OpenAlt · Apache Camel “ Apache Camel is a powerful open source integration framework based on known Enterprise Integration Patterns with
Page 4: Integrace s eGovernmentem na 2 řádky - OpenAlt · Apache Camel “ Apache Camel is a powerful open source integration framework based on known Enterprise Integration Patterns with

https://www.datoveschranky.info/o-datovych-schrankach/vyzkousejte-si-datovou-schranku

Page 5: Integrace s eGovernmentem na 2 řádky - OpenAlt · Apache Camel “ Apache Camel is a powerful open source integration framework based on known Enterprise Integration Patterns with

http://www.abclinuxu.cz/datove-schranky

Page 6: Integrace s eGovernmentem na 2 řádky - OpenAlt · Apache Camel “ Apache Camel is a powerful open source integration framework based on known Enterprise Integration Patterns with

https://github.com/czgovJava ISDS

přístup k datovým schránkám z javyGit tag >> maven centralfork

Camel ISDSintegrace Java ISDS do Apache CamelGit tag >> maven central

hlidacsmluv-dotacevyhledávání v registru smluv pro aplikace z

xrosecky/JAVA_ISDS

https://dotacni-parazit.cz/https://hackujstat.cz/

Page 7: Integrace s eGovernmentem na 2 řádky - OpenAlt · Apache Camel “ Apache Camel is a powerful open source integration framework based on known Enterprise Integration Patterns with

Apache Camel

“ Apache Camel is a powerful open sourceintegration framework based on known

Enterprise Integration Patterns withpowerful Bean Integration.

Page 8: Integrace s eGovernmentem na 2 řádky - OpenAlt · Apache Camel “ Apache Camel is a powerful open source integration framework based on known Enterprise Integration Patterns with

Apache Camel

Co jsou Enterprise Integration Patterns (EIP) ?

Je to kniha.

Page 9: Integrace s eGovernmentem na 2 řádky - OpenAlt · Apache Camel “ Apache Camel is a powerful open source integration framework based on known Enterprise Integration Patterns with

Apache Camel

Co jsou Enterprise Integration Patterns (EIP) ?

Page 10: Integrace s eGovernmentem na 2 řádky - OpenAlt · Apache Camel “ Apache Camel is a powerful open source integration framework based on known Enterprise Integration Patterns with

Apache Camel

Page 11: Integrace s eGovernmentem na 2 řádky - OpenAlt · Apache Camel “ Apache Camel is a powerful open source integration framework based on known Enterprise Integration Patterns with

Apache Camel

import org.apache.camel.builder.RouteBuilder;

public class TestRouteBuilder extends RouteBuilder { @Override public void configure() throws Exception {

from("activemq:queue:neworder") .choice() .when(xpath("/order/product = 'widget'")) .to("activemq:queue:widget") .otherwise() .to("activemq:queue:gadget") .end(); }}

Page 12: Integrace s eGovernmentem na 2 řádky - OpenAlt · Apache Camel “ Apache Camel is a powerful open source integration framework based on known Enterprise Integration Patterns with

Apache Camel

import org.apache.camel.builder.RouteBuilder;

public class TestRouteBuilder extends RouteBuilder { @Override public void configure() throws Exception {

from("file:/var/incoming?delete=true") .choice() .when(xpath("/order/product = 'widget'")) .to("ftp:[email protected]/upload?password=123") .otherwise() .to("isds:message?username=ABC&password=123") .end(); }}

Page 13: Integrace s eGovernmentem na 2 řádky - OpenAlt · Apache Camel “ Apache Camel is a powerful open source integration framework based on known Enterprise Integration Patterns with

Apache Camelhttp://camel.apache.org/components.html

200+ components

SQL

Page 14: Integrace s eGovernmentem na 2 řádky - OpenAlt · Apache Camel “ Apache Camel is a powerful open source integration framework based on known Enterprise Integration Patterns with

from("isds:messages?environment=test&username=AAA&password=123&zfo=true") .to("file:messages");

Integrace na 2 řádky

Page 15: Integrace s eGovernmentem na 2 řádky - OpenAlt · Apache Camel “ Apache Camel is a powerful open source integration framework based on known Enterprise Integration Patterns with

package com.github.czgov.playground.route;

import org.apache.camel.builder.RouteBuilder;

public class ZFORoute extends RouteBuilder { @Override public void configure() throws Exception { from("isds:messages?environment=test&" + "username={{isds.login}}&password={{isds.password}}&zfo=true") .to("file:messages"); }}

Integrace na 2 řádky

Page 16: Integrace s eGovernmentem na 2 řádky - OpenAlt · Apache Camel “ Apache Camel is a powerful open source integration framework based on known Enterprise Integration Patterns with
Page 17: Integrace s eGovernmentem na 2 řádky - OpenAlt · Apache Camel “ Apache Camel is a powerful open source integration framework based on known Enterprise Integration Patterns with

https://github.com/czgov

Page 18: Integrace s eGovernmentem na 2 řádky - OpenAlt · Apache Camel “ Apache Camel is a powerful open source integration framework based on known Enterprise Integration Patterns with

new Shiny Componenthttp://camel.apache.org/creating-a-

new-camel-component.htmlclass ShinyComponent extends UriEndpointComponent { // component starting point // creates Endpoint protected Endpoint createEndpoint();}

class ShinyEndpoint extends DefaultEndpoint { // define all parameters and configuration options // used for parsing uri and docs generation // create consumer and producer}

class ShinyConsumer extends ScheduledPollConsumer { // from("shiny:..") protected int poll();}

class ShinyProducer extends DefaultProducer { // to("shiny:...") public void process(Exchange exchange);}

Page 19: Integrace s eGovernmentem na 2 řádky - OpenAlt · Apache Camel “ Apache Camel is a powerful open source integration framework based on known Enterprise Integration Patterns with

Děkuji za pozornost

Josef LudvíčekSotware engineer @[email protected]

Page 20: Integrace s eGovernmentem na 2 řádky - OpenAlt · Apache Camel “ Apache Camel is a powerful open source integration framework based on known Enterprise Integration Patterns with

Zdroje

dokumentace frameworku Apache Camel

prezentace Microservices with Apache Camel, Claus Ibsen

kniha Camel In Action, Claus Ibsen and Jonathan Anstey

http://camel.apache.org/

https://www.slideshare.net/davsclaus/microservices-with-apache-camel

https://www.manning.com/books/camel-in-action