Decouple auto assign check (#1000)

* Introduce auto assign executer interface to override check method.
* Add copyright header.
* Move documentation to interface. Annotate the AutoAssignExecutor as FunctionalInterface.
* Rename method to match interface name

Signed-off-by: Michael Herdt <Michael.Herdt2@bosch-si.com>
This commit is contained in:
Michael Herdt
2020-09-04 10:18:52 +02:00
committed by GitHub
parent 0e4b67895e
commit 1921fbf607
4 changed files with 46 additions and 23 deletions

View File

@@ -0,0 +1,25 @@
/**
* Copyright (c) 2020 Bosch.IO GmbH and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.eclipse.hawkbit.repository.autoassign;
/**
* An interface declaration which contains the check for the auto assignment
* logic.
*/
@FunctionalInterface
public interface AutoAssignExecutor {
/**
* Checks all target filter queries with an auto assign distribution set and
* triggers the check and assignment to targets that don't have the design DS
* yet
*/
void check();
}