use of org.structr.core.entity.AbstractRelationship in project structr by structr.
the class GetRelationshipCommand method processMessage.
@Override
public void processMessage(final WebSocketMessage webSocketData) {
final String nodeId = (String) webSocketData.getNodeData().get("nodeId");
final AbstractRelationship rel = getRelationship(webSocketData.getId(), nodeId);
if (rel != null) {
webSocketData.setResult(Arrays.asList(rel));
// send only over local connection (no broadcast)
getWebSocket().send(webSocketData, true);
} else {
logger.warn("Relationship not found for id {}!", webSocketData.getId());
// Not necessary to send a 404 here
// getWebSocket().send(MessageBuilder.status().code(404).build(), true);
}
}
Aggregations