e3fda2fa2310195ae25956b0a71b6409774b64b1
[so.git] /
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.graphinventory.entities.uri;
22
23 import java.io.Serializable;
24 import java.net.URI;
25 import java.util.Map;
26 import java.util.regex.Pattern;
27 import org.onap.so.client.graphinventory.GraphInventoryObjectBase;
28 import org.onap.so.client.graphinventory.GraphInventoryObjectType;
29
30 public interface GraphInventoryUri<T extends GraphInventoryUri<?, ?>, OT extends GraphInventoryObjectBase>
31         extends Serializable {
32
33     public URI build();
34
35     /**
36      * By default GraphInventory enforces a depth of 1. Some objects can be told to retrieve objects nested beneath them
37      * by increasing this number.
38      * 
39      * You can use 0 to restrict the returned information to only the object you requested You can use all to retrieve
40      * all nested objects (this should only be used if you really need a massive amount of information and are caching
41      * the retrieval)
42      * 
43      * @param depth
44      * @return
45      */
46     public T depth(Depth depth);
47
48     /**
49      * Makes client only return object fields, no relationships
50      * 
51      * @return
52      */
53     public T nodesOnly(boolean nodesOnly);
54
55     public T queryParam(String name, String... values);
56
57     public T replaceQueryParam(String name, String... values);
58
59     public T resultIndex(int index);
60
61     public T resultSize(int size);
62
63     public T limit(int size);
64
65     public T clone();
66
67     /**
68      * returns all key values of the URI as a map. Key names can be found in {@link GraphInventoryObjectType}
69      * 
70      * @return
71      */
72     public Map<String, String> getURIKeys();
73
74     public OT getObjectType();
75
76     public boolean equals(Object o);
77
78     public int hashCode();
79
80     public Pattern getPrefixPattern();
81 }