logger.log(Level.SEVERE, "Unable to remove given object from collection: idToRemove is null");
getWebSocket().send(MessageBuilder.status().code(400).build(), true);
}
GraphObject obj = getNode(webSocketData.getId());
if (obj != null) {
if (!getWebSocket().getSecurityContext().isAllowed(((AbstractNode) obj), Permission.write)) {
getWebSocket().send(MessageBuilder.status().message("No write permission").code(400).build(), true);
logger.log(Level.WARNING, "No write permission for {0} on {1}", new Object[]{getWebSocket().getCurrentUser().toString(), obj.toString()});
return;
}
}
if (obj == null) {
// No node? Try to find relationship
obj = getRelationship(webSocketData.getId());
}
GraphObject objToRemove = getNode(idToRemove);
if (obj != null && objToRemove != null) {
try {