Source:
public BulkStatus run() throws IOException, OperationException { if (!admin.getActions().contains(action)) { throw new NuxeoException("Action '" + action + "' not found", HttpServletResponse.SC_NOT_FOUND); } if (!admin.isHttpEnabled(action) && !session.getPrincipal().isAdministrator()) { throw new NuxeoException("Action '" + action + "' denied", HttpServletResponse.SC_FORBIDDEN); } if (query == null && providerName == null) { throw new OperationException("Query and ProviderName cannot be both null"); } String userName = session.getPrincipal().getName(); PageProviderDefinition def = query != null ? PageProviderHelper.getQueryPageProviderDefinition(query) : PageProviderHelper.getPageProviderDefinition(providerName); if (def == null) { throw new OperationException("Could not get Provider Definition from either query or provider name"); } PageProvider<?> provider = PageProviderHelper.getPageProvider(session, def, namedParameters, queryParams != null ? queryParams.toArray(new String[0]) : null); query = PageProviderHelper.buildQueryString(provider); if (query.contains("?")) { throw new OperationException("Query parameters could not be parsed"); } BulkCommand.Builder builder = new BulkCommand.Builder(action, query).user(userName); try { Map<String, Serializable> mapParams = BulkParameters.paramsToMap(parametersAsJson); builder.params(mapParams); } catch (JsonParseException e) { throw new OperationException("Could not parse parameters, expecting valid json value", e); } if (repositoryName != null) { builder.repository(repositoryName); } else { builder.repository(session.getRepositoryName()); } if (bucketSize > 0) { builder.bucket(bucketSize); } if (batchSize > 0) { builder.batch(batchSize); } String commandId = service.submit(builder.build()); return service.getStatus(commandId); }

Target:
public BulkStatus run() throws IOException, OperationException { if (!admin.getActions().contains(action)) { throw new NuxeoException("Action '" + action + "' not found", HttpServletResponse.SC_NOT_FOUND); } if (!admin.isHttpEnabled(action) && !session.getPrincipal().isAdministrator()) { throw new NuxeoException("Action '" + action + "' denied", HttpServletResponse.SC_FORBIDDEN); } if (query == null && providerName == null) { throw new OperationException("Query and ProviderName cannot be both null"); } String userName = session.getPrincipal().getName(); PageProviderDefinition def = query != null ? PageProviderHelper.getQueryPageProviderDefinition(query) : PageProviderHelper.getPageProviderDefinition(providerName); if (def == null) { throw new OperationException("Could not get Provider Definition from either query or provider name"); } PageProvider<?> provider = PageProviderHelper.getPageProvider(session, def, namedParameters, queryParams != null ? queryParams.toArray(new String[0]) : null); query = PageProviderHelper.buildQueryString(provider); if (query.contains("?")) { throw new OperationException("Query parameters could not be parsed"); } BulkCommand.Builder builder = new BulkCommand.Builder(action, query).user(userName); try { builder.params(BulkParameters.paramsToMap(parametersAsJson)); } catch (IOException e) { throw new OperationException("Could not parse parameters, expecting valid json value", e); } if (repositoryName != null) { builder.repository(repositoryName); } else { builder.repository(session.getRepositoryName()); } if (bucketSize > 0) { builder.bucket(bucketSize); } if (batchSize > 0) { builder.batch(batchSize); } String commandId = service.submit(builder.build()); return service.getStatus(commandId); }