diff --git a/bindings-generator/pom.xml b/bindings-generator/pom.xml
index 9eae5e7..457f28d 100644
--- a/bindings-generator/pom.xml
+++ b/bindings-generator/pom.xml
@@ -11,7 +11,7 @@
com.vmware.vcloudvcd-api-tooling-parent
- 9.7
+ 10.0.0${project.artifactId} :: Bindings generation utilityProvides custom API bindings generation beyond what can be accomplished with xjc and OpenAPI
diff --git a/pom.xml b/pom.xml
index 4d93571..f9c8c6b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -8,7 +8,7 @@
4.0.0com.vmware.vcloudvcd-api-tooling-parent
- 9.7
+ 10.0.0pom${project.artifactId} :: vCloud Director REST API tooling parentParent project housing tools and utilities to process vCloud Director APIs and build bindings
diff --git a/vcd-bindings-maven-plugin/pom.xml b/vcd-bindings-maven-plugin/pom.xml
index e703ad0..cc557dd 100644
--- a/vcd-bindings-maven-plugin/pom.xml
+++ b/vcd-bindings-maven-plugin/pom.xml
@@ -12,7 +12,7 @@
com.vmware.vcloudvcd-api-tooling-parent
- 9.7
+ 10.0.0${project.artifactId} :: Maven plugin wrapper for bindings generation utility
diff --git a/vcd-xjc-plugins/pom.xml b/vcd-xjc-plugins/pom.xml
index 2421c71..cb26e1b 100644
--- a/vcd-xjc-plugins/pom.xml
+++ b/vcd-xjc-plugins/pom.xml
@@ -10,7 +10,7 @@
com.vmware.vcloudvcd-api-tooling-parent
- 9.7
+ 10.0.0jar${project.artifactId} :: Custom plugins for XML to Java Compilation
@@ -37,4 +37,16 @@
+
+
+
+ maven-compiler-plugin
+
+ utf8
+ 1.8
+ 1.8
+
+
+
+
diff --git a/vcd-xjc-plugins/src/main/java/com/vmware/vcloud/api/annotation/ContentType.java b/vcd-xjc-plugins/src/main/java/com/vmware/vcloud/api/annotation/ContentType.java
index 8c3fcd4..8ea8ca4 100644
--- a/vcd-xjc-plugins/src/main/java/com/vmware/vcloud/api/annotation/ContentType.java
+++ b/vcd-xjc-plugins/src/main/java/com/vmware/vcloud/api/annotation/ContentType.java
@@ -4,7 +4,7 @@
* #%L
* vcd-xjc-plugins :: Custom plugins for XML to Java Compilation
* %%
- * Copyright (C) 2018 VMware, Inc.
+ * Copyright (C) 2018 - 2021 VMware, Inc.
* %%
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -45,3 +45,4 @@
public @interface ContentType {
String value();
}
+
diff --git a/vcd-xjc-plugins/src/main/java/com/vmware/vcloud/api/annotation/MultiSite.java b/vcd-xjc-plugins/src/main/java/com/vmware/vcloud/api/annotation/MultiSite.java
new file mode 100644
index 0000000..94805ce
--- /dev/null
+++ b/vcd-xjc-plugins/src/main/java/com/vmware/vcloud/api/annotation/MultiSite.java
@@ -0,0 +1,80 @@
+package com.vmware.vcloud.api.annotation;
+
+/*-
+ * #%L
+ * vcd-xjc-plugins :: Custom plugins for XML to Java Compilation
+ * %%
+ * Copyright (C) 2018 - 2021 VMware, Inc.
+ * %%
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ * #L%
+ */
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import javax.xml.bind.JAXBElement;
+
+import com.vmware.vcloud.api.rest.version.ApiVersion;
+
+
+/**
+ * Indicates that a handler method can handle multi-site requests. A list of collection field names
+ * to be merged in the result body can be optionally specified. A custom response builder class can
+ * also be optionallyspecified to handle aggregation of the federated responses. If neither is
+ * specified, default aggregation implementation will be applied to the results.
+ */
+@Inherited
+@Target({ ElementType.TYPE, ElementType.METHOD })
+@Retention(RetentionPolicy.RUNTIME)
+public @interface MultiSite {
+
+ /**
+ * Specifies the list of collection names in a {@link JAXBElement} type that should be merged to
+ * create a multi-site response. i.e. the contents of independent response objects from multiple
+ * associated Org endpoints will be merged into a single collection in the response object
+ */
+ String[] mergeCollections() default {};
+
+ /**
+ * Specifies a custom class to use to build a multi-site response object. If none specified, a
+ * default multi-site response builder will be used to construct a multi-site response for the
+ * request. Any mrgeCollections value is ignored if a custom response builder is specified
+ */
+ Class> customResponseBuilder() default Object.class;
+
+ /**
+ * Specifies an {@link ApiVersion.Alias} to add support for multi-site request fanout. If none
+ * specified, a default {@code ApiVersion.Alias.MULTI_SITE} is used
+ */
+ ApiVersion.Alias addedIn() default ApiVersion.Alias.MULTI_SITE;
+
+ /**
+ * Specifies an {@link ApiVersion.Alias} to remove support for multi-site request fanout. If
+ * none specified, a default {@code ApiVersion.Alias.FUTURE} is used
+ */
+ ApiVersion.Alias removedIn() default ApiVersion.Alias.FUTURE;
+}
+
diff --git a/vcd-xjc-plugins/src/main/java/com/vmware/vcloud/api/annotation/Restricted.java b/vcd-xjc-plugins/src/main/java/com/vmware/vcloud/api/annotation/Restricted.java
new file mode 100644
index 0000000..a21aa53
--- /dev/null
+++ b/vcd-xjc-plugins/src/main/java/com/vmware/vcloud/api/annotation/Restricted.java
@@ -0,0 +1,47 @@
+package com.vmware.vcloud.api.annotation;
+
+/*-
+ * #%L
+ * vcd-xjc-plugins :: Custom plugins for XML to Java Compilation
+ * %%
+ * Copyright (C) 2018 - 2021 VMware, Inc.
+ * %%
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ * #L%
+ */
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * This annotation denotes that the annotated field is potentially restricted. Before writing out or
+ * reading in this field, the API framework should determine if the caller is allowed to see/use the
+ * field.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target({ ElementType.FIELD })
+public @interface Restricted {
+
+}
+
diff --git a/vcd-xjc-plugins/src/main/java/com/vmware/vcloud/api/annotation/Supported.java b/vcd-xjc-plugins/src/main/java/com/vmware/vcloud/api/annotation/Supported.java
index ef9b15e..d498d99 100644
--- a/vcd-xjc-plugins/src/main/java/com/vmware/vcloud/api/annotation/Supported.java
+++ b/vcd-xjc-plugins/src/main/java/com/vmware/vcloud/api/annotation/Supported.java
@@ -4,7 +4,7 @@
* #%L
* vcd-xjc-plugins :: Custom plugins for XML to Java Compilation
* %%
- * Copyright (C) 2018 VMware, Inc.
+ * Copyright (C) 2018 - 2021 VMware, Inc.
* %%
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -36,28 +36,27 @@
/**
* This annotation denotes when the specific feature was introduced to the
- * REST-API and if and when it was removed.
- *
- * A feature is present starting from {@link #addedIn()} version inclusive, to
- * {@link #removedIn()} exclusive.
- *
- * This annotation is added automatically to the JAXB generated classes.
+ * REST-API and if and when it was removed. This annotation is added
+ * automatically to the JAXB generated classes.
+ *
+ * The feature is present starting from {@link #addedIn()} version inclusive, to
+ * {@link #removedIn()} exclusive.
+ *
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.FIELD, ElementType.METHOD, ElementType.TYPE })
public @interface Supported {
+ public static final String VCLOUD_LEGACY_FILTER_PARAM = "vcloud_legacy";
+
/**
- * Version in which the feature was added, inclusive.
- *
- * @return a version string
+ * Version in which the feature was added.
*/
String addedIn();
/**
- * Version in which the feature was removed, exclusive.
- *
- * @return a version string
+ * Version in which the feature was removed.
*/
String removedIn() default "";
}
+
diff --git a/vcd-xjc-plugins/src/main/java/com/vmware/vcloud/api/enums/EnumValidator.java b/vcd-xjc-plugins/src/main/java/com/vmware/vcloud/api/enums/EnumValidator.java
index 146ad7d..ba14d79 100644
--- a/vcd-xjc-plugins/src/main/java/com/vmware/vcloud/api/enums/EnumValidator.java
+++ b/vcd-xjc-plugins/src/main/java/com/vmware/vcloud/api/enums/EnumValidator.java
@@ -49,3 +49,4 @@ public interface EnumValidator extends Serializable {
*/
void validate(String key, T value);
}
+
diff --git a/vcd-xjc-plugins/src/main/java/com/vmware/vcloud/api/enums/NameVersionHolder.java b/vcd-xjc-plugins/src/main/java/com/vmware/vcloud/api/enums/NameVersionHolder.java
index 9de9f68..56b5ba3 100644
--- a/vcd-xjc-plugins/src/main/java/com/vmware/vcloud/api/enums/NameVersionHolder.java
+++ b/vcd-xjc-plugins/src/main/java/com/vmware/vcloud/api/enums/NameVersionHolder.java
@@ -93,3 +93,4 @@ protected T validateValue(String key, T value) {
return value;
}
}
+
diff --git a/vcd-xjc-plugins/src/main/java/com/vmware/vcloud/api/http/converters/JAXBElementConverter.java b/vcd-xjc-plugins/src/main/java/com/vmware/vcloud/api/http/converters/JAXBElementConverter.java
new file mode 100644
index 0000000..baf772e
--- /dev/null
+++ b/vcd-xjc-plugins/src/main/java/com/vmware/vcloud/api/http/converters/JAXBElementConverter.java
@@ -0,0 +1,138 @@
+package com.vmware.vcloud.api.http.converters;
+
+/*-
+ * #%L
+ * vcd-xjc-plugins :: Custom plugins for XML to Java Compilation
+ * %%
+ * Copyright (C) 2018 - 2021 VMware, Inc.
+ * %%
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ * #L%
+ */
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+
+import javax.xml.bind.JAXBElement;
+
+
+/**
+ * Converts an xsd-generated type into a {@link JAXBElement} wrapped representation
+ */
+public class JAXBElementConverter {
+
+ private static class ObjectFactoryInvocation {
+ final Object objectFactory;
+ final Method factoryMethod;
+
+ ObjectFactoryInvocation(Object objectFactory, Method factoryMethod) {
+ this.objectFactory = objectFactory;
+ this.factoryMethod = factoryMethod;
+ }
+
+ public JAXBElement> convert(Object value) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException {
+ return (JAXBElement>) factoryMethod.invoke(objectFactory, value);
+ }
+ }
+
+
+ private final List