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
<?xml version="1.0" encoding="UTF-8"?> | |
<features name="Tesipro" xmlns="http://karaf.apache.org/xmlns/features/v1.2.0"> | |
<repository>mvn:org.apache.camel.karaf/apache-camel/2.12.2/xml/features</repository> | |
<repository>mvn:org.apache.activemq/activemq-karaf/5.9.0/xml/features</repository> | |
<repository>mvn:org.apache.cxf.karaf/apache-cxf/2.7.7/xml/features</repository> | |
<feature name="tesipro-requisites" resolver="(obr)" start-level="60"> | |
<!-- Container dependencies --> |
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
@Reference(referenceInterface = AspectRatioCalculator.class, cardinality = ReferenceCardinality.OPTIONAL_MULTIPLE, policy = ReferencePolicy.DYNAMIC) | |
private final Map<String, AspectRatioCalculator> aspectRatioCalculators = new ConcurrentHashMap<String, AspectRatioCalculator>(); | |
protected void bindAspectRatioCalculators(final AspectRatioCalculator arc) { | |
LOG.debug("Registering [{}] as aspect ratio calculator for resource type [{}]", arc.getClass().getName(), arc.getResourceType()); | |
this.aspectRatioCalculators.put(arc.getResourceType(), arc); | |
} | |
protected void unbindAspectRatioCalculators(final AspectRatioCalculator arc) { | |
LOG.debug("Unregistering [{}] as aspect ratio calculator for resource type [{}]", arc.getClass().getName(), arc.getResourceType()); |
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
@Test | |
public void productSplitter() { | |
CamelContext context = new DefaultCamelContext(); | |
try { | |
context.addRoutes(new RouteBuilder() { | |
@Override | |
public void configure() { | |
from("file:src/test/resources/messages/products.xml"). | |
split(xpath("//Skus/Sku")). | |
setHeader("SkuID", xpath("//Sku/Id")).convertBodyTo(String.class).to("direct:end"); |
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
from("file://src/test/resources/messages?fileName=products.xml"). | |
log("Source Body : ${body}"). | |
to("stream:out"). | |
split(xpath("//Skus/Sku")).log("Split Body : ${body}"). | |
setHeader("SkuID", xpath("//Sku/Id")). | |
convertBodyTo(String.class).to("mock:end"); |
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
public void configure() { | |
from("direct:products"). | |
from("direct:prices"). | |
split(xpath("//Skus/Sku|//skus/sku")). | |
setHeader("SkuID", xpath("//Sku/@Id|//sku/@id", String.class)).convertBodyTo(String.class). | |
aggregate(header("SkuID"), new GroupedMessageAggregationStrategy()).completionSize(2).completionTimeout(2000). | |
to("mock:end"); | |
} |
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
public void configure() { | |
from("direct:products", "direct:prices").to("direct:combined"); | |
from("direct:combined"). | |
split(xpath("//Skus/Sku|//skus/sku")). | |
setHeader("SkuID", xpath("//Sku/@Id|//sku/@id", String.class)).convertBodyTo(String.class). | |
aggregate(header("SkuID"), new GroupedMessageAggregationStrategy()).completionSize(4). | |
log("Aggregated : ${body}"). | |
to("mock:end"); | |
} |
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
public class MapToXMLTransformer { | |
/* | |
SKU_ID, DATE_EFF, DATE_INAC, VAT_CODE_ATT, PCNT_TO_APLY | |
Origin = List<HashMap<String,String>> | |
[ [skuid=10, date_eff=JAN, date_inac=FEB, vat_code_att=S, pcnt_to_aply=80], | |
[skuid=10, date_eff=JAN, date_inac=FEB, vat_code_att=Z, pcnt_to_aply=20], | |
[skuid=10, date_eff=MAR, date_inac=APR, vat_code_att=S, pcnt_to_aply=100] | |
] | |
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
Origin = List<HashMap<String,String>> | |
[ [skuid=10, date_eff=JAN, date_inac=FEB, vat_code_att=S, pcnt_to_aply=80], | |
[skuid=10, date_eff=JAN, date_inac=FEB, vat_code_att=Z, pcnt_to_aply=20], | |
[skuid=10, date_eff=MAR, date_inac=APR, vat_code_att=S, pcnt_to_aply=100] | |
] | |
Destination = String | |
<SkuTax skuId="10"> |
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
[INFO] ------------- Scan rip | |
[INFO] Load server rules | |
[INFO] Load server rules (done) | time=865ms | |
[INFO] Base dir: /Users/jonathan.vila/workspace/rms-to-osp | |
[INFO] Working dir: /Users/jonathan.vila/workspace/rms-to-osp/target/sonar | |
[INFO] Source paths: pom.xml, src/main/java | |
[INFO] Test paths: src/test/java | |
[INFO] Binary dirs: target/classes | |
[INFO] Source encoding: UTF-8, default locale: en_US | |
[INFO] Index files |
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
[jonathan@localhost bin]$ ./rhamt-cli --input ../samples/jee-example-app-1.0.0.ear --output ../output --source weblogic --target eap:7 | |
Using RHAMT at /home/jonathan/workspace/windup-distribution/target/rhamt-cli-4.2.0-SNAPSHOT-offline/rhamt-cli-4.2.0-SNAPSHOT | |
Warning: JAVA_HOME environment variable is not set. | |
> Red Hat Application Migration Toolkit (RHAMT) CLI, version 4.2.0-SNAPSHOT. | |
Red Hat Application Migration Toolkit (RHAMT) CLI, version [ ] - by Red Hat, Inc. [ https://developers.redhat.com/products/rhamt/overview/ ] | |
WARNING: No packages were set in --packages. This will cause all .jar files to be decompiled and can possibly take a long time. Check the RHAMT User Guide for performance tips. |
OlderNewer