Search in sources :

Example 6 with Produces

use of javax.enterprise.inject.Produces in project quickstarts by jboss-switchyard.

the class ConnectionInfoMetadataProducer method createConnectionInfoFieldList.

@Produces
@Named("connectionInfoFieldMetaData")
public List<FieldMetaData> createConnectionInfoFieldList() {
    List<FieldMetaData> connFields = new ArrayList<FieldMetaData>();
    FieldMetaData connid = RfcFactory.eINSTANCE.createFieldMetaData();
    connid.setName("CONNID");
    connid.setType(DataType.NUM);
    connid.setByteLength(1);
    connid.setByteOffset(0);
    connid.setUnicodeByteLength(2);
    connid.setUnicodeByteOffset(0);
    connFields.add(connid);
    FieldMetaData airline = RfcFactory.eINSTANCE.createFieldMetaData();
    airline.setName("AIRLINE");
    airline.setType(DataType.CHAR);
    airline.setByteLength(20);
    airline.setByteOffset(1);
    airline.setUnicodeByteLength(40);
    airline.setUnicodeByteOffset(2);
    connFields.add(airline);
    FieldMetaData planetype = RfcFactory.eINSTANCE.createFieldMetaData();
    planetype.setName("PLANETYPE");
    planetype.setType(DataType.CHAR);
    planetype.setByteLength(10);
    planetype.setByteOffset(21);
    planetype.setUnicodeByteLength(20);
    planetype.setUnicodeByteOffset(42);
    connFields.add(planetype);
    FieldMetaData cityfrom = RfcFactory.eINSTANCE.createFieldMetaData();
    cityfrom.setName("CITYFROM");
    cityfrom.setType(DataType.CHAR);
    cityfrom.setByteLength(20);
    cityfrom.setByteOffset(31);
    cityfrom.setUnicodeByteLength(40);
    cityfrom.setUnicodeByteOffset(62);
    connFields.add(cityfrom);
    FieldMetaData depdate = RfcFactory.eINSTANCE.createFieldMetaData();
    depdate.setName("DEPDATE");
    depdate.setType(DataType.DATE);
    depdate.setByteLength(8);
    depdate.setByteOffset(51);
    depdate.setUnicodeByteLength(16);
    depdate.setUnicodeByteOffset(102);
    connFields.add(depdate);
    FieldMetaData deptime = RfcFactory.eINSTANCE.createFieldMetaData();
    deptime.setName("DEPTIME");
    deptime.setType(DataType.TIME);
    deptime.setByteLength(6);
    deptime.setByteOffset(59);
    deptime.setUnicodeByteLength(12);
    deptime.setUnicodeByteOffset(118);
    connFields.add(deptime);
    FieldMetaData cityto = RfcFactory.eINSTANCE.createFieldMetaData();
    cityto.setName("CITYTO");
    cityto.setType(DataType.CHAR);
    cityto.setByteLength(20);
    cityto.setByteOffset(65);
    cityto.setUnicodeByteLength(40);
    cityto.setUnicodeByteOffset(130);
    connFields.add(cityto);
    FieldMetaData arrdate = RfcFactory.eINSTANCE.createFieldMetaData();
    arrdate.setName("ARRDATE");
    arrdate.setType(DataType.DATE);
    arrdate.setByteLength(8);
    arrdate.setByteOffset(85);
    arrdate.setUnicodeByteLength(16);
    arrdate.setUnicodeByteOffset(170);
    connFields.add(arrdate);
    FieldMetaData arrtime = RfcFactory.eINSTANCE.createFieldMetaData();
    arrtime.setName("ARRTIME");
    arrtime.setType(DataType.TIME);
    arrtime.setByteLength(6);
    arrtime.setByteOffset(93);
    arrtime.setUnicodeByteLength(12);
    arrtime.setUnicodeByteOffset(186);
    connFields.add(arrtime);
    return connFields;
}
Also used : FieldMetaData(org.fusesource.camel.component.sap.model.rfc.FieldMetaData) ArrayList(java.util.ArrayList) Named(javax.inject.Named) Produces(javax.enterprise.inject.Produces)

Example 7 with Produces

use of javax.enterprise.inject.Produces in project quickstarts by jboss-switchyard.

the class ConnectionInfoMetadataProducer method createConnectionInfo.

@Produces
@Named("connectionInfo")
public RecordMetaData createConnectionInfo(@Named("connectionInfoFieldMetaData") List<FieldMetaData> connectionInfoFieldMetaData) {
    RecordMetaData conninfo = RfcFactory.eINSTANCE.createRecordMetaData();
    conninfo.setName("CONNECTION_INFO");
    conninfo.setRecordFieldMetaData(connectionInfoFieldMetaData);
    return conninfo;
}
Also used : RecordMetaData(org.fusesource.camel.component.sap.model.rfc.RecordMetaData) Named(javax.inject.Named) Produces(javax.enterprise.inject.Produces)

Example 8 with Produces

use of javax.enterprise.inject.Produces in project quickstarts by jboss-switchyard.

the class FlightInfoMetadataProducer method createFlightInfo.

@Produces
@Named("flightInfo")
public RecordMetaData createFlightInfo(@Named("flightInfoFieldMetaData") List<FieldMetaData> flightInfoFieldMetaData) {
    RecordMetaData flightinfo = RfcFactory.eINSTANCE.createRecordMetaData();
    flightinfo.setName("FLTINFO_STRUCTURE");
    flightinfo.setRecordFieldMetaData(flightInfoFieldMetaData);
    return flightinfo;
}
Also used : RecordMetaData(org.fusesource.camel.component.sap.model.rfc.RecordMetaData) Named(javax.inject.Named) Produces(javax.enterprise.inject.Produces)

Example 9 with Produces

use of javax.enterprise.inject.Produces in project quickstarts by jboss-switchyard.

the class FunctionTemplateMetadataProducer method createExportParameterList.

@Produces
@Named("exportParameterList")
public List<ListFieldMetaData> createExportParameterList(@Named("flightInfo") RecordMetaData flightInfo, @Named("connectionInfo") RecordMetaData connectionInfo) {
    List<ListFieldMetaData> exports = new ArrayList<ListFieldMetaData>();
    ListFieldMetaData tripnumber = RfcFactory.eINSTANCE.createListFieldMetaData();
    tripnumber.setName("TRIPNUMBER");
    tripnumber.setType(DataType.NUM);
    tripnumber.setByteLength(8);
    tripnumber.setUnicodeByteLength(16);
    exports.add(tripnumber);
    ListFieldMetaData ticketPrice = RfcFactory.eINSTANCE.createListFieldMetaData();
    ticketPrice.setName("TICKET_PRICE");
    ticketPrice.setType(DataType.BCD);
    ticketPrice.setByteLength(12);
    ticketPrice.setUnicodeByteLength(12);
    ticketPrice.setDecimals(4);
    exports.add(ticketPrice);
    ListFieldMetaData ticketTax = RfcFactory.eINSTANCE.createListFieldMetaData();
    ticketTax.setName("TICKET_TAX");
    ticketTax.setType(DataType.BCD);
    ticketTax.setByteLength(12);
    ticketTax.setUnicodeByteLength(12);
    ticketTax.setDecimals(4);
    exports.add(ticketTax);
    ListFieldMetaData currency = RfcFactory.eINSTANCE.createListFieldMetaData();
    currency.setName("CURRENCY");
    currency.setType(DataType.CHAR);
    currency.setByteLength(5);
    currency.setUnicodeByteLength(10);
    exports.add(currency);
    ListFieldMetaData passform = RfcFactory.eINSTANCE.createListFieldMetaData();
    passform.setName("PASSFORM");
    passform.setType(DataType.CHAR);
    passform.setByteLength(15);
    passform.setUnicodeByteLength(30);
    exports.add(passform);
    ListFieldMetaData passname = RfcFactory.eINSTANCE.createListFieldMetaData();
    passname.setName("PASSNAME");
    passname.setType(DataType.CHAR);
    passname.setByteLength(25);
    passname.setUnicodeByteLength(50);
    exports.add(passname);
    ListFieldMetaData passbirth = RfcFactory.eINSTANCE.createListFieldMetaData();
    passbirth.setName("PASSBIRTH");
    passbirth.setType(DataType.DATE);
    passbirth.setByteLength(8);
    passbirth.setUnicodeByteLength(16);
    exports.add(passbirth);
    ListFieldMetaData fltinfo = RfcFactory.eINSTANCE.createListFieldMetaData();
    fltinfo.setName("FLTINFO");
    fltinfo.setType(DataType.STRUCTURE);
    fltinfo.setRecordMetaData(flightInfo);
    exports.add(fltinfo);
    ListFieldMetaData conninfo = RfcFactory.eINSTANCE.createListFieldMetaData();
    conninfo.setName("CONNINFO");
    conninfo.setType(DataType.TABLE);
    conninfo.setRecordMetaData(connectionInfo);
    exports.add(conninfo);
    return exports;
}
Also used : ListFieldMetaData(org.fusesource.camel.component.sap.model.rfc.ListFieldMetaData) ArrayList(java.util.ArrayList) Named(javax.inject.Named) Produces(javax.enterprise.inject.Produces)

Example 10 with Produces

use of javax.enterprise.inject.Produces in project quickstarts by jboss-switchyard.

the class FunctionTemplateMetadataProducer method createBookFlightFunctionTemplate.

@Produces
@Named("bookFlightFunctionTemplate")
public FunctionTemplate createBookFlightFunctionTemplate(@Named("importParameterList") List<ListFieldMetaData> importParameterList, @Named("exportParameterList") List<ListFieldMetaData> exportParameterList) {
    FunctionTemplate template = RfcFactory.eINSTANCE.createFunctionTemplate();
    template.setImportParameterList(importParameterList);
    template.setExportParameterList(exportParameterList);
    return template;
}
Also used : FunctionTemplate(org.fusesource.camel.component.sap.model.rfc.FunctionTemplate) Named(javax.inject.Named) Produces(javax.enterprise.inject.Produces)

Aggregations

Produces (javax.enterprise.inject.Produces)51 Named (javax.inject.Named)31 ApplicationScoped (javax.enterprise.context.ApplicationScoped)25 PropertiesComponent (org.apache.camel.component.properties.PropertiesComponent)12 Properties (java.util.Properties)10 ArrayList (java.util.ArrayList)6 Dependent (javax.enterprise.context.Dependent)4 OperationsFacade (org.gluu.site.ldap.OperationsFacade)4 LdapEntryManager (org.gluu.site.ldap.persistence.LdapEntryManager)4 InjectableResource (org.apache.deltaspike.core.api.resourceloader.InjectableResource)3 InjectableResourceProvider (org.apache.deltaspike.core.api.resourceloader.InjectableResourceProvider)3 ParameterizedType (java.lang.reflect.ParameterizedType)2 Type (java.lang.reflect.Type)2 FieldMetaData (org.fusesource.camel.component.sap.model.rfc.FieldMetaData)2 FunctionTemplate (org.fusesource.camel.component.sap.model.rfc.FunctionTemplate)2 ListFieldMetaData (org.fusesource.camel.component.sap.model.rfc.ListFieldMetaData)2 RecordMetaData (org.fusesource.camel.component.sap.model.rfc.RecordMetaData)2 OxIntializationException (org.xdi.exception.OxIntializationException)2 SmtpConfiguration (org.xdi.model.SmtpConfiguration)2 FunctionMapperImpl (com.sun.el.lang.FunctionMapperImpl)1