Search in sources :

Example 11 with Produces

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

the class FunctionTemplateMetadataProducer method createImportParameterList.

@Produces
@Named("importParameterList")
private List<ListFieldMetaData> createImportParameterList() {
    List<ListFieldMetaData> imports = new ArrayList<ListFieldMetaData>();
    ListFieldMetaData custname = RfcFactory.eINSTANCE.createListFieldMetaData();
    custname.setName("CUSTNAME");
    custname.setType(DataType.CHAR);
    custname.setByteLength(25);
    custname.setUnicodeByteLength(50);
    imports.add(custname);
    ListFieldMetaData passform = RfcFactory.eINSTANCE.createListFieldMetaData();
    passform.setName("PASSFORM");
    passform.setType(DataType.CHAR);
    passform.setByteLength(15);
    passform.setUnicodeByteLength(30);
    imports.add(passform);
    ListFieldMetaData passname = RfcFactory.eINSTANCE.createListFieldMetaData();
    passname.setName("PASSNAME");
    passname.setType(DataType.CHAR);
    passname.setByteLength(25);
    passname.setUnicodeByteLength(50);
    imports.add(passname);
    ListFieldMetaData passbirth = RfcFactory.eINSTANCE.createListFieldMetaData();
    passbirth.setName("PASSBIRTH");
    passbirth.setType(DataType.DATE);
    passbirth.setByteLength(8);
    passbirth.setUnicodeByteLength(16);
    imports.add(passbirth);
    ListFieldMetaData flightdate = RfcFactory.eINSTANCE.createListFieldMetaData();
    flightdate.setName("FLIGHTDATE");
    flightdate.setType(DataType.DATE);
    flightdate.setByteLength(8);
    flightdate.setUnicodeByteLength(16);
    imports.add(flightdate);
    ListFieldMetaData travelagencynumber = RfcFactory.eINSTANCE.createListFieldMetaData();
    travelagencynumber.setName("TRAVELAGENCYNUMBER");
    travelagencynumber.setType(DataType.NUM);
    travelagencynumber.setByteLength(8);
    travelagencynumber.setUnicodeByteLength(8);
    imports.add(travelagencynumber);
    ListFieldMetaData destinationFrom = RfcFactory.eINSTANCE.createListFieldMetaData();
    destinationFrom.setName("DESTINATION_FROM");
    destinationFrom.setType(DataType.CHAR);
    destinationFrom.setByteLength(3);
    destinationFrom.setUnicodeByteLength(6);
    imports.add(destinationFrom);
    ListFieldMetaData destinationTo = RfcFactory.eINSTANCE.createListFieldMetaData();
    destinationTo.setName("DESTINATION_TO");
    destinationTo.setType(DataType.CHAR);
    destinationTo.setByteLength(3);
    destinationTo.setUnicodeByteLength(6);
    imports.add(destinationTo);
    return imports;
}
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 12 with Produces

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

the class RepositoryMetadataProducer method createRepositoryData.

@Produces
@Named("nplRepositoryData")
public RepositoryData createRepositoryData(@Named("bookFlightFunctionTemplate") FunctionTemplate bookFlightFunctionTemplate) {
    RepositoryData data = RfcFactory.eINSTANCE.createRepositoryData();
    Map<String, FunctionTemplate> templates = new HashMap<String, FunctionTemplate>();
    templates.put("BOOK_FLIGHT", bookFlightFunctionTemplate);
    data.setFunctionTemplates(templates);
    return data;
}
Also used : FunctionTemplate(org.fusesource.camel.component.sap.model.rfc.FunctionTemplate) HashMap(java.util.HashMap) RepositoryData(org.fusesource.camel.component.sap.model.rfc.RepositoryData) Named(javax.inject.Named) Produces(javax.enterprise.inject.Produces)

Example 13 with Produces

use of javax.enterprise.inject.Produces in project camel by apache.

the class Application method properties.

@Produces
@ApplicationScoped
@Named("properties")
// "properties" component bean that Camel uses to lookup properties
PropertiesComponent properties(PropertiesParser parser) {
    PropertiesComponent component = new PropertiesComponent();
    // Use DeltaSpike as configuration source for Camel CDI
    component.setPropertiesParser(parser);
    return component;
}
Also used : PropertiesComponent(org.apache.camel.component.properties.PropertiesComponent) Named(javax.inject.Named) Produces(javax.enterprise.inject.Produces) ApplicationScoped(javax.enterprise.context.ApplicationScoped)

Example 14 with Produces

use of javax.enterprise.inject.Produces in project camel by apache.

the class Application method properties.

@Produces
@ApplicationScoped
@Named("properties")
// "properties" component bean that Camel uses to lookup properties
PropertiesComponent properties() {
    PropertiesComponent component = new PropertiesComponent();
    component.setLocation("classpath:application.properties");
    return component;
}
Also used : PropertiesComponent(org.apache.camel.component.properties.PropertiesComponent) Named(javax.inject.Named) Produces(javax.enterprise.inject.Produces) ApplicationScoped(javax.enterprise.context.ApplicationScoped)

Example 15 with Produces

use of javax.enterprise.inject.Produces in project camel by apache.

the class Config method properties.

@Produces
@ApplicationScoped
@Named("properties")
PropertiesComponent properties() {
    PropertiesComponent component = new PropertiesComponent();
    component.setLocation("classpath:jms.properties");
    return component;
}
Also used : PropertiesComponent(org.apache.camel.component.properties.PropertiesComponent) Named(javax.inject.Named) Produces(javax.enterprise.inject.Produces) ApplicationScoped(javax.enterprise.context.ApplicationScoped)

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