Merge "Sniro BB now supports sole service proxies"
[so.git] / common / src / main / java / org / onap / so / client / aai / entities / uri / AAISimpleUri.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP - SO
4  * ================================================================================
5  * Copyright (C) 2017 - 2018 AT&T 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.so.client.aai.entities.uri;
22
23 import java.net.URI;
24 import javax.ws.rs.core.UriBuilder;
25 import org.onap.so.client.aai.AAIObjectPlurals;
26 import org.onap.so.client.aai.AAIObjectType;
27 import org.onap.so.client.graphinventory.Format;
28 import org.onap.so.client.graphinventory.entities.uri.Depth;
29 import org.onap.so.client.graphinventory.entities.uri.SimpleUri;
30
31 public class AAISimpleUri extends SimpleUri implements AAIResourceUri {
32
33     private static final long serialVersionUID = -6397024057188453229L;
34
35     protected AAISimpleUri(AAIObjectType type, Object... values) {
36         super(type, values);
37
38     }
39
40     protected AAISimpleUri(AAIObjectType type, URI uri) {
41         super(type, uri);
42     }
43
44     protected AAISimpleUri(AAIObjectType type, UriBuilder builder, Object... values) {
45         super(type, builder, values);
46     }
47
48     protected AAISimpleUri(AAIObjectPlurals type, UriBuilder builder, Object... values) {
49         super(type, builder, values);
50     }
51
52     protected AAISimpleUri(AAIObjectPlurals type) {
53         super(type);
54     }
55
56     protected AAISimpleUri(AAIObjectPlurals type, Object... values) {
57         super(type, values);
58     }
59
60     protected AAISimpleUri(AAIResourceUri parentUri, AAIObjectType childType, Object... childValues) {
61         super(parentUri, childType, childValues);
62     }
63
64     protected AAISimpleUri(AAIResourceUri parentUri, AAIObjectPlurals childType) {
65         super(parentUri, childType);
66     }
67
68     @Override
69     public AAISimpleUri relationshipAPI() {
70         return (AAISimpleUri) super.relationshipAPI();
71     }
72
73     @Override
74     public AAISimpleUri relatedTo(AAIObjectPlurals plural) {
75         return (AAISimpleUri) super.relatedTo(plural);
76     }
77
78     @Override
79     public AAISimpleUri relatedTo(AAIObjectType type, String... values) {
80         return (AAISimpleUri) super.relatedTo(type, values);
81     }
82
83     @Override
84     public AAISimpleUri resourceVersion(String version) {
85         return (AAISimpleUri) super.resourceVersion(version);
86     }
87
88     @Override
89     public AAISimpleUri queryParam(String name, String... values) {
90         return (AAISimpleUri) super.queryParam(name, values);
91     }
92
93     @Override
94     public AAISimpleUri replaceQueryParam(String name, String... values) {
95         return (AAISimpleUri) super.replaceQueryParam(name, values);
96     }
97
98     @Override
99     public AAISimpleUri resultIndex(int index) {
100         return (AAISimpleUri) super.resultIndex(index);
101     }
102
103     @Override
104     public AAISimpleUri resultSize(int size) {
105         return (AAISimpleUri) super.resultSize(size);
106     }
107
108     @Override
109     public AAISimpleUri limit(int size) {
110         return (AAISimpleUri) super.limit(size);
111     }
112
113     @Override
114     public AAISimpleUri clone() {
115         if (this.type != null) {
116             return new AAISimpleUri((AAIObjectType) this.type, this.internalURI.clone(), values);
117         } else {
118             return new AAISimpleUri((AAIObjectPlurals) this.pluralType, this.internalURI.clone(), values);
119         }
120     }
121
122     @Override
123     public AAIObjectType getObjectType() {
124         return (AAIObjectType) this.type;
125     }
126
127     @Override
128     public AAISimpleUri depth(Depth depth) {
129         return (AAISimpleUri) super.depth(depth);
130     }
131
132     @Override
133     public AAISimpleUri nodesOnly(boolean nodesOnly) {
134         return (AAISimpleUri) super.nodesOnly(nodesOnly);
135     }
136
137     @Override
138     public AAISimpleUri format(Format format) {
139         return (AAISimpleUri) super.format(format);
140     }
141 }