Specification and BaseRepositotyProvider improvements (#1182)
* Introduce custom base repository factory bean Signed-off-by: Alexander Dobler <alexander.dobler3@bosch.io> * Simplify ordered DS service call by using specs Signed-off-by: Alexander Dobler <alexander.dobler3@bosch.io> * Annotate getBaseRepoType interface as FunctionalInterface Signed-off-by: Alexander Dobler <alexander.dobler3@bosch.io> * Use CustomBaseRepositoryFactory instead of static BaseClass Signed-off-by: Alexander Dobler <alexander.dobler3@bosch.io> * Fix license headers Signed-off-by: Alexander Dobler <alexander.dobler3@bosch.io> * Add ordered specification back Signed-off-by: Alexander Dobler <alexander.dobler3@bosch.io>
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* Copyright (c) 2021 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;
|
||||
|
||||
/**
|
||||
* Provider that returns a base repository implementation dynamically based on repository type
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface BaseRepositoryTypeProvider {
|
||||
|
||||
/**
|
||||
* Return a base repository implementation that shall be used based on provided repository type
|
||||
* @param repositoryType type of repository
|
||||
* @return base repository implementation class
|
||||
*/
|
||||
Class<?> getBaseRepositoryType(final Class<?> repositoryType);
|
||||
}
|
||||
Reference in New Issue
Block a user