Package org.apache.tuscany.sca.implementation.resource

Examples of org.apache.tuscany.sca.implementation.resource.ResourceImplementation


        // Read the location attribute specifying the location of the
        // resources
        String location = reader.getAttributeValue(null, "location");

        // Create an initialize the resource implementationmodel
        ResourceImplementation implementation = implementationFactory.createResourceImplementation();
        implementation.setLocation(location);
        implementation.setUnresolved(true);
       
        // Skip to end element
        while (reader.hasNext()) {
            if (reader.next() == END_ELEMENT && IMPLEMENTATION_RESOURCE.equals(reader.getName())) {
                break;
View Full Code Here


        // Read the location attribute specifying the location of the
        // resources
        String location = reader.getAttributeValue(null, "location");

        // Create an initialize the resource implementationmodel
        ResourceImplementation implementation = implementationFactory.createResourceImplementation();
        implementation.setLocation(location);
        implementation.setUnresolved(true);
       
        // Skip to end element
        while (reader.hasNext()) {
            if (reader.next() == END_ELEMENT && IMPLEMENTATION_RESOURCE.equals(reader.getName())) {
                break;
View Full Code Here

    public ResourceImplementation read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException {

        // Read an <implementation.resource> element

        // Create and initialize the resource implementation model
        ResourceImplementation implementation = null;

        // Read the location attribute specifying the location of the resources
        String location = reader.getAttributeValue(null, "location");
        if (location != null) {
            implementation = implementationFactory.createResourceImplementation();
            implementation.setLocation(location);
            implementation.setUnresolved(true);
        } else {
            error("LocationAttributeMissing", reader);
            //throw new ContributionReadException(MSG_LOCATION_MISSING);
        }
View Full Code Here

            // Read the directory attribute. This is where the sample
            // CRUD implementation will persist resources.
            String location = reader.getAttributeValue(null, "location");

            // Create an initialize the resource implementationmodel
            ResourceImplementation implementation = resourceFactory.createResourceImplementation();
            implementation.setLocation(location);
            implementation.setUnresolved(true);
           
            // Skip to end element
            while (reader.hasNext()) {
                if (reader.next() == END_ELEMENT && IMPLEMENTATION_RESOURCE.equals(reader.getName())) {
                    break;
View Full Code Here

        // Get the target component implementation, for now we are assuming
        // that it's an implementation.resource
        RuntimeComponentService componentService = (RuntimeComponentService) service;
        RuntimeWire wire = componentService.getRuntimeWire(binding);
        Implementation implementation = wire.getTarget().getComponent().getImplementation();
        ResourceImplementation resourceImplementation = (ResourceImplementation)implementation;
       
        // Get the resource location URL
        URL locationURL = resourceImplementation.getLocationURL();
       
        // Register the default resource servlet with the servlet host
        DefaultResourceServlet resourceServlet = new DefaultResourceServlet(locationURL.toString());
        servletHost.addServletMapping(uri, resourceServlet);
       
View Full Code Here

    public ResourceImplementation read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException {

        // Read an <implementation.resource> element

        // Create and initialize the resource implementation model
        ResourceImplementation implementation = null;

        // Read the location attribute specifying the location of the resources
        String location = reader.getAttributeValue(null, "location");
        if (location != null) {
            implementation = implementationFactory.createResourceImplementation();
            implementation.setLocation(location);
            implementation.setUnresolved(true);
        } else {
            error("LocationAttributeMissing", reader);
            //throw new ContributionReadException(MSG_LOCATION_MISSING);
        }
View Full Code Here

            // Read the directory attribute. This is where the sample
            // CRUD implementation will persist resources.
            String location = reader.getAttributeValue(null, "location");

            // Create an initialize the resource implementationmodel
            ResourceImplementation implementation = implementationFactory.createResourceImplementation();
            implementation.setLocation(location);
            implementation.setUnresolved(true);
           
            // Skip to end element
            while (reader.hasNext()) {
                if (reader.next() == END_ELEMENT && IMPLEMENTATION_RESOURCE.equals(reader.getName())) {
                    break;
View Full Code Here

        // Read the location attribute specifying the location of the
        // resources
        String location = reader.getAttributeValue(null, "location");

        // Create an initialize the resource implementationmodel
        ResourceImplementation implementation = implementationFactory.createResourceImplementation();
        implementation.setLocation(location);
        implementation.setUnresolved(true);
       
        // Skip to end element
        while (reader.hasNext()) {
            if (reader.next() == END_ELEMENT && IMPLEMENTATION_RESOURCE.equals(reader.getName())) {
                break;
View Full Code Here

    public ResourceImplementation read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException {

        // Read an <implementation.resource> element

        // Create and initialize the resource implementation model
        ResourceImplementation implementation = null;

        // Read the location attribute specifying the location of the resources
        String location = reader.getAttributeValue(null, "location");
        if (location != null) {
            implementation = implementationFactory.createResourceImplementation();
            implementation.setLocation(location);
            implementation.setUnresolved(true);
        } else {
            error("LocationAttributeMissing", reader);
            //throw new ContributionReadException(MSG_LOCATION_MISSING);
        }
View Full Code Here

    public ResourceImplementation read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException {

        // Read an <implementation.resource> element

        // Create and initialize the resource implementation model
        ResourceImplementation implementation = null;

        // Read the location attribute specifying the location of the resources
        String location = getURIString(reader, "location");
        if (location != null) {
            implementation = implementationFactory.createResourceImplementation();
            implementation.setLocation(location);
            implementation.setUnresolved(true);
        } else {
            error("LocationAttributeMissing", reader);
            //throw new ContributionReadException(MSG_LOCATION_MISSING);
        }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.implementation.resource.ResourceImplementation

Copyright © 2018 www.massapicom. 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.