Package org.platformlayer.xml

Examples of org.platformlayer.xml.JaxbHelper


    }
  }

  @Override
  public <T> List<T> listItems(Class<T> clazz) throws OpsException {
    JaxbHelper jaxbHelper = PlatformLayerClientBase.toJaxbHelper(clazz, ManagedItemCollection.class);
    PlatformLayerKey path = PlatformLayerClientBase.toKey(jaxbHelper, null, listServices(true));

    UntypedItemCollection untypedItems = listItemsUntyped(path);

    List<T> items = Lists.newArrayList();
View Full Code Here


    }
  }

  @Override
  public <T extends ItemBase> T putItemByTag(T item, Tag uniqueTag) throws OpsException {
    JaxbHelper jaxbHelper = PlatformLayerClientBase.toJaxbHelper(item);

    String xml = PlatformLayerClientBase.serialize(jaxbHelper, item);
    PlatformLayerKey key = PlatformLayerClientBase.toKey(jaxbHelper, item, listServices(true));

    UntypedItem ret = putItemByTag(key, uniqueTag, xml, Format.XML);
View Full Code Here

  }

  public <T extends ItemBase> T getItem(String id, Class<T> itemClass) throws OpsException, IOException {
    TypedPlatformLayerClient client = getTypedClient();

    JaxbHelper jaxbHelper = PlatformLayerClientBase.toJaxbHelper(itemClass, new Class[] {});

    PlatformLayerKey key = PlatformLayerClientBase.toKey(jaxbHelper, new ManagedItemId(id), itemClass,
        client.listServices(true));
    return client.getItem(key, itemClass);
  }
View Full Code Here

        }
      } catch (JSONException e) {
        throw new IllegalArgumentException("Error parsing data", e);
      }

      JaxbHelper jaxbHelper = JaxbHelper.get(SettingCollection.class);
      String xml;
      try {
        xml = jaxbHelper.marshal(settings, false);
      } catch (JAXBException e) {
        throw new IllegalArgumentException("Error converting JSON to XML", e);
      }
      authorization.data = xml;
    }
View Full Code Here

TOP

Related Classes of org.platformlayer.xml.JaxbHelper

Copyright © 2018 www.massapicom. 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.