}
}
}
public void handleNewLinkerSelection() {
LinkerSelectionContext lh = linker.getSelectionContext();
setEnabled(lh.getMultipleSelection() != null
&& lh.getMultipleSelection().size() > 0
&& PermissionsUtils.isPermitted("jcr:removeNode", lh.getSelectionPermissions())
&& !lh.isLocked()
&& !lh.isSecondarySelection()
&& !lh.getMultipleSelection()
.get(0)
.getPath()
.equals("/sites/" + lh.getMultipleSelection().get(0).getSiteKey() + "/"
+ lh.getMultipleSelection().get(0).getName())
&& !lh.getMultipleSelection().get(0).getPath()
.equals("/" + lh.getMultipleSelection().get(0).getName()));
}