TOMEE-2882 Translate to Portuguese: examples/pojo-webservice
Hello, I opened a ticket in Jira [1] and a PR [2], can anyone revise the translation? thank you [1] https://issues.apache.org/jira/browse/TOMEE-2882 [2] https://github.com/apache/tomee/pull/691 -- *Daniel Dias dos Santos* Java Developer SouJava & JCP Member GitHub: https://github.com/Daniel-Dos Linkedin: www.linkedin.com/in/danieldiasjava Twitter: http://twitter.com/danieldiasjava
[GitHub] [tomee] Daniel-Dos opened a new pull request #691: TOMEE-2882 Translate to Portuguese: examples/pojo-webservice
Daniel-Dos opened a new pull request #691: URL: https://github.com/apache/tomee/pull/691 Link to Jira: https://issues.apache.org/jira/browse/TOMEE-2882 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [tomee] Daniel-Dos commented on pull request #687: TOMEE-2878 - Translate to Portuguese: examples/multi-jpa-provider-testing
Daniel-Dos commented on pull request #687: URL: https://github.com/apache/tomee/pull/687#issuecomment-660395031 thanks @willesreis for review. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [tomee] Daniel-Dos commented on pull request #686: TOMEE-2877 Translate to Portuguese: examples/mp-rest-jwt-public-key
Daniel-Dos commented on pull request #686: URL: https://github.com/apache/tomee/pull/686#issuecomment-660394265 thanks @willesreis for review . This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: Making Antora actionable
inline... > On Jul 17, 2020, at 2:53 PM, Willes Reis wrote: > > inline and other points... > > >> I added a TOC and the {done} checkmark seems to display nicely in that. I >> like having things organized in sections as it’s easier to write text >> describing the activity, and now the TOC provides a list view. What do you >> think? >> >> Thanks, >> David Jencks >>> > > The TOC is great, I agree that it's good to organize. About {done} > checkmark, I didn't know, +1 learned. Thanks! > > About tomee-antora-ui, it looks like most of it has already been done, but > the items in "todo" refer to decisions. > How to approach this subject? I don’t know :-) We could experiment with the header color. it might work to have the same gradient as in the footer in the header. It would be good to get feedback from others on this point. > > About tomee-antora, I am studying the "todo" item "Make it easy to work > locally" to work in it. As a possible hint, the commented-out urls such as # - url: ./../../tomee-site-generator are what I use for a local playbook. I didn’t know it at the time I did this, but it’s possible to use git work trees to check out all three (or 4 now?) main tomee branches at once from one clone. I have all the tomee projects checked out next to one another. This playbook was transplanted from another project so I think all the paths need to be shortened by one parent directory, e.g. ./../tomee-site-generator. David > > Willes
[GitHub] [tomee] willesreis commented on a change in pull request #687: TOMEE-2878 - Translate to Portuguese: examples/multi-jpa-provider-testing
willesreis commented on a change in pull request #687: URL: https://github.com/apache/tomee/pull/687#discussion_r456697466 ## File path: examples/multi-jpa-provider-testing/README_pt.adoc ## @@ -0,0 +1,295 @@ += Teste de vários provedores de JPA +:index-group: JPA +:jbake-type: page +:jbake-status: published + +Este teste mostra como usar vários provedores de JPA, Hibernate e Openjpa. + +Usando anotações JPA, o código pode ser facilmente usado com diferentes implementações. A classe `@Entity` é direta, um POJO de Pessoa com um ID e um nome, o `persistence.xml` cria e descarta a tabela de Pessoa para ambas as implementações. Os exemplos e dependências de implementações estão dentro dos recursos de teste, em particular: `arquillian.xml` para fins de teste, o `hibernate-pom.xml` carrega dependências do hibernate-core e o `openjpa-pom.xml` carrega as dependências do openjpa. O teste dentro da classe `JPATest.java` é executado duas vezes, uma vez para cada implementação. + +== @Entity + +Classe POJO simples que segue o padrão JPA + +[source,java] + +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; + +@Entity +public class Person { + +@Id +@GeneratedValue +private long id; + +private String name; + +public long getId() { +return id; +} + +public String getName() { +return name; +} + +public void setName(String name) { +this.name = name; +} +} + + +== persistence.xml + +Criar e soltar tabela Pessoa Review comment: ```suggestion Cria e descarta a tabela Pessoa. ``` ## File path: examples/multi-jpa-provider-testing/README_pt.adoc ## @@ -0,0 +1,295 @@ += Teste de vários provedores de JPA +:index-group: JPA +:jbake-type: page +:jbake-status: published + +Este teste mostra como usar vários provedores de JPA, Hibernate e Openjpa. + +Usando anotações JPA, o código pode ser facilmente usado com diferentes implementações. A classe `@Entity` é direta, um POJO de Pessoa com um ID e um nome, o `persistence.xml` cria e descarta a tabela de Pessoa para ambas as implementações. Os exemplos e dependências de implementações estão dentro dos recursos de teste, em particular: `arquillian.xml` para fins de teste, o `hibernate-pom.xml` carrega dependências do hibernate-core e o `openjpa-pom.xml` carrega as dependências do openjpa. O teste dentro da classe `JPATest.java` é executado duas vezes, uma vez para cada implementação. + +== @Entity + +Classe POJO simples que segue o padrão JPA + +[source,java] + +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; + +@Entity +public class Person { + +@Id +@GeneratedValue +private long id; + +private String name; + +public long getId() { +return id; +} + +public String getName() { +return name; +} + +public void setName(String name) { +this.name = name; +} +} + + +== persistence.xml + +Criar e soltar tabela Pessoa + +[source,xml] + +http://java.sun.com/xml/ns/persistence; + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; + xsi:schemaLocation="http://java.sun.com/xml/ns/persistence + http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd;> + +jdbc/jpa + + + + + + + + + + + +== JPA Teste + +O `entity manager` é injetado pelo cdi e um objeto Pessoa é criada e inserida no banco de dados de em memória + +[source,java] + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit.Arquillian; +import org.jboss.arquillian.transaction.api.annotation.TransactionMode; +import org.jboss.arquillian.transaction.api.annotation.Transactional; +import org.jboss.shrinkwrap.api.ArchivePaths; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.asset.ClassLoaderAsset; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.superbiz.model.Person; + +import javax.persistence.EntityManager; +import javax.persistence.PersistenceContext; + +import static org.junit.Assert.assertNotNull; + +@RunWith(Arquillian.class) +public class JPATest { + +@Deployment +public static WebArchive war() { +return ShrinkWrap.create(WebArchive.class) +.addClass(Person.class) +.addAsWebInfResource(new ClassLoaderAsset("META-INF/persistence.xml"), ArchivePaths.create("persistence.xml")); +} + +@PersistenceContext +private EntityManager em; + +@Test +@Transactional(TransactionMode.ROLLBACK) +public void persist() { +assertNotNull(em); + +// do something with the em +final Person p = new Person(); +p.setName("Apache OpenEJB"); +em.persist(p); +} +} + + +Dentro do exemplo, não há referência às
Re: Making Antora actionable
inline and other points... > I added a TOC and the {done} checkmark seems to display nicely in that. I > like having things organized in sections as it’s easier to write text > describing the activity, and now the TOC provides a list view. What do you > think? > > Thanks, > David Jencks > > The TOC is great, I agree that it's good to organize. About {done} checkmark, I didn't know, +1 learned. Thanks! About tomee-antora-ui, it looks like most of it has already been done, but the items in "todo" refer to decisions. How to approach this subject? About tomee-antora, I am studying the "todo" item "Make it easy to work locally" to work in it. Willes
Re: Making Antora actionable
Inline... > On Jul 16, 2020, at 11:39 PM, Willes Reis wrote: > > Hi David Jencks, thank you for updates. > > Em qui., 16 de jul. de 2020 às 18:13, David Jencks > escreveu: > >> Hi Willes, >> >> I’ve never seen that particular error from npm! I changed the relevant >> url to be https://, could you try again? > > > I tried the build again and was successful: downloaded node modules, > processed antora-playbook and built site folder. > Browsing on this local site was great! > Wonderful! > >> >> > I also added some todo.adoc files to these two new projects…. take a look, >> are they more or less what you had in mind? >> > > Yes, it's more or less that I had in mind. > I thought about keeping it in checklist, as in asciidoc: > * [x] Task that is already done > * [ ] Task that is missing > ... to make it visible to anyone who checks the repository, understanding > the progress, what already was done and what is missing, as simple as > possible. > With this in mind and your wide knowledge, I will know the first steps to > help you even more. I added a TOC and the {done} checkmark seems to display nicely in that. I like having things organized in sections as it’s easier to write text describing the activity, and now the TOC provides a list view. What do you think? Thanks, David Jencks > > Willes
Re: Making Antora actionable
Hi David Jencks, thank you for updates. Em qui., 16 de jul. de 2020 às 18:13, David Jencks escreveu: > Hi Willes, > > I’ve never seen that particular error from npm! I changed the relevant > url to be https://, could you try again? I tried the build again and was successful: downloaded node modules, processed antora-playbook and built site folder. Browsing on this local site was great! > > I also added some todo.adoc files to these two new projects…. take a look, > are they more or less what you had in mind? > Yes, it's more or less that I had in mind. I thought about keeping it in checklist, as in asciidoc: * [x] Task that is already done * [ ] Task that is missing ... to make it visible to anyone who checks the repository, understanding the progress, what already was done and what is missing, as simple as possible. With this in mind and your wide knowledge, I will know the first steps to help you even more. Willes