import org.onap.portalapp.portal.ecomp.model.PortalRestResponse;
import org.onap.portalapp.portal.ecomp.model.PortalRestStatusEnum;
import org.onap.portalapp.portal.logging.aop.EPAuditLog;
import org.onap.portalapp.portal.ecomp.model.PortalRestResponse;
import org.onap.portalapp.portal.ecomp.model.PortalRestStatusEnum;
import org.onap.portalapp.portal.logging.aop.EPAuditLog;
import org.onap.portalapp.portal.service.MicroserviceService;
import org.onap.portalapp.portal.service.WidgetParameterService;
import org.onap.portalapp.portal.utils.EPCommonSystemProperties;
import org.onap.portalapp.portal.service.MicroserviceService;
import org.onap.portalapp.portal.service.WidgetParameterService;
import org.onap.portalapp.portal.utils.EPCommonSystemProperties;
SystemProperties.getProperty(EPCommonSystemProperties.MS_WIDGET_LOCAL_PORT))
+ "/widget/microservices/widgetCatalog/" + loginName,
HttpMethod.GET, new HttpEntity<>(WidgetServiceHeaders.getInstance()), List.class);
SystemProperties.getProperty(EPCommonSystemProperties.MS_WIDGET_LOCAL_PORT))
+ "/widget/microservices/widgetCatalog/" + loginName,
HttpMethod.GET, new HttpEntity<>(WidgetServiceHeaders.getInstance()), List.class);
SystemProperties.getProperty(EPCommonSystemProperties.MS_WIDGET_LOCAL_PORT))
+ "/widget/microservices/widgetCatalog",
HttpMethod.GET, new HttpEntity<>(WidgetServiceHeaders.getInstance()), List.class);
SystemProperties.getProperty(EPCommonSystemProperties.MS_WIDGET_LOCAL_PORT))
+ "/widget/microservices/widgetCatalog",
HttpMethod.GET, new HttpEntity<>(WidgetServiceHeaders.getInstance()), List.class);
public void updateWidgetCatalog(@RequestBody WidgetCatalog newWidgetCatalog, @PathVariable("widgetId") long widgetId) throws Exception {
template.exchange(
EcompPortalUtils.widgetMsProtocol() + "://"
public void updateWidgetCatalog(@RequestBody WidgetCatalog newWidgetCatalog, @PathVariable("widgetId") long widgetId) throws Exception {
template.exchange(
EcompPortalUtils.widgetMsProtocol() + "://"
SystemProperties.getProperty(MS_WIDGET_LOCAL_PORT))
+ "/widget/microservices/widgetCatalog/" + widgetId,
HttpMethod.PUT, new HttpEntity<>(newWidgetCatalog, WidgetServiceHeaders.getInstance()), String.class);
SystemProperties.getProperty(MS_WIDGET_LOCAL_PORT))
+ "/widget/microservices/widgetCatalog/" + widgetId,
HttpMethod.PUT, new HttpEntity<>(newWidgetCatalog, WidgetServiceHeaders.getInstance()), String.class);
public void deleteOnboardingWidget(@PathVariable("widgetId") long widgetId) throws Exception {
template.exchange(
EcompPortalUtils.widgetMsProtocol() + "://"
public void deleteOnboardingWidget(@PathVariable("widgetId") long widgetId) throws Exception {
template.exchange(
EcompPortalUtils.widgetMsProtocol() + "://"
SystemProperties.getProperty(MS_WIDGET_LOCAL_PORT))
+ "/widget/microservices/widgetCatalog/" + widgetId,
HttpMethod.DELETE, new HttpEntity<>(WidgetServiceHeaders.getInstance()), String.class);
SystemProperties.getProperty(MS_WIDGET_LOCAL_PORT))
+ "/widget/microservices/widgetCatalog/" + widgetId,
HttpMethod.DELETE, new HttpEntity<>(WidgetServiceHeaders.getInstance()), String.class);
multipartRequest.add("widget", request.getParameter("newWidget"));
respond = template.postForObject(
EcompPortalUtils.widgetMsProtocol() + "://"
multipartRequest.add("widget", request.getParameter("newWidget"));
respond = template.postForObject(
EcompPortalUtils.widgetMsProtocol() + "://"
SystemProperties.getProperty(EPCommonSystemProperties.MS_WIDGET_LOCAL_PORT))
+ "/widget/microservices/widgetCatalog/" + widgetId,
new HttpEntity<>(multipartRequest, WidgetServiceHeaders.getInstance()), String.class);
SystemProperties.getProperty(EPCommonSystemProperties.MS_WIDGET_LOCAL_PORT))
+ "/widget/microservices/widgetCatalog/" + widgetId,
new HttpEntity<>(multipartRequest, WidgetServiceHeaders.getInstance()), String.class);
SystemProperties.getProperty(EPCommonSystemProperties.MS_WIDGET_LOCAL_PORT))
+ "/widget/microservices/widgetCatalog",
new HttpEntity<>(multipartRequest, WidgetServiceHeaders.getInstance()), String.class);
SystemProperties.getProperty(EPCommonSystemProperties.MS_WIDGET_LOCAL_PORT))
+ "/widget/microservices/widgetCatalog",
new HttpEntity<>(multipartRequest, WidgetServiceHeaders.getInstance()), String.class);
@RequestMapping(value = "/portalApi/microservices/{widgetId}/framework.js", method = RequestMethod.GET)
public String getWidgetFramework(@PathVariable("widgetId") long widgetId) throws Exception {
return template.getForObject(EcompPortalUtils.widgetMsProtocol() + "://"
@RequestMapping(value = "/portalApi/microservices/{widgetId}/framework.js", method = RequestMethod.GET)
public String getWidgetFramework(@PathVariable("widgetId") long widgetId) throws Exception {
return template.getForObject(EcompPortalUtils.widgetMsProtocol() + "://"
SystemProperties.getProperty(MS_WIDGET_LOCAL_PORT))
+ "/widget/microservices/" + widgetId + "/framework.js", String.class,
WidgetServiceHeaders.getInstance());
SystemProperties.getProperty(MS_WIDGET_LOCAL_PORT))
+ "/widget/microservices/" + widgetId + "/framework.js", String.class,
WidgetServiceHeaders.getInstance());
@RequestMapping(value = "/portalApi/microservices/{widgetId}/controller.js", method = RequestMethod.GET)
public String getWidgetController(@PathVariable("widgetId") long widgetId) throws Exception {
return template.getForObject(EcompPortalUtils.widgetMsProtocol() + "://"
@RequestMapping(value = "/portalApi/microservices/{widgetId}/controller.js", method = RequestMethod.GET)
public String getWidgetController(@PathVariable("widgetId") long widgetId) throws Exception {
return template.getForObject(EcompPortalUtils.widgetMsProtocol() + "://"
SystemProperties.getProperty(MS_WIDGET_LOCAL_PORT))
+ "/widget/microservices/" + widgetId + "/controller.js", String.class,
WidgetServiceHeaders.getInstance());
SystemProperties.getProperty(MS_WIDGET_LOCAL_PORT))
+ "/widget/microservices/" + widgetId + "/controller.js", String.class,
WidgetServiceHeaders.getInstance());
@RequestMapping(value = "/portalApi/microservices/{widgetId}/style.css", method = RequestMethod.GET)
public String getWidgetCSS(@PathVariable("widgetId") long widgetId) throws Exception {
return template.getForObject(EcompPortalUtils.widgetMsProtocol() + "://"
@RequestMapping(value = "/portalApi/microservices/{widgetId}/style.css", method = RequestMethod.GET)
public String getWidgetCSS(@PathVariable("widgetId") long widgetId) throws Exception {
return template.getForObject(EcompPortalUtils.widgetMsProtocol() + "://"
SystemProperties.getProperty(MS_WIDGET_LOCAL_PORT))
+ "/widget/microservices/" + widgetId + "/styles.css", String.class,
WidgetServiceHeaders.getInstance());
SystemProperties.getProperty(MS_WIDGET_LOCAL_PORT))
+ "/widget/microservices/" + widgetId + "/styles.css", String.class,
WidgetServiceHeaders.getInstance());
List<WidgetParameterResult> list = new ArrayList<>();
Long serviceId = template.exchange(
EcompPortalUtils.widgetMsProtocol() + "://"
List<WidgetParameterResult> list = new ArrayList<>();
Long serviceId = template.exchange(
EcompPortalUtils.widgetMsProtocol() + "://"
SystemProperties.getProperty(EPCommonSystemProperties.MS_WIDGET_LOCAL_PORT))
+ "/widget/microservices/widgetCatalog/parameters/" + widgetId,
HttpMethod.GET, new HttpEntity<>(WidgetServiceHeaders.getInstance()), Long.class).getBody();
SystemProperties.getProperty(EPCommonSystemProperties.MS_WIDGET_LOCAL_PORT))
+ "/widget/microservices/widgetCatalog/parameters/" + widgetId,
HttpMethod.GET, new HttpEntity<>(WidgetServiceHeaders.getInstance()), Long.class).getBody();
SystemProperties.getProperty(EPCommonSystemProperties.MS_WIDGET_LOCAL_PORT))
+ "/widget/microservices/download/" + widgetId,
HttpMethod.GET, new HttpEntity<>(WidgetServiceHeaders.getInstance()), byte[].class)
SystemProperties.getProperty(EPCommonSystemProperties.MS_WIDGET_LOCAL_PORT))
+ "/widget/microservices/download/" + widgetId,
HttpMethod.GET, new HttpEntity<>(WidgetServiceHeaders.getInstance()), byte[].class)