Examples of VirtualFileAdaptor


Examples of org.jboss.as.webservices.util.VirtualFileAdaptor

            for (String wsdlLocation : map.keySet()) {
                try {
                    final ResourceRoot resourceRoot = getWsdlResourceRoot(unit, wsdlLocation);
                    if (resourceRoot == null) continue;
                    final UnifiedVirtualFile uvf = new VirtualFileAdaptor(resourceRoot.getRoot());
                    URL url = uvf.findChild(wsdlLocation).toURL();
                    SOAPAddressWSDLParser parser = new SOAPAddressWSDLParser(url);
                    for (AnnotationInstance ai : map.get(wsdlLocation)) {
                        String port = ai.value(PORT_NAME).asString();
                        String service = ai.value(SERVICE_NAME).asString();
                        AnnotationValue targetNS = ai.value(TARGET_NAMESPACE);
View Full Code Here

Examples of org.jboss.as.webservices.util.VirtualFileAdaptor

public final class JBossWebservicesDescriptorDeploymentProcessor implements DeploymentUnitProcessor {

    public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
        final DeploymentUnit unit = phaseContext.getDeploymentUnit();
        final ResourceRoot deploymentRoot = unit.getAttachment(Attachments.DEPLOYMENT_ROOT);
        final UnifiedVirtualFile virtualFile = new VirtualFileAdaptor(deploymentRoot.getRoot());
        final JBossWebservicesMetaData jbossWebservicesMD = JBossWebservicesFactory.loadFromVFSRoot(virtualFile);
        if (jbossWebservicesMD != null) {
            unit.putAttachment(WSAttachmentKeys.JBOSS_WEBSERVICES_METADATA_KEY, jbossWebservicesMD);
        }
    }
View Full Code Here

Examples of org.jboss.as.webservices.util.VirtualFileAdaptor

public final class WebservicesDescriptorDeploymentProcessor implements DeploymentUnitProcessor {

    public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
        final DeploymentUnit unit = phaseContext.getDeploymentUnit();
        final ResourceRoot deploymentRoot = unit.getAttachment(Attachments.DEPLOYMENT_ROOT);
        final UnifiedVirtualFile virtualFile = new VirtualFileAdaptor(deploymentRoot.getRoot());
        final WebservicesMetaData webservicesMD = WebservicesFactory.loadFromVFSRoot(virtualFile);
        if (webservicesMD != null) {
            unit.putAttachment(WSAttachmentKeys.WEBSERVICES_METADATA_KEY, webservicesMD);
        }
    }
View Full Code Here

Examples of org.jboss.as.webservices.util.VirtualFileAdaptor

        return null;
    }

    private static UnifiedVirtualFile getUnifiedVirtualFile(final DeploymentUnit unit) { // TODO: refactor to common code
        final ResourceRoot resourceRoot = unit.getAttachment(org.jboss.as.server.deployment.Attachments.DEPLOYMENT_ROOT);
        return new VirtualFileAdaptor(resourceRoot.getRoot());
    }
View Full Code Here

Examples of org.jboss.as.webservices.util.VirtualFileAdaptor

        return null;
    }

    private static UnifiedVirtualFile getUnifiedVirtualFile(final DeploymentUnit deploymentUnit) { // TODO: refactor to common code
        final ResourceRoot resourceRoot = deploymentUnit.getAttachment(org.jboss.as.server.deployment.Attachments.DEPLOYMENT_ROOT);
        return new VirtualFileAdaptor(resourceRoot.getRoot());
    }
View Full Code Here

Examples of org.jboss.as.webservices.util.VirtualFileAdaptor

            try {
                List<VirtualFile> virtualFiles = root.getChildrenRecursively(WS_FILE_FILTER);
                final Set<UnifiedVirtualFile> uVirtualFiles = new HashSet<UnifiedVirtualFile>();
                for (VirtualFile vf : virtualFiles) {
                    // Adding the roots of the virtual files.
                    uVirtualFiles.add(new VirtualFileAdaptor(vf));
                }
                dep.setMetadataFiles(new LinkedList<UnifiedVirtualFile>(uVirtualFiles));
            } catch (IOException e) {
                ROOT_LOGGER.cannotLoadMetaDataFiles(e, root);
            }
        }

        if (unit.getParent() != null) {
            final String parentDeploymentName = unit.getParent().getName();
            final Module parentModule = unit.getParent().getAttachment(Attachments.MODULE);
            if (parentModule == null) {
                throw MESSAGES.classLoaderResolutionFailed(deploymentRoot);
            }
            final ClassLoader parentClassLoader = parentModule.getClassLoader();

            ROOT_LOGGER.creatingUnifiedWebservicesDeploymentModel(unit.getParent());
            final ArchiveDeployment parentDep = this.newDeployment(parentDeploymentName, parentClassLoader);
            dep.setParent(parentDep);
        }

        if (root != null) {
            dep.setRootFile(new VirtualFileAdaptor(root));
        } else {
            dep.setRootFile(new ResourceLoaderAdapter(classLoader));
        }
        dep.setRuntimeClassLoader(classLoader);
        dep.setType(deploymentType);
View Full Code Here

Examples of org.jboss.as.webservices.util.VirtualFileAdaptor

    {
        ResourceRoot resourceRoot = deploymentUnit.getAttachment(org.jboss.as.server.deployment.Attachments.DEPLOYMENT_ROOT);
        if (resourceRoot == null) {
            throw new IllegalStateException("Resource root not found for deployment " + deploymentUnit);
        }
        return new VirtualFileAdaptor(resourceRoot.getRoot());
    }
View Full Code Here

Examples of org.jboss.as.webservices.util.VirtualFileAdaptor

        try {
            List<VirtualFile> virtualFiles = root.getChildrenRecursively(WS_FILE_FILTER);
            final Set<UnifiedVirtualFile> uVirtualFiles = new HashSet<UnifiedVirtualFile>();
            for (VirtualFile vf : virtualFiles) {
                // Adding the roots of the virtual files.
                uVirtualFiles.add(new VirtualFileAdaptor(vf));
            }
            dep.setMetadataFiles(new LinkedList<UnifiedVirtualFile>(uVirtualFiles));
        } catch (IOException e) {
            this.log.warn("Could not load metadata files for deployment root " + root, e);
        }

        if (unit.getParent() != null) {
            final String parentDeploymentName = unit.getParent().getName();
            final Module parentModule = unit.getParent().getAttachment(Attachments.MODULE);
            if (parentModule == null) {
                throw new DeploymentUnitProcessingException("failed to resolve module for parent of deployment "
                        + deploymentRoot);
            }
            final ClassLoader parentClassLoader = parentModule.getClassLoader();

            this.log.debug("Creating new WS deployment model for parent: " + unit.getParent());
            final ArchiveDeployment parentDep = this.newDeployment(parentDeploymentName, parentClassLoader);
            dep.setParent(parentDep);
        }

        dep.setRootFile(new VirtualFileAdaptor(root));
        dep.setRuntimeClassLoader(classLoader);
        final DeploymentType deploymentType = ASHelper.getRequiredAttachment(unit, WSAttachmentKeys.DEPLOYMENT_TYPE_KEY);
        dep.setType(deploymentType);

        return dep;
View Full Code Here

Examples of org.jboss.as.webservices.util.VirtualFileAdaptor

            }
            WSLogger.ROOT_LOGGER.tracef("Creating new unified WS deployment model for %s", unit.getParent());
            parentDep = this.newDeployment(null, unit.getParent().getName(), parentModule.getClassLoader(), null);
        }

        final UnifiedVirtualFile uvf = root != null ? new VirtualFileAdaptor(root) : new ResourceLoaderAdapter(classLoader);
        final ArchiveDeployment dep = this.newDeployment(parentDep, unit.getName(), classLoader, uvf);

        //add an AnnotationInfo attachment that uses composite jandex index
        dep.addAttachment(AnnotationsInfo.class, new JandexAnnotationsInfo(unit));
View Full Code Here

Examples of org.jboss.as.webservices.util.VirtualFileAdaptor

        }
    }

    private static UnifiedVirtualFile getUnifiedVirtualFile(final DeploymentUnit unit) {
        final ResourceRoot resourceRoot = unit.getAttachment(org.jboss.as.server.deployment.Attachments.DEPLOYMENT_ROOT);
        return new VirtualFileAdaptor(resourceRoot.getRoot());
    }
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.