Completed constants.

Signed-off-by: Kai Zimmermann <kai.zimmermann@bosch-si.com>
This commit is contained in:
Kai Zimmermann
2016-06-03 12:34:09 +02:00
parent 2769170c47
commit 7468d8961e
2 changed files with 28 additions and 9 deletions

View File

@@ -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;
@@ -12,16 +17,29 @@ import org.eclipse.hawkbit.repository.model.SoftwareModuleType;
*/
public final class Constants {
/**
* Default {@link SoftwareModuleType} generated by repository for every new
* account for Firmware/Operating System.
* {@link SoftwareModuleType#getKey()} of a {@link SoftwareModuleType}
* generated by repository for every new account for Firmware/Operating
* System.
*/
public static final String SMT_DEFAULT_OS_KEY = "os";
/**
* Default {@link SoftwareModuleType} generated by repository for every new
* account for applications.
* {@link SoftwareModuleType#getKey()} of a {@link SoftwareModuleType}
* generated by repository for every new account for applications.
*/
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}
* generated by repository for every new account that includes

View File

@@ -284,10 +284,11 @@ public class JpaSystemManagement implements CurrentTenantCacheKeyGenerator, Syst
}
private DistributionSetType createStandardSoftwareDataSetup() {
final SoftwareModuleType app = softwareModuleTypeRepository.save(new JpaSoftwareModuleType(
Constants.SMT_DEFAULT_APP_KEY, "Application", "Application Addons", Integer.MAX_VALUE));
final SoftwareModuleType app = softwareModuleTypeRepository
.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(
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
.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).")
.addMandatoryModuleType(os).addOptionalModuleType(app));
}
}
}