Ejemplo n.º 1
0
 /**
  * Use this API to fetch filtered set of dnskey resources. filter string should be in JSON
  * format.eg: "port:80,servicetype:HTTP".
  */
 public static dnskey[] get_filtered(nitro_service service, String filter) throws Exception {
   dnskey obj = new dnskey();
   options option = new options();
   option.set_filter(filter);
   dnskey[] response = (dnskey[]) obj.getfiltered(service, option);
   return response;
 }
Ejemplo n.º 2
0
 /**
  * Use this API to count the filtered set of dnskey resources. set the filter parameter values in
  * filtervalue object.
  */
 public static long count_filtered(nitro_service service, filtervalue[] filter) throws Exception {
   dnskey obj = new dnskey();
   options option = new options();
   option.set_count(true);
   option.set_filter(filter);
   dnskey[] response = (dnskey[]) obj.getfiltered(service, option);
   if (response != null) {
     return response[0].__count;
   }
   return 0;
 }