Author: scabanovich
Date: 2012-01-20 19:15:27 -0500 (Fri, 20 Jan 2012)
New Revision: 38009
Added:
trunk/seam/tests/org.jboss.tools.seam.xml.test/projects/Test/components23.xml
Modified:
trunk/seam/tests/org.jboss.tools.seam.xml.test/src/org/jboss/tools/seam/xml/test/SeamXMLModelTest.java
Log:
JBIDE-10678
https://issues.joss.org/browse/JBIDE-10678
Support of Seam 2.3 components XML .
Added: trunk/seam/tests/org.jboss.tools.seam.xml.test/projects/Test/components23.xml
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.xml.test/projects/Test/components23.xml
(rev 0)
+++
trunk/seam/tests/org.jboss.tools.seam.xml.test/projects/Test/components23.xml 2012-01-21
00:15:27 UTC (rev 38009)
@@ -0,0 +1,90 @@
+<?xml version="1.0"?>
+<components
xmlns="http://jboss.com/products/seam/components"
+
xmlns:async="http://jboss.com/products/seam/async"
+
xmlns:bpm="http://jboss.com/products/seam/bpm"
+
xmlns:core="http://jboss.com/products/seam/core"
+
xmlns:drools="http://jboss.com/products/seam/drools"
+
xmlns:framework="http://jboss.com/products/seam/framework"
+
xmlns:international="http://jboss.com/products/seam/international"
+
xmlns:jms="http://jboss.com/products/seam/jms"
+
xmlns:navigation="http://jboss.com/products/seam/navigation"
+
xmlns:pdf="http://jboss.com/products/seam/pdf"
+
xmlns:persistence="http://jboss.com/products/seam/persistence"
+
xmlns:remoting="http://jboss.com/products/seam/remoting"
+
xmlns:security="http://jboss.com/products/seam/security"
+
xmlns:theme="http://jboss.com/products/seam/theme"
+
xmlns:transaction="http://jboss.com/products/seam/transaction"
+
xmlns:ui="http://jboss.com/products/seam/ui"
+
xmlns:web="http://jboss.com/products/seam/web"
+
xmlns:wicket="http://jboss.com/products/seam/wicket"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://jboss.com/products/seam/components
http://jboss.com/products/seam/components-2.3.xsd
http://jboss.com/products/seam/navigation
http://jboss.com/products/seam/navigation-2.3.xsd http://jboss.com/products/seam/remoting
http://jboss.com/products/seam/remoting-2.3.xsd http://jboss.com/products/seam/framework
http://jboss.com/products/seam/framework-2.3.xsd http://jboss.com/products/seam/security
http://jboss.com/products/seam/security-2.3.xsd http://jboss.com/products/seam/transaction
http://jboss.com/products/seam/transaction-2.3.xsd http://jboss.com/products/seam/ui
http://jboss.com/products/seam/ui-2.3.xsd http://jboss.com/products/seam/web
http://jboss.com/products/seam/web-2.3.xsd http://jboss.com/products/seam/persistence
http://jboss.com/products/seam/persistence-2.3.xsd http://jboss.com/products/seam/async
http://jboss.com/products/seam/async-2.3.xsd http://jboss.com/products/seam/drools h!
ttp://jboss.com/products/seam/drools-2.3.xsd http://jboss.com/products/seam/international
http://jboss.com/products/seam/international-2.3.xsd http://jboss.com/products/seam/wicket
http://jboss.com/products/seam/wicket-2.3.xsd http://jboss.com/products/seam/pdf
http://jboss.com/products/seam/pdf-2.3.xsd http://jboss.com/products/seam/core
http://jboss.com/products/seam/core-2.3.xsd http://jboss.com/products/seam/theme
http://jboss.com/products/seam/theme-2.3.xsd http://jboss.com/products/seam/jms
http://jboss.com/products/seam/jms-2.3.xsd http://jboss.com/products/seam/bpm
http://jboss.com/products/seam/bpm-2.3.xsd">
+ <component class="org.MyClass" name="myComponent"/>
+ <factory name="myFactory" value="myFactory"/>
+ <event type="myType"/>
+ <import>org.mypackage</import>
+ <navigation:pages http-port="3" https-port="4"
login-view-id="2" no-conversation-view-id="1"/>
+ <remoting:remoting debug="false" poll-interval="1"
poll-timeout="2"/>
+ <framework:entity-query ejbql="abc" name="entityQuery"/>
+ <framework:hibernate-entity-query ejbql="abc"
name="hibernateEntityQuery"/>
+ <framework:entity-home entity-class="org.MyEntityHome"
name="entityHome"/>
+ <framework:hibernate-entity-home name="hibernateEntityHome"/>
+ <security:identity authenticate-method="#{m1}"
remember-me="true"/>
+ <security:identity-manager identity-store="#{xyz}"/>
+ <security:jpa-identity-store entity-manager="myManager"
user-class="org.MyStore"/>
+ <security:jpa-token-store entity-manager="myEntityManager"
token-class="String"/>
+ <security:ldap-identity-store server-address="777"
server-port="555"/>
+ <security:permission-manager permission-store="#{permissionStore}"/>
+ <security:jpa-permission-store entity-manager="myEntityManager"
user-permission-class="org.MyPermissionClass"/>
+ <security:rule-based-permission-resolver security-rules="#{myRules}"/>
+ <security:persistent-permission-resolver
permission-store="#{myPermissionStore}"/>
+ <security:remember-me cookie-max-age="101" mode="disabled"/>
+ <transaction:ejb-transaction jndi-name="abc"/>
+ <ui:jpa-entity-loader entity-manager="myEntityManager"/>
+ <ui:hibernate-entity-loader session="mySession"/>
+ <ui:entity-converter entity-loader="myEntityLoader"/>
+ <web:context-filter url-pattern="*"/>
+ <web:exception-filter url-pattern="*"/>
+ <web:multipart-filter url-pattern="*"/>
+ <web:ajax4jsf-filter/>
+ <web:authentication-filter/>
+ <web:cache-control-filter/>
+ <web:character-encoding-filter/>
+ <web:hot-deploy-filter/>
+ <web:identity-filter/>
+ <web:logging-filter/>
+ <web:redirect-filter/>
+ <web:rewrite-filter/>
+ <web:session/>
+ <web:wicket-filter application-class="myClass"
+ application-factory-class="myFactoryClass"
detect-portlet-context="true"/>
+ <persistence:managed-persistence-context name="myPersistentContext"
persistence-unit-jndi-name="myname"/>
+ <persistence:entity-manager-factory name="myManagerFactory"
persistence-unit-name="myName"/>
+ <persistence:filter name="myFilter">
+ <persistence:name>myFilterName</persistence:name>
+ </persistence:filter>
+ <persistence:managed-hibernate-session name="mySession"
+ session-factory="mySessionFactory"
session-factory-jndi-name="myName"/>
+ <persistence:hibernate-session-factory cfg-resource-name="rname"
name="mySessionFactory">
+ <persistence:naming-strategy>#{mystrategy}</persistence:naming-strategy>
+ </persistence:hibernate-session-factory>
+ <async:timer-service-dispatcher scope="stateless"/>
+ <drools:managed-working-memory name="myManagedWorkingMemory"
rule-base="#{bb}"/>
+ <drools:rule-base name="myRuleBase" rule-files="fff"/>
+ <drools:rule-agent configuration-file="fff"
name="myRuleAgent"/>
+ <international:locale-selector locale-string="ss"/>
+ <international:time-zone-selector time-zone-id="22"/>
+ <international:locale-config default-locale="ru"/>
+ <wicket:web-application application-class="org.MyApplication"/>
+ <pdf:key-store-config key-store="keyStore" name="myKeyStore"
key-alias="a" key-password="p" key-store-password="q"/>
+ <core:init jndi-pattern="pp"
transaction-management-enabled="true" security-enabled="true"
debug="true"/>
+ <core:manager conversation-timeout="1"
concurrent-request-timeout="1" conversation-id-parameter="p"
default-flush-mode="MANUAL" parent-conversation-id-parameter="q"/>
+ <core:pojo-cache cfg-resource-name="nnn"/>
+ <core:resource-loader bundle-names="n1,n2"/>
+ <theme:theme-selector name="mySelector" theme="x"
available-themes="x,y" cookie-enabled="true"
cookie-max-age="100"/>
+ <jms:queue-connection queue-connection-factory-jndi-name="myName"/>
+ <jms:topic-connection topic-connection-factory-jndi-name="factory"/>
+ <jms:managed-topic-publisher name="myTopicPublisher"
topic-jndi-name="jjj"/>
+ <jms:managed-queue-sender name="mySender"
queue-jndi-name="nn"/>
+ <bpm:actor group-actor-ids="1"/>
+ <bpm:jbpm/>
+</components>
Property changes on:
trunk/seam/tests/org.jboss.tools.seam.xml.test/projects/Test/components23.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified:
trunk/seam/tests/org.jboss.tools.seam.xml.test/src/org/jboss/tools/seam/xml/test/SeamXMLModelTest.java
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.xml.test/src/org/jboss/tools/seam/xml/test/SeamXMLModelTest.java 2012-01-20
23:55:08 UTC (rev 38008)
+++
trunk/seam/tests/org.jboss.tools.seam.xml.test/src/org/jboss/tools/seam/xml/test/SeamXMLModelTest.java 2012-01-21
00:15:27 UTC (rev 38009)
@@ -66,6 +66,12 @@
return EclipseResourceUtil.createObjectForResource(f);
}
+ protected XModelObject getComponents23Object() {
+ IFile f = project.getFile(new Path("components23.xml"));
+ assertTrue(f.exists());
+ return EclipseResourceUtil.createObjectForResource(f);
+ }
+
public void testNavigationPagesComponent() {
XModelObject fileObject = getComponents22Object();
assertNotNull("Cannot create XModel object for file components22.xml.",
fileObject);
@@ -90,7 +96,7 @@
JobUtils.waitForIdle();
XMarkerManager.getInstance();
assertNotNull("Cannot create XModel object for file components22.xml.",
fileObject);
-
+
XModelObject coreInit0 =
fileObject.getChildByPath("org.jboss.seam.core.init");
assertNotNull("Cannot find component org.jboss.seam.core.init.", coreInit0);
assertFalse("Validator found wrong errors in component
org.jboss.seam.core.init", XMarkerManager.getInstance().hasErrors(coreInit0));
@@ -105,6 +111,19 @@
}
+ public void testXML23Model() {
+ IFile f = project.getFile(new Path("components23.xml"));
+ assertTrue("File components23.xml is not accessible in Test project.",
f.isAccessible());
+
+ XModelObject fileObject = EclipseResourceUtil.createObjectForResource(f);
+ assertNotNull("Cannot create XModel object for file components22.xml.",
fileObject);
+
+ String entity = fileObject.getModelEntity().getName();
+ assertEquals("File components23.xml is incorrectly parsed by XModel.",
SeamComponentConstants.ENT_SEAM_COMPONENTS_23, entity);
+
+ //TODO continue test
+ }
+
protected void assertAttribute(XModelObject object, String name, String value) {
String actual = object.getAttributeValue(name);
assertEquals("Attribute " + name + " in " +
object.getPresentationString() + " is incorrect.", value, actual);