Completed constants.
Signed-off-by: Kai Zimmermann <kai.zimmermann@bosch-si.com>
This commit is contained in:
@@ -1,5 +1,10 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2011-2016 Bosch Software Innovations GmbH, Germany. All rights reserved.
|
* Copyright (c) 2015 Bosch Software Innovations 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;
|
package org.eclipse.hawkbit.repository;
|
||||||
|
|
||||||
@@ -12,16 +17,29 @@ import org.eclipse.hawkbit.repository.model.SoftwareModuleType;
|
|||||||
*/
|
*/
|
||||||
public final class Constants {
|
public final class Constants {
|
||||||
/**
|
/**
|
||||||
* Default {@link SoftwareModuleType} generated by repository for every new
|
* {@link SoftwareModuleType#getKey()} of a {@link SoftwareModuleType}
|
||||||
* account for Firmware/Operating System.
|
* generated by repository for every new account for Firmware/Operating
|
||||||
|
* System.
|
||||||
*/
|
*/
|
||||||
public static final String SMT_DEFAULT_OS_KEY = "os";
|
public static final String SMT_DEFAULT_OS_KEY = "os";
|
||||||
/**
|
/**
|
||||||
* Default {@link SoftwareModuleType} generated by repository for every new
|
* {@link SoftwareModuleType#getKey()} of a {@link SoftwareModuleType}
|
||||||
* account for applications.
|
* generated by repository for every new account for applications.
|
||||||
*/
|
*/
|
||||||
public static final String SMT_DEFAULT_APP_KEY = "application";
|
public static final String SMT_DEFAULT_APP_KEY = "application";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@link SoftwareModuleType#getName()} of a {@link SoftwareModuleType}
|
||||||
|
* generated by repository for every new account for "Firmware/Operating
|
||||||
|
* System" .
|
||||||
|
*/
|
||||||
|
public static final String SMT_DEFAULT_OS_NAME = "Firmware";
|
||||||
|
/**
|
||||||
|
* {@link SoftwareModuleType#getName()} of a {@link SoftwareModuleType}
|
||||||
|
* generated by repository for every new account for "applications/apps".
|
||||||
|
*/
|
||||||
|
public static final String SMT_DEFAULT_APP_NAME = "Application";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@link DistributionSetType#getKey()} of a {@link DistributionSetType}
|
* {@link DistributionSetType#getKey()} of a {@link DistributionSetType}
|
||||||
* generated by repository for every new account that includes
|
* generated by repository for every new account that includes
|
||||||
|
|||||||
@@ -284,10 +284,11 @@ public class JpaSystemManagement implements CurrentTenantCacheKeyGenerator, Syst
|
|||||||
}
|
}
|
||||||
|
|
||||||
private DistributionSetType createStandardSoftwareDataSetup() {
|
private DistributionSetType createStandardSoftwareDataSetup() {
|
||||||
final SoftwareModuleType app = softwareModuleTypeRepository.save(new JpaSoftwareModuleType(
|
final SoftwareModuleType app = softwareModuleTypeRepository
|
||||||
Constants.SMT_DEFAULT_APP_KEY, "Application", "Application Addons", Integer.MAX_VALUE));
|
.save(new JpaSoftwareModuleType(Constants.SMT_DEFAULT_APP_KEY, Constants.SMT_DEFAULT_APP_NAME,
|
||||||
|
"Application Addons", Integer.MAX_VALUE));
|
||||||
final SoftwareModuleType os = softwareModuleTypeRepository.save(new JpaSoftwareModuleType(
|
final SoftwareModuleType os = softwareModuleTypeRepository.save(new JpaSoftwareModuleType(
|
||||||
Constants.SMT_DEFAULT_OS_KEY, "Firmware", "Core firmware or operationg system", 1));
|
Constants.SMT_DEFAULT_OS_KEY, Constants.SMT_DEFAULT_OS_NAME, "Core firmware or operationg system", 1));
|
||||||
|
|
||||||
distributionSetTypeRepository
|
distributionSetTypeRepository
|
||||||
.save((JpaDistributionSetType) new JpaDistributionSetType(Constants.DST_DEFAULT_OS_ONLY_KEY,
|
.save((JpaDistributionSetType) new JpaDistributionSetType(Constants.DST_DEFAULT_OS_ONLY_KEY,
|
||||||
@@ -299,4 +300,4 @@ public class JpaSystemManagement implements CurrentTenantCacheKeyGenerator, Syst
|
|||||||
Constants.DST_DEFAULT_OS_WITH_APPS_NAME, "Default type with Firmware/OS and optional app(s).")
|
Constants.DST_DEFAULT_OS_WITH_APPS_NAME, "Default type with Firmware/OS and optional app(s).")
|
||||||
.addMandatoryModuleType(os).addOptionalModuleType(app));
|
.addMandatoryModuleType(os).addOptionalModuleType(app));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user