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;
}
Aggregations