public void replaceReferences(ReferenceReplacementService service) {
synchronized (getDataLock()) {
if (scriptedLinks == null) {
updateScriptedLinks(service.getItemLookup(), getScript());
}
ScriptReferenceReplacer cloner = new ScriptReferenceReplacer(this, service, scriptedLinks);
if (cloner.replaceReferences()) {
updateScriptedLinks(service.getItemLookup(), getScript());
}
}
}