Examples of UntypedItem


Examples of org.platformlayer.common.UntypedItem

        if (child instanceof Element) {
          Element childElement = (Element) child;
          // String namespaceURI = childElement.getNamespaceURI();
          String nodeName = childElement.getLocalName();
          if (nodeName.equals("item")) {
            UntypedItem untypedItem = new UntypedItemXml(childElement);

            items.add(untypedItem);
          }
        }
      }
View Full Code Here

Examples of org.platformlayer.common.UntypedItem

    if (uniqueTag != null) {
      relativePath += "?unique=" + urlEncode(uniqueTag.getKey());
    }

    String xml = doRequest(HttpMethod.PUT, relativePath, String.class, Format.XML, data, dataFormat);
    UntypedItem item = UntypedItemXml.build(xml);

    // PlatformLayerKey platformLayerKey = item.getPlatformLayerKey();
    // platformLayerKey = platformLayerKey.withId(new ManagedItemId(item.getId()));
    // item.setPlatformLayerKey(platformLayerKey);
View Full Code Here

Examples of org.platformlayer.common.UntypedItem

  public UntypedItem getItemUntyped(PlatformLayerKey key, Format format) throws PlatformLayerClientException {
    String relativePath = buildRelativePath(key);

    String data = doRequest(HttpMethod.GET, relativePath, String.class, format, null, null);

    UntypedItem item;
    switch (format) {
    case XML:
      item = UntypedItemXml.build(data);
      break;
View Full Code Here

Examples of org.platformlayer.common.UntypedItem

    String xml = PlatformLayerClientBase.serialize(jaxbHelper, item);

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

    UntypedItem created = putItem(key, xml, Format.XML);

    Class<T> itemClass = (Class<T>) item.getClass();
    return promoteToTyped(created, itemClass);
  }
View Full Code Here

Examples of org.platformlayer.common.UntypedItem

    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);
    Class<T> itemClass = (Class<T>) item.getClass();
    return promoteToTyped(ret, itemClass);
  }
View Full Code Here

Examples of org.platformlayer.common.UntypedItem

    return ret;
  }

  @Override
  public <T> T findItem(PlatformLayerKey key, Class<T> itemClass) throws OpsException {
    UntypedItem itemUntyped = getItemUntyped(key, Format.XML);
    if (itemUntyped == null) {
      return null;
    }

    return promoteToTyped(itemUntyped, itemClass);
View Full Code Here

Examples of org.platformlayer.common.UntypedItem

    return promoteToTyped(itemUntyped, itemClass);
  }

  @Override
  public <T> T findItem(PlatformLayerKey key) throws OpsException {
    UntypedItem itemUntyped = getItemUntyped(key, Format.XML);
    if (itemUntyped == null) {
      return null;
    }

    return promoteToTyped(itemUntyped);
View Full Code Here

Examples of org.platformlayer.common.UntypedItem

    return changeTags(key, tagChanges, null);
  }

  @Override
  public Tags getItemTags(PlatformLayerKey key) throws PlatformLayerClientException {
    UntypedItem itemUntyped = getItemUntyped(key, Format.XML);
    if (itemUntyped == null) {
      return null;
    }
    return itemUntyped.getTags();
  }
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.