Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SWITCHYARD-2045 Refactor camel-sap quickstart
Refactored quickstart - split camel routes into indivisual services and convert some CDI beans into MessageComposer
- Loading branch information
1 parent
a3570c1
commit 4ddd0d5
Showing
23 changed files
with
685 additions
and
758 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
5 changes: 3 additions & 2 deletions
5
...g/src/main/java/org/switchyard/quickstarts/camel/sap/binding/CreateFlightTripService.java
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,7 +1,8 @@ | ||
package org.switchyard.quickstarts.camel.sap.binding; | ||
|
||
import org.fusesource.camel.component.sap.model.rfc.Structure; | ||
import org.switchyard.quickstarts.camel.sap.binding.bean.FlightTripRequestInfo; | ||
import org.switchyard.quickstarts.camel.sap.binding.jaxb.BookFlightResponse; | ||
|
||
public interface CreateFlightTripService { | ||
Structure invoke(Structure request); | ||
BookFlightResponse invoke(FlightTripRequestInfo request); | ||
} |
8 changes: 8 additions & 0 deletions
8
...c/main/java/org/switchyard/quickstarts/camel/sap/binding/FlightConnectionInfoService.java
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package org.switchyard.quickstarts.camel.sap.binding; | ||
|
||
import org.switchyard.quickstarts.camel.sap.binding.bean.FlightConnectionInfo; | ||
import org.switchyard.quickstarts.camel.sap.binding.jaxb.BookFlightRequest; | ||
|
||
public interface FlightConnectionInfoService { | ||
FlightConnectionInfo getFlightConnectionInfo(BookFlightRequest request); | ||
} |
8 changes: 8 additions & 0 deletions
8
...src/main/java/org/switchyard/quickstarts/camel/sap/binding/FlightCustomerInfoService.java
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package org.switchyard.quickstarts.camel.sap.binding; | ||
|
||
import org.switchyard.quickstarts.camel.sap.binding.bean.FlightCustomerInfo; | ||
import org.switchyard.quickstarts.camel.sap.binding.jaxb.BookFlightRequest; | ||
|
||
public interface FlightCustomerInfoService { | ||
FlightCustomerInfo getFlightCustomerInfo(BookFlightRequest request); | ||
} |
3 changes: 2 additions & 1 deletion
3
...n/java/org/switchyard/quickstarts/camel/sap/binding/GetFlightConnectionDetailService.java
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,7 +1,8 @@ | ||
package org.switchyard.quickstarts.camel.sap.binding; | ||
|
||
import org.fusesource.camel.component.sap.model.rfc.Structure; | ||
import org.switchyard.quickstarts.camel.sap.binding.bean.FlightConnectionInfo; | ||
|
||
public interface GetFlightConnectionDetailService { | ||
Structure invoke(Structure request); | ||
FlightConnectionInfo invoke(Structure request); | ||
} |
3 changes: 2 additions & 1 deletion
3
...ain/java/org/switchyard/quickstarts/camel/sap/binding/GetFlightConnectionListService.java
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,7 +1,8 @@ | ||
package org.switchyard.quickstarts.camel.sap.binding; | ||
|
||
import org.fusesource.camel.component.sap.model.rfc.Structure; | ||
import org.switchyard.quickstarts.camel.sap.binding.jaxb.BookFlightRequest; | ||
|
||
public interface GetFlightConnectionListService { | ||
Structure invoke(Structure request); | ||
Structure invoke(BookFlightRequest request); | ||
} |
7 changes: 0 additions & 7 deletions
7
.../main/java/org/switchyard/quickstarts/camel/sap/binding/GetFlightCustomerListService.java
This file was deleted.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
...ding/src/main/java/org/switchyard/quickstarts/camel/sap/binding/PassengerInfoService.java
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package org.switchyard.quickstarts.camel.sap.binding; | ||
|
||
import org.switchyard.quickstarts.camel.sap.binding.bean.PassengerInfo; | ||
import org.switchyard.quickstarts.camel.sap.binding.jaxb.BookFlightRequest; | ||
|
||
public interface PassengerInfoService { | ||
PassengerInfo getPassengerInfo(BookFlightRequest request); | ||
} |
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
52 changes: 52 additions & 0 deletions
52
...rc/main/java/org/switchyard/quickstarts/camel/sap/binding/bean/FlightTripRequestInfo.java
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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/** | ||
* Copyright 2013 Red Hat, Inc. | ||
* | ||
* Red Hat licenses this file to you under the Apache License, version | ||
* 2.0 (the "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or | ||
* implied. See the License for the specific language governing | ||
* permissions and limitations under the License. | ||
* | ||
*/ | ||
package org.switchyard.quickstarts.camel.sap.binding.bean; | ||
|
||
/** | ||
* A composite object contains FlightConnectionInfo, FlightCustomerInfo and PassengerInfo. | ||
* Those 3 objects are needed to book a trip. | ||
*/ | ||
public class FlightTripRequestInfo { | ||
FlightConnectionInfo _flightConnectionInfo; | ||
FlightCustomerInfo _flightCustomerInfo; | ||
PassengerInfo _passengerInfo; | ||
|
||
public FlightConnectionInfo getFlightConnectionInfo() { | ||
return _flightConnectionInfo; | ||
} | ||
|
||
public FlightCustomerInfo getFlightCustomerInfo() { | ||
return _flightCustomerInfo; | ||
} | ||
|
||
public PassengerInfo getPassengerInfo() { | ||
return _passengerInfo; | ||
} | ||
|
||
public void setFlightConnectionInfo(FlightConnectionInfo _flightConnectionInfo) { | ||
this._flightConnectionInfo = _flightConnectionInfo; | ||
} | ||
|
||
public void setFlightCustomerInfo(FlightCustomerInfo _flightCustomerInfo) { | ||
this._flightCustomerInfo = _flightCustomerInfo; | ||
} | ||
|
||
public void setPassengerInfo(PassengerInfo _passengerInfo) { | ||
this._passengerInfo = _passengerInfo; | ||
} | ||
|
||
} |
Oops, something went wrong.