aboutsummaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/main/java/org/onap/vid/services/CategoryParameterServiceImpl.java
diff options
context:
space:
mode:
authorSonsino, Ofir (os0695) <os0695@intl.att.com>2018-07-10 14:20:54 +0300
committerSonsino, Ofir (os0695) <os0695@intl.att.com>2018-07-10 14:20:54 +0300
commitc72d565bb58226b20625b2bce5f0019046bee649 (patch)
tree8658e49595705b02e47ddc14afa20d6bb7123547 /vid-app-common/src/main/java/org/onap/vid/services/CategoryParameterServiceImpl.java
parentef8a6b47847012fd59ea20da21d8d3d7c4a301ed (diff)
Merge 1806 code of vid-common
Change-Id: I75d52abed4a24dfe3827d79edc4a2938726aa87a Issue-ID: VID-208 Signed-off-by: Sonsino, Ofir (os0695) <os0695@intl.att.com>
Diffstat (limited to 'vid-app-common/src/main/java/org/onap/vid/services/CategoryParameterServiceImpl.java')
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/services/CategoryParameterServiceImpl.java22
1 files changed, 10 insertions, 12 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/services/CategoryParameterServiceImpl.java b/vid-app-common/src/main/java/org/onap/vid/services/CategoryParameterServiceImpl.java
index 3887fdfcc..fa531ffc1 100644
--- a/vid-app-common/src/main/java/org/onap/vid/services/CategoryParameterServiceImpl.java
+++ b/vid-app-common/src/main/java/org/onap/vid/services/CategoryParameterServiceImpl.java
@@ -1,22 +1,20 @@
package org.onap.vid.services;
-import java.io.IOException;
-import java.util.*;
-import java.util.stream.Collectors;
-
-import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
-import org.onap.portalsdk.core.service.DataAccessService;
import org.onap.vid.category.AddCategoryOptionResponse;
+import org.onap.vid.category.AddCategoryOptionsRequest;
import org.onap.vid.category.CategoryParameterOptionRep;
+import org.onap.vid.category.CategoryParametersResponse;
import org.onap.vid.model.CategoryParameter;
+import org.onap.vid.model.CategoryParameter.Family;
import org.onap.vid.model.CategoryParameterOption;
-import org.onap.vid.category.AddCategoryOptionsRequest;
-import org.onap.vid.category.CategoryParametersResponse;
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.onap.portalsdk.core.service.DataAccessService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
-import org.onap.vid.model.CategoryParameter.Family;
import javax.ws.rs.ForbiddenException;
+import java.util.*;
+import java.util.stream.Collectors;
@Service
@@ -49,7 +47,7 @@ public class CategoryParameterServiceImpl implements CategoryParameterService {
}
@Override
- public CategoryParametersResponse getCategoryParameters(Family familyName) throws IOException {
+ public CategoryParametersResponse getCategoryParameters(Family familyName) {
List<CategoryParameter> categoryParameters = dataAccessService.getList(CategoryParameter.class, String.format(" where family = '%s' ",familyName), null, null);
return convertToCategoryParametersResponse(categoryParameters);
}
@@ -63,7 +61,7 @@ public class CategoryParameterServiceImpl implements CategoryParameterService {
}
@Override
- public AddCategoryOptionResponse createCategoryParameterOptions(String categoryName, AddCategoryOptionsRequest optionsRequest) throws IOException, UnfoundedCategoryException {
+ public AddCategoryOptionResponse createCategoryParameterOptions(String categoryName, AddCategoryOptionsRequest optionsRequest) {
AddCategoryOptionResponse response = new AddCategoryOptionResponse(new ArrayList<>());
CategoryParameter categoryParameter = getCategoryParameter(categoryName);
@@ -123,7 +121,7 @@ public class CategoryParameterServiceImpl implements CategoryParameterService {
}
@Override
- public void deleteCategoryOption(String categoryName, CategoryParameterOption option) throws IOException {
+ public void deleteCategoryOption(String categoryName, CategoryParameterOption option) {
List<CategoryParameter> categoryParameters = dataAccessService.getList(CategoryParameter.class, String.format(" where name = '%s'", categoryName), null, null);
if (categoryParameters.size() != 1) {
String msg = "There is no category parameter with name " + categoryName;