Examples of AppData


Examples of org.opensocial.models.AppData

    try {
      Request request = AppDataService.getAppData();
      Response response = client.send(request);

      AppData data = response.getEntry();
      assertTrue(data.getDataForUser(ORKUT_ID, "key1").equals(randomValue1));
      assertTrue(data.getDataForUser(ORKUT_ID, "key2").equals(randomValue2));
    } catch (Exception e) {
      fail("Exception occurred while processing retrieve request");
    }

    try {
      Request request = AppDataService.deleteAppData(
          new String[] {"key1", "key2"});
      client.send(request);
    } catch (Exception e) {
      fail("Exception occurred while processing delete request");
    }

    try {
      Request request = AppDataService.getAppData();
      Response response = client.send(request);

      AppData data = response.getEntry();
      assertTrue(data.hasField(ORKUT_ID));
      assertTrue(data.getDataForUser(ORKUT_ID, "key1") == null);
      assertTrue(data.getDataForUser(ORKUT_ID, "key2") == null);
      assertTrue(data.getDataForUser(ORKUT_ID, "java") != null);
    } catch (Exception e) {
      fail("Exception occurred while processing retrieve request");
    }
  }
View Full Code Here

Examples of xregistry.generated.FindAppDescResponseDocument.FindAppDescResponse.AppData

       
        if(results != null){
            List<xregistry.doc.AppData> finalResults = new ArrayList<xregistry.doc.AppData>();
            for(int i = 0;i<results.length;i++){
                try {
          AppData xbeansData = results[i];
          xregistry.doc.AppData resultAppData = new xregistry.doc.AppData(xbeansData.getName(),xbeansData.getOwner(),xbeansData.getHostName());
          resultAppData.allowedAction = xbeansData.getAllowedAction();
          resultAppData.resourceID = xbeansData.getName();
          finalResults.add(resultAppData);
        } catch (XmlValueOutOfRangeException e) {
          log.severe("Problem with retrieving object : " + e.getLocalizedMessage(), e);
        }   
            }
View Full Code Here

Examples of xregistry.generated.FindAppDescResponseDocument.FindAppDescResponse.AppData

        FindAppDescResponse appDescResponse = res.addNewFindAppDescResponse();
       
       
        if (appsData != null) {
            for (xregistry.doc.AppData appData : appsData) {
                AppData xbeansAppData = appDescResponse.addNewAppData();
                copyAppData(appData, xbeansAppData);
            }
        } else {
            res.addNewFindAppDescResponse();
        }
View Full Code Here

Examples of xregistry.generated.FindAppDescResponseDocument.FindAppDescResponse.AppData

                          resources[i].hasWriteAccess = "All".equals(data[i].getAllowedAction())
                                  || "Write".equals(data[i].getAllowedAction());
                          resources[i].isOwner = "All".equals(data[i].getAllowedAction())
                                  || Action.ResourceAdmin.toString().equals(data[i].getAllowedAction());
                          if (data[i] instanceof AppData) {
                              AppData appData = (AppData) data[i];
                              resources[i].displayName = appData.getName().getLocalPart() + "#" + appData.getHostName();
                              resources[i].name = appData.getName() + "#" + appData.getHostName();
                          } else {
                            resources[i].displayName =  data[i].getName().getLocalPart();
                              resources[i].name = data[i].getName().toString();
                          }
                          resources[i].resourceID = data[i].getResourceID().toString();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.