@Override public void execute() { Pair<List<? extends Snapshot>, Integer> result = _snapshotService.listSnapshots(this); ListResponse<SnapshotResponse> response = new ListResponse<SnapshotResponse>(); List<SnapshotResponse> snapshotResponses = new ArrayList<SnapshotResponse>(); for (Snapshot snapshot : result.first()) { SnapshotResponse snapshotResponse = _responseGenerator.createSnapshotResponse(snapshot); snapshotResponse.setObjectName("snapshot"); snapshotResponses.add(snapshotResponse); } response.setResponses(snapshotResponses, result.second()); response.setResponseName(getCommandName()); this.setResponseObject(response); }