* ============LICENSE_START=======================================================
* ONAP Policy Engine
* ================================================================================
* ============LICENSE_START=======================================================
* ONAP Policy Engine
* ================================================================================
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import com.fasterxml.jackson.annotation.PropertyAccessor;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.annotation.PropertyAccessor;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.io.IOException;
import java.io.PrintWriter;
import java.net.MalformedURLException;
import java.io.IOException;
import java.io.PrintWriter;
import java.net.MalformedURLException;
import javax.management.AttributeNotFoundException;
import javax.management.InstanceNotFoundException;
import javax.management.MBeanException;
import javax.management.AttributeNotFoundException;
import javax.management.InstanceNotFoundException;
import javax.management.MBeanException;
import javax.script.SimpleBindings;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.script.SimpleBindings;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.json.JSONObject;
import org.onap.policy.common.logging.flexlogger.FlexLogger;
import org.onap.policy.common.logging.flexlogger.Logger;
import org.json.JSONObject;
import org.onap.policy.common.logging.flexlogger.FlexLogger;
import org.onap.policy.common.logging.flexlogger.Logger;
/**
* This method is to retrieve all the data of last 30 days from PolicyEntity table as default.
*
* @param request object
* @param response object contains retrieved data
*/
/**
* This method is to retrieve all the data of last 30 days from PolicyEntity table as default.
*
* @param request object
* @param response object contains retrieved data
*/
method = {org.springframework.web.bind.annotation.RequestMethod.GET},
produces = MediaType.APPLICATION_JSON_VALUE)
public void get_DashboardPolicyCrudData(HttpServletRequest request, HttpServletResponse response) {
method = {org.springframework.web.bind.annotation.RequestMethod.GET},
produces = MediaType.APPLICATION_JSON_VALUE)
public void get_DashboardPolicyCrudData(HttpServletRequest request, HttpServletResponse response) {
method = {org.springframework.web.bind.annotation.RequestMethod.POST})
public void dashboardAdvancedSearch(HttpServletRequest request, HttpServletResponse response) throws IOException {
String lscope = null;
method = {org.springframework.web.bind.annotation.RequestMethod.POST})
public void dashboardAdvancedSearch(HttpServletRequest request, HttpServletResponse response) throws IOException {
String lscope = null;
method = {org.springframework.web.bind.annotation.RequestMethod.GET},
produces = MediaType.APPLICATION_JSON_VALUE)
public void get_DashboardPdpPolicyCrudData(HttpServletRequest request, HttpServletResponse response) {
method = {org.springframework.web.bind.annotation.RequestMethod.GET},
produces = MediaType.APPLICATION_JSON_VALUE)
public void get_DashboardPdpPolicyCrudData(HttpServletRequest request, HttpServletResponse response) {
method = {org.springframework.web.bind.annotation.RequestMethod.GET},
produces = MediaType.APPLICATION_JSON_VALUE)
public void getData(HttpServletRequest request, HttpServletResponse response) {
method = {org.springframework.web.bind.annotation.RequestMethod.GET},
produces = MediaType.APPLICATION_JSON_VALUE)
public void getData(HttpServletRequest request, HttpServletResponse response) {
method = {org.springframework.web.bind.annotation.RequestMethod.GET},
produces = MediaType.APPLICATION_JSON_VALUE)
public void getSystemAlertData(HttpServletRequest request, HttpServletResponse response) {
method = {org.springframework.web.bind.annotation.RequestMethod.GET},
produces = MediaType.APPLICATION_JSON_VALUE)
public void getSystemAlertData(HttpServletRequest request, HttpServletResponse response) {
method = {org.springframework.web.bind.annotation.RequestMethod.GET},
produces = MediaType.APPLICATION_JSON_VALUE)
public void getPAPStatusData(HttpServletRequest request, HttpServletResponse response) {
method = {org.springframework.web.bind.annotation.RequestMethod.GET},
produces = MediaType.APPLICATION_JSON_VALUE)
public void getPAPStatusData(HttpServletRequest request, HttpServletResponse response) {
method = {org.springframework.web.bind.annotation.RequestMethod.GET},
produces = MediaType.APPLICATION_JSON_VALUE)
public void getPDPStatusData(HttpServletRequest request, HttpServletResponse response) {
method = {org.springframework.web.bind.annotation.RequestMethod.GET},
produces = MediaType.APPLICATION_JSON_VALUE)
public void getPDPStatusData(HttpServletRequest request, HttpServletResponse response) {
method = {org.springframework.web.bind.annotation.RequestMethod.GET},
produces = MediaType.APPLICATION_JSON_VALUE)
public void getPolicyActivityData(HttpServletRequest request, HttpServletResponse response) {
method = {org.springframework.web.bind.annotation.RequestMethod.GET},
produces = MediaType.APPLICATION_JSON_VALUE)
public void getPolicyActivityData(HttpServletRequest request, HttpServletResponse response) {
- private void getPolicyData(String inputScope, String inputStage, String isDeleted, String createdAfter, String createdBefore) {
+ private void getPolicyData(String inputScope, String inputStage, String isDeleted, String createdAfter,
+ String createdBefore) {
policyStatusCrudData = new ArrayList<>();
List<Object> policyData = null;
SimpleBindings geParams = new SimpleBindings();
policyStatusCrudData = new ArrayList<>();
List<Object> policyData = null;
SimpleBindings geParams = new SimpleBindings();
HashMap map = null;
try (JMXConnector jmxConnection = JMXConnectorFactory.newJMXConnector(createConnectionURL(host, port), map)) {
jmxConnection.connect();
HashMap map = null;
try (JMXConnector jmxConnection = JMXConnectorFactory.newJMXConnector(createConnectionURL(host, port), map)) {
jmxConnection.connect();
- Object o =
- jmxConnection.getMBeanServerConnection().getAttribute(
- new ObjectName("PdpRest:type=PdpRestMonitor"), jmxAttribute);
+ Object o = jmxConnection.getMBeanServerConnection()
+ .getAttribute(new ObjectName("PdpRest:type=PdpRestMonitor"), jmxAttribute);
return new JMXServiceURL("rmi", "", 0, "/jndi/rmi://" + host + ":" + port + "/jmxrmi");
}
return new JMXServiceURL("rmi", "", 0, "/jndi/rmi://" + host + ":" + port + "/jmxrmi");
}
*/
@SuppressWarnings({"rawtypes", "unchecked"})
private Object getPolicy(String host, int port, String jmxAttribute) {
*/
@SuppressWarnings({"rawtypes", "unchecked"})
private Object getPolicy(String host, int port, String jmxAttribute) {
HashMap map = null;
try (JMXConnector jmxConnection = JMXConnectorFactory.newJMXConnector(createConnectionURL(host, port), map)) {
jmxConnection.connect();
HashMap map = null;
try (JMXConnector jmxConnection = JMXConnectorFactory.newJMXConnector(createConnectionURL(host, port), map)) {
jmxConnection.connect();
- Object o =
- jmxConnection.getMBeanServerConnection().getAttribute(
- new ObjectName("PdpRest:type=PdpRestMonitor"), "policyMap");
+ Object o = jmxConnection.getMBeanServerConnection()
+ .getAttribute(new ObjectName("PdpRest:type=PdpRestMonitor"), "policyMap");