if (name == null) {
throw new IllegalArgumentException("name can't be null");
}
ResourceId id = new ResourceId(scope, name);
ExoContainer container = ExoContainerContext.getCurrentContainer();
JavascriptConfigService service = (JavascriptConfigService) container
.getComponentInstanceOfType(JavascriptConfigService.class);
ScriptResource resource = service.getResource(id);
if (resource != null) {
if (FetchMode.IMMEDIATE.equals(resource.getFetchMode())) {
resourceIds.add(id, null);
} else {
Map<ResourceId, FetchMode> tmp = new HashMap<ResourceId, FetchMode>();
tmp.put(id, null);
for (ScriptResource res : service.resolveIds(tmp).keySet()) {
require(res.getId().toString());
}
}
}
}