001/* 002 * (C) Copyright 2018 Nuxeo (http://nuxeo.com/) and others. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 * 016 * Contributors: 017 * Kevin Leturc <kleturc@nuxeo.com> 018 */ 019package org.nuxeo.ecm.core.bulk; 020 021import java.util.List; 022 023/** 024 * The Bulk admin service, it's an internal service in order to access configuration from Bulk Action Framework. 025 * 026 * @since 10.2 027 */ 028// This service is needed by stream processors to create appropriate streams 029public interface BulkAdminService { 030 031 /** 032 * Returns a list of declared bulk actions. By design a bulk action listen the stream of its own name. 033 * 034 * @return a list of declared bulk actions 035 */ 036 List<String> getActions(); 037 038 int getBucketSize(String action); 039 040 int getBatchSize(String action); 041 042 /** 043 * Returns the default query limit for the bulk action. 044 * 045 * @since 11.4 046 */ 047 Long getQueryLimit(String action); 048 049 /** 050 * @since 11.1 051 */ 052 String getDefaultScroller(String action); 053 054 /** 055 * @since 11.1 056 */ 057 String getInputStream(String action); 058 059 /** 060 * Returns true if the action id is to be accessible through http API. 061 * 062 * @since 10.3 063 */ 064 boolean isHttpEnabled(String actionId); 065 066 /** 067 * Returns true if commands about this action need to be executed sequentially instead of being run concurrently. 068 * 069 * @since 10.3 070 */ 071 boolean isSequentialCommands(String actionId); 072 073 /** 074 * Gets the validation class of an action. 075 * 076 * @since 10.10 077 */ 078 BulkActionValidation getActionValidation(String action); 079 080}