forked from quarkusio/pt.quarkus.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcdi-integration.adoc.po
1114 lines (925 loc) · 65.1 KB
/
cdi-integration.adoc.po
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# SOME DESCRIPTIVE TITLE
# Copyright (C) YEAR Free Software Foundation, Inc.
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: \n"
"POT-Creation-Date: 2023-10-29 08:09+0000\n"
"PO-Revision-Date: 2024-01-21 09:51-0300\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: pt_BR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 3.4.2\n"
#. This guide is maintained in the main Quarkus repository
#. and pull requests should be submitted there:
#. https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc
#. type: Title =
#: _guides/cdi-integration.adoc
#, no-wrap
msgid "CDI Integration Guide"
msgstr "Guia de Integração CDI"
#: _guides/cdi-integration.adoc
#, fuzzy
msgid ""
"ArC, the CDI container in Quarkus, is bootstrapped at build time.\n"
"To integrate with the container, https://jakarta.ee/specifications/cdi/4.1/jakarta-cdi-spec-4.1.html#spi_lite[CDI Build Compatible Extensions, window=\"_blank\"] can be used, as well as a Quarkus-specific extension API.\n"
"CDI Portable Extensions are not and cannot be supported.\n"
"This guide focuses on the Quarkus-specific extensions API."
msgstr "O ArC, o contêiner CDI no Quarkus, é inicializado no momento da compilação. Para integrar-se ao contêiner, podem ser usadas link:https://jakarta.ee/specifications/cdi/4.1/jakarta-cdi-spec-4.1.html#spi_lite[as extensões compatíveis com o CDI Build] , bem como uma API de extensão específica do Quarkus. As extensões portáteis CDI não são e não podem ser suportadas. Este guia se concentra na API de extensões específicas do Quarkus."
#: _guides/cdi-integration.adoc
msgid ""
"The container is bootstrapped in multiple phases.\n"
"From a high level perspective these phases go as follows:"
msgstr "O contêiner é inicializado em várias fases. De uma perspectiva de alto nível, essas fases são as seguintes:"
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "Initialization"
msgstr "Inicialização"
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "Bean discovery"
msgstr "Descoberta do Bean"
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "Registration of synthetic components"
msgstr "Registo de componentes sintéticos"
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "Validation"
msgstr "Validação"
#: _guides/cdi-integration.adoc
msgid ""
"In the _initialization_ phase the preparatory work is being carried out and custom contexts are registered.\n"
"_Bean discovery_ is then the process where the container analyzes all application classes, identifies beans and wires them all together based on the provided metadata.\n"
"Subsequently, the extensions can register _synthetic components_.\n"
"Attributes of these components are fully controlled by the extensions, i.e. are not derived from an existing class.\n"
"Finally, the _deployment is validated_.\n"
"For example, the container validates every injection point in the application and fails the build if there is no bean that satisfies the given required type and qualifiers."
msgstr "Na fase de _inicialização_ , o trabalho preparatório está sendo realizado e os contextos personalizados são registrados. A _descoberta de beans_ é o processo em que o contêiner analisa todas as classes da aplicação, identifica os beans e os conecta com base nos metadados fornecidos. Posteriormente, as extensões podem registrar _componentes sintéticos_ . Os atributos desses componentes são totalmente controlados pelas extensões, ou seja, não são derivados de uma classe existente. Por fim, a _implementação é validada_ . Por exemplo, o contêiner valida cada ponto de injeção na aplicação e falha a construção se não houver nenhum bean que satisfaça o tipo e os qualificadores exigidos."
#: _guides/cdi-integration.adoc
#, fuzzy
msgid "You can see more information about the bootstrap by enabling additional logging. Simply run the Maven build with `-X` or `--debug` and grep the lines that contain `io.quarkus.arc`. In <<cdi-reference.adoc#dev_mode,dev mode>>, you can use `quarkus.log.category.\"io.quarkus.arc.processor\".level=DEBUG` and two special endpoints are also registered automatically to provide some basic debug info in the JSON format."
msgstr "O senhor pode ver mais informações sobre o bootstrap ativando o registro adicional. Basta executar a compilação do Maven com `-X` ou `--debug` e usar o grep nas linhas que contêm `io.quarkus.arc` . No xref:cdi-reference.adoc#dev_mode[modo de desenvolvimento] , o senhor pode usar `quarkus.log.category.\"io.quarkus.arc.processor\".level=DEBUG` e dois pontos de extremidade especiais também são registrados automaticamente para fornecer algumas informações básicas de depuração no formato JSON."
#: _guides/cdi-integration.adoc
msgid ""
"Quarkus build steps can produce and consume various build items and hook into each phase.\n"
"In the following sections we will describe all the relevant build items and common scenarios."
msgstr "As etapas de construção do Quarkus podem produzir e consumir vários itens de construção e se conectar a cada fase. Nas seções a seguir, descreveremos todos os itens de construção relevantes e cenários comuns."
#. type: Title ==
#: _guides/cdi-integration.adoc
#, no-wrap
msgid "Metadata Sources"
msgstr "Fontes de metadados"
#: _guides/cdi-integration.adoc
#, fuzzy
msgid ""
"Classes and annotations are the primary source of bean-level metadata.\n"
"The initial metadata are read from the _bean archive index_, an immutable https://github.com/smallrye/jandex[Jandex index, window=\"_blank\"] which is built from various sources during <<cdi-reference.adoc#bean_discovery,bean discovery>>.\n"
"However, extensions can add, remove or transform the metadata at certain stages of the bootstrap.\n"
"Moreover, extensions can also register <<synthetic_beans,synthetic components>>.\n"
"This is an important aspect to realize when integrating CDI components in Quarkus."
msgstr "As classes e as anotações são a principal fonte de metadados no nível do bean. Os metadados iniciais são lidos do _índice do arquivo do bean_ , um link:https://github.com/smallrye/jandex[índice Jandex] imutável que é criado a partir de várias fontes durante a xref:cdi-reference.adoc#bean_discovery[descoberta do bean] . No entanto, as extensões podem adicionar, remover ou transformar os metadados em determinados estágios do bootstrap. Além disso, as extensões também podem registrar xref:synthetic_beans[componentes sintéticos] . Esse é um aspecto importante a ser percebido ao integrar componentes CDI no Quarkus."
#: _guides/cdi-integration.adoc
msgid ""
"This way, extensions can turn classes, that would be otherwise ignored, into beans and vice versa.\n"
"For example, a class that declares a `@Scheduled` method is always registered as a bean even if it is not annotated with a bean defining annotation and would be normally ignored."
msgstr "Dessa forma, as extensões podem transformar classes, que de outra forma seriam ignoradas, em beans e vice-versa. Por exemplo, uma classe que declara um método `@Scheduled` é sempre registrada como um bean, mesmo que não tenha sido anotada com uma anotação de definição de bean e, normalmente, seria ignorada."
#. type: Title ==
#: _guides/cdi-integration.adoc
#, no-wrap
msgid "Use Case - My Class Is Not Recognized as a Bean"
msgstr "Caso de uso - Minha classe não é reconhecida como um Bean"
#: _guides/cdi-integration.adoc
#, fuzzy
msgid ""
"An `UnsatisfiedResolutionException` indicates a problem during <<cdi.adoc#typesafe_resolution,typesafe resolution>>.\n"
"Sometimes an injection point cannot be satisfied even if there is a class on the classpath that appears to be eligible for injection.\n"
"There are several reasons why a class is not recognized and also several ways to fix it.\n"
"In the first step we should identify the _reason_."
msgstr "Um `UnsatisfiedResolutionException` indica um problema durante a xref:cdi.adoc#typesafe_resolution[resolução typesafe] . Às vezes, um ponto de injeção não pode ser satisfeito, mesmo que haja uma classe no classpath que pareça ser elegível para injeção. Há vários motivos pelos quais uma classe não é reconhecida e também várias maneiras de corrigi-los. Na primeira etapa, devemos identificar o _motivo_ ."
#. type: Title ===
#: _guides/cdi-integration.adoc
#, no-wrap
msgid "_Reason 1_: Class Is Not discovered"
msgstr "_Razão 1_: Classe Não Está Descoberta"
#: _guides/cdi-integration.adoc
#, fuzzy
msgid ""
"Quarkus has a <<cdi-reference.adoc#bean_discovery,simplified discovery>>.\n"
"It might happen that the class is not part of the application index.\n"
"For example, classes from the _runtime module_ of a Quarkus extension are not indexed automatically."
msgstr "O Quarkus tem uma xref:cdi-reference.adoc#bean_discovery[descoberta simplificada] . Pode acontecer que a classe não faça parte do índice do aplicativo. Por exemplo, as classes do _módulo de tempo de execução_ de uma extensão do Quarkus não são indexadas automaticamente."
#: _guides/cdi-integration.adoc
msgid ""
"_Solution_: Use the `AdditionalBeanBuildItem`.\n"
"This build item can be used to specify one or more additional classes to be analyzed during the discovery.\n"
"Additional bean classes are transparently added to the application index processed by the container."
msgstr "_Solução_ : Use o `AdditionalBeanBuildItem` . Esse item de construção pode ser usado para especificar uma ou mais classes adicionais a serem analisadas durante a descoberta. As classes de bean adicionais são adicionadas de forma transparente ao índice da aplicação processado pelo contêiner."
#: _guides/cdi-integration.adoc
#, fuzzy
msgid "It is not possible to conditionally enable/disable additional beans via the `@IfBuildProfile`, `@UnlessBuildProfile`, `@IfBuildProperty` and `@UnlessBuildProperty` annotations as described in <<cdi-reference.adoc#enable_build_profile>> and <<cdi-reference.adoc#enable_build_properties>>. Extensions should inspect the configuration or the current profile and only produce an `AdditionalBeanBuildItem` if really needed."
msgstr "Não é possível ativar/desativar condicionalmente beans adicionais por meio das anotações `@IfBuildProfile` , `@UnlessBuildProfile` , `@IfBuildProperty` e `@UnlessBuildProperty` , conforme descrito em <<cdi-reference.adoc#enable_build_profile>> e <<cdi-reference.adoc#enable_build_properties>> . As extensões devem inspecionar a configuração ou o perfil atual e produzir um `AdditionalBeanBuildItem` somente se for realmente necessário."
#. type: Block title
#: _guides/cdi-integration.adoc
#, no-wrap
msgid "`AdditionalBeanBuildItem` Example"
msgstr "Exemplo de `AdditionalBeanBuildItem`"
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "`AdditionalBeanBuildItem.Builder` can be used for more complex use cases."
msgstr "`AdditionalBeanBuildItem.Builder` pode ser utilizado para casos de uso mais complexos."
#: _guides/cdi-integration.adoc
#, fuzzy
msgid ""
"Bean classes added via `AdditionalBeanBuildItem` are _removable_ by default.\n"
"If the container considers them <<cdi-reference.adoc#remove_unused_beans,unused>>, they are just ignored.\n"
"However, you can use `AdditionalBeanBuildItem.Builder.setUnremovable()` method to instruct the container to never remove bean classes registered via this build item.\n"
"See also <<cdi-reference.adoc#remove_unused_beans,Removing Unused Beans>> and <<unremovable_builditem>> for more details."
msgstr "As classes Bean adicionadas por meio do site `AdditionalBeanBuildItem` são _removíveis_ por padrão. Se o contêiner as considerar xref:cdi-reference.adoc#remove_unused_beans[não utilizadas] , elas serão simplesmente ignoradas. No entanto, é possível usar o método `AdditionalBeanBuildItem.Builder.setUnremovable()` para instruir o contêiner a nunca remover as classes de bean registradas por meio desse item de compilação. Consulte também xref:cdi-reference.adoc#remove_unused_beans[Removing Unused Beans] e <<unremovable_builditem>> para obter mais detalhes."
#: _guides/cdi-integration.adoc
msgid ""
"It is aso possible to set the default scope via `AdditionalBeanBuildItem.Builder#setDefaultScope()`.\n"
"The default scope is only used if there is no scope declared on the bean class."
msgstr "Também é possível definir o escopo padrão por meio de `AdditionalBeanBuildItem.Builder#setDefaultScope()` . O escopo padrão só é usado se não houver um escopo declarado na classe do bean."
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "If no default scope is specified the `@Dependent` pseudo-scope is used."
msgstr "Se não for especificado um escopo padrão, é utilizado o pseudo escopo `@Dependent`."
#. type: Title ===
#: _guides/cdi-integration.adoc
#, no-wrap
msgid "_Reason 2_: Class Is Discovered but Has No Bean Defining Annotation"
msgstr "_Motivo 2_: A Classe É Descoberta mas Não Tem uma Anotação de Definição de Bean"
#: _guides/cdi-integration.adoc
#, fuzzy
msgid ""
"In Quarkus, the application is represented by a single bean archive with the https://jakarta.ee/specifications/cdi/4.1/jakarta-cdi-spec-4.1.html#default_bean_discovery[bean discovery mode `annotated`, window=\"_blank\"].\n"
"Therefore, bean classes that don't have a https://jakarta.ee/specifications/cdi/4.1/jakarta-cdi-spec-4.1.html#bean_defining_annotations[bean defining annotation, window=\"_blank\"] are ignored.\n"
"Bean defining annotations are declared on the class-level and include scopes, stereotypes and `@Interceptor`."
msgstr "No Quarkus, o aplicativo é representado por um único arquivo de bean com o link:https://jakarta.ee/specifications/cdi/4.1/jakarta-cdi-spec-4.1.html#default_bean_discovery[modo de descoberta de bean annotated] . Portanto, as classes de bean que não têm uma link:https://jakarta.ee/specifications/cdi/4.1/jakarta-cdi-spec-4.1.html#bean_defining_annotations[anotação de definição de bean] são ignoradas. As anotações que definem o bean são declaradas no nível da classe e incluem escopos, estereótipos e `@Interceptor` ."
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "_Solution 1_: Use the `AutoAddScopeBuildItem`. This build item can be used to add a scope to a class that meets certain conditions."
msgstr "_Solução 1_: Utilizar o `AutoAddScopeBuildItem`. Este item de construção pode ser utilizado para adicionar um escopo a uma classe que satisfaça determinadas condições."
#. type: Block title
#: _guides/cdi-integration.adoc
#, no-wrap
msgid "`AutoAddScopeBuildItem` Example"
msgstr "Exemplo de `AutoAddScopeBuildItem`"
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "Find all classes annotated with `@Scheduled`."
msgstr "Encontrar todas as classes anotadas com `@Scheduled`."
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "Add `@Singleton` as default scope. Classes already annotated with a scope are skipped automatically."
msgstr "Adicione `@Singleton` como escopo padrão. As classes já anotadas com um escopo são ignoradas automaticamente."
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "_Solution 2_: If you need to process classes annotated with a specific annotation then it's possible to extend the set of bean defining annotations via the `BeanDefiningAnnotationBuildItem`."
msgstr "_Solução 2_: Se precisar processar classes anotadas com uma anotação específica, é possível estender o conjunto de anotações que definem beans através do `BeanDefiningAnnotationBuildItem`."
#. type: Block title
#: _guides/cdi-integration.adoc
#, no-wrap
msgid "`BeanDefiningAnnotationBuildItem` Example"
msgstr "Exemplo de `BeanDefiningAnnotationBuildItem`"
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "Add `org.eclipse.microprofile.graphql.GraphQLApi` to the set of bean defining annotations."
msgstr "Adicionar `org.eclipse.microprofile.graphql.GraphQLApi` ao conjunto de anotações de definição de bean."
#: _guides/cdi-integration.adoc
#, fuzzy
msgid ""
"Bean classes added via `BeanDefiningAnnotationBuildItem` are _not removable_ by default, i.e. the resulting beans must not be removed even if they are considered unused.\n"
"However, you can change the default behavior.\n"
"See also <<cdi-reference.adoc#remove_unused_beans,Removing Unused Beans>> and <<unremovable_builditem>> for more details."
msgstr "As classes de beans adicionadas por meio do site `BeanDefiningAnnotationBuildItem` _não_ são _removíveis_ por padrão, ou seja, os beans resultantes não devem ser removidos, mesmo que sejam considerados não utilizados. Entretanto, o senhor pode alterar o comportamento padrão. Consulte também xref:cdi-reference.adoc#remove_unused_beans[Removendo beans não utilizados] e <<unremovable_builditem>> para obter mais detalhes."
#: _guides/cdi-integration.adoc
msgid ""
"It is also possible to specify the default scope.\n"
"The default scope is only used if there is no scope declared on the bean class."
msgstr "Também é possível especificar o escopo padrão. O escopo padrão é usado somente se não houver escopo declarado na classe do bean."
#. type: Title ===
#: _guides/cdi-integration.adoc
#, no-wrap
msgid "_Reason 3_: Class Was Discovered and Has a Bean Defining Annotation but Was Removed"
msgstr "_Motivo 3_: A Classe Foi Descoberta e Tem uma Anotação que Define o Bean, mas Foi Removida"
#: _guides/cdi-integration.adoc
#, fuzzy
msgid ""
"The container attempts to <<cdi-reference.adoc#remove_unused_beans,remove all unused beans>> during the build by default.\n"
"This optimization allows for _framework-level dead code elimination_.\n"
"In few special cases, it's not possible to correctly identify an unused bean.\n"
"In particular, Quarkus is not able to detect the usage of the `CDI.current()` static method yet.\n"
"Extensions can eliminate possible false positives by producing an `UnremovableBeanBuildItem`."
msgstr "Por padrão, o contêiner tenta xref:cdi-reference.adoc#remove_unused_beans[remover todos os beans não utilizados] durante a compilação. Essa otimização permite a _eliminação de código morto no nível da estrutura_ . Em alguns casos especiais, não é possível identificar corretamente um bean não utilizado. Em particular, o Quarkus ainda não é capaz de detectar o uso do método estático `CDI.current()` . As extensões podem eliminar possíveis falsos positivos produzindo um `UnremovableBeanBuildItem` ."
#. type: Block title
#: _guides/cdi-integration.adoc
#, no-wrap
msgid "`UnremovableBeanBuildItem` Example"
msgstr "Exemplo de `UnremovableBeanBuildItem`"
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "Make all classes annotated with `@Startup` unremovable."
msgstr "Tornar todas as classes anotadas com `@Startup` não removíveis."
#. type: Title ==
#: _guides/cdi-integration.adoc
#, no-wrap
msgid "Use Case - My Annotation Is Not Recognized as a Qualifier or an Interceptor Binding"
msgstr "Caso de uso - Minha Anotação não É Reconhecida Como Um Qualificador ou Uma Ligação de Interceptador"
#: _guides/cdi-integration.adoc
msgid ""
"It is likely that the annotation class is not part of the application index.\n"
"For example, classes from the _runtime module_ of a Quarkus extension are not indexed automatically."
msgstr "É provável que a classe de anotação não faça parte do índice da aplicação. Por exemplo, as classes do _módulo de tempo de execução_ de uma extensão do Quarkus não são indexadas automaticamente."
#: _guides/cdi-integration.adoc
#, fuzzy
msgid "_Solution_: Use the `AdditionalBeanBuildItem` as described in <<additional_bean_build_item>>."
msgstr "_Solução_ : Use o site `AdditionalBeanBuildItem` conforme descrito em <<additional_bean_build_item>> ."
#. type: Title ==
#: _guides/cdi-integration.adoc
#, no-wrap
msgid "Use Case - I Need To Transform Annotation Metadata"
msgstr "Caso de Utilização - Preciso Transformar Metadados de Anotações"
#: _guides/cdi-integration.adoc
#, fuzzy
msgid ""
"In some cases, it's useful to be able to modify the annotation metadata.\n"
"Quarkus provides a powerful alternative to https://jakarta.ee/specifications/cdi/4.1/jakarta-cdi-spec-4.1.html#process_annotated_type[`jakarta.enterprise.inject.spi.ProcessAnnotatedType`, window=\"_blank\"] and https://jakarta.ee/specifications/cdi/4.1/jakarta-cdi-spec-4.1.html#bce_enhancement[`jakarta.enterprise.inject.build.compatible.spi.Enhancement`, window=\"_blank\"].\n"
"With an `AnnotationsTransformerBuildItem` it's possible to override the annotations that exist on bean classes."
msgstr "Em alguns casos, é útil poder modificar os metadados da anotação. O Quarkus oferece uma alternativa eficiente para link:https://jakarta.ee/specifications/cdi/4.1/jakarta-cdi-spec-4.1.html#process_annotated_type[jakarta.enterprise.inject.spi.ProcessAnnotatedType] e link:https://jakarta.ee/specifications/cdi/4.1/jakarta-cdi-spec-4.1.html#bce_enhancement[jakarta.enterprise.inject.build.compatible.spi.Enhancement] . Com um `AnnotationsTransformerBuildItem` , é possível substituir as anotações existentes nas classes de bean."
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "Keep in mind that annotation transformers must be produced _before_ the bean discovery starts."
msgstr "Tenha em mente que os transformadores de anotação devem ser produzidos _antes_ do início da descoberta de bean."
#: _guides/cdi-integration.adoc
#, fuzzy
msgid ""
"For example, you might want to add an interceptor binding to a specific bean class.\n"
"You can use a convenient builder API to create a transformation instance:"
msgstr "Por exemplo, o senhor pode querer adicionar uma ligação de interceptador a uma classe de bean específica. O senhor pode usar uma API de construtor conveniente para criar uma instância de transformação:"
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "Builder Example"
msgstr "Exemplo de Builder"
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "The transformer is only applied to classes."
msgstr "O transformador só é aplicado às classes."
#: _guides/cdi-integration.adoc
#, fuzzy
msgid "Only apply the transformation if the class is `org.acme.Bar`."
msgstr "Aplique a transformação somente se a classe for `org.acme.Bar` ."
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "Add the `@MyInterceptorBinding` annotation."
msgstr "Adicionar a anotação `@MyInterceptorBinding`."
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "The example above can be rewritten with an anonymous class:"
msgstr "O exemplo acima pode ser reescrito com uma classe anônima:"
#. type: Block title
#: _guides/cdi-integration.adoc
#, no-wrap
msgid "`AnnotationsTransformerBuildItem` Example"
msgstr "Exemplo de `AnnotationsTransformerBuildItem`"
#: _guides/cdi-integration.adoc
#, fuzzy
msgid "If the class name equals to `org.acme.Bar` then add `@MyInterceptorBinding`."
msgstr "Se o nome da classe for igual a `org.acme.Bar` , adicione `@MyInterceptorBinding` ."
#: _guides/cdi-integration.adoc
#, fuzzy
msgid "The previous `AnnotationsTransformer` API from ArC is still supported, but the new `AnnotationTransformation` API from Jandex is preferred."
msgstr "A API `AnnotationsTransformer` anterior da ArC ainda é compatível, mas a nova API `AnnotationTransformation` da Jandex é a preferida."
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "Build steps can query the transformed annotations for a given annotation target via the `TransformedAnnotationsBuildItem`."
msgstr "As etapas de construção podem consultar as anotações transformadas para um determinado alvo de anotação através do `TransformedAnnotationsBuildItem`."
#. type: Block title
#: _guides/cdi-integration.adoc
#, no-wrap
msgid "`TransformedAnnotationsBuildItem` Example"
msgstr "Exemplo de `TransformedAnnotationsBuildItem`"
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "`TransformedAnnotationsBuildItem.getAnnotations()` will return a possibly transformed set of annotations."
msgstr "`TransformedAnnotationsBuildItem.getAnnotations()` devolverá um conjunto de anotações possivelmente transformadas."
#: _guides/cdi-integration.adoc
#, fuzzy
msgid "There are other build items specialized in transformation: <<additional_interceptor_bindings>> and <<injection_point_transformation>>."
msgstr "Há outros itens de compilação especializados em transformação: <<additional_interceptor_bindings>> e <<injection_point_transformation>> ."
#. type: Title ===
#: _guides/cdi-integration.adoc
#, no-wrap
msgid "How to Enable Trace Logging for Annotation Transformers"
msgstr "Como Ativar o Log de Trace para Transformadores de Anotações"
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "You can set the `TRACE` level for the category `io.quarkus.arc.processor` and try to analyze the log output afterwards."
msgstr "Pode definir o nível de `TRACE` para a categoria `io.quarkus.arc.processor` e tentar analisar a saída do log posteriormente."
#. type: Block title
#: _guides/cdi-integration.adoc
#, no-wrap
msgid "`application.properties` Example"
msgstr "Exemplo de `application.properties`"
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "You also need to adjust the minimum log level for the relevant category."
msgstr "Também é necessário ajustar o nível mínimo de log para a categoria relevante."
#. type: Title ==
#: _guides/cdi-integration.adoc
#, no-wrap
msgid "Use Case - Inspect Beans, Observers and Injection Points"
msgstr "Caso de Uso - Inspecionar Beans, Observadores e Pontos de Injeção"
#. type: Title ===
#: _guides/cdi-integration.adoc
#, no-wrap
msgid "_Solution 1_: `BeanDiscoveryFinishedBuildItem`"
msgstr "_Solução 1_: `BeanDiscoveryFinishedBuildItem`"
#: _guides/cdi-integration.adoc
msgid ""
"Consumers of `BeanDiscoveryFinishedBuildItem` can easily inspect all class-based beans, observers and injection points registered in the application.\n"
"However, synthetic beans and observers are _not included_ because this build item is produced _before_ the synthetic components are registered."
msgstr "Os consumidores do `BeanDiscoveryFinishedBuildItem` podem inspecionar facilmente todos os beans, observadores e pontos de injeção baseados em classe registrados na aplicação. No entanto, os beans e observadores sintéticos _não são incluídos_ porque esse item de construção é produzido _antes_ que os componentes sintéticos sejam registrados."
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "Additionally, the bean resolver returned from `BeanDiscoveryFinishedBuildItem#getBeanResolver()` can be used to apply the type-safe resolution rules, e.g. to find out whether there is a bean that would satisfy certain combination of required type and qualifiers."
msgstr "Além disso, o resolvedor de beans retornado por `BeanDiscoveryFinishedBuildItem#getBeanResolver()` pode ser utilizado para aplicar as regras de resolução de tipagem segura, por exemplo, para descobrir se existe um bean que satisfaça uma determinada combinação de tipo e qualificadores necessários."
#. type: Block title
#: _guides/cdi-integration.adoc
#, no-wrap
msgid "`BeanDiscoveryFinishedBuildItem` Example"
msgstr "Exemplo de `BeanDiscoveryFinishedBuildItem`"
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "The resulting list will not contain `@Named` synthetic beans."
msgstr "A lista resultante não conterá beans sintéticos `@Named`."
#. type: Title ===
#: _guides/cdi-integration.adoc
#, no-wrap
msgid "_Solution 2_: `SynthesisFinishedBuildItem`"
msgstr "_Solução 2_: `SynthesisFinishedBuildItem`"
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "Consumers of `SynthesisFinishedBuildItem` can easily inspect all beans, observers and injection points registered in the application. Synthetic beans and observers are included because this build item is produced _after_ the synthetic components are registered."
msgstr "Os consumidores de `SynthesisFinishedBuildItem` podem inspecionar facilmente todos os beans, observadores e pontos de injeção registrados na aplicação. Os beans e observadores sintéticos estão incluídos porque este item de construção é produzido _depois_ dos componentes sintéticos serem registrados."
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "Additionally, the bean resolver returned from `SynthesisFinishedBuildItem#getBeanResolver()` can be used to apply the type-safe resolution rules, e.g. to find out whether there is a bean that would satisfy certain combination of required type and qualifiers."
msgstr "Além disso, o resolvedor de beans retornado por `SynthesisFinishedBuildItem#getBeanResolver()` pode ser utilizado para aplicar as regras de resolução de tipagem segura, por exemplo, para descobrir se existe um bean que satisfaça uma determinada combinação de tipo e qualificadores necessários."
#. type: Block title
#: _guides/cdi-integration.adoc
#, no-wrap
msgid "`SynthesisFinishedBuildItem` Example"
msgstr "Exemplo de `SynthesisFinishedBuildItem`"
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "The resulting list will contain `@Named` synthetic beans."
msgstr "A lista resultante conterá beans sintéticos `@Named`."
#. type: Title ==
#: _guides/cdi-integration.adoc
#, no-wrap
msgid "Use Case - The Need for Synthetic Beans"
msgstr "Caso de Uso - A Necessidade de Beans Sintéticos"
#: _guides/cdi-integration.adoc
#, fuzzy
msgid ""
"Sometimes it is practical to be able to register a _synthetic bean_.\n"
"Bean attributes of a synthetic bean are not derived from a Java class, method or field.\n"
"Instead, all the attributes are defined by an extension.\n"
"In regular CDI, this could be achieved using the https://jakarta.ee/specifications/cdi/4.1/jakarta-cdi-spec-4.1.html#after_bean_discovery[`AfterBeanDiscovery.addBean()`, window=\"_blank\"] and https://jakarta.ee/specifications/cdi/4.1/jakarta-cdi-spec-4.1.html#bce_synthesis[`SyntheticComponents.addBean()`] methods."
msgstr "Às vezes, é prático poder registrar um _bean sintético_ . Os atributos do bean de um bean sintético não são derivados de uma classe, método ou campo Java. Em vez disso, todos os atributos são definidos por uma extensão. No CDI normal, isso poderia ser feito usando os atributos link:https://jakarta.ee/specifications/cdi/4.1/jakarta-cdi-spec-4.1.html#after_bean_discovery[AfterBeanDiscovery.addBean()] e link:https://jakarta.ee/specifications/cdi/4.1/jakarta-cdi-spec-4.1.html#bce_synthesis[SyntheticComponents.addBean()] ."
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "_Solution_: If you need to register a synthetic bean then use the `SyntheticBeanBuildItem`."
msgstr "_Solução_: Se for necessário registrar um bean sintético, utilize o `SyntheticBeanBuildItem`."
#. type: Block title
#: _guides/cdi-integration.adoc
#, no-wrap
msgid "`SyntheticBeanBuildItem` Example 1"
msgstr "Exemplo 1 de `SyntheticBeanBuildItem`"
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "Generate the bytecode of the `jakarta.enterprise.context.spi.Contextual#create(CreationalContext<T>)` implementation."
msgstr "Gerar o bytecode da implementação `jakarta.enterprise.context.spi.Contextual#create(CreationalContext<T>)`."
#: _guides/cdi-integration.adoc
msgid ""
"The output of a bean configurator is recorded as bytecode.\n"
"Therefore, there are some limitations in how a synthetic bean instance is created at runtime.\n"
"You can:"
msgstr "A saída de um configurador de bean é gravada como bytecode. Portanto, há algumas limitações na forma como uma instância de bean sintético é criada em tempo de execução. Você pode:"
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "Generate the bytecode of the `Contextual#create(CreationalContext<T>)` method directly via `ExtendedBeanConfigurator.creator(Consumer<MethodCreator>)`."
msgstr "Gerar o bytecode do método `Contextual#create(CreationalContext<T>)` diretamente através do `ExtendedBeanConfigurator.creator(Consumer<MethodCreator>)`."
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "Pass a subclass of `io.quarkus.arc.BeanCreator` via `ExtendedBeanConfigurator#creator(Class<? extends BeanCreator<U>>)`, and possibly specify some build-time parameters via `ExtendedBeanConfigurator#param()` and synthetic injection points via `ExtendedBeanConfigurator#addInjectionPoint()`."
msgstr "Passar uma subclasse de `io.quarkus.arc.BeanCreator` através do `ExtendedBeanConfigurator#creator(Class<? extends BeanCreator<U>>)`, e possivelmente especificar alguns parâmetros de tempo de construção através do `ExtendedBeanConfigurator#param()` e pontos de injeção sintéticos através do `ExtendedBeanConfigurator#addInjectionPoint()`."
#: _guides/cdi-integration.adoc
#, fuzzy
msgid "Produce the runtime instance through a proxy returned from a <<writing-extensions.adoc#bytecode-recording,`@Recorder` method>> and set it via `ExtendedBeanConfigurator#runtimeValue(RuntimeValue<?>)`, `ExtendedBeanConfigurator#runtimeProxy(Object)`, `ExtendedBeanConfigurator#supplier(Supplier<?>)` or `ExtendedBeanConfigurator#createWith(Function<SyntheticCreationalContext<?>, <?>)`."
msgstr "Produza a instância de tempo de execução por meio de um proxy retornado de um xref:writing-extensions.adoc#bytecode-recording[método@Recorder] e defina-o por meio de `ExtendedBeanConfigurator#runtimeValue(RuntimeValue<?>)` , `ExtendedBeanConfigurator#runtimeProxy(Object)` , `ExtendedBeanConfigurator#supplier(Supplier<?>)` ou `ExtendedBeanConfigurator#createWith(Function<SyntheticCreationalContext<?>, <?>)` ."
#. type: Block title
#: _guides/cdi-integration.adoc
#, no-wrap
msgid "`SyntheticBeanBuildItem` Example 2"
msgstr "Exemplo 2 de `SyntheticBeanBuildItem`"
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "By default, a synthetic bean is initialized during `STATIC_INIT`."
msgstr "Por padrão, um bean sintético é inicializado durante `STATIC_INIT`."
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "The bean instance is supplied by a value returned from a recorder method."
msgstr "A instância do bean é fornecida por um valor retornado por um método de gravação."
#: _guides/cdi-integration.adoc
#, fuzzy
msgid "It is also possible to create a generic synthetic bean `Foo<Bar>`."
msgstr "Também é possível criar um bean sintético genérico `Foo<Bar>` ."
#: _guides/cdi-integration.adoc
#, fuzzy
msgid "`SyntheticBeanBuildItem` Example 3"
msgstr "`SyntheticBeanBuildItem` Exemplo 3"
#: _guides/cdi-integration.adoc
#, fuzzy
msgid "`types()` or `addType()` must be used to specify the generic type."
msgstr "`types()` ou `addType()` deve ser usado para especificar o tipo genérico."
#: _guides/cdi-integration.adoc
#, fuzzy
msgid ""
"It is possible to mark a synthetic bean to be initialized during `RUNTIME_INIT`.\n"
"See the <<writing-extensions.adoc#bootstrap-three-phases,Three Phases of Bootstrap and Quarkus Philosophy>> for more information about the difference between `STATIC_INIT` and `RUNTIME_INIT`."
msgstr "É possível marcar um bean sintético para ser inicializado durante `RUNTIME_INIT` . Consulte as xref:writing-extensions.adoc#bootstrap-three-phases[Três fases do Bootstrap e a Filosofia Quarkus] para obter mais informações sobre a diferença entre `STATIC_INIT` e `RUNTIME_INIT` ."
#. type: Block title
#: _guides/cdi-integration.adoc
#, no-wrap
msgid "`RUNTIME_INIT` `SyntheticBeanBuildItem` Example"
msgstr "Exemplo de `RUNTIME_INIT` `SyntheticBeanBuildItem`"
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "The recorder must be executed in the `ExecutionTime.RUNTIME_INIT` phase."
msgstr "O gravador deve ser executado na fase `ExecutionTime.RUNTIME_INIT`."
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "The bean instance is initialized during `RUNTIME_INIT`."
msgstr "A instância do bean é inicializada durante `RUNTIME_INIT`."
#. type: delimited block =
#: _guides/cdi-integration.adoc
msgid "Synthetic beans initialized during `RUNTIME_INIT` must not be accessed during `STATIC_INIT`. `RUNTIME_INIT` build steps that access a runtime-init synthetic bean should consume the `SyntheticBeansRuntimeInitBuildItem`:"
msgstr "Os beans sintéticos inicializados durante `RUNTIME_INIT` não devem ser acessados durante `STATIC_INIT`. As etapas de construção de `RUNTIME_INIT` que acessam um bean sintético inicializado em tempo de execução devem consumir o `SyntheticBeansRuntimeInitBuildItem`:"
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "This build step must be executed after `syntheticBean()` completes."
msgstr "Este passo de construção deve ser executado após a conclusão de `syntheticBean()`."
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "This recorder method results in an invocation upon the `Foo` bean instance and thus we need to make sure that the build step is executed after all synthetic beans are initialized."
msgstr "Este método de gravação resulta numa invocação da instância do bean `Foo` e, por isso, temos de nos certificar de que a etapa de construção é executada depois de todos os beans sintéticos serem inicializados."
#. type: delimited block =
#: _guides/cdi-integration.adoc
msgid "It is also possible to use the `BeanRegistrationPhaseBuildItem` to register a synthetic bean. However, we recommend extension authors to stick with `SyntheticBeanBuildItem` which is more idiomatic for Quarkus."
msgstr "Também é possível utilizar o `BeanRegistrationPhaseBuildItem` para registrar um bean sintético. No entanto, recomendamos aos autores de extensões que utilizem `SyntheticBeanBuildItem`, que é mais idiomático para o Quarkus."
#. type: Title ===
#: _guides/cdi-integration.adoc
#, no-wrap
msgid "Synthetic Injection Points"
msgstr "Pontos de Injeção Sintéticos"
#: _guides/cdi-integration.adoc
#, fuzzy
msgid ""
"A synthetic bean may register a synthetic injection point via the `ExtendedBeanConfigurator#addInjectionPoint()` method.\n"
"This injection point is validated at build time and considered when <<cdi-reference.adoc#remove_unused_beans,detecting unused beans>>.\n"
"The injected reference is accessible through the `SyntheticCreationalContext#getInjectedReference()` methods at runtime."
msgstr "Um bean sintético pode registrar um ponto de injeção sintético por meio do método `ExtendedBeanConfigurator#addInjectionPoint()` . Esse ponto de injeção é validado no momento da construção e considerado na xref:cdi-reference.adoc#remove_unused_beans[detecção de beans não utilizados] . A referência injetada pode ser acessada por meio dos métodos `SyntheticCreationalContext#getInjectedReference()` em tempo de execução."
#. type: Block title
#: _guides/cdi-integration.adoc
#, no-wrap
msgid "Synthetic Injection Point - Build Step Example"
msgstr "Ponto de Injeção Sintético - Exemplo de Etapa de Construção"
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "A synthetic injection point with required type `Bar` was added; this is an equivalent of `@Inject Bar`."
msgstr "Foi adicionado um ponto de injeção sintético com o tipo obrigatório `Bar`; este é equivalente a `@Inject Bar`."
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "The bean instance is created with a function returned from a recorder method."
msgstr "A instância do bean é criada com uma função retornada de um método de gravação."
#. type: Block title
#: _guides/cdi-integration.adoc
#, no-wrap
msgid "Synthetic Injection Point - Recorder Example"
msgstr "Ponto de Injeção Sintético - Exemplo de Gravador"
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "Pass a contextual reference of `Bar` to the constructor of `Foo`."
msgstr "Passa uma referência contextual de `Bar` ao construtor de `Foo`."
#: _guides/cdi-integration.adoc
#, fuzzy
msgid "Inactive Synthetic Beans"
msgstr "Feijões sintéticos inativos"
#: _guides/cdi-integration.adoc
#, fuzzy
msgid ""
"In the case when one needs to register multiple synthetic beans at build time but only wants a subset of them active at runtime, it is useful to be able to mark a synthetic bean as _inactive_.\n"
"This is done by configuring a \"check active\" procedure, which should be a `Supplier<ActiveResult>` obtained from a recorder:"
msgstr "No caso de alguém precisar registrar vários beans sintéticos no momento da construção, mas desejar que apenas um subconjunto deles esteja ativo no momento da execução, é útil poder marcar um bean sintético como _inativo_ . Isso é feito por meio da configuração de um procedimento \"check active\", que deve ser um `Supplier<ActiveResult>` obtido de um registrador:"
#: _guides/cdi-integration.adoc
#, fuzzy
msgid "Inactive Synthetic Bean - Build Step Example"
msgstr "Bean sintético inativo - exemplo de etapa de construção"
#: _guides/cdi-integration.adoc
#, fuzzy
msgid ""
"A bean that might be inactive is typically initialized eagerly, to make sure that an error is thrown at application startup.\n"
"If the bean is in fact inactive, but is not injected into an always-active bean, eager initialization is skipped and no error is thrown."
msgstr "Um bean que pode estar inativo normalmente é inicializado de forma ansiosa, para garantir que um erro seja lançado na inicialização do aplicativo. Se o bean estiver de fato inativo, mas não for injetado em um bean sempre ativo, a inicialização ansiosa será ignorada e nenhum erro será lançado."
#: _guides/cdi-integration.adoc
#, fuzzy
msgid "Configures the \"check active\" procedure."
msgstr "Configura o procedimento de \"verificação ativa\"."
#: _guides/cdi-integration.adoc
#, fuzzy
msgid "Inactive Synthetic Bean - Recorder Example"
msgstr "Bean sintético inativo - Exemplo de registrador"
#: _guides/cdi-integration.adoc
#, fuzzy
msgid "The condition when the synthetic bean should be inactive."
msgstr "A condição em que o bean sintético deve estar inativo."
#: _guides/cdi-integration.adoc
#, fuzzy
msgid ""
"Proper explanation of why the bean is inactive.\n"
"Another inactive `ActiveResult` may also be provided as a cause, if this bean's inactivity stems from another bean's inactivity."
msgstr "Explicação adequada do motivo pelo qual o bean está inativo. Outro `ActiveResult` inativo também pode ser fornecido como causa, se a inatividade desse bean resultar da inatividade de outro bean."
#: _guides/cdi-integration.adoc
#, fuzzy
msgid ""
"If an inactive bean is injected somewhere, or is dynamically looked up, an `InactiveBeanException` is thrown.\n"
"The error message contains the reason (from the `ActiveResult`), the cause chain (also from the `ActiveResult`), and possibly also a list of all injection points that resolve to this bean."
msgstr "Se um bean inativo for injetado em algum lugar ou for procurado dinamicamente, será lançado um `InactiveBeanException` . A mensagem de erro contém o motivo (de `ActiveResult` ), a cadeia de causas (também de `ActiveResult` ) e, possivelmente, também uma lista de todos os pontos de injeção que resolvem para esse bean."
#: _guides/cdi-integration.adoc
#, fuzzy
msgid ""
"If you want to handle the inactive case gracefully, you should always inject possibly inactive beans using `Instance<>`.\n"
"You also need to check before obtaining the actual instance:"
msgstr "Se quiser tratar o caso de inatividade com elegância, o senhor deve sempre injetar beans possivelmente inativos usando `Instance<>` . O senhor também precisa verificar antes de obter a instância real:"
#: _guides/cdi-integration.adoc
#, fuzzy
msgid "If you want to consume only active beans, you can inject an `InjectableInstance<>` and call `getActive()` to get the single instance or `listActive()` to get all instances:"
msgstr "Se quiser consumir apenas beans ativos, o senhor pode injetar um `InjectableInstance<>` e chamar `getActive()` para obter uma única instância ou `listActive()` para obter todas as instâncias:"
#. type: Title ==
#: _guides/cdi-integration.adoc
#, no-wrap
msgid "Use Case - Synthetic Observers"
msgstr "Caso de Uso - Observadores Sintéticos"
#: _guides/cdi-integration.adoc
#, fuzzy
msgid "Similar to <<synthetic_beans,synthetic beans>>, the attributes of a synthetic observer method are not derived from a Java method. Instead, all the attributes are defined by an extension."
msgstr "Semelhante aos xref:synthetic_beans[beans sintéticos] , os atributos de um método de observador sintético não são derivados de um método Java. Em vez disso, todos os atributos são definidos por uma extensão."
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "_Solution_: If you need to register a synthetic observer, use the `ObserverRegistrationPhaseBuildItem`."
msgstr "_Solução_: Se for necessário registrar um observador sintético, utilize o `ObserverRegistrationPhaseBuildItem`."
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "A build step that consumes the `ObserverRegistrationPhaseBuildItem` should always produce an `ObserverConfiguratorBuildItem` or at least inject a `BuildProducer` for this build item, otherwise it could be ignored or processed at the wrong time (e.g. after the correct CDI bootstrap phase)."
msgstr "Uma etapa de construção que consome o `ObserverRegistrationPhaseBuildItem` deve sempre produzir um `ObserverConfiguratorBuildItem` ou, pelo menos, injetar um `BuildProducer` para este item de construção, caso contrário, pode ser ignorado ou processado no momento errado (por exemplo, após a fase de bootstrap correta do CDI)."
#. type: Block title
#: _guides/cdi-integration.adoc
#, no-wrap
msgid "`ObserverRegistrationPhaseBuildItem` Example"
msgstr "Exemplo de `ObserverRegistrationPhaseBuildItem`"
#: _guides/cdi-integration.adoc
msgid ""
"The output of a `ObserverConfigurator` is recorded as bytecode.\n"
"Therefore, there are some limitations in how a synthetic observer is invoked at runtime.\n"
"Currently, you must generate the bytecode of the method body directly."
msgstr "A saída de um `ObserverConfigurator` é gravada como bytecode. Portanto, há algumas limitações na forma como um observador sintético é chamado no tempo de execução. Atualmente, você deve gerar o bytecode do corpo do método diretamente."
#. type: Title ==
#: _guides/cdi-integration.adoc
#, no-wrap
msgid "Use Case - I Have a Generated Bean Class"
msgstr "Caso de Uso - Tenho uma Classe de Bean Gerada"
#: _guides/cdi-integration.adoc
msgid ""
"No problem.\n"
"You can generate the bytecode of a bean class manually and then all you need to do is to produce a `GeneratedBeanBuildItem` instead of `GeneratedClassBuildItem`."
msgstr "Sem problemas. Você pode gerar o bytecode de uma classe de bean manualmente e, então, tudo o que precisa fazer é produzir um `GeneratedBeanBuildItem` em vez de `GeneratedClassBuildItem` ."
#. type: Block title
#: _guides/cdi-integration.adoc
#, no-wrap
msgid "`GeneratedBeanBuildItem` Example"
msgstr "Exemplo de `GeneratedBeanBuildItem`"
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "`io.quarkus.arc.deployment.GeneratedBeanGizmoAdaptor` makes it easy to produce ``GeneratedBeanBuildItem``s from Gizmo constructs."
msgstr "`io.quarkus.arc.deployment.GeneratedBeanGizmoAdaptor` facilita a produção de ``GeneratedBeanBuildItem``s a partir de constructos Gizmo."
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "The resulting bean class is something like `public class @Singleton MyBean { }`."
msgstr "A classe de bean resultante é algo como `public class @Singleton MyBean { }`."
#. type: Title ==
#: _guides/cdi-integration.adoc
#, no-wrap
msgid "Use Case - I Need to Validate the Deployment"
msgstr "Caso de Uso - Preciso Validar a Implantação"
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "Sometimes extensions need to inspect the beans, observers and injection points, then perform additional validations and fail the build if something is wrong."
msgstr "Por vezes, as extensões precisam de inspecionar os beans, os observadores e os pontos de injeção e, em seguida, efetuar validações adicionais e falhar a construção se algo estiver errado."
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "_Solution_: If an extension needs to validate the deployment it should use the `ValidationPhaseBuildItem`."
msgstr "_Solução_: Se uma extensão precisa validar a implantação, deve utilizar o `ValidationPhaseBuildItem`."
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "A build step that consumes the `ValidationPhaseBuildItem` should always produce a `ValidationErrorBuildItem` or at least inject a `BuildProducer` for this build item, otherwise it could be ignored or processed at the wrong time (e.g. after the correct CDI bootstrap phase)."
msgstr "Uma etapa de construção que consome o `ValidationPhaseBuildItem` deve sempre produzir um `ValidationErrorBuildItem` ou, pelo menos, injetar um `BuildProducer` para este item de construção, caso contrário, pode ser ignorado ou processado no momento errado (por exemplo, após a fase de bootstrap correta do CDI)."
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "You can easily filter all registered beans via the convenient `BeanStream` returned from the `ValidationPhaseBuildItem.getContext().beans()` method."
msgstr "Você pode filtrar facilmente todos os beans registrados através do prático `BeanStream` retornado pelo método `ValidationPhaseBuildItem.getContext().beans()`."
#. type: Title ==
#: _guides/cdi-integration.adoc
#, no-wrap
msgid "Use Case - Register a Custom CDI Context"
msgstr "Caso de Uso - Registrar um Contexto CDI Personalizado"
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "Sometimes extensions need to extend the set of built-in CDI contexts."
msgstr "Às vezes, as extensões precisam estender o conjunto de contextos CDI integrados."
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "_Solution_: If you need to register a custom context, use the `ContextRegistrationPhaseBuildItem`."
msgstr "_Solução_: Se for necessário registrar um contexto personalizado, utilize o `ContextRegistrationPhaseBuildItem`."
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "A build step that consumes the `ContextRegistrationPhaseBuildItem` should always produce a `ContextConfiguratorBuildItem` or at least inject a `BuildProducer` for this build item, otherwise it could be ignored or processed at the wrong time (e.g. after the correct CDI bootstrap phase)."
msgstr "Uma etapa de construção que consome o `ContextRegistrationPhaseBuildItem` deve sempre produzir um `ContextConfiguratorBuildItem` ou, pelo menos, injetar um `BuildProducer` para este item de construção, caso contrário, pode ser ignorado ou processado no momento errado (por exemplo, após a fase de bootstrap correta do CDI)."
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "`ContextRegistrationPhaseBuildItem` Example"
msgstr "Exemplo de `ContextRegistrationPhaseBuildItem`"
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "Additionally, each extension that registers a custom CDI context via `ContextRegistrationPhaseBuildItem` should also produce the `CustomScopeBuildItem` in order to contribute the custom scope annotation name to the set of bean defining annotations."
msgstr "Além disso, cada extensão que registra um contexto CDI personalizado através do `ContextRegistrationPhaseBuildItem` deve também produzir o `CustomScopeBuildItem` de modo a contribuir com o nome da anotação de escopo personalizado para o conjunto de anotações que definem o bean."
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "`CustomScopeBuildItem` Example"
msgstr "Exemplo de `CustomScopeBuildItem`"
#. type: Title ===
#: _guides/cdi-integration.adoc
#, no-wrap
msgid "What if I Need to Know All the Scopes Used in the Application?"
msgstr "E Se Eu Precisar Conhecer Todos os Escopos Utilizados na Aplicação?"
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "_Solution_: You can inject the `CustomScopeAnnotationsBuildItem` in a build step and use the convenient methods such as `CustomScopeAnnotationsBuildItem.isScopeDeclaredOn()`."
msgstr "_Solução_: Você pode injetar o `CustomScopeAnnotationsBuildItem` numa etapa de construção e utilizar os métodos convenientes, como `CustomScopeAnnotationsBuildItem.isScopeDeclaredOn()`."
#. type: Title ==
#: _guides/cdi-integration.adoc
#, no-wrap
msgid "Use Case - Additional Interceptor Bindings"
msgstr "Caso de Uso - Ligações de Interceptadores Adicionais"
#: _guides/cdi-integration.adoc
msgid ""
"In rare cases it might be handy to programmatically register an existing annotation that is not annotated with `@jakarta.interceptor.InterceptorBinding` as an interceptor binding.\n"
"This is similar to what CDI achieves through `BeforeBeanDiscovery#addInterceptorBinding()`.\n"
"We are going to use `InterceptorBindingRegistrarBuildItem` to get it done."
msgstr "Em casos raros, pode ser útil registrar programaticamente uma anotação existente que não esteja anotada com `@jakarta.interceptor.InterceptorBinding` como uma vinculação de interceptador. Isso é semelhante ao que o CDI consegue fazer por meio de `BeforeBeanDiscovery#addInterceptorBinding()` . Vamos usar o `InterceptorBindingRegistrarBuildItem` para fazer isso."
#. type: Block title
#: _guides/cdi-integration.adoc
#, no-wrap
msgid "`InterceptorBindingRegistrarBuildItem` Example"
msgstr "Exemplo de `InterceptorBindingRegistrarBuildItem`"
#. type: Title ==
#: _guides/cdi-integration.adoc
#, no-wrap
msgid "Use Case - Additional Qualifiers"
msgstr "Caso de Uso - Qualificadores Adicionais"
#: _guides/cdi-integration.adoc
msgid ""
"Sometimes it might be useful to register an existing annotation that is not annotated with `@jakarta.inject.Qualifier` as a CDI qualifier.\n"
"This is similar to what CDI achieves through `BeforeBeanDiscovery#addQualifier()`.\n"
"We are going to use `QualifierRegistrarBuildItem` to get it done."
msgstr "Às vezes, pode ser útil registrar uma anotação existente que não esteja anotada com `@jakarta.inject.Qualifier` como um qualificador CDI. Isso é semelhante ao que a CDI faz por meio do `BeforeBeanDiscovery#addQualifier()` . Vamos usar o `QualifierRegistrarBuildItem` para fazer isso."
#. type: Block title
#: _guides/cdi-integration.adoc
#, no-wrap
msgid "`QualifierRegistrarBuildItem` Example"
msgstr "Exemplo de `QualifierRegistrarBuildItem`"
#. type: Title ==
#: _guides/cdi-integration.adoc
#, no-wrap
msgid "Use Case - Additional Stereotypes"
msgstr "Caso de Uso - Estereótipos Adicionais"
#: _guides/cdi-integration.adoc
msgid ""
"It is sometimes useful to register an existing annotation that is not annotated with `@jakarta.enterprise.inject.Stereotype` as a CDI stereotype.\n"
"This is similar to what CDI achieves through `BeforeBeanDiscovery#addStereotype()`.\n"
"We are going to use `StereotypeRegistrarBuildItem` to get it done."
msgstr "Às vezes, é útil registrar uma anotação existente que não esteja anotada com `@jakarta.enterprise.inject.Stereotype` como um estereótipo CDI. Isso é semelhante ao que a CDI faz por meio do `BeforeBeanDiscovery#addStereotype()` . Vamos usar o `StereotypeRegistrarBuildItem` para fazer isso."
#. type: Block title
#: _guides/cdi-integration.adoc
#, no-wrap
msgid "`StereotypeRegistrarBuildItem` Example"
msgstr "Exemplo de `StereotypeRegistrarBuildItem`"
#: _guides/cdi-integration.adoc
#, fuzzy
msgid "If the newly registered stereotype annotation doesn't have the appropriate meta-annotations, such as scope or interceptor bindings, use an <<annotations_transformer_build_item,annotation transformation>> to add them."
msgstr "Se a anotação de estereótipo recém-registrada não tiver as meta-anotações apropriadas, como escopo ou ligações de interceptador, use uma xref:annotations_transformer_build_item[transformação de anotação] para adicioná-las."
#. type: Title ==
#: _guides/cdi-integration.adoc
#, no-wrap
msgid "Use Case - Injection Point Transformation"
msgstr "Caso de Uso - Transformação de Pontos de Injeção"
#: _guides/cdi-integration.adoc
msgid ""
"Every now and then it is handy to be able to change the qualifiers of an injection point programmatically.\n"
"You can do just that with `InjectionPointTransformerBuildItem`.\n"
"The following sample shows how to apply transformation to injection points with type `Foo` that contain qualifier `MyQualifier`:"
msgstr "De vez em quando, é útil poder alterar os qualificadores de um ponto de injeção de forma programática. Você pode fazer exatamente isso com `InjectionPointTransformerBuildItem` . O exemplo a seguir mostra como aplicar a transformação a pontos de injeção com o tipo `Foo` que contém o qualificador `MyQualifier` :"
#. type: Block title
#: _guides/cdi-integration.adoc
#, no-wrap
msgid "`InjectionPointTransformerBuildItem` Example"
msgstr "Exemplo de `InjectionPointTransformerBuildItem`"
#: _guides/cdi-integration.adoc
#, fuzzy
msgid "In theory, you can use <<annotations_transformer_build_item,an `AnnotationsTransformer`>> to achieve the same goal. However, there are few differences that make `InjectionPointsTransformer` more suitable for this particular task: (1) annotation transformers are applied to all classes during bean discovery, whereas `InjectionPointsTransformer` is only applied to discovered injection points after bean discovery; (2) with `InjectionPointsTransformer` you don't need to handle various types of injection points (field, parameters of initializer methods, etc.)."
msgstr "Em teoria, o senhor pode usar xref:annotations_transformer_build_item[um AnnotationsTransformer] para atingir o mesmo objetivo. No entanto, há algumas diferenças que tornam o `InjectionPointsTransformer` mais adequado para essa tarefa específica: (1) os transformadores de anotação são aplicados a todas as classes durante a descoberta do bean, enquanto o `InjectionPointsTransformer` só é aplicado aos pontos de injeção descobertos após a descoberta do bean; (2) com o `InjectionPointsTransformer` , o senhor não precisa lidar com vários tipos de pontos de injeção (campo, parâmetros de métodos inicializadores etc.)."
#. type: Title ==
#: _guides/cdi-integration.adoc
#, no-wrap
msgid "Use Case - Resource Annotations and Injection"
msgstr "Caso de Uso - Anotações e Injeção de Recursos"
#: _guides/cdi-integration.adoc
msgid ""
"The `ResourceAnnotationBuildItem` can be used to specify resource annotations that make it possible to resolve non-CDI injection points, such as Jakarta EE resources.\n"
"An integrator must also provide a corresponding `io.quarkus.arc.ResourceReferenceProvider` service provider implementation."
msgstr "O `ResourceAnnotationBuildItem` pode ser usado para especificar anotações de recursos que possibilitam a resolução de pontos de injeção não CDI, como os recursos do Jakarta EE. Um integrador também deve fornecer uma implementação correspondente do provedor de serviços `io.quarkus.arc.ResourceReferenceProvider`."
#. type: Block title
#: _guides/cdi-integration.adoc
#, no-wrap
msgid "`ResourceAnnotationBuildItem` Example"
msgstr "Exemplo de `ResourceAnnotationBuildItem`"
#. type: Title ==
#: _guides/cdi-integration.adoc
#, no-wrap
msgid "Available Build Time Metadata"
msgstr "Metadados de Tempo de Construção Disponíveis"
#: _guides/cdi-integration.adoc
msgid ""
"Any of the above extensions that operates with `BuildExtension.BuildContext` can leverage certain build time metadata that are generated during build.\n"
"The built-in keys located in `io.quarkus.arc.processor.BuildExtension.Key` are:"
msgstr "Qualquer uma das extensões acima que opere com `BuildExtension.BuildContext` pode aproveitar determinados metadados de tempo de construção gerados durante a construção. As chaves integradas, localizadas em `io.quarkus.arc.processor.BuildExtension.Key` são:"
#. type: Labeled list
#: _guides/cdi-integration.adoc
#, no-wrap
msgid "ANNOTATION_STORE"
msgstr "ANNOTATION_STORE"
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "Contains an `AnnotationStore` that keeps information about all `AnnotationTarget` annotations after application of annotation transformers"
msgstr "Contém um `AnnotationStore` que mantém informações sobre todas as anotações `AnnotationTarget` após a aplicação de transformadores de anotações"
#. type: Labeled list
#: _guides/cdi-integration.adoc
#, no-wrap
msgid "INJECTION_POINTS"
msgstr "INJECTION_POINTS"
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "`Collection<InjectionPointInfo>` containing all injection points"
msgstr "`Collection<InjectionPointInfo>` contendo todos os pontos de injeção"
#. type: Labeled list
#: _guides/cdi-integration.adoc
#, no-wrap
msgid "BEANS"
msgstr "BEANS"
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "`Collection<BeanInfo>` containing all beans"
msgstr "`Collection<BeanInfo>` contendo todos os beans"
#. type: Labeled list
#: _guides/cdi-integration.adoc
#, no-wrap
msgid "REMOVED_BEANS"
msgstr "REMOVED_BEANS"
#: _guides/cdi-integration.adoc
#, fuzzy
msgid "`Collection<BeanInfo>` containing all the removed beans; see <<cdi-reference.adoc#remove_unused_beans,Removing unused beans>> for more information"
msgstr "`Collection<BeanInfo>` contendo todos os beans removidos; consulte xref:cdi-reference.adoc#remove_unused_beans[Remoção de beans não utilizados] para obter mais informações"
#. type: Labeled list
#: _guides/cdi-integration.adoc
#, no-wrap
msgid "OBSERVERS"
msgstr "OBSERVERS"
#. type: Plain text
#: _guides/cdi-integration.adoc
msgid "`Collection<ObserverInfo>` containing all observers"
msgstr "`Collection<ObserverInfo>` contendo todos os observadores"
#. type: Labeled list
#: _guides/cdi-integration.adoc
#, no-wrap
msgid "SCOPES"