Package org.jclouds.vcloud.options

Examples of org.jclouds.vcloud.options.CatalogItemOptions$Builder


               "this binder is only valid for GeneratedHttpRequests!");
      GeneratedHttpRequest gRequest = (GeneratedHttpRequest) request;
      String name = checkNotNull(postParams.get("name"), "name").toString();
      URI entity = URI.create(checkNotNull(postParams.get("Entity"), "Entity").toString());

      CatalogItemOptions options = findOptionsInArgsOrNew(gRequest);
      try {
         return stringBinder.bindToRequest(request, generateXml(name, entity, options));
      } catch (ParserConfigurationException e) {
         throw new RuntimeException(e);
      } catch (FactoryConfigurationError e) {
View Full Code Here


            Object[] array = (Object[]) arg;
            if (array.length > 0 && array[0] instanceof CatalogItemOptions)
               return CatalogItemOptions.class.cast(array[0]);
         }
      }
      return new CatalogItemOptions();
   }
View Full Code Here

public class BindCatalogItemToXmlPayloadTest extends BasePayloadTest {
  
   public void testDefault() throws IOException {
      String expected = "<CatalogItem xmlns=\"http://www.vmware.com/vcloud/v1\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" name=\"myname\" xsi:schemaLocation=\"http://www.vmware.com/vcloud/v1 http://vcloud.safesecureweb.com/ns/vcloud.xsd\"><Description>mydescription</Description><Entity href=\"http://fooentity\"/><Property key=\"foo\">bar</Property></CatalogItem>";

      CatalogItemOptions options = CatalogItemOptions.Builder.description("mydescription").properties(
            ImmutableMap.of("foo", "bar"));
      GeneratedHttpRequest request = requestForArgs(ImmutableList.<Object> of(options));

      BindCatalogItemToXmlPayload binder = injector.getInstance(BindCatalogItemToXmlPayload.class);
View Full Code Here

public class BindCatalogItemToXmlPayloadTest extends BasePayloadTest {
  
   public void testDefault() throws IOException {
      String expected = "<CatalogItem xmlns=\"http://www.vmware.com/vcloud/v1\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" name=\"myname\" xsi:schemaLocation=\"http://www.vmware.com/vcloud/v1 http://vcloud.safesecureweb.com/ns/vcloud.xsd\"><Description>mydescription</Description><Entity href=\"http://fooentity\"/><Property key=\"foo\">bar</Property></CatalogItem>";

      CatalogItemOptions options = CatalogItemOptions.Builder.description("mydescription").properties(
            ImmutableMap.of("foo", "bar"));
      GeneratedHttpRequest request = requestForArgs(ImmutableList.<Object> of(options));

      BindCatalogItemToXmlPayload binder = injector.getInstance(BindCatalogItemToXmlPayload.class);
View Full Code Here

               "this binder is only valid for GeneratedHttpRequests!");
      GeneratedHttpRequest gRequest = (GeneratedHttpRequest) request;
      String name = checkNotNull(postParams.get("name"), "name").toString();
      URI entity = URI.create(checkNotNull(postParams.get("Entity"), "Entity").toString());

      CatalogItemOptions options = findOptionsInArgsOrNew(gRequest);
      try {
         return stringBinder.bindToRequest(request, generateXml(name, entity, options));
      } catch (ParserConfigurationException e) {
         throw new RuntimeException(e);
      } catch (FactoryConfigurationError e) {
View Full Code Here

            Object[] array = (Object[]) arg;
            if (array.length > 0 && array[0] instanceof CatalogItemOptions)
               return CatalogItemOptions.class.cast(array[0]);
         }
      }
      return new CatalogItemOptions();
   }
View Full Code Here

               "this binder is only valid for GeneratedHttpRequests!");
      GeneratedHttpRequest gRequest = (GeneratedHttpRequest) request;
      String name = checkNotNull(postParams.get("name"), "name").toString();
      URI entity = URI.create(checkNotNull(postParams.get("Entity"), "Entity").toString());

      CatalogItemOptions options = findOptionsInArgsOrNew(gRequest);
      try {
         return stringBinder.bindToRequest(request, generateXml(name, entity, options));
      } catch (ParserConfigurationException e) {
         throw new RuntimeException(e);
      } catch (FactoryConfigurationError e) {
View Full Code Here

            Object[] array = (Object[]) arg;
            if (array.length > 0 && array[0] instanceof CatalogItemOptions)
               return CatalogItemOptions.class.cast(array[0]);
         }
      }
      return new CatalogItemOptions();
   }
View Full Code Here

public class BindCatalogItemToXmlPayloadTest extends BasePayloadTest {
  
   public void testDefault() throws IOException {
      String expected = "<CatalogItem xmlns=\"http://www.vmware.com/vcloud/v1\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" name=\"myname\" xsi:schemaLocation=\"http://www.vmware.com/vcloud/v1 http://vcloud.safesecureweb.com/ns/vcloud.xsd\"><Description>mydescription</Description><Entity href=\"http://fooentity\"/><Property key=\"foo\">bar</Property></CatalogItem>";

      CatalogItemOptions options = CatalogItemOptions.Builder.description("mydescription").properties(
            ImmutableMap.of("foo", "bar"));
      GeneratedHttpRequest request = requestForArgs(ImmutableList.<Object> of(options));

      BindCatalogItemToXmlPayload binder = injector.getInstance(BindCatalogItemToXmlPayload.class);
View Full Code Here

TOP

Related Classes of org.jclouds.vcloud.options.CatalogItemOptions$Builder

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.