Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Vorto » Register a Code Generator: How's a Generator Process called?
Register a Code Generator: How's a Generator Process called? [message #1726825] Wed, 16 March 2016 16:50 Go to next message
Marcus Munzert is currently offline Marcus MunzertFriend
Messages: 10
Registered: August 2012
Location: Freiburg, Germany
Junior Member
Hi,

The Vorto REST-API to control code generators includes this: put /rest/generation-router/register/{serviceKey}/{classifier}

When I register my own code generator, how is that then being called? What is included in the body of the HTTP request that gets sent to my code generator when somebody clicks on the "generate" button for an information model in the repository?

Cheers,
Marcus


CEO and President
Generative Software GmbH
Cornelia-Schlosser-Allee 15
79111 Freiburg
Germany

www.generative-software.de
Phone: +49 761 1562051
Fax: +49 761 7043098

www.virtual-developer.com
The efficient use of software development
Re: Register a Code Generator: How's a Generator Process called? [message #1726832 is a reply to message #1726825] Wed, 16 March 2016 17:57 Go to previous messageGo to next message
Olaf Weinmann is currently offline Olaf WeinmannFriend
Messages: 29
Registered: May 2015
Junior Member
Hi Marcus,

basicly you are sending the namespace, the name and the version of the Information Model you want to generate for. The code generator then pulls the real object from the repo and generates the code. You'll find the corresponding implementations on repos side here:

https://github.com/eclipse/vorto/blob/development/server/repo/repo-core/src/main/java/org/eclipse/vorto/repository/internal/service/generation/GenerationDelegateProxyService.java

and on generator side here:

https://github.com/eclipse/vorto/blob/development/server/generators/org.eclipse.vorto.codegen.service/src/main/java/org/eclipse/vorto/service/generator/web/CodeGenerationController.java

Please let me know if this answers your question.

Cheers,

Olaf
Re: Register a Code Generator: How's a Generator Process called? [message #1726847 is a reply to message #1726825] Thu, 17 March 2016 00:56 Go to previous messageGo to next message
Alexander Edelmann is currently offline Alexander EdelmannFriend
Messages: 39
Registered: January 2015
Member
Hi Marcus,
when you registered your generator with the repository, you can generate code from an information model by invoking it via GET like :
/rest/generation-router/<infomodelnamespace>/<infomodelname>/<version>/<serviceKey>

The serviceKey is the key that you have specified when you registered your code generator.

The repository fetches the information model from the given information model Id as well as looks up platform mapping files (if they exist) and passes it as a context to your generator.

You do not need to include anything in the message body.
Does this answer your question?

Cheers, Alex
Re: Register a Code Generator: How's a Generator Process called? [message #1726865 is a reply to message #1726847] Thu, 17 March 2016 07:27 Go to previous messageGo to next message
Marcus Munzert is currently offline Marcus MunzertFriend
Messages: 10
Registered: August 2012
Location: Freiburg, Germany
Junior Member
Hi Olaf, hi Alex,

Thank you very much for the quick and precise answers. Yes, both replies answer my question. I think the way the generation via REST works is straightforward. It should be quite easy to connect our Virtual Developer Platform to the Vorto Repository in a generic way.

Cheers,
Marcus


CEO and President
Generative Software GmbH
Cornelia-Schlosser-Allee 15
79111 Freiburg
Germany

www.generative-software.de
Phone: +49 761 1562051
Fax: +49 761 7043098

www.virtual-developer.com
The efficient use of software development
Re: Register a Code Generator: How's a Generator Process called? [message #1726922 is a reply to message #1726865] Thu, 17 March 2016 12:56 Go to previous messageGo to next message
Olaf Weinmann is currently offline Olaf WeinmannFriend
Messages: 29
Registered: May 2015
Junior Member
Hi Marcus,

That sounds good! Have you already started the integration of the Virtual Developer Platform with the repository? Please keep us up to date on this and please let us know if you need further assistance!

Cheers,

Olaf

Re: Register a Code Generator: How's a Generator Process called? [message #1751327 is a reply to message #1726922] Sun, 08 January 2017 19:55 Go to previous message
Heinz Rohmer is currently offline Heinz RohmerFriend
Messages: 4
Registered: October 2015
Junior Member
Hi all,

took some time, but the Virtual Developer connector for generation by a HTTP GET request from a Vorto repository is nearly finished.

A few month ago, I could find the documentation about the REST call for registering generators in the Vorto documentation. At the moment we could not find this documentation any more. Can you provide us a link to the current documentation please?

Cheers,
Heinz
Previous Topic:Importing files into Vorto Project
Next Topic:Auto Deploy of Code generator to cloud providers
Goto Forum:
  


Current Time: Tue Apr 23 08:58:40 GMT 2024

Powered by FUDForum. Page generated in 0.03537 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top