示例#1
0
 public static Provider getSiteLoginForm(String sitId) throws IOException, URISyntaxException {
   String mn = "searchSite(site Id " + sitId + " )";
   System.out.println(fqcn + " :: " + mn);
   String getSiteURL = LoginApp.localURLVer1 + "provider/v1/" + sitId;
   String jsonResponse = HTTP.doGet(getSiteURL, LoginApp.loginTokens);
   Provider site =
       (Provider) GSONParser.handleJson(jsonResponse, lee.ysl.api.beans.Provider.class);
   System.out.println(site.getProvider()[0].getName());
   return site;
   /*site.getProvider()[0].getLoginForm().getRow()[0].getField()[0]
   		.setValue("hello");
   site.toString();*/
 }
示例#2
0
 public static void searchSite(String searchString) throws IOException, URISyntaxException {
   String mn = "searchSite(searchString " + searchString + " )";
   System.out.println(fqcn + " :: " + mn);
   String searchSiteURL = LoginApp.localURLVer1 + "provider/v1?name=" + searchString;
   String jsonResponse = HTTP.doGet(searchSiteURL, LoginApp.loginTokens);
   System.out.println(jsonResponse);
   List<Providers> providerList =
       (List<Providers>) GSONParser.handleJson(jsonResponse, lee.ysl.api.beans.Providers.class);
   for (Providers provider : providerList) {
     System.out.println(
         "Provider Id >> "
             + provider.getProviderId()
             + " >> Name  >>"
             + provider.getProviderName());
   }
 }