import java.util.Map;
import java.util.Objects;
import java.util.stream.IntStream;
-
+import lombok.Getter;
+import lombok.Setter;
import oasis.names.tc.xacml._3_0.core.schema.wd_17.AllOfType;
import oasis.names.tc.xacml._3_0.core.schema.wd_17.AnyOfType;
import oasis.names.tc.xacml._3_0.core.schema.wd_17.AttributeDesignatorType;
}
+@Getter
+@Setter
class ClosedLoopGridJSONData {
private String clearTimeOut;
private List<Object> connecttriggerSignatures;
private List<Object> connectVerificationSignatures;
- public String getClearTimeOut() {
- return clearTimeOut;
- }
-
- public void setClearTimeOut(String clearTimeOut) {
- this.clearTimeOut = clearTimeOut;
- }
-
- public String getTrapMaxAge() {
- return trapMaxAge;
- }
-
- public void setTrapMaxAge(String trapMaxAge) {
- this.trapMaxAge = trapMaxAge;
- }
-
- public String getVerificationclearTimeOut() {
- return verificationclearTimeOut;
- }
-
- public void setVerificationclearTimeOut(String verificationclearTimeOut) {
- this.verificationclearTimeOut = verificationclearTimeOut;
- }
-
- public List<Object> getConnecttriggerSignatures() {
- return connecttriggerSignatures;
- }
-
- public void setConnecttriggerSignatures(List<Object> connecttriggerSignatures) {
- this.connecttriggerSignatures = connecttriggerSignatures;
- }
-
- public List<Object> getConnectVerificationSignatures() {
- return connectVerificationSignatures;
- }
-
- public void setConnectVerificationSignatures(List<Object> connectVerificationSignatures) {
- this.connectVerificationSignatures = connectVerificationSignatures;
- }
}
import javax.json.JsonValue;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-
+import lombok.Getter;
+import lombok.Setter;
import oasis.names.tc.xacml._3_0.core.schema.wd_17.AllOfType;
import oasis.names.tc.xacml._3_0.core.schema.wd_17.AnyOfType;
import oasis.names.tc.xacml._3_0.core.schema.wd_17.AttributeDesignatorType;
}
+@Getter
+@Setter
class DCAEMicroServiceObject {
private String service;
private String riskLevel;
private String guard = null;
private Object uiContent;
-
- public String getGuard() {
- return guard;
- }
-
- public void setGuard(String guard) {
- this.guard = guard;
- }
-
- public String getRiskType() {
- return riskType;
- }
-
- public void setRiskType(String riskType) {
- this.riskType = riskType;
- }
-
- public String getRiskLevel() {
- return riskLevel;
- }
-
- public void setRiskLevel(String riskLevel) {
- this.riskLevel = riskLevel;
- }
-
- public String getPolicyScope() {
- return policyScope;
- }
-
- public void setPolicyScope(String policyScope) {
- this.policyScope = policyScope;
- }
-
- public String getPriority() {
- return priority;
- }
-
- public void setPriority(String priority) {
- this.priority = priority;
- }
-
- public String getVersion() {
- return version;
- }
-
- public void setVersion(String version) {
- this.version = version;
- }
-
private Object content;
-
- public String getPolicyName() {
- return policyName;
- }
-
- public void setPolicyName(String policyName) {
- this.policyName = policyName;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public String getConfigName() {
- return configName;
- }
-
- public void setConfigName(String configName) {
- this.configName = configName;
- }
-
- public Object getContent() {
- return content;
- }
-
- public void setContent(Object content) {
- this.content = content;
- }
-
- public String getService() {
- return service;
- }
-
- public void setService(String service) {
- this.service = service;
- }
-
- public String getLocation() {
- return location;
- }
-
- public void setLocation(String location) {
- this.location = location;
- }
-
- public String getUuid() {
- return uuid;
- }
-
- public void setUuid(String uuid) {
- this.uuid = uuid;
- }
-
- public String getTemplateVersion() {
- return templateVersion;
- }
-
- public void setTemplateVersion(String templateVersion) {
- this.templateVersion = templateVersion;
- }
-
- public Object getUiContent() {
- return uiContent;
- }
-
- public void setUiContent(Object uiContent) {
- this.uiContent = uiContent;
- }
-
}
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-
+import lombok.Getter;
+import lombok.Setter;
import oasis.names.tc.xacml._3_0.core.schema.wd_17.AllOfType;
import oasis.names.tc.xacml._3_0.core.schema.wd_17.AnyOfType;
import oasis.names.tc.xacml._3_0.core.schema.wd_17.AttributeDesignatorType;
}
}
-
+@Getter
+@Setter
class OptimizationObject {
private String service;
private String riskType;
private String riskLevel;
private String guard = null;
-
- public String getGuard() {
- return guard;
- }
-
- public void setGuard(String guard) {
- this.guard = guard;
- }
-
- public String getRiskType() {
- return riskType;
- }
-
- public void setRiskType(String riskType) {
- this.riskType = riskType;
- }
-
- public String getRiskLevel() {
- return riskLevel;
- }
-
- public void setRiskLevel(String riskLevel) {
- this.riskLevel = riskLevel;
- }
-
- public String getPriority() {
- return priority;
- }
-
- public void setPriority(String priority) {
- this.priority = priority;
- }
-
- public String getPolicyScope() {
- return policyScope;
- }
-
- public void setPolicyScope(String policyScope) {
- this.policyScope = policyScope;
- }
-
- public String getVersion() {
- return version;
- }
-
- public void setVersion(String version) {
- this.version = version;
- }
-
private Object content;
-
- public String getPolicyName() {
- return policyName;
- }
-
- public void setPolicyName(String policyName) {
- this.policyName = policyName;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public Object getContent() {
- return content;
- }
-
- public void setContent(Object content) {
- this.content = content;
- }
-
- public String getService() {
- return service;
- }
-
- public void setService(String service) {
- this.service = service;
- }
-
- public String getTemplateVersion() {
- return templateVersion;
- }
-
- public void setTemplateVersion(String templateVersion) {
- this.templateVersion = templateVersion;
- }
-
}
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-
+import lombok.Getter;
+import lombok.Setter;
import org.json.JSONObject;
import org.onap.policy.admin.RESTfulPAPEngine;
import org.onap.policy.common.logging.flexlogger.FlexLogger;
}
}
-
+@Getter
+@Setter
class PdpData {
String id;
int jmxPort;
String name;
String description;
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public int getJmxPort() {
- return jmxPort;
- }
-
- public void setJmxPort(int jmxPort) {
- this.jmxPort = jmxPort;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
}
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-
+import lombok.Getter;
+import lombok.Setter;
import org.json.JSONObject;
import org.onap.policy.common.logging.flexlogger.FlexLogger;
import org.onap.policy.common.logging.flexlogger.Logger;
}
}
-
+@Setter
+@Getter
class ReadScopes {
private int id;
private UserInfo loginId;
private String role;
private List<String> scope;
-
- public int getId() {
- return id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public UserInfo getLoginId() {
- return loginId;
- }
-
- public void setLoginId(UserInfo loginId) {
- this.loginId = loginId;
- }
-
- public String getRole() {
- return role;
- }
-
- public void setRole(String role) {
- this.role = role;
- }
-
- public List<String> getScope() {
- return scope;
- }
-
- public void setScope(List<String> scope) {
- this.scope = scope;
- }
-
}
package org.onap.policy.controller;
+import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import java.io.UnsupportedEncodingException;
private Set<StdPDPGroup> groups;
private static List<Object> rolesdata;
+ /**
+ * Before.
+ *
+ * @throws Exception Exception
+ */
@Before
public void setUp() throws Exception {
logger.info("setUp: Entering");
}
@Test
- public void testPDPGroupData() {
- HttpServletRequest request = mock(HttpServletRequest.class);
- MockHttpServletResponse response = new MockHttpServletResponse();
+ public void testPdpGroupData() {
+ final HttpServletRequest request = mock(HttpServletRequest.class);
+ final MockHttpServletResponse response = new MockHttpServletResponse();
PolicyController controller = mock(PolicyController.class);
PDPController pdpController = new PDPController();
pdpController.setJunit(true);;
logger.error("Exception Occured" + e);
}
}
+
+ @Test
+ public void testPdpData() {
+ PdpData data = new PdpData();
+ data.setId("id");
+ assertEquals("id", data.getId());
+ data.setDescription("foo");
+ assertEquals("foo", data.getDescription());
+ data.setJmxPort(0);
+ assertEquals(0, data.getJmxPort());
+ data.setName("name");
+ assertEquals("name", data.getName());
+ }
}
private PolicyRolesController controller = null;
private static CommonClassDao commonClassDao;
+ /**
+ * Before.
+ *
+ * @throws Exception exception
+ */
@Before
public void setUp() throws Exception {
logger.info("setUp: Entering");
============LICENSE_START=======================================================
ONAP Policy Engine
================================================================================
- Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ Copyright (C) 2017-2019 AT&T Intellectual Property. 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.
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.
</exclusion>
</exclusions>
</dependency>
- <dependency>
- <groupId>org.projectlombok</groupId>
- <artifactId>lombok</artifactId>
- <version>1.18.6</version>
- <scope>provided</scope>
- </dependency>
<dependency>
<groupId>org.onap.policy.engine</groupId>
<artifactId>ONAP-XACML</artifactId>
</plugins>
</reporting>
<dependencies>
+ <dependency>
+ <groupId>org.projectlombok</groupId>
+ <artifactId>lombok</artifactId>
+ <scope>provided</scope>
+ </dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>