From d378c37fbd1ecec7b43394926f1ca32a695e07de Mon Sep 17 00:00:00 2001 From: vasraz Date: Mon, 22 Mar 2021 15:33:06 +0000 Subject: Reformat openecomp-be Signed-off-by: Vasyl Razinkov Issue-ID: SDC-3449 Change-Id: I13e02322f8e00820cc5a1d85752caaeda9bf10d1 --- .../ApplicationConfigManager.java | 14 +++--- .../impl/ApplicationConfigManagerImpl.java | 50 ++++++++++------------ 2 files changed, 29 insertions(+), 35 deletions(-) (limited to 'openecomp-be/backend/openecomp-sdc-application-config-manager') diff --git a/openecomp-be/backend/openecomp-sdc-application-config-manager/src/main/java/org/openecomp/sdc/applicationconfig/ApplicationConfigManager.java b/openecomp-be/backend/openecomp-sdc-application-config-manager/src/main/java/org/openecomp/sdc/applicationconfig/ApplicationConfigManager.java index ff95e5af3c..74c7193018 100644 --- a/openecomp-be/backend/openecomp-sdc-application-config-manager/src/main/java/org/openecomp/sdc/applicationconfig/ApplicationConfigManager.java +++ b/openecomp-be/backend/openecomp-sdc-application-config-manager/src/main/java/org/openecomp/sdc/applicationconfig/ApplicationConfigManager.java @@ -7,9 +7,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,22 +17,20 @@ * limitations under the License. * ============LICENSE_END========================================================= */ - package org.openecomp.sdc.applicationconfig; +import java.util.Collection; import org.openecomp.core.utilities.applicationconfig.dao.type.ApplicationConfigEntity; import org.openecomp.core.utilities.applicationconfig.type.ConfigurationData; -import java.util.Collection; - /** * Created by Talio on 8/8/2016. */ public interface ApplicationConfigManager { - void insertIntoTable(String namespace, String key, String value); + void insertIntoTable(String namespace, String key, String value); - ConfigurationData getFromTable(String namespace, String key); + ConfigurationData getFromTable(String namespace, String key); - Collection getListOfConfigurationByNamespace(String namespace); + Collection getListOfConfigurationByNamespace(String namespace); } diff --git a/openecomp-be/backend/openecomp-sdc-application-config-manager/src/main/java/org/openecomp/sdc/applicationconfig/impl/ApplicationConfigManagerImpl.java b/openecomp-be/backend/openecomp-sdc-application-config-manager/src/main/java/org/openecomp/sdc/applicationconfig/impl/ApplicationConfigManagerImpl.java index bc9354f221..9c164b74c3 100644 --- a/openecomp-be/backend/openecomp-sdc-application-config-manager/src/main/java/org/openecomp/sdc/applicationconfig/impl/ApplicationConfigManagerImpl.java +++ b/openecomp-be/backend/openecomp-sdc-application-config-manager/src/main/java/org/openecomp/sdc/applicationconfig/impl/ApplicationConfigManagerImpl.java @@ -12,10 +12,10 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. -*/ - + */ package org.openecomp.sdc.applicationconfig.impl; +import java.util.Collection; import org.openecomp.core.utilities.applicationconfig.ApplicationConfig; import org.openecomp.core.utilities.applicationconfig.dao.type.ApplicationConfigEntity; import org.openecomp.core.utilities.applicationconfig.impl.ApplicationConfigImpl; @@ -25,37 +25,33 @@ import org.openecomp.sdc.common.errors.CoreException; import org.openecomp.sdc.common.errors.ErrorCategory; import org.openecomp.sdc.common.errors.ErrorCode; -import java.util.Collection; - /** * Created by Talio on 8/8/2016. */ public class ApplicationConfigManagerImpl implements ApplicationConfigManager { - private static final String SCHEMA_GENERATOR_INITIALIZATION_ERROR = - "SCHEMA_GENERATOR_INITIALIZATION_ERROR"; - private static final String SCHEMA_GENERATOR_INITIALIZATION_ERROR_MSG = - "Error occurred while loading questionnaire schema templates"; - private ApplicationConfig applicationConfig = new ApplicationConfigImpl(); - - @Override - public void insertIntoTable(String namespace, String key, String value) { - try { - applicationConfig.insertValue(namespace, key, value); - } catch (Exception exception) { - throw new CoreException(new ErrorCode.ErrorCodeBuilder().withCategory(ErrorCategory - .APPLICATION).withId(SCHEMA_GENERATOR_INITIALIZATION_ERROR).withMessage( - SCHEMA_GENERATOR_INITIALIZATION_ERROR_MSG).build(), exception); + private static final String SCHEMA_GENERATOR_INITIALIZATION_ERROR = "SCHEMA_GENERATOR_INITIALIZATION_ERROR"; + private static final String SCHEMA_GENERATOR_INITIALIZATION_ERROR_MSG = "Error occurred while loading questionnaire schema templates"; + private ApplicationConfig applicationConfig = new ApplicationConfigImpl(); + + @Override + public void insertIntoTable(String namespace, String key, String value) { + try { + applicationConfig.insertValue(namespace, key, value); + } catch (Exception exception) { + throw new CoreException( + new ErrorCode.ErrorCodeBuilder().withCategory(ErrorCategory.APPLICATION).withId(SCHEMA_GENERATOR_INITIALIZATION_ERROR) + .withMessage(SCHEMA_GENERATOR_INITIALIZATION_ERROR_MSG).build(), exception); + } } - } - @Override - public ConfigurationData getFromTable(String namespace, String key) { - return applicationConfig.getConfigurationData(namespace, key); - } + @Override + public ConfigurationData getFromTable(String namespace, String key) { + return applicationConfig.getConfigurationData(namespace, key); + } - @Override - public Collection getListOfConfigurationByNamespace(String namespace) { - return applicationConfig.getListOfConfigurationByNamespace(namespace); - } + @Override + public Collection getListOfConfigurationByNamespace(String namespace) { + return applicationConfig.getListOfConfigurationByNamespace(namespace); + } } -- cgit 1.2.3-korg