/** * Process Reference declaration in JavaScript code * Supported ways : * //@Reference * var catalog = new Reference("catalog"); * * //@Reference * catalog = new Reference("catalog"); * * @param scriptContent * @return */ private Reference processReferenceScript(String scriptContent) { Reference reference = null; String referenceName = null; String tokens[] = scriptContent.split("="); // find the string between the quotes tokens = tokens[1].split("\""); referenceName = tokens[1]; if(referenceName != null) { reference = assemblyFactory.createReference(); reference.setName(referenceName); } return reference; } }
/** * Process Reference declaration in JavaScript code * Supported ways : * //@Reference * var catalog = new Reference("catalog"); * * //@Reference * catalog = new Reference("catalog"); * * @param scriptContent * @return */ private Reference processReferenceScript(String scriptContent) { Reference reference = null; String referenceName = null; String tokens[] = scriptContent.split("="); // find the string between the quotes tokens = tokens[1].split("\""); referenceName = tokens[1]; if(referenceName != null) { reference = assemblyFactory.createReference(); reference.setName(referenceName); } return reference; } }
Reference ref = factory.createReference(); ref.setName(reader.getAttributeValue(null, "name")); String interfaceName = reader.getAttributeValue(null, "interface");
Reference ref = factory.createReference(); ref.setName(reader.getAttributeValue(null, "id")); String interfaceName = reader.getAttributeValue(null, "interface");
reference = assemblyFactory.createReference(); contract = reference; reference.setName(getString(reader, Constants.NAME));
reference = assemblyFactory.createReference(); contract = reference; reference.setName(getString(reader, Constants.NAME));
PortType partnerRolePT, Collection<WSDLInterface> theInterfaces, Monitor monitor) throws ContributionResolveException { Reference reference = assemblyFactory.createReference(); WSDLInterfaceContract interfaceContract = wsdlFactory.createWSDLInterfaceContract(); reference.setInterfaceContract(interfaceContract);
PortType partnerRolePT, Collection<WSDLInterface> theInterfaces, Monitor monitor) throws ContributionResolveException { Reference reference = assemblyFactory.createReference(); WSDLInterfaceContract interfaceContract = wsdlFactory.createWSDLInterfaceContract(); reference.setInterfaceContract(interfaceContract);
throw new ContributionResolveException(e); Reference reference = assemblyFactory.createReference(); JavaInterfaceContract contract = javaInterfaceFactory.createJavaInterfaceContract(); contract.setInterface(javaInterface);
org.apache.tuscany.sca.assembly.Reference reference = assemblyFactory.createReference(); JavaInterfaceContract interfaceContract = javaInterfaceFactory.createJavaInterfaceContract(); reference.setInterfaceContract(interfaceContract);
/** * Creates a Reference for the component type based on its name and Java interface */ private org.apache.tuscany.sca.assembly.Reference createReference(Class<?> interfaze, String name) throws InvalidInterfaceException { org.apache.tuscany.sca.assembly.Reference reference = assemblyFactory.createReference(); JavaInterfaceContract interfaceContract = javaFactory.createJavaInterfaceContract(); reference.setInterfaceContract(interfaceContract); // Set the name of the reference to the supplied name and the multiplicity of the reference // to 1..1 - for Spring implementations, this is the only multiplicity supported reference.setName(name); reference.setMultiplicity(Multiplicity.ONE_ONE); // For Spring references, we allow pass-by-reference reference.setAllowsPassByReference(true); // Set the call interface and, if present, the callback interface JavaInterface callInterface = javaFactory.createJavaInterface(interfaze); reference.getInterfaceContract().setInterface(callInterface); if (callInterface.getCallbackClass() != null) { JavaInterface callbackInterface = javaFactory.createJavaInterface(callInterface.getCallbackClass()); reference.getInterfaceContract().setCallbackInterface(callbackInterface); } return reference; }
private org.apache.tuscany.sca.assembly.Reference createReference(String name, Class<?> paramType, Type genericType ) throws IntrospectionException { org.apache.tuscany.sca.assembly.Reference reference = assemblyFactory.createReference(); reference.setName(name); JavaInterfaceContract interfaceContract = javaInterfaceFactory.createJavaInterfaceContract();
implReference = assemblyFactory.createReference();
implReference = assemblyFactory.createReference();