2 * ============LICENSE_START=======================================================
3 * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
4 * ================================================================================
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
17 * SPDX-License-Identifier: Apache-2.0
18 * ============LICENSE_END=========================================================
21 package org.onap.policy.pdpx.main.rest;
24 * Class to represent statistics report of xacmlPdp service.
27 public class StatisticsReport {
30 private long totalPoliciesCount;
31 private long permitDecisionsCount;
32 private long denyDecisionsCount;
33 private long indeterminantDecisionsCount;
34 private long notApplicableDecisionsCount;
38 * Returns the code of this {@link StatisticsReport} instance.
42 public int getCode() {
47 * Set code in this {@link StatisticsReport} instance.
49 * @param code the code to set
51 public void setCode(final int code) {
56 * Returns the totalPoliciesCount of this {@link StatisticsReport} instance.
58 * @return the totalPoliciesCount
60 public long getTotalPoliciesCount() {
61 return totalPoliciesCount;
65 * Set totalPoliciesCount in this {@link StatisticsReport} instance.
67 * @param totalPoliciesCount the totalPoliciesCount to set
69 public void setTotalPoliciesCount(long totalPoliciesCount) {
70 this.totalPoliciesCount = totalPoliciesCount;
74 * Returns the permitDecisionsCount of this {@link StatisticsReport} instance.
76 * @return the permitDecisionsCount
78 public long getPermitDecisionsCount() {
79 return permitDecisionsCount;
83 * Set permitDecisionsCount in this {@link StatisticsReport} instance.
85 * @param permitDecisionsCount the permitDecisionsCount to set
87 public void setPermitDecisionsCount(long permitDecisionsCount) {
88 this.permitDecisionsCount = permitDecisionsCount;
92 * Returns the denyDecisionsCount of this {@link StatisticsReport} instance.
94 * @return the denyDecisionsCount
96 public long getDenyDecisionsCount() {
97 return denyDecisionsCount;
101 * Set denyDecisionsCount in this {@link StatisticsReport} instance.
103 * @param denyDecisionsCount the denyDecisionsCount to set
105 public void setDenyDecisionsCount(long denyDecisionsCount) {
106 this.denyDecisionsCount = denyDecisionsCount;
110 * Returns the indeterminantDecisionsCount of this {@link StatisticsReport} instance.
112 * @return the indeterminantDecisionsCount
114 public long getIndeterminantDecisionsCount() {
115 return indeterminantDecisionsCount;
119 * Set indeterminantDecisionsCount in this {@link StatisticsReport} instance.
121 * @param indeterminantDecisionsCount the indeterminantDecisionsCount to set
123 public void setIndeterminantDecisionsCount(long indeterminantDecisionsCount) {
124 this.indeterminantDecisionsCount = indeterminantDecisionsCount;
128 * Returns the notApplicableDecisionsCount of this {@link StatisticsReport} instance.
130 * @return the notApplicableDecisionsCount
132 public long getNotApplicableDecisionsCount() {
133 return notApplicableDecisionsCount;
137 * Set notApplicableDecisionsCount in this {@link StatisticsReport} instance.
139 * @param notApplicableDecisionsCount the notApplicableDecisionsCount to set
141 public void setNotApplicableDecisionsCount(long notApplicableDecisionsCount) {
142 this.notApplicableDecisionsCount = notApplicableDecisionsCount;
149 public String toString() {
150 final StringBuilder builder = new StringBuilder();
151 builder.append("StatisticsReport [code=");
152 builder.append(getCode());
153 builder.append(", totalPoliciesCount=");
154 builder.append(getTotalPoliciesCount());
155 builder.append(", permitDecisionsCount=");
156 builder.append(getPermitDecisionsCount());
157 builder.append(", denyDecisionsCount=");
158 builder.append(getDenyDecisionsCount());
159 builder.append(", indeterminantDecisionsCount=");
160 builder.append(getIndeterminantDecisionsCount());
161 builder.append(", notApplicableDecisionsCount=");
162 builder.append(getNotApplicableDecisionsCount());
164 return builder.toString();