Search in sources :

Example 1 with PrintRequest

use of io.lumeer.core.task.executor.request.PrintRequest in project engine by Lumeer.

the class LumeerBridge method printAttribute.

@SuppressWarnings("unused")
public void printAttribute(final LinkBridge l, final String attrId) {
    final SelectedWorkspace workspace = task.getDaoContextSnapshot().getSelectedWorkspace();
    if (!printed && workspace.getOrganization().isPresent() && workspace.getProject().isPresent()) {
        final PrintRequest pq = new PrintRequest(workspace.getOrganization().get().getCode(), workspace.getProject().get().getCode(), l.getLink().getLinkTypeId(), l.getLink().getId(), attrId, ResourceType.LINK);
        operations.add(new PrintAttributeOperation(pq));
        // we can trigger this only once per rule/function
        printed = true;
    }
}
Also used : TextPrintRequest(io.lumeer.core.task.executor.request.TextPrintRequest) PrintRequest(io.lumeer.core.task.executor.request.PrintRequest) PrintAttributeOperation(io.lumeer.core.task.executor.operation.PrintAttributeOperation) SelectedWorkspace(io.lumeer.api.SelectedWorkspace)

Example 2 with PrintRequest

use of io.lumeer.core.task.executor.request.PrintRequest in project engine by Lumeer.

the class LumeerBridge method printAttribute.

@SuppressWarnings("unused")
public void printAttribute(final DocumentBridge d, final String attrId) {
    final SelectedWorkspace workspace = task.getDaoContextSnapshot().getSelectedWorkspace();
    if (!printed && workspace.getOrganization().isPresent() && workspace.getProject().isPresent()) {
        final PrintRequest pq = new PrintRequest(workspace.getOrganization().get().getCode(), workspace.getProject().get().getCode(), d.getDocument().getCollectionId(), d.getDocument().getId(), attrId, ResourceType.COLLECTION);
        operations.add(new PrintAttributeOperation(pq));
        // we can trigger this only once per rule/function
        printed = true;
    }
}
Also used : TextPrintRequest(io.lumeer.core.task.executor.request.TextPrintRequest) PrintRequest(io.lumeer.core.task.executor.request.PrintRequest) PrintAttributeOperation(io.lumeer.core.task.executor.operation.PrintAttributeOperation) SelectedWorkspace(io.lumeer.api.SelectedWorkspace)

Aggregations

SelectedWorkspace (io.lumeer.api.SelectedWorkspace)2 PrintAttributeOperation (io.lumeer.core.task.executor.operation.PrintAttributeOperation)2 PrintRequest (io.lumeer.core.task.executor.request.PrintRequest)2 TextPrintRequest (io.lumeer.core.task.executor.request.TextPrintRequest)2