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 <[email protected]> 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 true if the action id is to be accessible through http API. 044 * 045 * @since 10.3 046 */ 047 boolean isHttpEnabled(String actionId); 048 049 /** 050 * Returns true if commands about this action need to be executed sequentially instead of being run concurrently. 051 * 052 * @since 10.3 053 */ 054 boolean isSequentialCommands(String actionId); 055 056 /** 057 * Gets the validation class of an action. 058 * 059 * @since 10.10 060 */ 061 BulkActionValidation getActionValidation(String action); 062 063}