Examples of VirtualFileAdaptor


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) {
                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 "
                        + unit);
            }
            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);
        }

        if (root != null) {
            dep.setRootFile(new VirtualFileAdaptor(root));
        } else {
            dep.setRootFile(new ResourceLoaderAdapter(classLoader));
        }
        dep.setRuntimeClassLoader(classLoader);
        final DeploymentType deploymentType = ASHelper.getRequiredAttachment(unit, WSAttachmentKeys.DEPLOYMENT_TYPE_KEY);
View Full Code Here

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

    private UnifiedVirtualFile getUnifiedVirtualFile(final DeploymentUnit deploymentUnit) {
        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

    {
        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

        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

        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

        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

        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

public class WSDescriptorDeploymentProcessor implements DeploymentUnitProcessor {

    public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
        final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
        final ResourceRoot deploymentRoot = deploymentUnit.getAttachment(Attachments.DEPLOYMENT_ROOT);
        UnifiedVirtualFile uvf = new VirtualFileAdaptor(deploymentRoot.getRoot());
        WebservicesMetaData wsmd = WebservicesFactory.loadFromVFSRoot(uvf);
        if (wsmd != null) {
            deploymentUnit.putAttachment(WSAttachmentKeys.WEBSERVICES_METADATA_KEY, wsmd);
        }
    }
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.