[webbeans-commits] Webbeans SVN: r952 - doc/trunk/reference/ko-KR.
by webbeans-commits@lists.jboss.org
Author: eukim
Date: 2009-01-14 02:58:12 -0500 (Wed, 14 Jan 2009)
New Revision: 952
Modified:
doc/trunk/reference/ko-KR/ee.po
Log:
updated
Modified: doc/trunk/reference/ko-KR/ee.po
===================================================================
--- doc/trunk/reference/ko-KR/ee.po 2009-01-14 07:48:54 UTC (rev 951)
+++ doc/trunk/reference/ko-KR/ee.po 2009-01-14 07:58:12 UTC (rev 952)
@@ -8,7 +8,7 @@
"Project-Id-Version: ee\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-06 11:30+0000\n"
-"PO-Revision-Date: 2009-01-14 17:13+1000\n"
+"PO-Revision-Date: 2009-01-14 17:57+1000\n"
"Last-Translator: Eunju Kim <eukim(a)redhat.com>\n"
"Language-Team: Korean <ko(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -133,7 +133,7 @@
msgid ""
"It's easy to use a Web Bean from a Servlet in Java EE 6. Simply inject the "
"Web Bean using Web Beans field or initializer method injection."
-msgstr ""
+msgstr "Java EE 6에 있는 Servlet에서 Web Bean을 사용하기가 쉽습니다. Web Beans 영역 또는 초기화 방식 삽입을 사용하여 Web Bean을 삽입합니다. "
#. Tag: programlisting
#: ee.xml:40
@@ -186,11 +186,12 @@
#. Tag: para
#: ee.xml:42
#, no-c-format
+#, fuzzy
msgid ""
"The Web Beans client proxy takes care of routing method invocations from the "
"Servlet to the correct instances of <literal>Credentials</literal> and "
"<literal>Login</literal> for the current request and HTTP session."
-msgstr ""
+msgstr "Web Beans 클라이언트 프록시는 "
#. Tag: title
#: ee.xml:49
16 years
[webbeans-commits] Webbeans SVN: r951 - doc/trunk/reference/zh-TW.
by webbeans-commits@lists.jboss.org
Author: tchuang
Date: 2009-01-14 02:48:54 -0500 (Wed, 14 Jan 2009)
New Revision: 951
Modified:
doc/trunk/reference/zh-TW/events.po
doc/trunk/reference/zh-TW/producermethods.po
Log:
Translation updated
Modified: doc/trunk/reference/zh-TW/events.po
===================================================================
--- doc/trunk/reference/zh-TW/events.po 2009-01-14 07:16:56 UTC (rev 950)
+++ doc/trunk/reference/zh-TW/events.po 2009-01-14 07:48:54 UTC (rev 951)
@@ -8,7 +8,7 @@
"Project-Id-Version: events\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-06 11:30+0000\n"
-"PO-Revision-Date: 2009-01-08 09:48+1000\n"
+"PO-Revision-Date: 2009-01-14 17:48+1000\n"
"Last-Translator: Terry Chuang <tchuang(a)redhat.com>\n"
"Language-Team: Traditional Chinese <zh(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -20,7 +20,7 @@
#: events.xml:4
#, no-c-format
msgid "Events"
-msgstr ""
+msgstr "事件(Events)"
#. Tag: para
#: events.xml:6
@@ -61,7 +61,7 @@
#: events.xml:28
#, no-c-format
msgid "Event observers"
-msgstr ""
+msgstr "事件觀察器(Event observers)"
#. Tag: para
#: events.xml:30
@@ -156,7 +156,7 @@
#: events.xml:61
#, no-c-format
msgid "Event producers"
-msgstr ""
+msgstr "事件產生器(Event producers)"
#. Tag: para
#: events.xml:63
@@ -216,7 +216,7 @@
#: events.xml:86
#, no-c-format
msgid "specifies no event bindings."
-msgstr ""
+msgstr "不指定事件綁定。"
#. Tag: para
#: events.xml:90
@@ -305,7 +305,7 @@
#: events.xml:138
#, no-c-format
msgid "Registering observers dynamically"
-msgstr ""
+msgstr "動態式地註冊觀察器"
#. Tag: para
#: events.xml:140
@@ -354,13 +354,13 @@
#: events.xml:154
#, no-c-format
msgid "Event bindings with members"
-msgstr ""
+msgstr "與成員的事件綁定(Event binding)"
#. Tag: para
#: events.xml:156
#, no-c-format
msgid "An event binding type may have annotation members:"
-msgstr ""
+msgstr "事件綁定類型能夠有下列標記成員:"
#. Tag: programlisting
#: events.xml:158
@@ -402,7 +402,7 @@
msgid ""
"Event binding type members may be specified statically by the event "
"producer, via annotations at the event notifier injection point:"
-msgstr ""
+msgstr "事件綁定類型的成員可由事件產生器在事件通知器的注入點透過標記來靜態地指定:"
#. Tag: programlisting
#: events.xml:167
@@ -517,7 +517,7 @@
#: events.xml:197
#, no-c-format
msgid "Transactional observers"
-msgstr ""
+msgstr "交易觀察器(Transactional observers)"
#. Tag: para
#: events.xml:199
@@ -544,7 +544,7 @@
#: events.xml:207
#, no-c-format
msgid "There are three kinds of transactional observers:"
-msgstr ""
+msgstr "有三種類型的交易觀察器:"
#. Tag: para
#: events.xml:211
@@ -593,7 +593,7 @@
#: events.xml:233
#, no-c-format
msgid "Imagine that we have cached a JPA query result set in the application scope:"
-msgstr ""
+msgstr "想像我們已快取了一個設置於應用程式 scope 中的 JPA 查詢結果:"
#. Tag: programlisting
#: events.xml:235
Modified: doc/trunk/reference/zh-TW/producermethods.po
===================================================================
--- doc/trunk/reference/zh-TW/producermethods.po 2009-01-14 07:16:56 UTC (rev 950)
+++ doc/trunk/reference/zh-TW/producermethods.po 2009-01-14 07:48:54 UTC (rev 951)
@@ -8,7 +8,7 @@
"Project-Id-Version: producermethods\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-06 11:30+0000\n"
-"PO-Revision-Date: 2009-01-08 10:55+1000\n"
+"PO-Revision-Date: 2009-01-14 17:41+1000\n"
"Last-Translator: Terry Chuang <tchuang(a)redhat.com>\n"
"Language-Team: Traditional Chinese <zh(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -20,7 +20,7 @@
#: producermethods.xml:5
#, no-c-format
msgid "Producer methods"
-msgstr ""
+msgstr "Producer method"
#. Tag: para
#: producermethods.xml:7
@@ -32,12 +32,14 @@
"Beans into the Web Beans environment. (We'll meet a second approach in <xref "
"linkend=\"xml\"/>.)"
msgstr ""
+"Producer method 讓我們在當 Web Bean 管理員(而不是應用程式)負責舉例說明(instantiating)物件時能夠解決一些特定發生的問題。它們同時也是將非 Web Bean 物件整合入 Web Bean 環境中最簡單的方式。(我們將在 <xref "
+"linkend=\"xml\"/> 中提及第二個方式。)"
#. Tag: para
#: producermethods.xml:12
#, no-c-format
msgid "According to the spec:"
-msgstr ""
+msgstr "根據規格:"
#. Tag: chapter
#: producermethods.xml:12
@@ -86,12 +88,34 @@
"method will be called by the Web Bean manager to obtain an instance to "
"service this injection point.</para>."
msgstr ""
+"<blockquote> <para>Web Bean 的 producer method 的作用為要被注入之物件的來源:</para> <itemizedlist> <listitem> <para>要被注入的物件無須是 Web Bean 的 instance,</para> </listitem> <listitem> <para>要被注入的物件的具體類型取決於 runtime,或是</para> </listitem> <listitem> <para>該物件需要進行一些並非由 Web Bean 建構函式所實施的自訂初始化</para> </listitem> </itemizedlist> </blockquote> <para>比方說,producer method 能讓我們:</para> <itemizedlist> <listitem> <para>將 JPA entity 顯示為 Web Bean、</para> </listitem> <listitem> "
+"<para>將任何 JDK class 顯示為 Web Bean、</para> </listitem> <listitem> <para>為相同的實做 class 定義多重 Web Bean 以及不同的 scope 或初始化,或是</para> </listitem> <listitem> <para>在 runtime 時改變一個 API 類型的實做。</para> </listitem> </itemizedlist> <para>特別是,producer method 讓我們可以同時使用 Web Bean 和執行期多型性(runtime polymorphism)。就如我們所見,建置類型(deployment type)對於建置期多型性(deployment-time polymorphism)的問題來說是個強大的解決方法。不過一旦系統被建置後,Web Bean 實做便會是故定的。Producer method 則沒有這方面的限制:</para> <programlisting role=\"JAVA\"><![CDATA"
+"[@SessionScoped\n"
+"public class Preferences {\n"
+" \n"
+" private PaymentStrategyType paymentStrategy;\n"
+" \n"
+" ...\n"
+" \n"
+" @Produces @Preferred \n"
+" public PaymentStrategy getPaymentStrategy() {\n"
+" switch (paymentStrategy) {\n"
+" case CREDIT_CARD: return new CreditCardPaymentStrategy();\n"
+" case CHEQUE: return new ChequePaymentStrategy();\n"
+" case PAYPAL: return new PayPalPaymentStrategy();\n"
+" default: return null;\n"
+" } \n"
+" }\n"
+" \n"
+"}]]></programlisting> <para>考慮這個注入點:</para> "
+"<programlisting role=\"JAVA\"><![CDATA[@Preferred PaymentStrategy "
+"paymentStrat;]]></programlisting> <para>這個注入點擁有和 producer method 相同的類型和綁定標記,因此它會使用一般的 Web Bean 注入規則來解析 producer method。Producer method 會被 Web Bean 管理員調用來取得一個 instance 來服務這個注入點。</para>"
#. Tag: title
#: producermethods.xml:68
#, no-c-format
msgid "Scope of a producer method"
-msgstr ""
+msgstr "producer method 的 scope"
#. Tag: para
#: producermethods.xml:70
@@ -110,7 +134,7 @@
msgid ""
"To change this behavior, we can add a <literal>@SessionScoped</literal> "
"annotation to the method."
-msgstr ""
+msgstr "若要更改此特性,我們可將 <literal>@SessionScoped</literal> 這個標記附加至 method。"
#. Tag: programlisting
#: producermethods.xml:78
@@ -139,7 +163,7 @@
#: producermethods.xml:87
#, no-c-format
msgid "Injection into producer methods"
-msgstr ""
+msgstr "注入 producer method"
#. Tag: para
#: producermethods.xml:89
@@ -225,13 +249,13 @@
#: producermethods.xml:119
#, no-c-format
msgid "Use of <literal>@New</literal> with producer methods"
-msgstr ""
+msgstr "使用 <literal>@New</literal> 和 producer method"
#. Tag: para
#: producermethods.xml:121
#, no-c-format
msgid "Consider the following producer method:"
-msgstr ""
+msgstr "考慮下列 producer method:"
#. Tag: programlisting
#: producermethods.xml:123
16 years
[webbeans-commits] Webbeans SVN: r950 - doc/trunk/reference/ko-KR.
by webbeans-commits@lists.jboss.org
Author: eukim
Date: 2009-01-14 02:16:56 -0500 (Wed, 14 Jan 2009)
New Revision: 950
Modified:
doc/trunk/reference/ko-KR/ee.po
doc/trunk/reference/ko-KR/example.po
doc/trunk/reference/ko-KR/extend.po
doc/trunk/reference/ko-KR/part3.po
doc/trunk/reference/ko-KR/xml.po
Log:
updated
Modified: doc/trunk/reference/ko-KR/ee.po
===================================================================
--- doc/trunk/reference/ko-KR/ee.po 2009-01-14 07:07:21 UTC (rev 949)
+++ doc/trunk/reference/ko-KR/ee.po 2009-01-14 07:16:56 UTC (rev 950)
@@ -8,7 +8,7 @@
"Project-Id-Version: ee\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-06 11:30+0000\n"
-"PO-Revision-Date: 2009-01-13 16:26+1000\n"
+"PO-Revision-Date: 2009-01-14 17:13+1000\n"
"Last-Translator: Eunju Kim <eukim(a)redhat.com>\n"
"Language-Team: Korean <ko(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -18,6 +18,7 @@
"Plural-Forms: nplurals=2; plural=(n!=1);\n\n"
"\n"
"\n"
+"\n"
#. Tag: title
#: ee.xml:4
@@ -34,7 +35,7 @@
"in Unified EL expressions in JSF and JSP pages. They may even be injected "
"into some objects, such as Servlets and Message-Driven Beans, which are not "
"Web Beans."
-msgstr ""
+msgstr "Web Beans는 Java EE 환경으로 완전 통합됩니다. Web Beans는 Java EE 리소스 및 JPA 지속성 컨텍스트로 액세스합니다. 이는 JSF 및 JSP 페이지에서 Unified EL 표현식으로 사용될 수 있습니다. 이는 Web Beans가 아닌 Servlets 및 Message-Driven Beans와 같은 일부 객체로 삽입될 수 도 있습니다. "
#. Tag: title
#: ee.xml:12
@@ -50,7 +51,7 @@
"injection using <literal>@Resource</literal>, <literal>@EJB</literal> and "
"<literal>@PersistenceContext</literal>. We've already seen a couple of "
"examples of this, though we didn't pay much attention at the time:"
-msgstr ""
+msgstr "모든 엔터프라이즈 Web Beans는 <literal>@Resource</literal>, <literal>@EJB</literal>, <literal>@PersistenceContext</literal>를 사용하여 Java EE 의존성 삽입의 장점을 취할 수 있습니다. 이미 이에 대한 몇몇 예를 살펴보았습니다: "
#. Tag: programlisting
#: ee.xml:19
@@ -108,7 +109,7 @@
"literal> callbacks are also supported for all simple and enterprise Web "
"Beans. The <literal>@PostConstruct</literal> method is called after "
"<emphasis>all</emphasis> injection has been performed."
-msgstr ""
+msgstr "Java EE <literal>@PostConstruct</literal> 및 <literal>@PreDestroy</literal> 콜백은 모든 엔터프라이즈 Web Beans에 대해 지원됩니다. <emphasis>모든</emphasis> 삽입이 실행된 후 <literal>@PostConstruct</literal> 방식이 호출됩니다. "
#. Tag: para
#: ee.xml:28
@@ -117,6 +118,8 @@
"There is one restriction to be aware of here: <literal>@PersistenceContext"
"(type=EXTENDED)</literal> is not supported for simple Web Beans."
msgstr ""
+"여기서 유의해야 할 한 가지 제한 사항이 있습니다: <literal>@PersistenceContext"
+"(type=EXTENDED)</literal>는 단순한 Web Beans에 대해 지원되지 않습니다. "
#. Tag: title
#: ee.xml:35
Modified: doc/trunk/reference/ko-KR/example.po
===================================================================
--- doc/trunk/reference/ko-KR/example.po 2009-01-14 07:07:21 UTC (rev 949)
+++ doc/trunk/reference/ko-KR/example.po 2009-01-14 07:16:56 UTC (rev 950)
@@ -8,7 +8,7 @@
"Project-Id-Version: example\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-06 11:30+0000\n"
-"PO-Revision-Date: 2009-01-12 17:55+1000\n"
+"PO-Revision-Date: 2009-01-14 15:00+1000\n"
"Last-Translator: Eunju Kim <eukim(a)redhat.com>\n"
"Language-Team: Korean <ko(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -17,6 +17,9 @@
"X-Generator: KBabel 1.11.4\n"
"Plural-Forms: nplurals=2; plural=(n!=1);\n\n"
"\n"
+"\n"
+"\n"
+"\n"
#. Tag: title
#: example.xml:4
@@ -31,7 +34,7 @@
"Let's illustrate these ideas with a full example. We're going to implement "
"user login/logout for an application that uses JSF. First, we'll define a "
"Web Bean to hold the username and password entered during login:"
-msgstr ""
+msgstr "이러한 웹 애플리케이션의 예를 살펴봅시다. JSF를 사용하는 애플리케이션의 사용자 로그인/로그아웃을 구현할 것입니다. 먼저, 로그인시 입력한 사용자 이름 및 암호를 보유하기 위해 Web Bean을 정의합니다: "
#. Tag: programlisting
#: example.xml:11
@@ -69,7 +72,7 @@
#: example.xml:13
#, no-c-format
msgid "This Web Bean is bound to the login prompt in the following JSF form:"
-msgstr ""
+msgstr "Web Bean은 다음과 같은 JSF 형식에서 로그인 프롬프트로 바운딩됩니다: "
#. Tag: programlisting
#: example.xml:15
@@ -108,7 +111,7 @@
"The actual work is done by a session scoped Web Bean that maintains "
"information about the currently logged-in user and exposes the "
"<literal>User</literal> entity to other Web Beans:"
-msgstr ""
+msgstr "현재 로그인 사용자에 관한 정보를 관리하는 Web Bean 세션 범위에 의해 실제 작업이 완료되어 다른 Web Beans에 <literal>User</literal> 엔티티를 노출시킵니다: "
#. Tag: programlisting
#: example.xml:21
@@ -192,7 +195,7 @@
#: example.xml:23
#, no-c-format
msgid "Of course, <literal>@LoggedIn</literal> is a binding annotation:"
-msgstr ""
+msgstr "<literal>@LoggedIn</literal>은 바인딩 어노테이션입니다: "
#. Tag: programlisting
#: example.xml:25
@@ -212,7 +215,7 @@
#: example.xml:27
#, no-c-format
msgid "Now, any other Web Bean can easily inject the current user:"
-msgstr ""
+msgstr "기타 다른 Web Bean은 현재 사용자를 쉽게 삽입할 수 있습니다: "
#. Tag: programlisting
#: example.xml:29
@@ -251,5 +254,5 @@
"Hopefully, this example gives a flavor of the Web Bean programming model. In "
"the next chapter, we'll explore Web Beans dependency injection in greater "
"depth."
-msgstr ""
+msgstr "이러한 예가 Web Bean 프로그래밍 모델의 맛을 보는 계기가 되었으면 합니다. 다음 부분에서는 Web Beans 의존성 삽입에 대해 자세히 살펴보겠습니다. "
Modified: doc/trunk/reference/ko-KR/extend.po
===================================================================
--- doc/trunk/reference/ko-KR/extend.po 2009-01-14 07:07:21 UTC (rev 949)
+++ doc/trunk/reference/ko-KR/extend.po 2009-01-14 07:16:56 UTC (rev 950)
@@ -8,7 +8,7 @@
"Project-Id-Version: extend\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-06 11:30+0000\n"
-"PO-Revision-Date: 2009-01-13 16:21+1000\n"
+"PO-Revision-Date: 2009-01-14 15:36+1000\n"
"Last-Translator: Eunju Kim <eukim(a)redhat.com>\n"
"Language-Team: Korean <ko(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -17,6 +17,9 @@
"X-Generator: KBabel 1.11.4\n"
"Plural-Forms: nplurals=2; plural=(n!=1);\n\n"
"\n"
+"\n"
+"\n"
+"\n"
#. Tag: title
#: extend.xml:4
@@ -33,13 +36,13 @@
"SPIs for the use of developers of portable extensions to Web Beans. For "
"example, the following kinds of extensions were envisaged by the designers "
"of Web Beans:"
-msgstr ""
+msgstr "Web Beans는 다른 기술과의 통합, 확장, 프레임워크에 대한 플랫폼이 되기 위한 것입니다. 따라서, Web Beans는 Web Beans로의 휴대용 확장에 대한 개발자의 사용을 위해 SPI 모음을 노출합니다. 예를 들어, 다음과 같은 종류의 확장은 Web Beans 개발자에 의해 구상되었습니다. "
#. Tag: para
#: extend.xml:14
#, no-c-format
msgid "integration with Business Process Management engines,"
-msgstr ""
+msgstr "비지니스 프로세스 관리 엔진과의 통합 "
#. Tag: para
#: extend.xml:17
@@ -47,13 +50,13 @@
msgid ""
"integration with third-party frameworks such as Spring, Seam, GWT or Wicket, "
"and"
-msgstr ""
+msgstr " Spring, Seam, GWT, Wicket과 같은 제삼자 프레임워크와의 통합 "
#. Tag: para
#: extend.xml:21
#, no-c-format
msgid "new technology based upon the Web Beans programming model."
-msgstr ""
+msgstr "Web Beans 프로그래밍 모델을 기반으로 하는 새로운 기술 "
#. Tag: para
#: extend.xml:25
@@ -61,7 +64,7 @@
msgid ""
"The nerve center for extending Web Beans is the <literal>Manager</literal> "
"object."
-msgstr ""
+msgstr "Web Beans 확장의 중심은 <literal>Manager</literal> 객체입니다. "
#. Tag: title
#: extend.xml:29
@@ -75,7 +78,7 @@
msgid ""
"The <literal>Manager</literal> interface lets us register and obtain Web "
"Beans, interceptors, decorators, observers and contexts programatically."
-msgstr ""
+msgstr "<literal>Manager</literal> 인터페이스는 Web Beans, 인터셉터, 데코레이터, 옵저버 및 컨텍스트를 프로그램적으로 획득하여 등록할 수 있게 합니다. "
#. Tag: programlisting
#: extend.xml:34
@@ -199,7 +202,7 @@
#: extend.xml:36
#, no-c-format
msgid "We can obtain an instance of <literal>Manager</literal> via injection:"
-msgstr ""
+msgstr "삽입을 통해 <literal>Manager</literal> 인스턴스를 얻을 수 있습니다: "
#. Tag: programlisting
#: extend.xml:38
@@ -220,7 +223,7 @@
"Instances of the abstract class <literal>Bean</literal> represent Web Beans. "
"There is an instance of <literal>Bean</literal> registered with the "
"<literal>Manager</literal> object for every Web Bean in the application."
-msgstr ""
+msgstr "<literal>Bean</literal> 추상 클래스의 인스턴스는 Web Beans를 나타냅니다. 애플리케이션에 있는 모든 Web Bean에 해당하는 <literal>Manager</literal> 객체로 등록된 <literal>Bean</literal> 인스턴스가 있습니다. "
#. Tag: programlisting
#: extend.xml:50
@@ -288,7 +291,7 @@
"specification (simple and enterprise Web Beans, producer methods and JMS "
"endpoints). For example, we could use the <literal>Bean</literal> class to "
"allow objects managed by another framework to be injected into Web Beans."
-msgstr ""
+msgstr "Web Beans 사양 (엔터프라이즈 Web Beans, 생산자 방식 및 JMS 엔드포인트)에 의해 정의된 것 이상으로 새로운 종류의 Web Beans을 지원하기 위해 <literal>Bean</literal> 클래스를 확장하고 <literal>Manager.addBean()</literal>를 호출하여 인스턴스를 등록할 수 있습니다. 예를 들어, <literal>Bean</literal> 클래스를 사용하여 Web Beans에 주입된 다른 프레임워크에 의해 관리되는 객체를 허용하게 할 수 있습니다. "
#. Tag: para
#: extend.xml:60
@@ -297,7 +300,7 @@
"There are two subclasses of <literal>Bean</literal> defined by the Web Beans "
"specification: <literal>Interceptor</literal> and <literal>Decorator</"
"literal>."
-msgstr ""
+msgstr "Web Beans 사양에 의해 정의되는 두 개의 <literal>Bean</literal> 하부 클래스가 있습니다: <literal>Interceptor</literal> 및 <literal>Decorator</literal>. "
#. Tag: title
#: extend.xml:67
@@ -311,7 +314,7 @@
msgid ""
"The <literal>Context</literal> interface supports addition of new scopes to "
"Web Beans, or extension of the built-in scopes to new environments."
-msgstr ""
+msgstr "<literal>Context</literal> 인터페이스는 Web Beans에 새로운 범위를 추가로 지원하거나 새로운 환경에 내장된 범위를 확장 지원합니다. "
#. Tag: programlisting
#: extend.xml:72
@@ -344,5 +347,5 @@
"For example, we might implement <literal>Context</literal> to add a business "
"process scope to Web Beans, or to add support for the conversation scope to "
"an application that uses Wicket."
-msgstr ""
+msgstr "예를 들어, Web Beans에 비지니스 프로세스 범위를 추가하거나 또는 Wicket을 사용하는 애플리케이션에 컨버세이션 범위에 대한 지원을 추가하기 위해 <literal>Context</literal>를 구현할 수 있습니다. "
Modified: doc/trunk/reference/ko-KR/part3.po
===================================================================
--- doc/trunk/reference/ko-KR/part3.po 2009-01-14 07:07:21 UTC (rev 949)
+++ doc/trunk/reference/ko-KR/part3.po 2009-01-14 07:16:56 UTC (rev 950)
@@ -8,7 +8,7 @@
"Project-Id-Version: part3\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-06 11:30+0000\n"
-"PO-Revision-Date: 2009-01-13 14:23+1000\n"
+"PO-Revision-Date: 2009-01-14 15:00+1000\n"
"Last-Translator: Eunju Kim <eukim(a)redhat.com>\n"
"Language-Team: Korean <ko(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -17,6 +17,7 @@
"X-Generator: KBabel 1.11.4\n"
"Plural-Forms: nplurals=2; plural=(n!=1);\n\n"
"\n"
+"\n"
#. Tag: para
#: part3.xml:5
@@ -131,7 +132,7 @@
"architecture. It encapsulates various properties of the role, including "
"scope, interceptor bindings, deployment type, etc, into a single reusable "
"package."
-msgstr "Web Beans의 <emphasis>전형적인 역할</emphasis>은 이러한 기능에 한 단계 더 나아갑니다. 전형적인 역할은 애플리케이션 구조에서의 일반적인 <emphasis>역할</emphasis>을 모델로 합니다. 이는 스코프, 인터셉터 바인딩, 배포 유형 등과 같은 다양한 역할의 속성으로 다시 사용 가능한 단일 패키지로 캡슐화합니다. "
+msgstr "Web Beans의 <emphasis>전형적인 역할</emphasis>은 이러한 기능에 한 단계 더 나아갑니다. 전형적인 역할은 애플리케이션 구조에서의 일반적인 <emphasis>역할</emphasis>을 모델로 합니다. 이는 범위, 인터셉터 바인딩, 배포 유형 등과 같은 다양한 역할의 속성으로 다시 사용 가능한 단일 패키지로 캡슐화합니다. "
#. Tag: para
#: part3.xml:66
Modified: doc/trunk/reference/ko-KR/xml.po
===================================================================
--- doc/trunk/reference/ko-KR/xml.po 2009-01-14 07:07:21 UTC (rev 949)
+++ doc/trunk/reference/ko-KR/xml.po 2009-01-14 07:16:56 UTC (rev 950)
@@ -8,7 +8,7 @@
"Project-Id-Version: xml\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-06 11:30+0000\n"
-"PO-Revision-Date: 2009-01-08 11:14+1000\n"
+"PO-Revision-Date: 2009-01-14 14:52+1000\n"
"Last-Translator: Eunju Kim <eukim(a)redhat.com>\n"
"Language-Team: Korean <ko(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -16,12 +16,13 @@
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.11.4\n"
"Plural-Forms: nplurals=2; plural=(n!=1);\n\n"
+"\n"
#. Tag: title
#: xml.xml:4
#, no-c-format
msgid "Defining Web Beans using XML"
-msgstr ""
+msgstr "XML을 사용하여 Web Beans 정의 "
#. Tag: para
#: xml.xml:6
16 years
[webbeans-commits] Webbeans SVN: r949 - ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test.
by webbeans-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-01-14 02:07:21 -0500 (Wed, 14 Jan 2009)
New Revision: 949
Removed:
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/DefaultDeploymentTypeTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/DeploymentTypeTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/NameTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ScopeTypeTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/TypeTest.java
Log:
ported tests to TCK
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/DefaultDeploymentTypeTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/DefaultDeploymentTypeTest.java 2009-01-14 07:04:34 UTC (rev 948)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/DefaultDeploymentTypeTest.java 2009-01-14 07:07:21 UTC (rev 949)
@@ -1,26 +0,0 @@
-package org.jboss.webbeans.test;
-
-import javax.webbeans.Production;
-import javax.webbeans.Standard;
-
-import org.testng.annotations.Test;
-
-
-public class DefaultDeploymentTypeTest extends AbstractTest
-{
-
- @Override
- protected void addStandardDeploymentTypesForTests()
- {
- // No-op
- }
-
- @Test @SpecAssertion(section={"2.5.6", "2.5.7"})
- public void testDefaultEnabledDeploymentTypes()
- {
- assert manager.getEnabledDeploymentTypes().size() == 2;
- assert manager.getEnabledDeploymentTypes().get(0).equals(Standard.class);
- assert manager.getEnabledDeploymentTypes().get(1).equals(Production.class);
- }
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/DeploymentTypeTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/DeploymentTypeTest.java 2009-01-14 07:04:34 UTC (rev 948)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/DeploymentTypeTest.java 2009-01-14 07:07:21 UTC (rev 949)
@@ -1,147 +0,0 @@
-package org.jboss.webbeans.test;
-
-import java.lang.reflect.Method;
-import java.util.Arrays;
-
-import javax.webbeans.DefinitionException;
-import javax.webbeans.DeploymentException;
-import javax.webbeans.Production;
-import javax.webbeans.Standard;
-import javax.webbeans.UnsatisfiedDependencyException;
-import javax.webbeans.manager.Bean;
-
-import org.jboss.webbeans.bean.ProducerMethodBean;
-import org.jboss.webbeans.bean.SimpleBean;
-import org.jboss.webbeans.test.annotations.AnotherDeploymentType;
-import org.jboss.webbeans.test.annotations.HornedAnimalDeploymentType;
-import org.jboss.webbeans.test.beans.BlackWidow;
-import org.jboss.webbeans.test.beans.RedSnapper;
-import org.jboss.webbeans.test.beans.Reindeer;
-import org.jboss.webbeans.test.beans.Rhinoceros;
-import org.jboss.webbeans.test.beans.SpiderProducer;
-import org.jboss.webbeans.test.beans.broken.BeanWithTooManyDeploymentTypes;
-import org.jboss.webbeans.test.beans.broken.Gazelle;
-import org.testng.annotations.Test;
-
-@SpecVersion("20081206")
-public class DeploymentTypeTest extends AbstractTest
-{
-
- @Test(expectedExceptions=DefinitionException.class) @SpecAssertion(section="2.5.1")
- public void testNonBuiltInComponentUsesStandard()
- {
- SimpleBean.of(Gazelle.class, manager);
- }
-
- @Test(groups={"stub", "annotationDefinition"}) @SpecAssertion(section="2.5.2")
- public void testDeploymentTypeHasCorrectTarget()
- {
- assert false;
- }
-
- @Test(groups={"stub", "annotationDefinition"}) @SpecAssertion(section="2.5.2")
- public void testDeploymentTypeHasCorrectRetention()
- {
- assert false;
- }
-
- @Test(groups={"stub", "annotationDefinition"}) @SpecAssertion(section="2.5.2")
- public void testDeploymentTypeDeclaresScopeTypeAnnotation()
- {
- assert false;
- }
-
- @Test(expectedExceptions=DefinitionException.class) @SpecAssertion(section="2.5.3")
- public void testTooManyDeploymentTypes()
- {
- SimpleBean.of(BeanWithTooManyDeploymentTypes.class, manager);
- }
-
- @Test @SpecAssertion(section="2.5.3")
- public void testDeploymentTypeInhertitedFromDeclaringBean() throws Exception
- {
- SimpleBean<SpiderProducer> bean = SimpleBean.of(SpiderProducer.class, manager);
- manager.addBean(bean);
- Method method = SpiderProducer.class.getMethod("produceBlackWidow");
- ProducerMethodBean<BlackWidow> blackWidowSpiderModel = ProducerMethodBean.of(method, bean, manager);
- assert blackWidowSpiderModel.getDeploymentType().equals(AnotherDeploymentType.class);
- }
-
- @Test(groups={"stub", "webbeansxml"}) @SpecAssertion(section="2.5.4")
- public void testXmlDeploymentTypeOverridesJava()
- {
- //Map<Class<? extends Annotation>, Annotation> xmlDefinedDeploymentTypeAnnotations = new HashMap<Class<? extends Annotation>, Annotation>();
- //xmlDefinedDeploymentTypeAnnotations.put(AnotherDeploymentType.class, new AnotherDeploymentTypeAnnotationLiteral());
- //AnnotatedClass<BeanWithTooManyDeploymentTypes> xmlDefinedDeploymentTypeAnnotatedItem = new SimpleAnnotatedClass<BeanWithTooManyDeploymentTypes>(BeanWithTooManyDeploymentTypes.class, xmlDefinedDeploymentTypeAnnotations);
-
- //SimpleBean<BeanWithTooManyDeploymentTypes> model = createSimpleBean(BeanWithTooManyDeploymentTypes.class, xmlDefinedDeploymentTypeAnnotatedItem, manager);
- //assert model.getDeploymentType().equals(AnotherDeploymentType.class);
- assert false;
- }
-
-
-
- @Test(groups={"stub", "webbeansxml"}) @SpecAssertion(section="2.5.4")
- public void testXmlRespectsJavaDeploymentType()
- {
- //AnnotatedClass<Tuna> annotatedItem = new SimpleAnnotatedClass<Tuna>(Tuna.class, new HashMap<Class<? extends Annotation>, Annotation>());
- //SimpleBean<Tuna> tuna = createSimpleBean(Tuna.class, annotatedItem, manager);
- //assert tuna.getDeploymentType().equals(AnotherDeploymentType.class);
- assert false;
- }
-
- @Test(groups={"stub", "webbeansxml"}) @SpecAssertion(section="2.5.5")
- public void testXmlDefaultDeploymentType()
- {
- //AnnotatedClass<Antelope> antelopeAnnotatedItem = new SimpleAnnotatedClass<Antelope>(Antelope.class, new HashMap<Class<? extends Annotation>, Annotation>());
- //SimpleBean<Antelope> antelope = createSimpleBean(Antelope.class, antelopeAnnotatedItem, manager);
- // assert antelope.getDeploymentType().equals(Production.class);
- assert false;
- }
-
- @Test @SpecAssertion(section="2.5.5")
- public void testHighestPrecedenceDeploymentTypeFromStereotype()
- {
- Bean<?> bean = SimpleBean.of(Rhinoceros.class, manager);
- assert bean.getDeploymentType().equals(HornedAnimalDeploymentType.class);
- }
-
- @Test(groups="beanLifecycle", expectedExceptions=UnsatisfiedDependencyException.class) @SpecAssertion(section="2.5.6")
- public void testBeanWithDisabledDeploymentTypeNotInstantiated()
- {
- manager.setEnabledDeploymentTypes(Arrays.asList(Standard.class, AnotherDeploymentType.class, HornedAnimalDeploymentType.class));
-
- Bean<RedSnapper> bean = SimpleBean.of(RedSnapper.class, manager);
- manager.addBean(bean);
- manager.getInstanceByType(RedSnapper.class);
- }
-
- @Test @SpecAssertion(section={"2.5.6", "2.5.7"})
- public void testCustomDeploymentTypes()
- {
- manager.setEnabledDeploymentTypes(Arrays.asList(Standard.class, AnotherDeploymentType.class, HornedAnimalDeploymentType.class));
- assert manager.getEnabledDeploymentTypes().size() == 3;
- assert manager.getEnabledDeploymentTypes().get(0).equals(Standard.class);
- assert manager.getEnabledDeploymentTypes().get(1).equals(AnotherDeploymentType.class);
- assert manager.getEnabledDeploymentTypes().get(2).equals(HornedAnimalDeploymentType.class);
- }
-
- @Test(expectedExceptions=DeploymentException.class) @SpecAssertion(section="2.5.6")
- public void testStandardMustBeDeclared()
- {
- manager.setEnabledDeploymentTypes(Arrays.asList(AnotherDeploymentType.class, HornedAnimalDeploymentType.class));
- }
-
- @Test(groups={"stub", "webbeansxml"}, expectedExceptions=DeploymentException.class) @SpecAssertion(section="2.5.6")
- public void testMultipleDeployElementsCannotBeDefined()
- {
-
- }
-
- @Test @SpecAssertion(section={"2.5.5", "2.7.2"})
- public void testWebBeanDeploymentTypeOverridesStereotype()
- {
- Bean<Reindeer> bean = SimpleBean.of(Reindeer.class, manager);
- assert bean.getDeploymentType().equals(Production.class);
- }
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/NameTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/NameTest.java 2009-01-14 07:04:34 UTC (rev 948)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/NameTest.java 2009-01-14 07:07:21 UTC (rev 949)
@@ -1,136 +0,0 @@
-package org.jboss.webbeans.test;
-
-import javax.webbeans.DefinitionException;
-
-import org.jboss.webbeans.bean.SimpleBean;
-import org.jboss.webbeans.test.beans.Haddock;
-import org.jboss.webbeans.test.beans.Minnow;
-import org.jboss.webbeans.test.beans.Moose;
-import org.jboss.webbeans.test.beans.RedSnapper;
-import org.jboss.webbeans.test.beans.SeaBass;
-import org.testng.annotations.Test;
-
-@SpecVersion("20081206")
-public class NameTest extends AbstractTest
-{
-
- @Test(groups="stub", expectedExceptions=DefinitionException.class) @SpecAssertion(section="2.6")
- public void testInvalidElIdentifierUsedAsWebBeanName()
- {
- assert false;
- }
-
- @Test @SpecAssertion(section="2.6.1")
- public void testNonDefaultNamed()
- {
- SimpleBean<Moose> moose = SimpleBean.of(Moose.class, manager);
- assert moose.getName().equals("aMoose");
- }
-
- @Test(groups={"stub", "webbeansxml"}) @SpecAssertion(section="2.6.2")
- public void testNonDefaultXmlNamed()
- {
- /*Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
- annotations.put(Named.class, new NamedAnnotationLiteral(){
-
- public String value()
- {
- return "aTrout";
- }
-
- });
- AnnotatedClass<SeaBass> annotatedItem = new SimpleAnnotatedClass<SeaBass>(SeaBass.class, annotations);*/
- //SimpleBean<SeaBass> trout = createSimpleBean(SeaBass.class, annotatedItem, manager);
-
- //assert trout.getName().equals("aTrout");
- assert false;
- }
-
- @Test(groups={"stub", "webbeansxml"}) @SpecAssertion(section="2.6.2")
- public void testXmlNamedOverridesJavaNamed()
- {
- /*Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
- annotations.put(Named.class, new NamedAnnotationLiteral(){
-
- public String value()
- {
- return "aTrout";
- }
-
- });
- AnnotatedClass<Cod> annotatedItem = new SimpleAnnotatedClass<Cod>(Cod.class, annotations);*/
- //SimpleBean<Cod> cod = createSimpleBean(Cod.class, annotatedItem, manager);
-
- //assert cod.getName().equals("aTrout");
- assert false;
- }
-
- @Test(groups={"stub", "webbeansxml"}) @SpecAssertion(section={"2.6.2", "2.6.3"})
- public void testJavaNamedUsedWhenNoXmlSpecified()
- {
- //Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
- //AnnotatedClass<Cod> annotatedItem = new SimpleAnnotatedClass<Cod>(Cod.class, annotations);
- //SimpleBean<Cod> cod = createSimpleBean(Cod.class, annotatedItem, manager);
-
- //assert cod.getName().equals("whitefish");
- assert false;
- }
-
- @Test @SpecAssertion(section={"2.6.3", "3.2.7"})
- public void testDefaultNamed()
- {
- SimpleBean<Haddock> haddock = SimpleBean.of(Haddock.class, manager);
- assert haddock.getName() != null;
- assert haddock.getName().equals("haddock");
- }
-
- @Test(groups={"stub", "webbeansxml"}) @SpecAssertion(section="2.6.3")
- public void testDefaultXmlNamed()
- {
- /*Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
- annotations.put(Named.class, new NamedAnnotationLiteral() {
-
- public String value()
- {
- return "";
- }
-
- });
- AnnotatedClass<SeaBass> annotatedItem = new SimpleAnnotatedClass<SeaBass>(SeaBass.class, annotations);*/
- //SimpleBean<SeaBass> trout = createSimpleBean(SeaBass.class, annotatedItem, manager);
-
- //assert trout.getName() != null;
- //assert trout.getName().equals("seaBass");
- assert false;
- }
-
- @Test @SpecAssertion(section={"2.6.3", "2.7"})
- public void testSterotypeDefaultsName()
- {
- SimpleBean<RedSnapper> model = SimpleBean.of(RedSnapper.class, manager);
- assert model.getMergedStereotypes().isBeanNameDefaulted();
- assert model.getName().equals("redSnapper");
- }
-
- @Test @SpecAssertion(section="2.6.4")
- public void testNotNamedInJava()
- {
- SimpleBean<SeaBass> model = SimpleBean.of(SeaBass.class, manager);
- assert model.getName() == null;
- }
-
- @Test @SpecAssertion(section="2.6.4")
- public void testNotNamedInXml()
- {
- SimpleBean<SeaBass> model = SimpleBean.of(SeaBass.class, manager);
- assert model.getName() == null;
- }
-
- @Test @SpecAssertion(section="2.6.4")
- public void testNotNamedInStereotype()
- {
- SimpleBean<Minnow> model = SimpleBean.of(Minnow.class, manager);
- assert model.getName() == null;
- }
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ScopeTypeTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ScopeTypeTest.java 2009-01-14 07:04:34 UTC (rev 948)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ScopeTypeTest.java 2009-01-14 07:07:21 UTC (rev 949)
@@ -1,149 +0,0 @@
-package org.jboss.webbeans.test;
-
-import javax.webbeans.ApplicationScoped;
-import javax.webbeans.DefinitionException;
-import javax.webbeans.Dependent;
-import javax.webbeans.RequestScoped;
-import javax.webbeans.manager.Bean;
-
-import org.jboss.webbeans.bean.SimpleBean;
-import org.jboss.webbeans.test.annotations.AnotherScopeType;
-import org.jboss.webbeans.test.beans.BeanWithTooManyScopeTypes;
-import org.jboss.webbeans.test.beans.Grayling;
-import org.jboss.webbeans.test.beans.Minnow;
-import org.jboss.webbeans.test.beans.Mullet;
-import org.jboss.webbeans.test.beans.Order;
-import org.jboss.webbeans.test.beans.Pollock;
-import org.jboss.webbeans.test.beans.RedSnapper;
-import org.jboss.webbeans.test.beans.SeaBass;
-import org.jboss.webbeans.test.beans.broken.Scallop;
-import org.testng.annotations.Test;
-
-@SpecVersion("20081206")
-public class ScopeTypeTest extends AbstractTest
-{
-
- @Test @SpecAssertion(section="2.4")
- public void testScopeTypesAreExtensible()
- {
- Bean<Mullet> mullet = SimpleBean.of(Mullet.class, manager);
- assert mullet.getScopeType().equals(AnotherScopeType.class);
- }
-
- @Test(groups={"stub", "annotationDefinition"}) @SpecAssertion(section="2.4.2")
- public void testScopeTypeHasCorrectTarget()
- {
- assert false;
- }
-
- @Test(groups={"stub", "annotationDefinition"}) @SpecAssertion(section="2.4.2")
- public void testScopeTypeHasCorrectRetention()
- {
- assert false;
- }
-
- @Test(groups={"stub", "annotationDefinition"}) @SpecAssertion(section="2.4.2")
- public void testScopeTypeDeclaresScopeTypeAnnotation()
- {
- assert false;
- }
-
- @Test @SpecAssertion(section="2.4.3")
- public void testScopeDeclaredInJava()
- {
- SimpleBean<SeaBass> trout = SimpleBean.of(SeaBass.class, manager);
- assert trout.getScopeType().equals(RequestScoped.class);
- }
-
- @Test(expectedExceptions=DefinitionException.class) @SpecAssertion(section="2.4.3")
- public void testTooManyScopesSpecifiedInJava()
- {
- SimpleBean.of(BeanWithTooManyScopeTypes.class, manager);
- }
-
- @Test(expectedExceptions=DefinitionException.class, groups={"stub", "webbeansxml"})
- public void testTooManyScopesSpecifiedInXml()
- {
- //Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
- //annotations.put(RequestScoped.class, new RequestScopedAnnotationLiteral());
- //annotations.put(ConversationScoped.class, new ConversationScopedAnnotationLiteral());
- //AnnotatedClass<Antelope> antelopeAnnotatedItem = new SimpleAnnotatedClass<Antelope>(Antelope.class, annotations);
- //createSimpleBean(null, antelopeAnnotatedItem, manager);
- }
-
- @Test(groups={"stub", "webbeansxml"}) @SpecAssertion(section="2.4.4")
- public void testScopeDeclaredInXml()
- {
- //Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
- //annotations.put(RequestScoped.class, new RequestScopedAnnotationLiteral());
- //AnnotatedClass<Order> annotatedItem = new SimpleAnnotatedClass<Order>(Order.class, annotations);
-
- //SimpleBean<Order> order = createSimpleBean(Order.class, annotatedItem, manager);
- //assert order.getScopeType().equals(RequestScoped.class);
- assert false;
- }
-
- @Test(groups={"stub", "webbeansxml"}) @SpecAssertion(section="2.4.4")
- public void testScopeMissingInXml()
- {
- //Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
- //AnnotatedClass<SeaBass> annotatedItem = new SimpleAnnotatedClass<SeaBass>(SeaBass.class, annotations);
-
- //SimpleBean<SeaBass> trout =createSimpleBean(SeaBass.class, annotatedItem, manager);
- //assert trout.getScopeType().equals(RequestScoped.class);
- assert false;
- }
-
- @Test(groups={"stub", "webbeansxml"}) @SpecAssertion(section="2.4.4")
- public void testScopeDeclaredInXmlOverridesJava()
- {
- //Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
- //annotations.put(ConversationScoped.class, new ConversationScopedAnnotationLiteral());
- //AnnotatedClass<SeaBass> annotatedItem = new SimpleAnnotatedClass<SeaBass>(SeaBass.class, annotations);
- //SimpleBean<SeaBass> trout = createSimpleBean(SeaBass.class, annotatedItem, manager);
- //assert trout.getScopeType().equals(ConversationScoped.class);
- assert false;
- }
-
- @Test @SpecAssertion(section="2.4.5")
- public void testDefaultScope()
- {
- SimpleBean<Order> order = SimpleBean.of(Order.class, manager);
- assert order.getScopeType().equals(Dependent.class);
- }
-
- @Test @SpecAssertion(section={"2.4.5", "2.7.2"})
- public void testScopeSpecifiedAndStereotyped()
- {
- Bean<Minnow> minnow = SimpleBean.of(Minnow.class, manager);
- assert minnow.getScopeType().equals(RequestScoped.class);
- }
-
- @Test(expectedExceptions=DefinitionException.class) @SpecAssertion(section="2.4.5")
- public void testMutipleIncompatibleScopeStereotypes()
- {
- SimpleBean.of(Scallop.class, manager);
- }
-
- @Test @SpecAssertion(section="2.4.5")
- public void testMutipleIncompatibleScopeStereotypesWithScopeSpecified()
- {
- Bean<Pollock> pollock = SimpleBean.of(Pollock.class, manager);
- assert pollock.getScopeType().equals(Dependent.class);
- }
-
- @Test @SpecAssertion(section="2.4.5")
- public void testMutipleCompatibleScopeStereotypes()
- {
- Bean<Grayling> grayling = SimpleBean.of(Grayling.class, manager);
- assert grayling.getScopeType().equals(ApplicationScoped.class);
- }
-
- @Test @SpecAssertion(section="2.7.2")
- public void testWebBeanScopeTypeOverridesStereotype()
- {
- Bean<RedSnapper> bean = SimpleBean.of(RedSnapper.class, manager);
- assert bean.getScopeType().equals(RequestScoped.class);
- }
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/TypeTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/TypeTest.java 2009-01-14 07:04:34 UTC (rev 948)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/TypeTest.java 2009-01-14 07:07:21 UTC (rev 949)
@@ -1,19 +0,0 @@
-package org.jboss.webbeans.test;
-
-import org.jboss.webbeans.bean.SimpleBean;
-import org.jboss.webbeans.test.beans.Haddock;
-import org.testng.annotations.Test;
-
-public class TypeTest extends AbstractTest
-{
-
- @Test @SpecAssertion(section="2.6.3")
- public void testDefaultNamed()
- {
- SimpleBean<Haddock> haddock = SimpleBean.of(Haddock.class, manager);
- assert haddock.getName() != null;
- assert haddock.getName().equals("haddock");
- }
-
-}
-
16 years
[webbeans-commits] Webbeans SVN: r948 - tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans.
by webbeans-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-01-14 02:04:34 -0500 (Wed, 14 Jan 2009)
New Revision: 948
Modified:
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/DependentFinalTuna.java
Log:
fixed import
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/DependentFinalTuna.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/DependentFinalTuna.java 2009-01-14 07:00:06 UTC (rev 947)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/DependentFinalTuna.java 2009-01-14 07:04:34 UTC (rev 948)
@@ -1,6 +1,6 @@
package org.jboss.webbeans.tck.impl.test.beans;
-import org.jboss.webbeans.test.annotations.AnotherDeploymentType;
+import org.jboss.webbeans.tck.impl.test.annotations.AnotherDeploymentType;
@AnotherDeploymentType
public final class DependentFinalTuna
16 years
[webbeans-commits] Webbeans SVN: r947 - doc/trunk/reference/zh-TW.
by webbeans-commits@lists.jboss.org
Author: tchuang
Date: 2009-01-14 02:00:06 -0500 (Wed, 14 Jan 2009)
New Revision: 947
Modified:
doc/trunk/reference/zh-TW/part1.po
doc/trunk/reference/zh-TW/part2.po
doc/trunk/reference/zh-TW/part3.po
doc/trunk/reference/zh-TW/part4.po
Log:
Translation updated
Modified: doc/trunk/reference/zh-TW/part1.po
===================================================================
--- doc/trunk/reference/zh-TW/part1.po 2009-01-14 06:56:59 UTC (rev 946)
+++ doc/trunk/reference/zh-TW/part1.po 2009-01-14 07:00:06 UTC (rev 947)
@@ -8,7 +8,7 @@
"Project-Id-Version: part1\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-06 11:30+0000\n"
-"PO-Revision-Date: 2009-01-13 17:04+1000\n"
+"PO-Revision-Date: 2009-01-14 12:05+1000\n"
"Last-Translator: Terry Chuang <tchuang(a)redhat.com>\n"
"Language-Team: Traditional Chinese <zh(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -173,7 +173,7 @@
"together with a new pattern, called <emphasis>binding annotations</"
"emphasis>, to wire together Web Beans, their dependencies, their "
"interceptors and decorators and their event consumers."
-msgstr ""
+msgstr "最重要的是,Web Bean 以一種 <emphasis>typesafe</emphasis> 的方式來提供了所有的這些功能。Web Bean 從不使用基於字串的識別符號(identifier)來斷定共同協作的物件如何相輔相成。雖然 XML 也是選項之一不過卻很少被使用到。取而代之,Web Bean 使用了 Java 物件模型中可使用的 typing 資訊並統合了一個稱為 <emphasis>binding annotations(綁定標記)</emphasis>的新格式,它可將 Web Bean、它們的相依性、它們的攔截器和裝飾器以及它們的事件用戶聯繫在一起。"
#. Tag: para
#: part1.xml:100
@@ -181,7 +181,7 @@
msgid ""
"The Web Beans services are general and apply to the following types of "
"components that exist in the Java EE environment:"
-msgstr ""
+msgstr "Web Bean 服務為通用的並且適用於下列位於 Java EE 環境中的元件類型:"
#. Tag: para
#: part1.xml:105
@@ -209,7 +209,7 @@
"of components defined by future Java EE specifications or by non-standard "
"frameworks may be cleanly integrated with Web Beans, take advantage of the "
"Web Beans services, and interact with any other kind of Web Bean."
-msgstr ""
+msgstr "Web Bean 甚至提供了必要的整合點來讓未來 Java EE 規格或是非標準架構所定義的其它類型元件能夠利落地與 Web Bean 整合、有效利用 Web Bean 服務,並與任何其它類型的 Web Bean 進行互動。"
#. Tag: para
#: part1.xml:120
@@ -219,7 +219,7 @@
"Seam, Guice and Spring. However, Web Beans has its own very distinct "
"character: more typesafe than Seam, more stateful and less XML-centric than "
"Spring, more web and enterprise-application capable than Guice."
-msgstr ""
+msgstr "Web Bean 受到了幾個現有的 Java framework(包括 Seam、Guice 以及 Spring)的影響。不過,Web Bean 擁有它自己獨特的特性:比 Seam 還要完善的 typesafe、比 Spring 更 stateful 而沒有那麼地以 XML 為中心,並且針對於網站和企業級的應用程式上的處理能力比 Guice 完善。"
#. Tag: para
#: part1.xml:125
@@ -228,5 +228,5 @@
"Most importantly, Web Beans is a JCP standard that integrates cleanly with "
"Java EE, and with any Java SE environment where embeddable EJB Lite is "
"available."
-msgstr ""
+msgstr "最重要的是,Web Bean 是一個能與 Java EE 以及可使用崁入式的 EJB Lite 的任何 Java SE 環境整合的 JCP 標準。"
Modified: doc/trunk/reference/zh-TW/part2.po
===================================================================
--- doc/trunk/reference/zh-TW/part2.po 2009-01-14 06:56:59 UTC (rev 946)
+++ doc/trunk/reference/zh-TW/part2.po 2009-01-14 07:00:06 UTC (rev 947)
@@ -8,7 +8,7 @@
"Project-Id-Version: part2\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-06 11:30+0000\n"
-"PO-Revision-Date: 2009-01-13 15:46+1000\n"
+"PO-Revision-Date: 2009-01-14 12:31+1000\n"
"Last-Translator: Terry Chuang <tchuang(a)redhat.com>\n"
"Language-Team: Traditional Chinese <zh(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -22,19 +22,19 @@
msgid ""
"The first major theme of Web Beans is <emphasis>loose coupling</emphasis>. "
"We've already seen three means of achieving loose coupling:"
-msgstr "Web Bean 的第一個重點就是 <emphasis>loose coupling</emphasis>。我們已經看過了三種達成 loose coupling 的方式。"
+msgstr "Web Bean 的第一個重點就是 <emphasis>loose coupling(鬆散結合性)</emphasis>。我們已經看過了三種 loose coupling 的方式:"
#. Tag: para
#: part2.xml:10
#, no-c-format
msgid "<emphasis>deployment types</emphasis> enable deployment time polymorphism,"
-msgstr ""
+msgstr "<emphasis>deployment types(建置類型)</emphasis>可啟用建置時間多型性(deployment time polymorphism)、"
#. Tag: para
#: part2.xml:14
#, no-c-format
msgid "<emphasis>producer methods</emphasis> enable runtime polymorphism, and"
-msgstr ""
+msgstr "<emphasis>producer methods</emphasis> 可啟用 runtime Polymorphism(執行期多型性),以及"
#. Tag: para
#: part2.xml:18
@@ -42,7 +42,7 @@
msgid ""
"<emphasis>contextual lifecycle management</emphasis> decouples Web Bean "
"lifecycles."
-msgstr ""
+msgstr "<emphasis>contextual lifecycle management</emphasis> 可 decouple Web Bean 的生命週期。"
#. Tag: para
#: part2.xml:23
@@ -52,7 +52,7 @@
"client is no longer tightly bound to an implementation of an API, nor is it "
"required to manage the lifecycle of the server object. This approach lets "
"<emphasis>stateful objects interact as if they were services</emphasis>."
-msgstr ""
+msgstr "這些技巧都可用來啟用客戶端以及伺服器的 loose coupling。客戶端已不再固定綁定至一個特定 API 的實做,並且它亦無須管理伺服器物件的生命週期。這個方法能讓<emphasis>有狀態的物件被視為服務一般地來進行互動</emphasis>。"
#. Tag: para
#: part2.xml:28
@@ -63,7 +63,7 @@
"attempted to provide the facilities listed above invariably did it by "
"sacrificing type safety. Web Beans is the first technology that achieves "
"this level of loose coupling in a typesafe way."
-msgstr ""
+msgstr "Loose coupling 會使系統變得更加<emphasis>動態式</emphasis>。系統可透過充足定義的方式來回應變更。過去,有許多 framework 嘗試了提供以上所列出的功能,不過卻都是藉由犧牲了 type safety 來達成的。Web Bean 是第一個以 typesafe 的方式來實現此層級的 loose coupling 的技術。"
#. Tag: para
#: part2.xml:34
@@ -71,7 +71,7 @@
msgid ""
"Web Beans provides three extra important facilities that further the goal of "
"loose coupling:"
-msgstr ""
+msgstr "Web Bean 提供了三個額外的重要功能以用來達成 loose coupling:"
#. Tag: para
#: part2.xml:39
@@ -79,7 +79,7 @@
msgid ""
"<emphasis>interceptors</emphasis> decouple technical concerns from business "
"logic,"
-msgstr ""
+msgstr "<emphasis>interceptors(攔截器)</emphasis>可區分技術問題與商業邏輯,"
#. Tag: para
#: part2.xml:43
@@ -87,7 +87,7 @@
msgid ""
"<emphasis>decorators</emphasis> may be used to decouple some business "
"concerns, and"
-msgstr ""
+msgstr "<emphasis>decorators(裝飾器)</emphasis>可被用來區分一些商業問題,並且"
#. Tag: para
#: part2.xml:47
@@ -96,10 +96,12 @@
"<emphasis>event notifications</emphasis> decouple event producers from event "
"consumers."
msgstr ""
+"<emphasis>event notifications(事件通知)</emphasis>可區分事件產生器(event producer)與事件用戶(event "
+"consumer)。"
#. Tag: para
#: part2.xml:52
#, no-c-format
msgid "Let's explore interceptors first."
-msgstr ""
+msgstr "讓我們先來探討攔截器(interceptor)。"
Modified: doc/trunk/reference/zh-TW/part3.po
===================================================================
--- doc/trunk/reference/zh-TW/part3.po 2009-01-14 06:56:59 UTC (rev 946)
+++ doc/trunk/reference/zh-TW/part3.po 2009-01-14 07:00:06 UTC (rev 947)
@@ -1,17 +1,20 @@
+# translation of part3.po to Traditional Chinese
# Language zh-TW translations for Introduction_to_Web_Beans package.
+#
# Automatically generated, 2009.
-#
+# Terry Chuang <tchuang(a)redhat.com>, 2009.
msgid ""
msgstr ""
-"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Project-Id-Version: part3\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-06 11:30+0000\n"
-"PO-Revision-Date: 2009-01-06 11:30+0000\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: none\n"
+"PO-Revision-Date: 2009-01-14 16:07+1000\n"
+"Last-Translator: Terry Chuang <tchuang(a)redhat.com>\n"
+"Language-Team: Traditional Chinese <zh(a)li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
#. Tag: para
#: part3.xml:5
@@ -21,7 +24,7 @@
"The information about the dependencies, interceptors and decorators of a Web "
"Bean, and the information about event consumers for an event producer, is "
"contained in typesafe Java constructs that may be validated by the compiler."
-msgstr ""
+msgstr "Web Bean 的第二個重點就是 <emphasis>strong typing(強類型)</emphasis>。有關於 Web Bean 的相依性、攔截器與裝飾器的相關資訊,以及有關於某個事件產生器的事件用戶的相關資訊都包含在編譯器可驗證的 typesafe Java 架構中。"
#. Tag: para
#: part3.xml:10
@@ -31,7 +34,7 @@
"framework is hiding them from you using clever defaulting rules—so-"
"called \"configuration by convention\"—but because there are simply no "
"strings there to begin with!"
-msgstr ""
+msgstr "您在 Web Bean 的程式碼中不會看見基於字串的識別符號,這不是因為 framework 透過使用預設的規則來將它隱藏起來—又稱為「configuration by convention」—而是因為一開始根本就沒有任何字串!"
#. Tag: para
#: part3.xml:15
@@ -43,7 +46,7 @@
"It turns out that when you start thinking of identifying objects, events or "
"interceptors via annotations instead of names, you have an opportunity to "
"lift the semantic level of your code."
-msgstr ""
+msgstr "這個作法明顯的好處就是<emphasis>任何</emphasis> IDE 都可在不使用特殊工具的情況下提供自動完成(autocompletion)、驗證(validation)和重整(refactoring)。還有一個較沒那麼明顯且直接的好處。當您希望透過標記來識別物件、事件或是攔截器而不是透過名稱時,您可提昇您程式碼的語意層級(semantic level)。"
#. Tag: para
#: part3.xml:21
@@ -51,61 +54,61 @@
msgid ""
"Web Beans encourages you develop annotations that model concepts, for "
"example,"
-msgstr ""
+msgstr "Web Bean 鼓勵您使用塑造概念的標記,例如"
#. Tag: para
#: part3.xml:26
#, no-c-format
msgid "<literal>@Asynchronous</literal>,"
-msgstr ""
+msgstr "<literal>@Asynchronous</literal>、"
#. Tag: para
#: part3.xml:29
#, no-c-format
msgid "<literal>@Mock</literal>,"
-msgstr ""
+msgstr "<literal>@Mock</literal>、"
#. Tag: para
#: part3.xml:32
#, no-c-format
msgid "<literal>@Secure</literal> or"
-msgstr ""
+msgstr "<literal>@Secure</literal> 或"
#. Tag: para
#: part3.xml:35
#, no-c-format
msgid "<literal>@Updated</literal>,"
-msgstr ""
+msgstr "<literal>@Updated</literal>、"
#. Tag: para
#: part3.xml:39
#, no-c-format
msgid "instead of using compound names like"
-msgstr ""
+msgstr "而不是使用像是"
#. Tag: para
#: part3.xml:43
#, no-c-format
msgid "<literal>asyncPaymentProcessor</literal>,"
-msgstr ""
+msgstr "<literal>asyncPaymentProcessor</literal>、"
#. Tag: para
#: part3.xml:46
#, no-c-format
msgid "<literal>mockPaymentProcessor</literal>,"
-msgstr ""
+msgstr "<literal>mockPaymentProcessor</literal>、"
#. Tag: para
#: part3.xml:49
#, no-c-format
msgid "<literal>SecurityInterceptor</literal> or"
-msgstr ""
+msgstr "<literal>SecurityInterceptor</literal> 或是"
#. Tag: para
#: part3.xml:52
#, no-c-format
msgid "<literal>DocumentUpdatedEvent</literal>."
-msgstr ""
+msgstr "<literal>DocumentUpdatedEvent</literal> 的複合式名稱。"
#. Tag: para
#: part3.xml:56
@@ -115,7 +118,7 @@
"disparate parts of the system. They help us categorize and understand our "
"code. They help us deal with common concerns in a common way. They make our "
"code more literate and more understandable."
-msgstr ""
+msgstr "這些標記可重複使用。它們協助描述系統不同部份的通用要點(common qualities)。它們協助我們分類和理解我們的程式碼。它們協助我們利用通用的方式來處理一般的問題。它們讓我們的程式碼變得更文字化且更容易理解。"
#. Tag: para
#: part3.xml:61
@@ -126,7 +129,7 @@
"architecture. It encapsulates various properties of the role, including "
"scope, interceptor bindings, deployment type, etc, into a single reusable "
"package."
-msgstr ""
+msgstr "Web Bean <emphasis>stereotype</emphasis> 將這個概念帶領到了另一個更為進階的領域。固定刻板模式(stereotype model)是您應用程式架構中的一個通用<emphasis>角色(role)</emphasis>。它將該角色的各種屬性(包括 scope、攔截器綁定〔interceptor binding〕,建置類型〔deployment type〕等等)壓縮進了一個單獨、可重複使用的套件中。"
#. Tag: para
#: part3.xml:66
@@ -136,7 +139,7 @@
"so Web Beans takes advantage of XML schemas to validate the Java types and "
"attributes that appear in XML. This approach turns out to make the XML more "
"literate, just like annotations made our Java code more literate."
-msgstr ""
+msgstr "就連 Web Bean XML 的 metadata 也屬於強類型!XML 沒有編譯器,因此 Web Bean 利用了 XML schema 來驗證出現在 XML 中的 Java 類型和屬性。這個方法使得 XML 變得更文字化,就和標記使得我們的 Java 程式碼變得更容易理解一樣。"
#. Tag: para
#: part3.xml:71
@@ -147,4 +150,5 @@
"more understandable. Most of the time you don't ever really <emphasis>need</"
"emphasis> to use these features, but if you use them wisely, you'll come to "
"appreciate their power."
-msgstr ""
+msgstr "我們現在已準備好談到一些更為進階的 Web Bean 功能。請記得,這些功能是為了使我們的程式碼變得易於驗證和較容易理解。實際上大部分的時候您都不會真的<emphasis>需要</emphasis>使用到這些功能,不過若您可有效地利用這些功能的話,您將可體會到這些功能的強大。"
+
Modified: doc/trunk/reference/zh-TW/part4.po
===================================================================
--- doc/trunk/reference/zh-TW/part4.po 2009-01-14 06:56:59 UTC (rev 946)
+++ doc/trunk/reference/zh-TW/part4.po 2009-01-14 07:00:06 UTC (rev 947)
@@ -1,17 +1,20 @@
+# translation of part4.po to Traditional Chinese
# Language zh-TW translations for Introduction_to_Web_Beans package.
+#
# Automatically generated, 2009.
-#
+# Terry Chuang <tchuang(a)redhat.com>, 2009.
msgid ""
msgstr ""
-"Project-Id-Version: Introduction_to_Web_Beans VERSION\n"
+"Project-Id-Version: part4\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-06 11:30+0000\n"
-"PO-Revision-Date: 2009-01-06 11:30+0000\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: none\n"
+"PO-Revision-Date: 2009-01-14 16:59+1000\n"
+"Last-Translator: Terry Chuang <tchuang(a)redhat.com>\n"
+"Language-Team: Traditional Chinese <zh(a)li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
#. Tag: para
#: part4.xml:5
@@ -23,7 +26,7 @@
"open technology. It forms a part of the Java EE ecosystem, and is itself the "
"foundation for a new ecosystem of portable extensions and integration with "
"existing frameworks and technologies."
-msgstr ""
+msgstr "Web Bean 的第三個主題為 <emphasis>integration(整合性)</emphasis>。Web Bean 本身就是設計來與其它技術整合用的,它可協助應用程式開發員將不同的技術統合在一起。Web Bean 是個開放式技術。它形成了 Java EE 生態系統的一部分,並且它本身身為一個 portable extension 的新生態系統基礎,同時也是和現有 framework 和技術整合上的一個根本。"
#. Tag: para
#: part4.xml:12
@@ -37,7 +40,7 @@
"interesting technologies that are used in the world of Java application "
"development, but Web Beans makes it easier to use the technologies which are "
"not yet part of the platform seamlessly within the Java EE environment."
-msgstr ""
+msgstr "我們已經看到了 Web Bean 如何協助整合 EJB 與 JSF,它讓 EJB 能夠直接地綁定至 JSF 頁面。那僅是一開始而已。Web Bean 也提供了能夠使其它技術(例如商業流程管理、其它網站 Framework 以及第三方元件模型)變得多變化的功能。Java EE 平台永遠也無法標準化全部使用於 Java 應用程式開發領域中的技術,不過 Web Bean 能使得在 Java EE 環境下使用還未屬於該平台的技術變得更為容易。"
#. Tag: para
#: part4.xml:21
@@ -49,4 +52,5 @@
"need to use these SPIs directly, but it's nice to know they are there if you "
"need them. Most importantly, you'll take advantage of them indirectly, every "
"time you use a third-party extension."
-msgstr ""
+msgstr "我們正要探討如何在一個使用 Web Bean 的應用程式中有效地利用 Java EE 平台。我們也將簡短地探討一組提供來讓 Web Bean 支援 portable extension 的 SPI。您可能永遠也不會需要直接使用到這些 SPI,不過知道它們的存在以備不時之需總是較好的。最重要的是,每當您使用第三方的 extension 時,您便會間接地利用到它們。"
+
16 years
[webbeans-commits] Webbeans SVN: r946 - in tck/trunk: impl/src/main/java/org/jboss/webbeans/tck/impl/test/annotations and 4 other directories.
by webbeans-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-01-14 01:56:59 -0500 (Wed, 14 Jan 2009)
New Revision: 946
Added:
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/annotations/AnotherScopeType.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/annotations/FishStereotype.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/annotations/HornedMammalStereotype.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/annotations/MammalStereotype.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/annotations/RiverFishStereotype.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/BeanWithTooManyScopeTypes.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/Grayling.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/Haddock.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/Minnow.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/Moose.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/Mullet.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/Pollock.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/Reindeer.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/Rhinoceros.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/SeaBass.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/broken/
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/broken/BeanWithTooManyDeploymentTypes.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/broken/Gazelle.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/broken/Scallop.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/DefaultDeploymentTypeTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/DeploymentTypeTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/NameTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/ScopeTypeTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/TypeTest.java
Modified:
tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/Beans.java
tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/Managers.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/AbstractTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/CommonWebBeanTest.java
Log:
More chapter 2 tests
Modified: tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/Beans.java
===================================================================
--- tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/Beans.java 2009-01-14 06:33:46 UTC (rev 945)
+++ tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/Beans.java 2009-01-14 06:56:59 UTC (rev 946)
@@ -1,6 +1,8 @@
package org.jboss.webbeans.tck.api;
+import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
+import java.util.Set;
import javax.webbeans.manager.Bean;
@@ -57,4 +59,29 @@
*/
public <T> Bean<T> createProducerMethodBean(Method method, Bean<?> declaringBean);
+ /**
+ *
+ * @param bean
+ * @return
+ */
+ boolean isBeanNameDefaulted(Bean<?> bean);
+
+ /**
+ *
+ * @param bean
+ * @return
+ */
+ Set<Class<?>> getRequiredTypes(Bean<?> bean);
+
+ /**
+ *
+ * @return
+ */
+ Set<Class<? extends Annotation>> getSupportedScopes(Bean<?> bean);
+
+ /**
+ *
+ * @return
+ */
+ Set<Annotation> getBindings(Bean<?> bean);
}
Modified: tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/Managers.java
===================================================================
--- tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/Managers.java 2009-01-14 06:33:46 UTC (rev 945)
+++ tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/Managers.java 2009-01-14 06:56:59 UTC (rev 946)
@@ -25,6 +25,13 @@
void setEnabledDeploymentTypes(List<Class<? extends Annotation>> enabledDeploymentTypes);
/**
+ * Returns a list of the enabled deployment types for the current manager
+ *
+ * @return
+ */
+ List<Class<? extends Annotation>> getEnabledDeploymentTypes();
+
+ /**
* Get a new Manager instance
*
* @return the Manager
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/annotations/AnotherScopeType.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/annotations/AnotherScopeType.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/annotations/AnotherScopeType.java 2009-01-14 06:56:59 UTC (rev 946)
@@ -0,0 +1,20 @@
+package org.jboss.webbeans.tck.impl.test.annotations;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.webbeans.ScopeType;
+
+@Target( { TYPE, METHOD })
+@Retention(RUNTIME)
+@Documented
+@ScopeType
+public @interface AnotherScopeType
+{
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/annotations/FishStereotype.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/annotations/FishStereotype.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/annotations/FishStereotype.java 2009-01-14 06:56:59 UTC (rev 946)
@@ -0,0 +1,23 @@
+package org.jboss.webbeans.tck.impl.test.annotations;
+
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.webbeans.ApplicationScoped;
+import javax.webbeans.Named;
+import javax.webbeans.Stereotype;
+
+import org.jboss.webbeans.tck.impl.test.beans.Animal;
+
+(a)Stereotype(requiredTypes=Animal.class)
+@Target( { TYPE })
+@Retention(RUNTIME)
+@ApplicationScoped
+@Named
+public @interface FishStereotype
+{
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/annotations/HornedMammalStereotype.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/annotations/HornedMammalStereotype.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/annotations/HornedMammalStereotype.java 2009-01-14 06:56:59 UTC (rev 946)
@@ -0,0 +1,20 @@
+package org.jboss.webbeans.tck.impl.test.annotations;
+
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.webbeans.Stereotype;
+
+import org.jboss.webbeans.tck.impl.test.beans.Animal;
+
+(a)Stereotype(requiredTypes=Animal.class)
+@Target( { TYPE })
+@Retention(RUNTIME)
+@HornedAnimalDeploymentType
+public @interface HornedMammalStereotype
+{
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/annotations/MammalStereotype.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/annotations/MammalStereotype.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/annotations/MammalStereotype.java 2009-01-14 06:56:59 UTC (rev 946)
@@ -0,0 +1,20 @@
+package org.jboss.webbeans.tck.impl.test.annotations;
+
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.webbeans.Stereotype;
+
+import org.jboss.webbeans.tck.impl.test.beans.Animal;
+
+(a)Stereotype(requiredTypes=Animal.class)
+@Target( { TYPE })
+@Retention(RUNTIME)
+@AnotherDeploymentType
+public @interface MammalStereotype
+{
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/annotations/RiverFishStereotype.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/annotations/RiverFishStereotype.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/annotations/RiverFishStereotype.java 2009-01-14 06:56:59 UTC (rev 946)
@@ -0,0 +1,21 @@
+package org.jboss.webbeans.tck.impl.test.annotations;
+
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.webbeans.ApplicationScoped;
+import javax.webbeans.Stereotype;
+
+import org.jboss.webbeans.tck.impl.test.beans.Animal;
+
+(a)Stereotype(requiredTypes=Animal.class)
+@Target( { TYPE })
+@Retention(RUNTIME)
+@ApplicationScoped
+public @interface RiverFishStereotype
+{
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/BeanWithTooManyScopeTypes.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/BeanWithTooManyScopeTypes.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/BeanWithTooManyScopeTypes.java 2009-01-14 06:56:59 UTC (rev 946)
@@ -0,0 +1,11 @@
+package org.jboss.webbeans.tck.impl.test.beans;
+
+import javax.webbeans.ConversationScoped;
+import javax.webbeans.RequestScoped;
+
+@RequestScoped
+@ConversationScoped
+public class BeanWithTooManyScopeTypes
+{
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/Grayling.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/Grayling.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/Grayling.java 2009-01-14 06:56:59 UTC (rev 946)
@@ -0,0 +1,11 @@
+package org.jboss.webbeans.tck.impl.test.beans;
+
+import org.jboss.webbeans.tck.impl.test.annotations.FishStereotype;
+import org.jboss.webbeans.tck.impl.test.annotations.RiverFishStereotype;
+
+@RiverFishStereotype
+@FishStereotype
+public class Grayling implements Animal
+{
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/Haddock.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/Haddock.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/Haddock.java 2009-01-14 06:56:59 UTC (rev 946)
@@ -0,0 +1,11 @@
+package org.jboss.webbeans.tck.impl.test.beans;
+
+import javax.webbeans.Named;
+import javax.webbeans.Production;
+
+@Production
+@Named
+public class Haddock implements Animal
+{
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/Minnow.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/Minnow.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/Minnow.java 2009-01-14 06:56:59 UTC (rev 946)
@@ -0,0 +1,12 @@
+package org.jboss.webbeans.tck.impl.test.beans;
+
+import javax.webbeans.RequestScoped;
+
+import org.jboss.webbeans.tck.impl.test.annotations.RiverFishStereotype;
+
+@RiverFishStereotype
+@RequestScoped
+public class Minnow implements Animal
+{
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/Moose.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/Moose.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/Moose.java 2009-01-14 06:56:59 UTC (rev 946)
@@ -0,0 +1,12 @@
+package org.jboss.webbeans.tck.impl.test.beans;
+
+import javax.webbeans.Named;
+
+import org.jboss.webbeans.tck.impl.test.annotations.MammalStereotype;
+
+@MammalStereotype
+@Named("aMoose")
+public class Moose implements Animal
+{
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/Mullet.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/Mullet.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/Mullet.java 2009-01-14 06:56:59 UTC (rev 946)
@@ -0,0 +1,9 @@
+package org.jboss.webbeans.tck.impl.test.beans;
+
+import org.jboss.webbeans.tck.impl.test.annotations.AnotherScopeType;
+
+@AnotherScopeType
+public class Mullet
+{
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/Pollock.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/Pollock.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/Pollock.java 2009-01-14 06:56:59 UTC (rev 946)
@@ -0,0 +1,14 @@
+package org.jboss.webbeans.tck.impl.test.beans;
+
+import javax.webbeans.Dependent;
+
+import org.jboss.webbeans.tck.impl.test.annotations.AnimalStereotype;
+import org.jboss.webbeans.tck.impl.test.annotations.FishStereotype;
+
+@AnimalStereotype
+@FishStereotype
+@Dependent
+public class Pollock implements Animal
+{
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/Reindeer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/Reindeer.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/Reindeer.java 2009-01-14 06:56:59 UTC (rev 946)
@@ -0,0 +1,12 @@
+package org.jboss.webbeans.tck.impl.test.beans;
+
+import javax.webbeans.Production;
+
+import org.jboss.webbeans.tck.impl.test.annotations.HornedMammalStereotype;
+
+@HornedMammalStereotype
+@Production
+public class Reindeer implements Animal
+{
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/Rhinoceros.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/Rhinoceros.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/Rhinoceros.java 2009-01-14 06:56:59 UTC (rev 946)
@@ -0,0 +1,11 @@
+package org.jboss.webbeans.tck.impl.test.beans;
+
+import org.jboss.webbeans.tck.impl.test.annotations.HornedMammalStereotype;
+import org.jboss.webbeans.tck.impl.test.annotations.MammalStereotype;
+
+@HornedMammalStereotype
+@MammalStereotype
+public class Rhinoceros implements Animal
+{
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/SeaBass.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/SeaBass.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/SeaBass.java 2009-01-14 06:56:59 UTC (rev 946)
@@ -0,0 +1,11 @@
+package org.jboss.webbeans.tck.impl.test.beans;
+
+import javax.webbeans.Production;
+import javax.webbeans.RequestScoped;
+
+@Production
+@RequestScoped
+public class SeaBass implements Animal
+{
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/broken/BeanWithTooManyDeploymentTypes.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/broken/BeanWithTooManyDeploymentTypes.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/broken/BeanWithTooManyDeploymentTypes.java 2009-01-14 06:56:59 UTC (rev 946)
@@ -0,0 +1,12 @@
+package org.jboss.webbeans.tck.impl.test.beans.broken;
+
+import javax.webbeans.Production;
+
+import org.jboss.webbeans.tck.impl.test.annotations.AnotherDeploymentType;
+
+@Production
+@AnotherDeploymentType
+public class BeanWithTooManyDeploymentTypes
+{
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/broken/Gazelle.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/broken/Gazelle.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/broken/Gazelle.java 2009-01-14 06:56:59 UTC (rev 946)
@@ -0,0 +1,9 @@
+package org.jboss.webbeans.tck.impl.test.beans.broken;
+
+import javax.webbeans.Standard;
+
+@Standard
+public class Gazelle
+{
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/broken/Scallop.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/broken/Scallop.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/broken/Scallop.java 2009-01-14 06:56:59 UTC (rev 946)
@@ -0,0 +1,11 @@
+package org.jboss.webbeans.tck.impl.test.beans.broken;
+
+import org.jboss.webbeans.tck.impl.test.annotations.AnimalStereotype;
+import org.jboss.webbeans.tck.impl.test.annotations.FishStereotype;
+
+@AnimalStereotype
+@FishStereotype
+public class Scallop
+{
+
+}
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/AbstractTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/AbstractTest.java 2009-01-14 06:33:46 UTC (rev 945)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/AbstractTest.java 2009-01-14 06:56:59 UTC (rev 946)
@@ -14,8 +14,10 @@
import javax.webbeans.manager.Bean;
import javax.webbeans.manager.Manager;
+import org.jboss.webbeans.tck.impl.TckUtils;
import org.jboss.webbeans.tck.impl.WebBeansTCKImpl;
import org.jboss.webbeans.tck.impl.test.annotations.AnotherDeploymentType;
+import org.jboss.webbeans.tck.impl.test.annotations.HornedAnimalDeploymentType;
import org.testng.annotations.BeforeMethod;
public class AbstractTest
@@ -70,13 +72,13 @@
}
*/
- /*
+
@SuppressWarnings("unchecked")
protected void addStandardDeploymentTypesForTests()
{
- manager.setEnabledDeploymentTypes(Arrays.asList(Standard.class, Production.class, AnotherDeploymentType.class, HornedAnimalDeploymentType.class));
+ TckUtils.getManagers().setEnabledDeploymentTypes(Arrays.asList(Standard.class, Production.class, AnotherDeploymentType.class, HornedAnimalDeploymentType.class));
}
-
+/*
protected <T> void addToEjbCache(Class<T> clazz)
{
manager.getEjbDescriptorCache().add(new MockEjbDescriptor<T>(clazz));
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/CommonWebBeanTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/CommonWebBeanTest.java 2009-01-14 06:33:46 UTC (rev 945)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/CommonWebBeanTest.java 2009-01-14 06:56:59 UTC (rev 946)
@@ -8,6 +8,7 @@
import org.jboss.webbeans.tck.impl.SpecAssertion;
import org.jboss.webbeans.tck.impl.SpecVersion;
+import org.jboss.webbeans.tck.impl.TckUtils;
import org.jboss.webbeans.tck.impl.test.beans.Animal;
import org.jboss.webbeans.tck.impl.test.beans.DeadlyAnimal;
import org.jboss.webbeans.tck.impl.test.beans.DeadlySpider;
@@ -42,7 +43,7 @@
public void testBindingTypesNonEmpty()
{
Bean<?> model = getSimpleBean(RedSnapper.class);
- assert model.getBindings().size() > 0;
+ assert TckUtils.getBeans().getBindings(model).size() > 0;
}
@Test @SpecAssertion(section="2")
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/DefaultDeploymentTypeTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/DefaultDeploymentTypeTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/DefaultDeploymentTypeTest.java 2009-01-14 06:56:59 UTC (rev 946)
@@ -0,0 +1,29 @@
+package org.jboss.webbeans.tck.tests.definition;
+
+import javax.webbeans.Production;
+import javax.webbeans.Standard;
+
+import org.jboss.webbeans.tck.impl.SpecAssertion;
+import org.jboss.webbeans.tck.impl.TckUtils;
+import org.jboss.webbeans.tck.tests.AbstractTest;
+import org.testng.annotations.Test;
+
+
+public class DefaultDeploymentTypeTest extends AbstractTest
+{
+
+ @Override
+ protected void addStandardDeploymentTypesForTests()
+ {
+ // No-op
+ }
+
+ @Test @SpecAssertion(section={"2.5.6", "2.5.7"})
+ public void testDefaultEnabledDeploymentTypes()
+ {
+ assert TckUtils.getManagers().getEnabledDeploymentTypes().size() == 2;
+ assert TckUtils.getManagers().getEnabledDeploymentTypes().get(0).equals(Standard.class);
+ assert TckUtils.getManagers().getEnabledDeploymentTypes().get(1).equals(Production.class);
+ }
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/DeploymentTypeTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/DeploymentTypeTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/DeploymentTypeTest.java 2009-01-14 06:56:59 UTC (rev 946)
@@ -0,0 +1,158 @@
+package org.jboss.webbeans.tck.tests.definition;
+
+import java.lang.reflect.Method;
+import java.util.Arrays;
+
+import javax.webbeans.DefinitionException;
+import javax.webbeans.DeploymentException;
+import javax.webbeans.Production;
+import javax.webbeans.Standard;
+import javax.webbeans.UnsatisfiedDependencyException;
+import javax.webbeans.manager.Bean;
+
+import org.jboss.webbeans.tck.impl.SpecAssertion;
+import org.jboss.webbeans.tck.impl.SpecVersion;
+import org.jboss.webbeans.tck.impl.TckUtils;
+import org.jboss.webbeans.tck.impl.test.annotations.AnotherDeploymentType;
+import org.jboss.webbeans.tck.impl.test.annotations.HornedAnimalDeploymentType;
+import org.jboss.webbeans.tck.impl.test.beans.BlackWidow;
+import org.jboss.webbeans.tck.impl.test.beans.RedSnapper;
+import org.jboss.webbeans.tck.impl.test.beans.Reindeer;
+import org.jboss.webbeans.tck.impl.test.beans.Rhinoceros;
+import org.jboss.webbeans.tck.impl.test.beans.SpiderProducer;
+import org.jboss.webbeans.tck.impl.test.beans.broken.BeanWithTooManyDeploymentTypes;
+import org.jboss.webbeans.tck.impl.test.beans.broken.Gazelle;
+import org.jboss.webbeans.tck.tests.AbstractTest;
+import org.testng.annotations.Test;
+
+@SpecVersion("20081206")
+public class DeploymentTypeTest extends AbstractTest
+{
+
+ @Test(expectedExceptions=DefinitionException.class) @SpecAssertion(section="2.5.1")
+ public void testNonBuiltInComponentUsesStandard()
+ {
+ getSimpleBean(Gazelle.class);
+ }
+
+ @Test(groups={"stub", "annotationDefinition"}) @SpecAssertion(section="2.5.2")
+ public void testDeploymentTypeHasCorrectTarget()
+ {
+ assert false;
+ }
+
+ @Test(groups={"stub", "annotationDefinition"}) @SpecAssertion(section="2.5.2")
+ public void testDeploymentTypeHasCorrectRetention()
+ {
+ assert false;
+ }
+
+ @Test(groups={"stub", "annotationDefinition"}) @SpecAssertion(section="2.5.2")
+ public void testDeploymentTypeDeclaresScopeTypeAnnotation()
+ {
+ assert false;
+ }
+
+ @Test(expectedExceptions=DefinitionException.class) @SpecAssertion(section="2.5.3")
+ public void testTooManyDeploymentTypes()
+ {
+ getSimpleBean(BeanWithTooManyDeploymentTypes.class);
+ }
+
+ @SuppressWarnings("unchecked")
+ @Test @SpecAssertion(section="2.5.3")
+ public void testDeploymentTypeInhertitedFromDeclaringBean() throws Exception
+ {
+ Bean<SpiderProducer> bean = getSimpleBean(SpiderProducer.class);
+ manager.addBean(bean);
+ Method method = SpiderProducer.class.getMethod("produceBlackWidow");
+ Bean<BlackWidow> blackWidowSpiderModel = (Bean<BlackWidow>) getProducerMethodBean(method, bean);
+ assert blackWidowSpiderModel.getDeploymentType().equals(AnotherDeploymentType.class);
+ }
+
+ @Test(groups={"stub", "webbeansxml"}) @SpecAssertion(section="2.5.4")
+ public void testXmlDeploymentTypeOverridesJava()
+ {
+ //Map<Class<? extends Annotation>, Annotation> xmlDefinedDeploymentTypeAnnotations = new HashMap<Class<? extends Annotation>, Annotation>();
+ //xmlDefinedDeploymentTypeAnnotations.put(AnotherDeploymentType.class, new AnotherDeploymentTypeAnnotationLiteral());
+ //AnnotatedClass<BeanWithTooManyDeploymentTypes> xmlDefinedDeploymentTypeAnnotatedItem = new SimpleAnnotatedClass<BeanWithTooManyDeploymentTypes>(BeanWithTooManyDeploymentTypes.class, xmlDefinedDeploymentTypeAnnotations);
+
+ //SimpleBean<BeanWithTooManyDeploymentTypes> model = createSimpleBean(BeanWithTooManyDeploymentTypes.class, xmlDefinedDeploymentTypeAnnotatedItem, manager);
+ //assert model.getDeploymentType().equals(AnotherDeploymentType.class);
+ assert false;
+ }
+
+
+
+ @Test(groups={"stub", "webbeansxml"}) @SpecAssertion(section="2.5.4")
+ public void testXmlRespectsJavaDeploymentType()
+ {
+ //AnnotatedClass<Tuna> annotatedItem = new SimpleAnnotatedClass<Tuna>(Tuna.class, new HashMap<Class<? extends Annotation>, Annotation>());
+ //SimpleBean<Tuna> tuna = createSimpleBean(Tuna.class, annotatedItem, manager);
+ //assert tuna.getDeploymentType().equals(AnotherDeploymentType.class);
+ assert false;
+ }
+
+ @Test(groups={"stub", "webbeansxml"}) @SpecAssertion(section="2.5.5")
+ public void testXmlDefaultDeploymentType()
+ {
+ //AnnotatedClass<Antelope> antelopeAnnotatedItem = new SimpleAnnotatedClass<Antelope>(Antelope.class, new HashMap<Class<? extends Annotation>, Annotation>());
+ //SimpleBean<Antelope> antelope = createSimpleBean(Antelope.class, antelopeAnnotatedItem, manager);
+ // assert antelope.getDeploymentType().equals(Production.class);
+ assert false;
+ }
+
+ @Test @SpecAssertion(section="2.5.5")
+ public void testHighestPrecedenceDeploymentTypeFromStereotype()
+ {
+ Bean<?> bean = getSimpleBean(Rhinoceros.class);
+ assert bean.getDeploymentType().equals(HornedAnimalDeploymentType.class);
+ }
+
+ @SuppressWarnings("unchecked")
+ @Test(groups="beanLifecycle", expectedExceptions=UnsatisfiedDependencyException.class) @SpecAssertion(section="2.5.6")
+ public void testBeanWithDisabledDeploymentTypeNotInstantiated()
+ {
+ TckUtils.getManagers().setEnabledDeploymentTypes(
+ Arrays.asList(Standard.class, AnotherDeploymentType.class,
+ HornedAnimalDeploymentType.class));
+
+ Bean<RedSnapper> bean = getSimpleBean(RedSnapper.class);
+ manager.addBean(bean);
+ manager.getInstanceByType(RedSnapper.class);
+ }
+
+ @SuppressWarnings("unchecked")
+ @Test @SpecAssertion(section={"2.5.6", "2.5.7"})
+ public void testCustomDeploymentTypes()
+ {
+ TckUtils.getManagers().setEnabledDeploymentTypes(
+ Arrays.asList(Standard.class, AnotherDeploymentType.class,
+ HornedAnimalDeploymentType.class));
+ assert TckUtils.getManagers().getEnabledDeploymentTypes().size() == 3;
+ assert TckUtils.getManagers().getEnabledDeploymentTypes().get(0).equals(Standard.class);
+ assert TckUtils.getManagers().getEnabledDeploymentTypes().get(1).equals(AnotherDeploymentType.class);
+ assert TckUtils.getManagers().getEnabledDeploymentTypes().get(2).equals(HornedAnimalDeploymentType.class);
+ }
+
+ @SuppressWarnings("unchecked")
+ @Test(expectedExceptions=DeploymentException.class) @SpecAssertion(section="2.5.6")
+ public void testStandardMustBeDeclared()
+ {
+ TckUtils.getManagers().setEnabledDeploymentTypes(
+ Arrays.asList(AnotherDeploymentType.class, HornedAnimalDeploymentType.class));
+ }
+
+ @Test(groups={"stub", "webbeansxml"}, expectedExceptions=DeploymentException.class) @SpecAssertion(section="2.5.6")
+ public void testMultipleDeployElementsCannotBeDefined()
+ {
+
+ }
+
+ @Test @SpecAssertion(section={"2.5.5", "2.7.2"})
+ public void testWebBeanDeploymentTypeOverridesStereotype()
+ {
+ Bean<Reindeer> bean = getSimpleBean(Reindeer.class);
+ assert bean.getDeploymentType().equals(Production.class);
+ }
+}
\ No newline at end of file
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/NameTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/NameTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/NameTest.java 2009-01-14 06:56:59 UTC (rev 946)
@@ -0,0 +1,140 @@
+package org.jboss.webbeans.tck.tests.definition;
+
+import javax.webbeans.DefinitionException;
+import javax.webbeans.manager.Bean;
+
+import org.jboss.webbeans.tck.impl.SpecAssertion;
+import org.jboss.webbeans.tck.impl.SpecVersion;
+import org.jboss.webbeans.tck.impl.TckUtils;
+import org.jboss.webbeans.tck.impl.test.beans.Haddock;
+import org.jboss.webbeans.tck.impl.test.beans.Minnow;
+import org.jboss.webbeans.tck.impl.test.beans.Moose;
+import org.jboss.webbeans.tck.impl.test.beans.RedSnapper;
+import org.jboss.webbeans.tck.impl.test.beans.SeaBass;
+import org.jboss.webbeans.tck.tests.AbstractTest;
+import org.testng.annotations.Test;
+
+@SpecVersion("20081206")
+public class NameTest extends AbstractTest
+{
+
+ @Test(groups="stub", expectedExceptions=DefinitionException.class) @SpecAssertion(section="2.6")
+ public void testInvalidElIdentifierUsedAsWebBeanName()
+ {
+ assert false;
+ }
+
+ @Test @SpecAssertion(section="2.6.1")
+ public void testNonDefaultNamed()
+ {
+ Bean<Moose> moose = getSimpleBean(Moose.class);
+ assert moose.getName().equals("aMoose");
+ }
+
+ @Test(groups={"stub", "webbeansxml"}) @SpecAssertion(section="2.6.2")
+ public void testNonDefaultXmlNamed()
+ {
+ /*Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
+ annotations.put(Named.class, new NamedAnnotationLiteral(){
+
+ public String value()
+ {
+ return "aTrout";
+ }
+
+ });
+ AnnotatedClass<SeaBass> annotatedItem = new SimpleAnnotatedClass<SeaBass>(SeaBass.class, annotations);*/
+ //SimpleBean<SeaBass> trout = createSimpleBean(SeaBass.class, annotatedItem, manager);
+
+ //assert trout.getName().equals("aTrout");
+ assert false;
+ }
+
+ @Test(groups={"stub", "webbeansxml"}) @SpecAssertion(section="2.6.2")
+ public void testXmlNamedOverridesJavaNamed()
+ {
+ /*Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
+ annotations.put(Named.class, new NamedAnnotationLiteral(){
+
+ public String value()
+ {
+ return "aTrout";
+ }
+
+ });
+ AnnotatedClass<Cod> annotatedItem = new SimpleAnnotatedClass<Cod>(Cod.class, annotations);*/
+ //SimpleBean<Cod> cod = createSimpleBean(Cod.class, annotatedItem, manager);
+
+ //assert cod.getName().equals("aTrout");
+ assert false;
+ }
+
+ @Test(groups={"stub", "webbeansxml"}) @SpecAssertion(section={"2.6.2", "2.6.3"})
+ public void testJavaNamedUsedWhenNoXmlSpecified()
+ {
+ //Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
+ //AnnotatedClass<Cod> annotatedItem = new SimpleAnnotatedClass<Cod>(Cod.class, annotations);
+ //SimpleBean<Cod> cod = createSimpleBean(Cod.class, annotatedItem, manager);
+
+ //assert cod.getName().equals("whitefish");
+ assert false;
+ }
+
+ @Test @SpecAssertion(section={"2.6.3", "3.2.7"})
+ public void testDefaultNamed()
+ {
+ Bean<Haddock> haddock = getSimpleBean(Haddock.class);
+ assert haddock.getName() != null;
+ assert haddock.getName().equals("haddock");
+ }
+
+ @Test(groups={"stub", "webbeansxml"}) @SpecAssertion(section="2.6.3")
+ public void testDefaultXmlNamed()
+ {
+ /*Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
+ annotations.put(Named.class, new NamedAnnotationLiteral() {
+
+ public String value()
+ {
+ return "";
+ }
+
+ });
+ AnnotatedClass<SeaBass> annotatedItem = new SimpleAnnotatedClass<SeaBass>(SeaBass.class, annotations);*/
+ //SimpleBean<SeaBass> trout = createSimpleBean(SeaBass.class, annotatedItem, manager);
+
+ //assert trout.getName() != null;
+ //assert trout.getName().equals("seaBass");
+ assert false;
+ }
+
+ @Test @SpecAssertion(section={"2.6.3", "2.7"})
+ public void testSterotypeDefaultsName()
+ {
+ Bean<RedSnapper> model = getSimpleBean(RedSnapper.class);
+ assert TckUtils.getBeans().isBeanNameDefaulted(model);
+ assert model.getName().equals("redSnapper");
+ }
+
+ @Test @SpecAssertion(section="2.6.4")
+ public void testNotNamedInJava()
+ {
+ Bean<SeaBass> model = getSimpleBean(SeaBass.class);
+ assert model.getName() == null;
+ }
+
+ @Test @SpecAssertion(section="2.6.4")
+ public void testNotNamedInXml()
+ {
+ Bean<SeaBass> model = getSimpleBean(SeaBass.class);
+ assert model.getName() == null;
+ }
+
+ @Test @SpecAssertion(section="2.6.4")
+ public void testNotNamedInStereotype()
+ {
+ Bean<Minnow> model = getSimpleBean(Minnow.class);
+ assert model.getName() == null;
+ }
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/ScopeTypeTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/ScopeTypeTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/ScopeTypeTest.java 2009-01-14 06:56:59 UTC (rev 946)
@@ -0,0 +1,151 @@
+package org.jboss.webbeans.tck.tests.definition;
+
+import javax.webbeans.ApplicationScoped;
+import javax.webbeans.DefinitionException;
+import javax.webbeans.Dependent;
+import javax.webbeans.RequestScoped;
+import javax.webbeans.manager.Bean;
+
+import org.jboss.webbeans.tck.impl.SpecAssertion;
+import org.jboss.webbeans.tck.impl.SpecVersion;
+import org.jboss.webbeans.tck.impl.test.annotations.AnotherScopeType;
+import org.jboss.webbeans.tck.impl.test.beans.BeanWithTooManyScopeTypes;
+import org.jboss.webbeans.tck.impl.test.beans.Grayling;
+import org.jboss.webbeans.tck.impl.test.beans.Minnow;
+import org.jboss.webbeans.tck.impl.test.beans.Mullet;
+import org.jboss.webbeans.tck.impl.test.beans.Order;
+import org.jboss.webbeans.tck.impl.test.beans.Pollock;
+import org.jboss.webbeans.tck.impl.test.beans.RedSnapper;
+import org.jboss.webbeans.tck.impl.test.beans.SeaBass;
+import org.jboss.webbeans.tck.impl.test.beans.broken.Scallop;
+import org.jboss.webbeans.tck.tests.AbstractTest;
+import org.testng.annotations.Test;
+
+@SpecVersion("20081206")
+public class ScopeTypeTest extends AbstractTest
+{
+
+ @Test @SpecAssertion(section="2.4")
+ public void testScopeTypesAreExtensible()
+ {
+ Bean<Mullet> mullet = getSimpleBean(Mullet.class);
+ assert mullet.getScopeType().equals(AnotherScopeType.class);
+ }
+
+ @Test(groups={"stub", "annotationDefinition"}) @SpecAssertion(section="2.4.2")
+ public void testScopeTypeHasCorrectTarget()
+ {
+ assert false;
+ }
+
+ @Test(groups={"stub", "annotationDefinition"}) @SpecAssertion(section="2.4.2")
+ public void testScopeTypeHasCorrectRetention()
+ {
+ assert false;
+ }
+
+ @Test(groups={"stub", "annotationDefinition"}) @SpecAssertion(section="2.4.2")
+ public void testScopeTypeDeclaresScopeTypeAnnotation()
+ {
+ assert false;
+ }
+
+ @Test @SpecAssertion(section="2.4.3")
+ public void testScopeDeclaredInJava()
+ {
+ Bean<SeaBass> trout = getSimpleBean(SeaBass.class);
+ assert trout.getScopeType().equals(RequestScoped.class);
+ }
+
+ @Test(expectedExceptions=DefinitionException.class) @SpecAssertion(section="2.4.3")
+ public void testTooManyScopesSpecifiedInJava()
+ {
+ getSimpleBean(BeanWithTooManyScopeTypes.class);
+ }
+
+ @Test(expectedExceptions=DefinitionException.class, groups={"stub", "webbeansxml"})
+ public void testTooManyScopesSpecifiedInXml()
+ {
+ //Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
+ //annotations.put(RequestScoped.class, new RequestScopedAnnotationLiteral());
+ //annotations.put(ConversationScoped.class, new ConversationScopedAnnotationLiteral());
+ //AnnotatedClass<Antelope> antelopeAnnotatedItem = new SimpleAnnotatedClass<Antelope>(Antelope.class, annotations);
+ //createSimpleBean(null, antelopeAnnotatedItem, manager);
+ }
+
+ @Test(groups={"stub", "webbeansxml"}) @SpecAssertion(section="2.4.4")
+ public void testScopeDeclaredInXml()
+ {
+ //Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
+ //annotations.put(RequestScoped.class, new RequestScopedAnnotationLiteral());
+ //AnnotatedClass<Order> annotatedItem = new SimpleAnnotatedClass<Order>(Order.class, annotations);
+
+ //SimpleBean<Order> order = createSimpleBean(Order.class, annotatedItem, manager);
+ //assert order.getScopeType().equals(RequestScoped.class);
+ assert false;
+ }
+
+ @Test(groups={"stub", "webbeansxml"}) @SpecAssertion(section="2.4.4")
+ public void testScopeMissingInXml()
+ {
+ //Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
+ //AnnotatedClass<SeaBass> annotatedItem = new SimpleAnnotatedClass<SeaBass>(SeaBass.class, annotations);
+
+ //SimpleBean<SeaBass> trout =createSimpleBean(SeaBass.class, annotatedItem, manager);
+ //assert trout.getScopeType().equals(RequestScoped.class);
+ assert false;
+ }
+
+ @Test(groups={"stub", "webbeansxml"}) @SpecAssertion(section="2.4.4")
+ public void testScopeDeclaredInXmlOverridesJava()
+ {
+ //Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
+ //annotations.put(ConversationScoped.class, new ConversationScopedAnnotationLiteral());
+ //AnnotatedClass<SeaBass> annotatedItem = new SimpleAnnotatedClass<SeaBass>(SeaBass.class, annotations);
+ //SimpleBean<SeaBass> trout = createSimpleBean(SeaBass.class, annotatedItem, manager);
+ //assert trout.getScopeType().equals(ConversationScoped.class);
+ assert false;
+ }
+
+ @Test @SpecAssertion(section="2.4.5")
+ public void testDefaultScope()
+ {
+ Bean<Order> order = getSimpleBean(Order.class);
+ assert order.getScopeType().equals(Dependent.class);
+ }
+
+ @Test @SpecAssertion(section={"2.4.5", "2.7.2"})
+ public void testScopeSpecifiedAndStereotyped()
+ {
+ Bean<Minnow> minnow = getSimpleBean(Minnow.class);
+ assert minnow.getScopeType().equals(RequestScoped.class);
+ }
+
+ @Test(expectedExceptions=DefinitionException.class) @SpecAssertion(section="2.4.5")
+ public void testMutipleIncompatibleScopeStereotypes()
+ {
+ getSimpleBean(Scallop.class);
+ }
+
+ @Test @SpecAssertion(section="2.4.5")
+ public void testMutipleIncompatibleScopeStereotypesWithScopeSpecified()
+ {
+ Bean<Pollock> pollock = getSimpleBean(Pollock.class);
+ assert pollock.getScopeType().equals(Dependent.class);
+ }
+
+ @Test @SpecAssertion(section="2.4.5")
+ public void testMutipleCompatibleScopeStereotypes()
+ {
+ Bean<Grayling> grayling = getSimpleBean(Grayling.class);
+ assert grayling.getScopeType().equals(ApplicationScoped.class);
+ }
+
+ @Test @SpecAssertion(section="2.7.2")
+ public void testWebBeanScopeTypeOverridesStereotype()
+ {
+ Bean<RedSnapper> bean = getSimpleBean(RedSnapper.class);
+ assert bean.getScopeType().equals(RequestScoped.class);
+ }
+
+}
\ No newline at end of file
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/TypeTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/TypeTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/TypeTest.java 2009-01-14 06:56:59 UTC (rev 946)
@@ -0,0 +1,22 @@
+package org.jboss.webbeans.tck.tests.definition;
+
+import javax.webbeans.manager.Bean;
+
+import org.jboss.webbeans.tck.impl.SpecAssertion;
+import org.jboss.webbeans.tck.impl.test.beans.Haddock;
+import org.jboss.webbeans.tck.tests.AbstractTest;
+import org.testng.annotations.Test;
+
+public class TypeTest extends AbstractTest
+{
+
+ @Test @SpecAssertion(section="2.6.3")
+ public void testDefaultNamed()
+ {
+ Bean<Haddock> haddock = getSimpleBean(Haddock.class);
+ assert haddock.getName() != null;
+ assert haddock.getName().equals("haddock");
+ }
+
+}
+
16 years
[webbeans-commits] Webbeans SVN: r945 - doc/trunk/reference/es-ES.
by webbeans-commits@lists.jboss.org
Author: guegl
Date: 2009-01-14 01:33:46 -0500 (Wed, 14 Jan 2009)
New Revision: 945
Modified:
doc/trunk/reference/es-ES/ri.po
Log:
in progress
Modified: doc/trunk/reference/es-ES/ri.po
===================================================================
--- doc/trunk/reference/es-ES/ri.po 2009-01-14 05:57:47 UTC (rev 944)
+++ doc/trunk/reference/es-ES/ri.po 2009-01-14 06:33:46 UTC (rev 945)
@@ -1,23 +1,26 @@
+# translation of ri.po to Spanish
# Language es-ES translations for master.xml package.
+#
# Automatically generated, 2008.
-#
+# Gladys Guerrero Lozano <gguerrer(a)redhat.com>, 2009.
msgid ""
msgstr ""
-"Project-Id-Version: master.xml \n"
+"Project-Id-Version: ri\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-08 14:07+0000\n"
-"PO-Revision-Date: 2008-12-19 20:26+0000\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: none\n"
+"PO-Revision-Date: 2009-01-14 16:33+1000\n"
+"Last-Translator: Gladys Guerrero Lozano <gguerrer(a)redhat.com>\n"
+"Language-Team: Spanish <fedora-trans-es(a)redhat.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
#. Tag: title
#: ri.xml:4
#, no-c-format
msgid "The Web Beans Reference Implementation"
-msgstr ""
+msgstr "Implementación de referencia de Web Beans"
#. Tag: para
#: ri.xml:6
@@ -28,34 +31,39 @@
"download the latest developer release of Web Beans from the <ulink url="
"\"http://seamframework.org/Download\">the downloads page</ulink>."
msgstr ""
+"La implementación de referencia de Web Beans se desarrolla en <ulink url="
+"\"http://seamframework.org/WebBeans\">the Seam project</ulink>. Se puede descargar la última versión de Web Beans desde <ulink url=\"http://seamframework.org/Download\">the downloads page</ulink>."
#. Tag: para
#: ri.xml:13
#, no-c-format
+#, fuzzy
msgid ""
"The Web Beans RI comes with a two deployable example applications: "
"<literal>webbeans-numberguess</literal>, a war example, containing only "
"simple beans, and <literal>webbeans-translator</literal> an ear example, "
"containing enterprise beans. To run the examples you'll need the following:"
msgstr ""
+"La IR de Web Beans viene con dos ejemplos de aplicaciones de despliegue: "
+"<literal>webbeans-numberguess</literal>, un ejemplo de guerra, que contiene sólo beans sencillos y un oído de ejemplo de <literal>webbeans-translator</literal> que contiene beans de empresa. Para ejecutar los ejemplos necesitará lo siguiente:"
#. Tag: para
#: ri.xml:22
#, no-c-format
msgid "the latest release of the Web Beans RI,"
-msgstr ""
+msgstr "la última versión de la IR de Web Beans,"
#. Tag: para
#: ri.xml:25
#, no-c-format
msgid "JBoss AS 5.0.0.GA, and"
-msgstr ""
+msgstr "JBoss AS 5.0.0.GA, y"
#. Tag: para
#: ri.xml:28
#, no-c-format
msgid "Ant 1.7.0."
-msgstr ""
+msgstr "Ant 1.7.0."
#. Tag: para
#: ri.xml:32
@@ -65,6 +73,8 @@
"need to download JBoss AS 5.0.0.GA from <ulink url=\"http://www.jboss.org/"
"jbossas/downloads/\">jboss.org</ulink>, and unzip it. For example:"
msgstr ""
+"Actualmente, la IR de Web Beans sólo se ejecuta en JBoss Application Server 5. Necesitará descargar JBoss AS 5.0.0.GA desde <ulink url=\"http://www.jboss.org/"
+"jbossas/downloads/\">jboss.org</ulink>, y descomprimirlo. Por ejemplo:"
#. Tag: programlisting
#: ri.xml:39
@@ -73,6 +83,8 @@
"<![CDATA[$ cd /Applications\n"
"$ unzip ~/jboss-5.0.0.GA.zip]]>"
msgstr ""
+"<![CDATA[$ cd /Applications\n"
+"$ unzip ~/jboss-5.0.0.GA.zip]]>"
#. Tag: para
#: ri.xml:41
@@ -81,6 +93,8 @@
"Next, download the Web Beans RI from <ulink url=\"http://seamframework.org/"
"Download\">seamframework.org</ulink>, and unzip it. For example"
msgstr ""
+"Luego, descargue el IR de Web Beans desde <ulink url=\"http://seamframework.org/"
+"Download\">seamframework.org</ulink>, y descomprímalo. Por ejemplo:"
#. Tag: programlisting
#: ri.xml:47
@@ -89,6 +103,8 @@
"<![CDATA[$ cd ~/\n"
"$ unzip ~/webbeans-1.0.0.ALPHA1.zip]]>"
msgstr ""
+"<![CDATA[$ cd ~/\n"
+"$ unzip ~/webbeans-1.0.0.ALPHA1.zip]]>"
#. Tag: para
#: ri.xml:50
@@ -98,12 +114,14 @@
"as/build.properties</literal> and set the <literal>jboss.home</literal> "
"property. For example:"
msgstr ""
+"Después necesitaremos decirle a Web Beans en dónde está localizado JBoss. Editar <literal>jboss-"
+"as/build.properties</literal> y establecer la propiedad <literal>jboss.home</literal>. Por ejemplo:"
#. Tag: programlisting
#: ri.xml:56
#, no-c-format
msgid "jboss.home=/Applications/jboss-5.0.0.GA"
-msgstr ""
+msgstr "jboss.home=/Applications/jboss-5.0.0.GA"
#. Tag: para
#: ri.xml:58
@@ -112,7 +130,7 @@
"As Web Beans is a new piece of software, you need to update JBoss AS to run "
"the Web Beans RI. Future versions of JBoss AS will include these updates, "
"and this step won't be necessary."
-msgstr ""
+msgstr "Como Web Beans es una nueva parte de software, necesitamos actualizar JBoss AS para ejecutar el IR de Web Beans. Versiones futuras de JBOSS AS incluirán dichas actualizaciones, y este paso no será necesario."
#. Tag: para
#: ri.xml:65
@@ -124,6 +142,8 @@
"container and discover which EJBs are installed in your application. "
"Secondly, an update to JBoss EJB3 is needed."
msgstr ""
+"Actualmente, se necesitan dos actualizaciones. Primero, se agrega el nuevo desarrollador, <literal>webbeans.deployer</literal>. Así se agrega soporte para los archivos de Web "
+"Bean a JBoss AS, y permite al IR de Web Beans solicitar el contenedor EJB3 y descubrir cuáles EJB están instalados en su aplicación. En segundo lugar se necesita una actualización de JBoss EJB3."
#. Tag: para
#: ri.xml:74
@@ -140,6 +160,8 @@
"$ unzip apache-ant-1.7.0.zip\n"
"$ export ANT_HOME=~/apache-ant-1.7.0"
msgstr ""
+"$ unzip apache-ant-1.7.0.zip\n"
+"$ export ANT_HOME=~/apache-ant-1.7.0"
#. Tag: para
#: ri.xml:81
@@ -166,8 +188,7 @@
#. Tag: para
#: ri.xml:93
#, no-c-format
-msgid ""
-"The build scripts for the examples offer a number of targets, these are:"
+msgid "The build scripts for the examples offer a number of targets, these are:"
msgstr ""
#. Tag: para
@@ -187,8 +208,7 @@
#. Tag: para
#: ri.xml:111
#, no-c-format
-msgid ""
-"<literal>ant deploy</literal> - deploy the example in compressed jar format"
+msgid "<literal>ant deploy</literal> - deploy the example in compressed jar format"
msgstr ""
#. Tag: para
@@ -216,6 +236,8 @@
"$ cd examples/numberguess\n"
"ant deploy"
msgstr ""
+"$ cd examples/numberguess\n"
+"ant deploy"
#. Tag: para
#: ri.xml:134
@@ -242,6 +264,8 @@
"$ cd examples/translator\n"
"ant deploy"
msgstr ""
+"$ cd examples/translator\n"
+"ant deploy"
#. Tag: para
#: ri.xml:148
@@ -302,6 +326,18 @@
"\n"
"</faces-config>]]>"
msgstr ""
+"<![CDATA[<?xml version='1.0' encoding='UTF-8'?>\n"
+"<faces-config version=\"1.2\"\n"
+" xmlns=\"http://java.sun.com/xml/ns/javaee\"\n"
+" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"
+" xsi:schemaLocation=\"http://java.sun.com/xml/ns/javaee http://"
+"java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd\">\n"
+" \n"
+" <application>\n"
+" <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>\n"
+" </application>\n"
+"\n"
+"</faces-config>]]>"
#. Tag: para
#: ri.xml:178
@@ -438,6 +474,122 @@
"to an action method on the Web Bean. </para> </callout> </calloutlist> </"
"programlistingco>"
msgstr ""
+"<programlistingco> <areaspec> <area id=\"faces.servlet\" coords=\"12\"/> "
+"<area id=\"faces.servlet.mapping\" coords=\"18\"/> <area id=\"faces.default."
+"suffix\" coords=\"23\"/> <area id=\"session.timeout\" coords=\"28\"/> <area "
+"id=\"webbeans.listener\" coords=\"32\"/> </areaspec> <programlisting><![CDATA"
+"[<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+"\n"
+"<web-app version=\"2.5\"\n"
+" xmlns=\"http://java.sun.com/xml/ns/javaee\"\n"
+" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"
+" xsi:schemaLocation=\"http://java.sun.com/xml/ns/javaee http://java.sun."
+"com/xml/ns/javaee/web-app_2_5.xsd\">\n"
+" \n"
+" <display-name>Web Beans Numbergues example</display-name>\n"
+"\n"
+" <!-- JSF -->\n"
+"\n"
+" <servlet>\n"
+" <servlet-name>Faces Servlet</servlet-name>\n"
+" <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>\n"
+" <load-on-startup>1</load-on-startup>\n"
+" </servlet>\n"
+"\n"
+" <servlet-mapping>\n"
+" <servlet-name>Faces Servlet</servlet-name>\n"
+" <url-pattern>*.jsf</url-pattern>\n"
+" </servlet-mapping>\n"
+" \n"
+" <context-param>\n"
+" <param-name>javax.faces.DEFAULT_SUFFIX</param-name>\n"
+" <param-value>.xhtml</param-value>\n"
+" </context-param>\n"
+"\n"
+" <session-config>\n"
+" <session-timeout>10</session-timeout>\n"
+" </session-config>\n"
+"\n"
+"</web-app>]]></programlisting> <calloutlist> <callout arearefs=\"faces."
+"servlet\"> <para> Enable and load the JSF servlet </para> </callout> "
+"<callout arearefs=\"faces.servlet.mapping\"> <para> Configure requests to "
+"<literal>.jsf</literal> pages to be handled by JSF </para> </callout> "
+"<callout arearefs=\"faces.default.suffix\"> <para> Tell JSF that we will be "
+"giving our source files (facelets) an extension of <literal>.jsf</literal> </"
+"para> </callout> <callout arearefs=\"session.timeout\"> <para> Configure a "
+"session timeout of 10 minutes </para> </callout> </calloutlist> </"
+"programlistingco> <note> <para> Whilst this demo is a JSF demo, you can use "
+"the Web Beans RI with any Servlet based web framework. </para> </note> "
+"<para> Let's take a look at the Facelet view: </para> <programlistingco> "
+"<areaspec> <area id=\"template\" coords=\"8\"/> <area id=\"messages\" coords="
+"\"12\"/> <area id=\"instructions\" coords=\"19\"/> <area id=\"guess\" coords="
+"\"25\"/> <area id=\"validator\" coords=\"30\"/> <area id=\"submit\" coords="
+"\"33\"/> </areaspec> <programlisting><![CDATA[<!DOCTYPE html PUBLIC \"-//"
+"W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/"
+"xhtml1-transitional.dtd\">\n"
+"<html xmlns=\"http://www.w3.org/1999/xhtml\"\n"
+" xmlns:ui=\"http://java.sun.com/jsf/facelets\"\n"
+" xmlns:h=\"http://java.sun.com/jsf/html\"\n"
+" xmlns:f=\"http://java.sun.com/jsf/core\"\n"
+" xmlns:s=\"http://jboss.com/products/seam/taglib\">\n"
+"\n"
+" <ui:composition template=\"template.xhtml\">\n"
+" <ui:define name=\"content\">\n"
+" <h1>Guess a number...</h1>\n"
+" <h:form id=\"NumberGuessMain\">\n"
+" <div style=\"color: red\">\n"
+" <h:messages id=\"messages\" globalOnly=\"false\"/>\n"
+" <h:outputText id=\"Higher\" value=\"Higher!\" rendered=\"#{game."
+"number gt game.guess and game.guess ne 0}\"/>\n"
+" <h:outputText id=\"Lower\" value=\"Lower!\" rendered=\"#{game."
+"number lt game.guess and game.guess ne 0}\"/>\n"
+" </div>\n"
+" \n"
+" <div>\n"
+" I'm thinking of a number between #{game.smallest} and #{game."
+"biggest}.\n"
+" You have #{game.remainingGuesses} guesses.\n"
+" </div>\n"
+" \n"
+" <div>\n"
+" Your guess: \n"
+" <h:inputText id=\"inputGuess\" \n"
+" value=\"#{game.guess}\" \n"
+" required=\"true\" \n"
+" size=\"3\" \n"
+" disabled=\"#{game.number eq game.guess}\">\n"
+" <f:validateLongRange maximum=\"#{game.biggest}\" \n"
+" minimum=\"#{game.smallest}\"/>\n"
+" </h:inputText>\n"
+" <h:commandButton id=\"GuessButton\" \n"
+" value=\"Guess\" \n"
+" action=\"#{game.check}\" \n"
+" disabled=\"#{game.number eq game.guess}\"/>\n"
+" </div>\n"
+" <div>\n"
+" <h:commandButton id=\"RestartButton\" value=\"Reset\" action=\"#"
+"{game.reset}\" immediate=\"true\" />\n"
+" </div>\n"
+" </h:form>\n"
+" </ui:define>\n"
+" </ui:composition>\n"
+"</html>]]></programlisting> <calloutlist> <callout arearefs=\"template\"> "
+"<para> Facelets is a templating language for JSF, here we are wrapping our "
+"page in a template which defines the header. </para> </callout> <callout "
+"arearefs=\"messages\"> <para> There are a number of messages which can be "
+"sent to the user, \"Higher!\", \"Lower!\" and \"Correct!\" </para> </"
+"callout> <callout arearefs=\"instructions\"> <para> As the user guesses, the "
+"range of numbers they can guess gets smaller - this sentance changes to make "
+"sure they know what range to guess in. </para> </callout> <callout arearefs="
+"\"guess\"> <para> This input field is bound to a Web Bean, using the value "
+"expression. </para> </callout> <callout arearefs=\"validator\"> <para> A "
+"range validator is used to make sure the user doesn't accidentally input a "
+"number outside of the range in which they can guess - if the validator "
+"wasn't here, the user might use up a guess on an out of range number. </"
+"para> </callout> <callout arearefs=\"submit\"> <para> And, of course, there "
+"must be a way for the user to send their guess to the server. Here we bind "
+"to an action method on the Web Bean. </para> </callout> </calloutlist> </"
+"programlistingco>"
#. Tag: para
#: ri.xml:287
@@ -458,6 +610,11 @@
"@BindingType\n"
"public @interface Random {}]]>"
msgstr ""
+"<![CDATA[@Target( { TYPE, METHOD, PARAMETER, FIELD })\n"
+"@Retention(RUNTIME)\n"
+"@Documented\n"
+"@BindingType\n"
+"public @interface Random {}]]>"
#. Tag: para
#: ri.xml:295
@@ -478,6 +635,12 @@
"public @interface MaxNumber {}\n"
"]]>"
msgstr ""
+"<![CDATA[@Target( { TYPE, METHOD, PARAMETER, FIELD })\n"
+"@Retention(RUNTIME)\n"
+"@Documented\n"
+"@BindingType\n"
+"public @interface MaxNumber {}\n"
+"]]>"
#. Tag: para
#: ri.xml:302
@@ -516,6 +679,29 @@
"\n"
"}]]>"
msgstr ""
+"<![CDATA[@ApplicationScoped\n"
+"public class Generator {\n"
+" \n"
+" private java.util.Random random = new java.util.Random( System."
+"currentTimeMillis() );\n"
+" \n"
+" private int maxNumber = 100;\n"
+" \n"
+" java.util.Random getRandom()\n"
+" {\n"
+" return random;\n"
+" }\n"
+" \n"
+" @Produces @Random int next() { \n"
+" return getRandom().nextInt(maxNumber); \n"
+" }\n"
+" \n"
+" @Produces @MaxNumber int getMaxNumber()\n"
+" {\n"
+" return maxNumber;\n"
+" }\n"
+"\n"
+"}]]>"
#. Tag: para
#: ri.xml:310
@@ -645,6 +831,102 @@
" \n"
"}]]>"
msgstr ""
+"<![CDATA[package org.jboss.webbeans.examples.numberguess;\n"
+"\n"
+"\n"
+"import javax.annotation.PostConstruct;\n"
+"import javax.faces.application.FacesMessage;\n"
+"import javax.faces.context.FacesContext;\n"
+"import javax.webbeans.AnnotationLiteral;\n"
+"import javax.webbeans.Current;\n"
+"import javax.webbeans.Initializer;\n"
+"import javax.webbeans.Named;\n"
+"import javax.webbeans.SessionScoped;\n"
+"import javax.webbeans.manager.Manager;\n"
+"\n"
+"@Named\n"
+"@SessionScoped\n"
+"public class Game\n"
+"{\n"
+" private int number;\n"
+" \n"
+" private int guess;\n"
+" private int smallest;\n"
+" private int biggest;\n"
+" private int remainingGuesses;\n"
+" \n"
+" @Current Manager manager;\n"
+" \n"
+" public Game()\n"
+" {\n"
+" }\n"
+" \n"
+" @Initializer\n"
+" Game(@MaxNumber int maxNumber)\n"
+" { \n"
+" this.biggest = maxNumber;\n"
+" }\n"
+"\n"
+" public int getNumber()\n"
+" {\n"
+" return number;\n"
+" }\n"
+" \n"
+" public int getGuess()\n"
+" {\n"
+" return guess;\n"
+" }\n"
+" \n"
+" public void setGuess(int guess)\n"
+" {\n"
+" this.guess = guess;\n"
+" }\n"
+" \n"
+" public int getSmallest()\n"
+" {\n"
+" return smallest;\n"
+" }\n"
+" \n"
+" public int getBiggest()\n"
+" {\n"
+" return biggest;\n"
+" }\n"
+" \n"
+" public int getRemainingGuesses()\n"
+" {\n"
+" return remainingGuesses;\n"
+" }\n"
+" \n"
+" public String check()\n"
+" {\n"
+" if (guess>number)\n"
+" {\n"
+" biggest = guess - 1;\n"
+" }\n"
+" if (guess<number)\n"
+" {\n"
+" smallest = guess + 1;\n"
+" }\n"
+" if (guess == number)\n"
+" {\n"
+" FacesContext.getCurrentInstance().addMessage(null, new FacesMessage"
+"(\"Correct!\"));\n"
+" }\n"
+" remainingGuesses--;\n"
+" return null;\n"
+" }\n"
+" \n"
+" @PostConstruct\n"
+" public void reset()\n"
+" {\n"
+" this.smallest = 0;\n"
+" this.guess = 0;\n"
+" this.remainingGuesses = 10;\n"
+" this.number = manager.getInstanceByType(Integer.class, new "
+"AnnotationLiteral<Random>(){});\n"
+" }\n"
+" \n"
+"}]]>"
#. Tag: title
#: ri.xml:332
@@ -704,6 +986,19 @@
" </configuration>\n"
"</plugin>]]>"
msgstr ""
+"<![CDATA[<plugin>\n"
+" <groupId>org.apache.maven.plugins</groupId>\n"
+" <artifactId>maven-ear-plugin</artifactId>\n"
+" <configuration>\n"
+" <modules>\n"
+" <webModule>\n"
+" <groupId>org.jboss.webbeans.examples.translator</groupId>\n"
+" <artifactId>webbeans-translator-war</artifactId>\n"
+" <contextRoot>/webbeans-translator</contextRoot>\n"
+" </webModule>\n"
+" </modules>\n"
+" </configuration>\n"
+"</plugin>]]>"
#. Tag: para
#: ri.xml:360
@@ -747,6 +1042,26 @@
" </module>\n"
"</application>]]>"
msgstr ""
+"<![CDATA[<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+"<application xmlns=\"http://java.sun.com/xml/ns/javaee\" \n"
+" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"
+" xsi:schemaLocation=\"http://java.sun.com/xml/ns/javaee http://"
+"java.sun.com/xml/ns/javaee/application_5.xsd\"\n"
+" version=\"5\">\n"
+" <display-name>webbeans-translator-ear</display-name>\n"
+" <description>Ear Example for the reference implementation of JSR 299: Web "
+"Beans</description>\n"
+" \n"
+" <module>\n"
+" <web>\n"
+" <web-uri>webbeans-translator.war</web-uri>\n"
+" <context-root>/webbeans-translator</context-root>\n"
+" </web>\n"
+" </module>\n"
+" <module>\n"
+" <ejb>webbeans-translator.jar</ejb>\n"
+" </module>\n"
+"</application>]]>"
#. Tag: para
#: ri.xml:374
@@ -798,6 +1113,33 @@
" \n"
"</h:form>]]>"
msgstr ""
+"<![CDATA[<h:form id=\"NumberGuessMain\">\n"
+" \n"
+" <table>\n"
+" <tr align=\"center\" style=\"font-weight: bold\" >\n"
+" <td>\n"
+" Your text\n"
+" </td>\n"
+" <td>\n"
+" Translation\n"
+" </td>\n"
+" </tr>\n"
+" <tr>\n"
+" <td>\n"
+" <h:inputTextarea id=\"text\" value=\"#{translator.text}\" "
+"required=\"true\" rows=\"5\" cols=\"80\" />\n"
+" </td>\n"
+" <td>\n"
+" <h:outputText value=\"#{translator.translatedText}\" />\n"
+" </td>\n"
+" </tr>\n"
+" </table>\n"
+" <div>\n"
+" <h:commandButton id=\"button\" value=\"Translate\" action=\"#"
+"{translator.translate}\"/>\n"
+" </div>\n"
+" \n"
+"</h:form>]]>"
#. Tag: para
#: ri.xml:389
@@ -853,6 +1195,16 @@
" this.sentenceParser = sentenceParser; \n"
" this.sentenceTranslator = sentenceTranslator;]]>"
msgstr ""
+"<![CDATA[public class TextTranslator { \n"
+" private SentenceParser sentenceParser; \n"
+" private Translator sentenceTranslator; \n"
+" \n"
+" @Initializer\n"
+" TextTranslator(SentenceParser sentenceParser, Translator "
+"sentenceTranslator) \n"
+" { \n"
+" this.sentenceParser = sentenceParser; \n"
+" this.sentenceTranslator = sentenceTranslator;]]>"
#. Tag: para
#: ri.xml:420
@@ -884,6 +1236,13 @@
" \n"
" @Current TextTranslator translator;]]>"
msgstr ""
+"<![CDATA[@Stateful\n"
+"@RequestScoped\n"
+"@Named(\"translator\")\n"
+"public class TranslatorControllerBean implements TranslatorController\n"
+"{\n"
+" \n"
+" @Current TextTranslator translator;]]>"
#. Tag: para
#: ri.xml:434
@@ -907,6 +1266,11 @@
" \n"
" }]]>"
msgstr ""
+"<![CDATA[ @Remove\n"
+" public void remove()\n"
+" {\n"
+" \n"
+" }]]>"
#. Tag: para
#: ri.xml:444
@@ -933,3 +1297,4 @@
"We need help in all areas - bug fixing, writing new features, writing "
"examples and translating this reference guide."
msgstr ""
+
16 years
[webbeans-commits] Webbeans SVN: r944 - ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test.
by webbeans-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-01-14 00:57:47 -0500 (Wed, 14 Jan 2009)
New Revision: 944
Removed:
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/CommonWebBeanTest.java
Log:
ported to TCK
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/CommonWebBeanTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/CommonWebBeanTest.java 2009-01-14 05:38:55 UTC (rev 943)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/CommonWebBeanTest.java 2009-01-14 05:57:47 UTC (rev 944)
@@ -1,94 +0,0 @@
-package org.jboss.webbeans.test;
-
-import java.lang.reflect.Method;
-
-import javax.webbeans.Production;
-import javax.webbeans.RequestScoped;
-import javax.webbeans.manager.Bean;
-
-import org.jboss.webbeans.bean.ProducerMethodBean;
-import org.jboss.webbeans.bean.SimpleBean;
-import org.jboss.webbeans.test.beans.Animal;
-import org.jboss.webbeans.test.beans.DeadlyAnimal;
-import org.jboss.webbeans.test.beans.DeadlySpider;
-import org.jboss.webbeans.test.beans.DependentFinalTuna;
-import org.jboss.webbeans.test.beans.RedSnapper;
-import org.jboss.webbeans.test.beans.Spider;
-import org.jboss.webbeans.test.beans.SpiderProducer;
-import org.jboss.webbeans.test.beans.Tarantula;
-import org.testng.annotations.Test;
-
-/**
- * This test class should be used for common assertions about Web Beans
- *
- * @author Pete Muir
- *
- */
-@SpecVersion("20081206")
-public class CommonWebBeanTest extends AbstractTest
-{
-
- // TODO This should actually somehow test the reverse - that the container throws a definition exception if any of these occur
-
- @Test @SpecAssertion(section="2")
- public void testApiTypesNonEmpty()
- {
- Bean<?> model = SimpleBean.of(RedSnapper.class, manager);
- assert model.getTypes().size() > 0;
- }
-
- @Test @SpecAssertion(section="2")
- public void testBindingTypesNonEmpty()
- {
- Bean<?> model = SimpleBean.of(RedSnapper.class, manager);
- assert model.getBindings().size() > 0;
- }
-
- @Test @SpecAssertion(section="2")
- public void testHasScopeType()
- {
- Bean<?> model = SimpleBean.of(RedSnapper.class, manager);
- assert model.getScopeType().equals(RequestScoped.class);
- }
-
- @Test @SpecAssertion(section="2")
- public void testHasDeploymentType()
- {
- Bean<?> model = SimpleBean.of(RedSnapper.class, manager);
- assert model.getDeploymentType().equals(Production.class);
- }
-
- @Test(groups="producerMethod") @SpecAssertion(section="5.2")
- public void testIsNullable() throws Exception
- {
- SimpleBean<SpiderProducer> spiderProducerBean = SimpleBean.of(SpiderProducer.class, manager);
- manager.addBean(spiderProducerBean);
- Method method = SpiderProducer.class.getMethod("getWolfSpiderSize");
- Bean<Integer> bean = ProducerMethodBean.of(method, spiderProducerBean, manager);
- assert !bean.isNullable();
- method = SpiderProducer.class.getMethod("makeASpider");
- Bean<Spider> spiderBean = ProducerMethodBean.of(method, spiderProducerBean, manager);
- assert spiderBean.isNullable();
- }
-
-
- @Test @SpecAssertion(section={"3.2.2", "2.2"})
- public void testApiTypes()
- {
- Bean<Tarantula> bean = SimpleBean.of(Tarantula.class, manager);
- assert bean.getTypes().size() == 6;
- assert bean.getTypes().contains(Tarantula.class);
- assert bean.getTypes().contains(Spider.class);
- assert bean.getTypes().contains(Animal.class);
- assert bean.getTypes().contains(Object.class);
- assert bean.getTypes().contains(DeadlySpider.class);
- assert bean.getTypes().contains(DeadlyAnimal.class);
- }
-
- @Test @SpecAssertion(section="2.2")
- public void testFinalApiType()
- {
- SimpleBean.of(DependentFinalTuna.class, manager);
- }
-
-}
16 years
[webbeans-commits] Webbeans SVN: r943 - in tck/trunk/impl/src/main/java/org/jboss/webbeans/tck: tests and 1 other directories.
by webbeans-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-01-14 00:38:55 -0500 (Wed, 14 Jan 2009)
New Revision: 943
Added:
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/DependentFinalTuna.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/RedSnapper.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/CommonWebBeanTest.java
Log:
ported CommonWebBeanTest
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/DependentFinalTuna.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/DependentFinalTuna.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/DependentFinalTuna.java 2009-01-14 05:38:55 UTC (rev 943)
@@ -0,0 +1,9 @@
+package org.jboss.webbeans.tck.impl.test.beans;
+
+import org.jboss.webbeans.test.annotations.AnotherDeploymentType;
+
+@AnotherDeploymentType
+public final class DependentFinalTuna
+{
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/RedSnapper.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/RedSnapper.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/beans/RedSnapper.java 2009-01-14 05:38:55 UTC (rev 943)
@@ -0,0 +1,12 @@
+package org.jboss.webbeans.tck.impl.test.beans;
+
+import javax.webbeans.RequestScoped;
+
+import org.jboss.webbeans.test.annotations.FishStereotype;
+
+@FishStereotype
+@RequestScoped
+public class RedSnapper implements Animal
+{
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/CommonWebBeanTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/CommonWebBeanTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/CommonWebBeanTest.java 2009-01-14 05:38:55 UTC (rev 943)
@@ -0,0 +1,96 @@
+package org.jboss.webbeans.tck.tests.definition;
+
+import java.lang.reflect.Method;
+
+import javax.webbeans.Production;
+import javax.webbeans.RequestScoped;
+import javax.webbeans.manager.Bean;
+
+import org.jboss.webbeans.tck.impl.SpecAssertion;
+import org.jboss.webbeans.tck.impl.SpecVersion;
+import org.jboss.webbeans.tck.impl.test.beans.Animal;
+import org.jboss.webbeans.tck.impl.test.beans.DeadlyAnimal;
+import org.jboss.webbeans.tck.impl.test.beans.DeadlySpider;
+import org.jboss.webbeans.tck.impl.test.beans.DependentFinalTuna;
+import org.jboss.webbeans.tck.impl.test.beans.RedSnapper;
+import org.jboss.webbeans.tck.impl.test.beans.Spider;
+import org.jboss.webbeans.tck.impl.test.beans.SpiderProducer;
+import org.jboss.webbeans.tck.impl.test.beans.Tarantula;
+import org.jboss.webbeans.tck.tests.AbstractTest;
+import org.testng.annotations.Test;
+
+/**
+ * This test class should be used for common assertions about Web Beans
+ *
+ * @author Pete Muir
+ *
+ */
+@SpecVersion("20081206")
+public class CommonWebBeanTest extends AbstractTest
+{
+
+ // TODO This should actually somehow test the reverse - that the container throws a definition exception if any of these occur
+
+ @Test @SpecAssertion(section="2")
+ public void testApiTypesNonEmpty()
+ {
+ Bean<?> model = getSimpleBean(RedSnapper.class);
+ assert model.getTypes().size() > 0;
+ }
+
+ @Test @SpecAssertion(section="2")
+ public void testBindingTypesNonEmpty()
+ {
+ Bean<?> model = getSimpleBean(RedSnapper.class);
+ assert model.getBindings().size() > 0;
+ }
+
+ @Test @SpecAssertion(section="2")
+ public void testHasScopeType()
+ {
+ Bean<?> model = getSimpleBean(RedSnapper.class);
+ assert model.getScopeType().equals(RequestScoped.class);
+ }
+
+ @Test @SpecAssertion(section="2")
+ public void testHasDeploymentType()
+ {
+ Bean<?> model = getSimpleBean(RedSnapper.class);
+ assert model.getDeploymentType().equals(Production.class);
+ }
+
+ @SuppressWarnings("unchecked")
+ @Test(groups="producerMethod") @SpecAssertion(section="5.2")
+ public void testIsNullable() throws Exception
+ {
+ Bean<SpiderProducer> spiderProducerBean = getSimpleBean(SpiderProducer.class);
+ manager.addBean(spiderProducerBean);
+ Method method = SpiderProducer.class.getMethod("getWolfSpiderSize");
+ Bean<Integer> bean = (Bean<Integer>) getProducerMethodBean(method, spiderProducerBean);
+ assert !bean.isNullable();
+ method = SpiderProducer.class.getMethod("makeASpider");
+ Bean<Spider> spiderBean = (Bean<Spider>) getProducerMethodBean(method, spiderProducerBean);
+ assert spiderBean.isNullable();
+ }
+
+
+ @Test @SpecAssertion(section={"3.2.2", "2.2"})
+ public void testApiTypes()
+ {
+ Bean<Tarantula> bean = getSimpleBean(Tarantula.class);
+ assert bean.getTypes().size() == 6;
+ assert bean.getTypes().contains(Tarantula.class);
+ assert bean.getTypes().contains(Spider.class);
+ assert bean.getTypes().contains(Animal.class);
+ assert bean.getTypes().contains(Object.class);
+ assert bean.getTypes().contains(DeadlySpider.class);
+ assert bean.getTypes().contains(DeadlyAnimal.class);
+ }
+
+ @Test @SpecAssertion(section="2.2")
+ public void testFinalApiType()
+ {
+ getSimpleBean(DependentFinalTuna.class);
+ }
+
+}
\ No newline at end of file
16 years