* * org.onap.dcae
* * ================================================================================
* * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved.
+ * * Copyright (c) 2021 Nokia. All rights reserved.
* * ================================================================================
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
import org.springframework.stereotype.Service;
import java.util.HashMap;
-import java.util.LinkedHashMap;
import java.util.Map;
/**
* @author : Ravi Mantena
- * @date 10/16/2020
- * Application: ONAP - Blueprint Generator
- * Common ONAP Service used by ONAP and DMAAP Blueprint to add Interfaces
+ * @date 10/16/2020 Application: ONAP - Blueprint Generator Common ONAP Service to add Interfaces
*/
-
-
@Service
public class InterfacesService {
@Autowired
private StartService startService;
- // Method to create Interface to include Start and Start inputs sections in BP
- public Map<String,Object> createInterface(Map<String, LinkedHashMap<String, Object>> inputs, OnapComponentSpec onapComponentSpec){
+ /**
+ * Creates Interface to include Start and Start inputs sections in BP for given Inputs and
+ * ComponentSpec
+ *
+ * @param inputs Inputs
+ * @param onapComponentSpec OnapComponentSpec
+ * @return
+ */
+ public Map<String, Object> createInterface(
+ Map<String, Map<String, Object>> inputs, OnapComponentSpec onapComponentSpec) {
- Map<String,Object> response = new HashMap<>();
+ Map<String, Object> response = new HashMap<>();
Interfaces interfaces = new Interfaces();
Map<String, Object> startResponse = startService.createStart(inputs, onapComponentSpec);
- inputs = (Map<String, LinkedHashMap<String, Object>>) startResponse.get("inputs");
+ inputs = (Map<String, Map<String, Object>>) startResponse.get("inputs");
interfaces.setStart((Start) startResponse.get("start"));
response.put("inputs", inputs);
return response;
}
-
}
-