diff options
Diffstat (limited to 'src/main/java/org/onap/a1pesimulator/service/a1')
-rw-r--r-- | src/main/java/org/onap/a1pesimulator/service/a1/RanA1ServiceLocalStoreImpl.java | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/src/main/java/org/onap/a1pesimulator/service/a1/RanA1ServiceLocalStoreImpl.java b/src/main/java/org/onap/a1pesimulator/service/a1/RanA1ServiceLocalStoreImpl.java index feb481d..de451cf 100644 --- a/src/main/java/org/onap/a1pesimulator/service/a1/RanA1ServiceLocalStoreImpl.java +++ b/src/main/java/org/onap/a1pesimulator/service/a1/RanA1ServiceLocalStoreImpl.java @@ -1,11 +1,23 @@ +/* + * Copyright (C) 2021 Samsung Electronics + * 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. + * See the License for the specific language governing permissions and + * limitations under the License + */ + package org.onap.a1pesimulator.service.a1; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.ObjectMapper; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.http.HttpStatus; @@ -14,6 +26,9 @@ import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Service; import org.springframework.web.client.RestClientException; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; + /** * A1 Service implementation which uses in-memory policy data store. */ @@ -94,7 +109,7 @@ public class RanA1ServiceLocalStoreImpl implements A1Service { throws RestClientException { if (policyTypesMap.containsKey(policyTypeId) && policyTypesMap.get(policyTypeId).containsKey(policyId)) { return ResponseEntity.ok().contentType(MediaType.APPLICATION_JSON) - .body(policyTypesMap.get(policyTypeId).get(policyId)); + .body(policyTypesMap.get(policyTypeId).get(policyId)); } else { return ResponseEntity.notFound().build(); } |