Search in sources :

Example 1 with ParamDto

use of org.apache.isis.schema.cmd.v1.ParamDto in project estatio by estatio.

the class DeriveBlobFromReturnedDocumentAbstract method process.

@Override
public CommandDto process(final Command command, final CommandDto commandDto) {
    final Bookmark result = command.getResult();
    if (result == null) {
        return commandDto;
    }
    try {
        final Document document = bookmarkService.lookup(result, Document.class);
        if (document != null) {
            ParamDto paramDto = getParamDto(commandDto, paramNum);
            CommonDtoUtils.setValueOn(paramDto, ValueType.BLOB, document.getBlob(), bookmarkService);
        }
    } catch (Exception ex) {
        return commandDto;
    }
    return commandDto;
}
Also used : Bookmark(org.apache.isis.applib.services.bookmark.Bookmark) Document(org.incode.module.document.dom.impl.docs.Document) ParamDto(org.apache.isis.schema.cmd.v1.ParamDto)

Example 2 with ParamDto

use of org.apache.isis.schema.cmd.v1.ParamDto in project estatio by estatio.

the class DeriveBlobFromDummyPdfAbstract method process.

@Override
public CommandDto process(final Command command, final CommandDto commandDto) {
    ParamDto paramDto = getParamDto(commandDto, paramNum);
    CommonDtoUtils.setValueOn(paramDto, ValueType.BLOB, blob, bookmarkService);
    return commandDto;
}
Also used : ParamDto(org.apache.isis.schema.cmd.v1.ParamDto)

Aggregations

ParamDto (org.apache.isis.schema.cmd.v1.ParamDto)2 Bookmark (org.apache.isis.applib.services.bookmark.Bookmark)1 Document (org.incode.module.document.dom.impl.docs.Document)1