Search in sources :

Example 1 with ChangeRequestBuilder

use of org.activityinfo.server.entity.change.ChangeRequestBuilder in project activityinfo by bedatadriven.

the class RequestChangeHandler method execute.

@Override
public CommandResult execute(RequestChange cmd, User user) throws CommandException {
    ChangeRequestBuilder request = new ChangeRequestBuilder().setChangeType(ChangeType.valueOf(cmd.getChangeType())).setEntityId(cmd.getEntityId()).setEntityType(cmd.getEntityType()).setUser(user);
    if (cmd.getPropertyMap() != null) {
        request.setProperties(cmd.getPropertyMap().getTransientMap());
    }
    changeHandler.execute(request);
    return new VoidResult();
}
Also used : VoidResult(org.activityinfo.legacy.shared.command.result.VoidResult) ChangeRequestBuilder(org.activityinfo.server.entity.change.ChangeRequestBuilder)

Aggregations

VoidResult (org.activityinfo.legacy.shared.command.result.VoidResult)1 ChangeRequestBuilder (org.activityinfo.server.entity.change.ChangeRequestBuilder)1