Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bindings-generator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
<parent>
<groupId>com.vmware.vcloud</groupId>
<artifactId>vcd-api-tooling-parent</artifactId>
<version>9.7</version>
<version>10.3.0</version>
</parent>
<name>${project.artifactId} :: Bindings generation utility</name>
<description>Provides custom API bindings generation beyond what can be accomplished with xjc and OpenAPI</description>

<properties>
<commons.lang.version>3.7</commons.lang.version>
<java.version>1.8</java.version>
<java.version>11</java.version>
<jaxb.version>2.3.0</jaxb.version>
<jcommander.version>1.72</jcommander.version>
<logback.version>1.2.3</logback.version>
Expand Down
7 changes: 1 addition & 6 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
<?xml version="1.0"?>
<!--
api-extension-template-vcloud-director
Copyright 2018 VMware, Inc.
SPDX-License-Identifier: BSD-2-Clause
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.vmware.vcloud</groupId>
<artifactId>vcd-api-tooling-parent</artifactId>
<version>9.7</version>
<version>10.3.0</version>
<packaging>pom</packaging>
<name>${project.artifactId} :: vCloud Director REST API tooling parent</name>
<description>Parent project housing tools and utilities to process vCloud Director APIs and build bindings</description>
Expand Down
8 changes: 4 additions & 4 deletions vcd-bindings-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<parent>
<groupId>com.vmware.vcloud</groupId>
<artifactId>vcd-api-tooling-parent</artifactId>
<version>9.7</version>
<version>10.3.0</version>
</parent>
<name>${project.artifactId} :: Maven plugin wrapper for bindings generation utility</name>

Expand Down Expand Up @@ -40,13 +40,13 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<source>11</source>
<target>11</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.5.1</version>
<version>3.6.0</version>
<configuration>
<mojoDependencies>
<value>com.vmware.vcloud:vcd-bindings-maven-plugin</value>
Expand Down
33 changes: 29 additions & 4 deletions vcd-xjc-plugins/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<parent>
<groupId>com.vmware.vcloud</groupId>
<artifactId>vcd-api-tooling-parent</artifactId>
<version>9.7</version>
<version>10.3.0</version>
</parent>
<packaging>jar</packaging>
<name>${project.artifactId} :: Custom plugins for XML to Java Compilation</name>
Expand All @@ -29,12 +29,37 @@
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
</dependency>
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.12.2</version>
</dependency>

</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
<version>2.0.1</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.7</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-core</artifactId>
<version>3.1.11</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<encoding>utf8</encoding>
<source>11</source>
<target>11</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
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;

/**
* Indicates properties that are not explicitly contained in the model object, but can be
* used to filter a query on the model object.
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.TYPE, ElementType.METHOD })
public @interface CrossReferences {
/**
* The alias name for the cross referenced property.
*
* E.g: computePolicyType in OrgVdc that refers to policyType in VdcComputePolicy
*/
String[] aliases();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
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 the default field and direction the annotated method can use to determine
* how it should sort it's return values in the case when the caller has not provided this
* information.
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.METHOD })
public @interface DefaultSort {

/**
* Default field to be used when sorting results.
*/
String defaultSortField();

/**
* Determines direction of sort, ascending if "true".
*/
boolean sortAscending();

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
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;

/**
* Used to annotate methods that have an associated Audit Trail API Event.
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface Event {

/**
* The name of the EventTopic to look up an associated Builder implementation of.
*
* @return the String name of the EventTopic.
*/
String eventTopicName();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
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.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.PARAMETER;

/**
* This annotation is generated by the Swagger code generator on all parameters on all API methods.
* It is used to match up link parameter names during link generation.
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ PARAMETER })
public @interface LinkParamName {

String value();

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
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;
}
Loading