Implement Sonar Nexus REST interface directly
[policy/engine.git] / BRMSGateway / src / main / java / org / onap / policy / brms / api / nexus / pojo / NexusSearchResult.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP Policy Engine
4  * ================================================================================
5  * Copyright (C) 2018 Ericsson Intellectual Property. 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
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
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=========================================================
19  */
20
21 package org.onap.policy.brms.api.nexus.pojo;
22
23 import java.util.List;
24
25 /**
26  * The Class NexusSearchResult holds the result of a search in Nexus. It is populated directly from the JSON returned by
27  * the Nexus search.
28  */
29 public class NexusSearchResult {
30     private int totalCount;
31     private int from;
32     private int count;
33     private boolean tooManyResults;
34     private boolean collapsed;
35     private List<NexusRepository> repoDetails;
36     private List<NexusArtifact> data;
37     
38     public int getTotalCount() {
39         return totalCount;
40     }
41
42     public int getFrom() {
43         return from;
44     }
45
46     public int getCount() {
47         return count;
48     }
49
50     public boolean isTooManyResults() {
51         return tooManyResults;
52     }
53
54     public boolean isCollapsed() {
55         return collapsed;
56     }
57
58     public List<NexusRepository> getRepoDetailsList() {
59         return repoDetails;
60     }
61
62     public List<NexusArtifact> getArtifactList() {
63         return data;
64     }
65
66     @Override
67     public String toString() {
68         return "NexusSearchResult [totalCount=" + totalCount + ", from=" + from + ", count=" + count
69                 + ", tooManyResults=" + tooManyResults + ", collapsed=" + collapsed + ", repoDetailsList="
70                 + repoDetails + ", artifactList=" + data + "]";
71     }
72 }