Examples of ContributionFactory


Examples of org.apache.tuscany.sca.contribution.ContributionFactory

    private InterfaceContractMapper mapper;

    @Override
    public void setUp() throws Exception {
        ModelFactoryExtensionPoint factories = new DefaultModelFactoryExtensionPoint();
        ContributionFactory contributionFactory = new DefaultContributionFactory();
        factories.addFactory(contributionFactory);
        assemblyFactory = new DefaultAssemblyFactory();
        factories.addFactory(assemblyFactory);
        scaBindingFactory = new SCABindingFactoryImpl();
        factories.addFactory(scaBindingFactory);
View Full Code Here

Examples of org.apache.tuscany.sca.contribution.ContributionFactory

        modelFactories = registry.getExtensionPoint(ModelFactoryExtensionPoint.class);
        assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
        XMLInputFactory inputFactory = modelFactories.getFactory(XMLInputFactory.class);
        outputFactory = modelFactories.getFactory(XMLOutputFactory.class);
        outputFactory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, true);
        ContributionFactory contributionFactory = modelFactories.getFactory(ContributionFactory.class);
        PolicyFactory policyFactory = modelFactories.getFactory(PolicyFactory.class);
       
        // Get and initialize artifact processors
        StAXArtifactProcessorExtensionPoint staxProcessors = registry.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class);
        StAXArtifactProcessor<Object> staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, inputFactory, outputFactory);
View Full Code Here

Examples of org.apache.tuscany.sca.contribution.ContributionFactory

    public void testRead() throws Exception {
        XMLStreamReader reader = xmlFactory.createXMLStreamReader(new StringReader(VALID_XML));

        WorkspaceFactory workspaceFactory = new DefaultWorkspaceFactory();
        ContributionFactory contributionFactory = new DefaultContributionFactory();
        WorkspaceProcessor processor = new WorkspaceProcessor(workspaceFactory, contributionFactory, null);
        Workspace workspace = processor.read(reader);
        assertNotNull(workspace);
        assertEquals(2, workspace.getContributions().size());
        assertEquals("uri2", workspace.getContributions().get(1).getURI());
View Full Code Here

Examples of org.apache.tuscany.sca.contribution.ContributionFactory

  }

    public void testReadInvalid() throws Exception {
        XMLStreamReader reader = xmlFactory.createXMLStreamReader(new StringReader(INVALID_XML));
        WorkspaceFactory workspaceFactory = new DefaultWorkspaceFactory();
        ContributionFactory contributionFactory = new DefaultContributionFactory();
        WorkspaceProcessor processor = new WorkspaceProcessor(workspaceFactory, contributionFactory, null);
        try {
            processor.read(reader);
            fail("InvalidException should have been thrown");
        } catch (XMLStreamException e) {
View Full Code Here

Examples of org.apache.tuscany.sca.contribution.ContributionFactory

        startModules(registry, modules);
       
        SCABindingFactory scaBindingFactory = factories.getFactory(SCABindingFactory.class);
        IntentAttachPointTypeFactory intentAttachPointTypeFactory = new DefaultIntentAttachPointTypeFactory();
        factories.addFactory(intentAttachPointTypeFactory);
        ContributionFactory contributionFactory = factories.getFactory(ContributionFactory.class);
       
        // Create a monitor
        MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
       
        if (monitorFactory != null){
View Full Code Here

Examples of org.apache.tuscany.sca.contribution.ContributionFactory

        startModules(registry, modules);

        SCABindingFactory scaBindingFactory = factories.getFactory(SCABindingFactory.class);
        IntentAttachPointTypeFactory intentAttachPointTypeFactory = new DefaultIntentAttachPointTypeFactory();
        factories.addFactory(intentAttachPointTypeFactory);
        ContributionFactory contributionFactory = factories.getFactory(ContributionFactory.class);

        // Create a monitor
        MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);

        if (monitorFactory != null) {
View Full Code Here

Examples of org.apache.tuscany.sca.contribution.ContributionFactory

        ExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry();
        ModelFactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
        wsdlFactory = modelFactories.getFactory(WSDLFactory.class);
        xsdFactory = modelFactories.getFactory(XSDFactory.class);
       
        ContributionFactory contributionFactory = modelFactories.getFactory(ContributionFactory.class);
        Contribution contribution = contributionFactory.createContribution();
        ModelResolverExtensionPoint modelResolvers = extensionPoints.getExtensionPoint(ModelResolverExtensionPoint.class);
        resolver = new ExtensibleModelResolver(contribution, extensionPoints);
        contribution.setModelResolver(resolver);
       
        URLArtifactProcessorExtensionPoint documentProcessors = extensionPoints.getExtensionPoint(URLArtifactProcessorExtensionPoint.class);
View Full Code Here

Examples of org.apache.tuscany.sca.contribution.ContributionFactory

   
    public void resolve(ModelResolver resolver) {
     
      if (scriptName != null) {
          //FIXME The contribution factory should be injected
          ContributionFactory contributionFactory = new DefaultContributionFactory();
            Artifact artifact = contributionFactory.createArtifact();
            artifact.setURI(scriptName);
            artifact = resolver.resolveModel(Artifact.class, artifact);
            if (artifact.getLocation() != null) {
                try {
                    scriptURL = new URL(artifact.getLocation());
View Full Code Here

Examples of org.apache.tuscany.sca.contribution.ContributionFactory

    }

    private Contribution getContribution(URL contributionArtifactURL, String contributionArtifactPath) {
        URL contributionURL = getContributionURL(contributionArtifactURL, contributionArtifactPath);

        ContributionFactory contributionFactory = modelFactories.getFactory(ContributionFactory.class);

        SCAContribution contribution = new SCAContribution(contributionURL.toString(), contributionURL.toString());
        Contribution c = createContribution(contributionFactory, contribution);
        return c;
    }
View Full Code Here

Examples of org.apache.tuscany.sca.contribution.ContributionFactory

                Composite composite = compositeURI == null ? null : createComposite(compositeURI);
                configuration.setComposite(composite);
 

                // Create contribution models
                ContributionFactory contributionFactory = modelFactories.getFactory(ContributionFactory.class);
                for (SCAContribution c : contributions) {
                    Contribution contribution = createContribution(contributionFactory, c);
                    configuration.getContributions().add(contribution);
                }
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.