Juan Hernandez has submitted this change and it was merged.
Change subject: generator: Use Java to generate code
......................................................................
generator: Use Java to generate code
This change introduces a translation of the code generator from Python
to Java. This is a step towards the objective of using the same
generator for both the Python and and Java SDKs. The introduced Java
code is basically a literal translation of the existing Python code, to
the extent the differences between the two languages allow. Both
generatos generate exactly the same code, line by line.
To run the Java generator build the generator, and then use the
following commands to dowload the metadata from the server and
generate the code:
$ mvn validate -Pupdate-metadata
$ mvn validate -Pupdate-code
Change-Id: Ia128d1b35d371f535b95407113902da7f2931d3e
Signed-off-by: Juan Hernandez <juan.hernandez(a)redhat.com>
(cherry picked from commit 52b00d2cecd782ae54027713cb236eb43c77578f)
---
M .gitignore
D AUTHORS
A AUTHORS.md
R LICENSE.md
D README
A README.md
A generator/pom.xml
A generator/src/main/java/org/ovirt/engine/sdk/generator/Main.java
A generator/src/main/java/org/ovirt/engine/sdk/generator/common/AbstractCodegen.java
A generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/CodeHolder.java
A generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/Collection.java
A generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/CollectionExceptions.java
A generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/Documentation.java
A generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/EntryPoint.java
A generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/Import.java
A generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/Resource.java
A generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/RsdlCodegen.java
A generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/SubCollection.java
A generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/SubResource.java
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/CollectionAddTemplate
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/CollectionAddTemplate.java
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/CollectionGetCapabilitiesTemplate
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/CollectionGetCapabilitiesTemplate.java
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/CollectionGetDisksTemplate
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/CollectionGetDisksTemplate.java
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/CollectionGetNotSearchableTemplate
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/CollectionGetNotSearchableTemplate.java
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/CollectionGetSearchableTemplate
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/CollectionGetSearchableTemplate.java
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/CollectionListCapabilitiesTemplate
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/CollectionListCapabilitiesTemplate.java
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/CollectionListNotSearchableTemplate
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/CollectionListNotSearchableTemplate.java
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/CollectionListSearchableTemplate
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/CollectionListSearchableTemplate.java
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/CollectionTemplate
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/CollectionTemplate.java
A generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/CopyrightTemplate
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/CopyrightTemplate.java
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/EntryPointDynamicMethodTemplate
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/EntryPointDynamicMethodTemplate.java
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/EntryPointHeadTemplate
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/EntryPointHeadTemplate.java
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/EntryPointMethodsTemplate
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/EntryPointMethodsTemplate.java
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/EntryPointStaticMethodTemplate
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/EntryPointStaticMethodTemplate.java
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/EntryPointTemplate
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/EntryPointTemplate.java
A generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/ImportsTemplate
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/ImportsTemplate.java
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/ResourceActionTemplate
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/ResourceActionTemplate.java
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/ResourceDeleteTemplate
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/ResourceDeleteTemplate.java
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/ResourceDeleteWithBodyAndParamsTemplate
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/ResourceDeleteWithBodyAndParamsTemplate.java
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/ResourceDeleteWithBodyTemplate
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/ResourceDeleteWithBodyTemplate.java
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/ResourceDeleteWithParamsTemplate
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/ResourceDeleteWithParamsTemplate.java
A generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/ResourceTemplate
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/ResourceTemplate.java
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/ResourceUpdateTemplate
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/ResourceUpdateTemplate.java
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/SubCollectionAddTemplate
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/SubCollectionAddTemplate.java
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/SubCollectionGetTemplate
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/SubCollectionGetTemplate.java
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/SubCollectionListTemplate
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/SubCollectionListTemplate.java
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/SubCollectionListWithParamsTemplate
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/SubCollectionListWithParamsTemplate.java
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/SubCollectionTemplate
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/SubCollectionTemplate.java
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/SubResourceActionTemplate
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/SubResourceActionTemplate.java
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/SubResourceCollectionActionTemplate
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/SubResourceCollectionActionTemplate.java
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/SubResourceDeleteTemplate
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/SubResourceDeleteTemplate.java
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/SubResourceDeleteWithBodyTemplate
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/SubResourceDeleteWithBodyTemplate.java
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/SubResourceDeleteWithUrlParamsAndBodyTemplate
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/SubResourceDeleteWithUrlParamsAndBodyTemplate.java
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/SubResourceDeleteWithUrlParamsTemplate
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/SubResourceDeleteWithUrlParamsTemplate.java
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/SubResourceTemplate
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/SubResourceTemplate.java
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/SubResourceUpdateTemplate
A
generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/SubResourceUpdateTemplate.java
A generator/src/main/java/org/ovirt/engine/sdk/generator/templates/AbstractTemplate.java
A generator/src/main/java/org/ovirt/engine/sdk/generator/utils/CollectionsUtils.java
A generator/src/main/java/org/ovirt/engine/sdk/generator/utils/FileUtils.java
A generator/src/main/java/org/ovirt/engine/sdk/generator/utils/HeaderUtils.java
A generator/src/main/java/org/ovirt/engine/sdk/generator/utils/ParamUtils.java
A generator/src/main/java/org/ovirt/engine/sdk/generator/utils/ParamsContainer.java
A generator/src/main/java/org/ovirt/engine/sdk/generator/utils/StringUtils.java
A generator/src/main/java/org/ovirt/engine/sdk/generator/utils/TypeUtils.java
A generator/src/main/java/org/ovirt/engine/sdk/generator/utils/UrlUtils.java
A generator/src/main/java/org/ovirt/engine/sdk/generator/xsd/XsdCodegen.java
A generator/src/main/java/org/ovirt/engine/sdk/generator/xsd/XsdData.java
A
generator/src/main/java/org/ovirt/engine/sdk/generator/xsd/templates/FindRootClassTemplate
A
generator/src/main/java/org/ovirt/engine/sdk/generator/xsd/templates/FindRootClassTemplate.java
A generator/src/main/java/org/ovirt/engine/sdk/generator/xsd/templates/GetRootTagTemplate
A
generator/src/main/java/org/ovirt/engine/sdk/generator/xsd/templates/GetRootTagTemplate.java
A generator/src/main/java/org/ovirt/engine/sdk/generator/xsd/templates/ImportsTemplate
A
generator/src/main/java/org/ovirt/engine/sdk/generator/xsd/templates/ImportsTemplate.java
A
generator/src/main/java/org/ovirt/engine/sdk/generator/xsd/templates/ParseStringTemplate
A
generator/src/main/java/org/ovirt/engine/sdk/generator/xsd/templates/ParseStringTemplate.java
A
generator/src/main/java/org/ovirt/engine/sdk/generator/xsd/templates/SuperAttributesTemplate
A
generator/src/main/java/org/ovirt/engine/sdk/generator/xsd/templates/SuperAttributesTemplate.java
A generator/src/main/resources/README
A generator/src/main/resources/api.rsdl
A generator/src/main/resources/api.xjb
A generator/src/main/resources/api.xsd
116 files changed, 25,409 insertions(+), 32 deletions(-)
Approvals:
Juan Hernandez: Verified; Looks good to me, approved
--
To view, visit
http://gerrit.ovirt.org/30597
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia128d1b35d371f535b95407113902da7f2931d3e
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine-sdk
Gerrit-Branch: sdk_3.5
Gerrit-Owner: Juan Hernandez <juan.hernandez(a)redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernandez(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org