2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2018 Samsung Electronics Co., Ltd. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 package org.onap.policy.xacml.std.pap;
26 * Parameters class for StdPDPPolicy
28 public class StdPDPPolicyParams {
30 private boolean isRoot;
33 private boolean isValid;
34 private String policyId;
35 private String description;
36 private String version;
41 private StdPDPPolicyParams(){
46 * Get an instance of builder class
47 * @return StdPDPPolicyParamsBuilder
49 public static StdPDPPolicyParamsBuilder builder() {
50 return new StdPDPPolicyParamsBuilder();
57 public String getId() {
62 * Boolean to indicate root
65 public boolean isRoot() {
73 public String getName() {
81 public URI getLocation() {
89 public boolean isValid() {
97 public String getPolicyId() {
102 * Description of policy
103 * @return description
105 public String getDescription() {
110 * Retrieve version of policy
113 public String getVersion() {
118 * Builder class for std pdp policy params class
120 public static class StdPDPPolicyParamsBuilder {
121 StdPDPPolicyParams m = new StdPDPPolicyParams();
124 * Build the policy params
125 * @return stdPdpPolicyParams object
127 public StdPDPPolicyParams build() {
133 * @param id - provide id
136 public StdPDPPolicyParamsBuilder id(String id) {
143 * @param isRoot - true/false
146 public StdPDPPolicyParamsBuilder isRoot(boolean isRoot) {
153 * @param name - name of policy
156 public StdPDPPolicyParamsBuilder name(String name) {
163 * @param uri - for location
166 public StdPDPPolicyParamsBuilder location(URI uri) {
173 * @param isValid - whether the policy is valid
176 public StdPDPPolicyParamsBuilder isValid(boolean isValid) {
183 * @param policyId - policy id
186 public StdPDPPolicyParamsBuilder policyId(String policyId) {
187 m.policyId = policyId;
192 * Set description of policy
193 * @param description - of policy
196 public StdPDPPolicyParamsBuilder description(String description) {
197 m.description = description;
202 * Set version of policy
203 * @param version - of policy
206 public StdPDPPolicyParamsBuilder version(String version) {