Search in sources :

Example 1 with ResourceOperation

use of io.lumeer.core.task.executor.operation.ResourceOperation in project engine by Lumeer.

the class LumeerBridge method appendOperation.

@SuppressWarnings("rawtypes")
private void appendOperation(final StringBuilder sb, final String name, final java.util.Collection<Attribute> attributes, final Operation operation) {
    if (operation instanceof ResourceOperation) {
        final ResourceOperation resourceChange = (ResourceOperation) operation;
        sb.append(name).append("(").append(StringUtils.right(((WithId) resourceChange.getEntity()).getId(), 4)).append("): ");
        sb.append(attributes.stream().filter(a -> a.getId().equals(resourceChange.getAttrId())).map(Attribute::getName).findFirst().orElse(""));
        sb.append(" = ");
        sb.append(resourceChange.getValue());
        sb.append("\n");
    }
}
Also used : ResourceOperation(io.lumeer.core.task.executor.operation.ResourceOperation)

Aggregations

ResourceOperation (io.lumeer.core.task.executor.operation.ResourceOperation)1