Package org.jclouds.savvis.vpdc.domain

Examples of org.jclouds.savvis.vpdc.domain.Link


      URI href = null;
      if (uri != null) {
         href = URI.create(uri);
         id = uri.substring(uri.lastIndexOf('/') + 1);
      }
      return (attributes.containsKey("rel")) ? new Link(id, attributes.get("name"), type != null ? type : defaultType,
               href, attributes.get("rel")) : new ResourceImpl(id, attributes.get("name"), type != null ? type
               : defaultType, href);
   }
View Full Code Here


      assertEquals(
            result.toString(),
            Org.builder()
                  .name("100000.0")
                  .description("SAVVISStation Integration Testing")
                  .vDC(new Link("2736", "demo_vpdcname", "application/vnd.vmware.vcloud.vdc+xml", URI
                        .create("https://api.sandbox.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736"),
                        "down")).build().toString());

   }
View Full Code Here

            attributes = ImmutableMap.<String, String> builder().putAll(attributes)
                  .put("href", getRequest().getEndpoint().toASCIIString()).build();
         Resource org = newResource(attributes);
         builder.name(org.getName()).type(org.getType()).id(org.getId()).href(org.getHref());
      } else if (equalsOrSuffix(qName, "Link")) {
         Link link = Link.class.cast(newResource(attributes));
         if ("down".equals(link.getRel()))
            builder.vDC(link);
         else
            builder.image(link);
      }
   }
View Full Code Here

      assertEquals(
            result.toString(),
            Org.builder()
                  .name("100000.0")
                  .description("SAVVISStation Integration Testing")
                  .vDC(new Link("2736", "demo_vpdcname", "application/vnd.vmware.vcloud.vdc+xml", URI
                        .create("https://api.sandbox.savvis.net/rest/api/v0.8/org/100000.0/vdc/2736"),
                        "down")).build().toString());

   }
View Full Code Here

      URI href = null;
      if (uri != null) {
         href = URI.create(uri);
         id = uri.substring(uri.lastIndexOf('/') + 1);
      }
      return (attributes.containsKey("rel")) ? new Link(id, attributes.get("name"), type != null ? type : defaultType,
               href, attributes.get("rel")) : new ResourceImpl(id, attributes.get("name"), type != null ? type
               : defaultType, href);
   }
View Full Code Here

            attributes = ImmutableMap.<String, String> builder().putAll(attributes)
                  .put("href", getRequest().getEndpoint().toASCIIString()).build();
         Resource org = newResource(attributes);
         builder.name(org.getName()).type(org.getType()).id(org.getId()).href(org.getHref());
      } else if (equalsOrSuffix(qName, "Link")) {
         Link link = Link.class.cast(newResource(attributes));
         if ("down".equals(link.getRel()))
            builder.vDC(link);
         else
            builder.image(link);
      }
   }
View Full Code Here

TOP

Related Classes of org.jclouds.savvis.vpdc.domain.Link

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.