nameMap.put("j2eeType", NameFactory.JCA_RESOURCE_ADAPTER);
return new AbstractNameQuery(null, nameMap);
}
//construct name from components
PatternType pattern = resourceLocator.getPattern();
Artifact artifact = null;
if (pattern.getArtifactId() != null) {
artifact = new Artifact(pattern.getGroupId(), pattern.getArtifactId(), pattern.getVersion(), "car");
}
Map<String, String> nameMap = new HashMap<String, String>();
nameMap.put("name", pattern.getName());
nameMap.put("j2eeType", NameFactory.JCA_RESOURCE_ADAPTER);
if (pattern.getModule() != null) {
nameMap.put(NameFactory.RESOURCE_ADAPTER_MODULE, pattern.getModule());
}
return new AbstractNameQuery(artifact, nameMap, (Set) null);
}