Search in sources :

Example 1 with AttachmentList

use of org.jboss.as.server.deployment.AttachmentList in project wildfly by wildfly.

the class WSIntegrationProcessorJAXWS_JMS method getWsdlResourceRoot.

private static ResourceRoot getWsdlResourceRoot(final DeploymentUnit unit, final String wsdlPath) {
    final AttachmentList<ResourceRoot> resourceRoots = new AttachmentList<ResourceRoot>(ResourceRoot.class);
    final ResourceRoot root = unit.getAttachment(DEPLOYMENT_ROOT);
    resourceRoots.add(root);
    final AttachmentList<ResourceRoot> otherResourceRoots = unit.getAttachment(RESOURCE_ROOTS);
    if (otherResourceRoots != null) {
        resourceRoots.addAll(otherResourceRoots);
    }
    for (final ResourceRoot resourceRoot : resourceRoots) {
        VirtualFile file = resourceRoot.getRoot().getChild(wsdlPath);
        if (file.exists())
            return resourceRoot;
    }
    return null;
}
Also used : VirtualFile(org.jboss.vfs.VirtualFile) ResourceRoot(org.jboss.as.server.deployment.module.ResourceRoot) AttachmentList(org.jboss.as.server.deployment.AttachmentList)

Aggregations

AttachmentList (org.jboss.as.server.deployment.AttachmentList)1 ResourceRoot (org.jboss.as.server.deployment.module.ResourceRoot)1 VirtualFile (org.jboss.vfs.VirtualFile)1