File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
azd/src/main/java/org/azd/common/types Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 33import com .fasterxml .jackson .databind .JsonNode ;
44import org .azd .exceptions .AzDException ;
55import org .azd .helpers .JsonMapper ;
6+ import org .azd .utils .RestClient ;
67
78public abstract class BaseAbstractMethod {
89 private final JsonMapper MAPPER = new JsonMapper ();
910
11+ /**
12+ * toString() method to convert the POJO to string.
13+ * @return String result.
14+ */
1015 public String toString () {
1116 String res = null ;
1217
@@ -17,6 +22,10 @@ public String toString() {
1722 return res ;
1823 }
1924
25+ /**
26+ * Helper method to convert the string to Json node.
27+ * @return JsonNode object.
28+ */
2029 public JsonNode toJsonTree () {
2130 JsonNode res = null ;
2231 try {
@@ -25,4 +34,14 @@ public JsonNode toJsonTree() {
2534
2635 return res ;
2736 }
37+
38+ /**
39+ * Retrieves the continuation token from response header. This can then be used for getting the paginated response.
40+ * Note that not all the Apis return continuation token in the headers. If the header value "x-ms-continuationtoken"
41+ * is present then it will be returned or an empty string will be returned.
42+ * @return String value.
43+ */
44+ public String getContinuationToken () {
45+ return RestClient .Metadata .getResponseHeader ("x-ms-continuationtoken" );
46+ }
2847}
You can’t perform that action at this time.
0 commit comments