Author: julien(a)jboss.com
Date: 2007-08-20 18:51:27 -0400 (Mon, 20 Aug 2007)
New Revision: 8007
Added:
modules/portlet/trunk/test/
modules/portlet/trunk/test/build.bat
modules/portlet/trunk/test/build.sh
modules/portlet/trunk/test/build.xml
modules/portlet/trunk/test/src/
modules/portlet/trunk/test/src/main/
modules/portlet/trunk/test/src/main/org/
modules/portlet/trunk/test/src/main/org/jboss/
modules/portlet/trunk/test/src/main/org/jboss/portal/
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/PortalKernelBootstrap.java
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/PortalServlet.java
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/PortletApplicationDeployer.java
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/PortletApplicationDeployment.java
modules/portlet/trunk/test/src/resources/
modules/portlet/trunk/test/src/resources/bean-deployer_1_0.xsd
modules/portlet/trunk/test/src/resources/bean-deployer_2_0.xsd
modules/portlet/trunk/test/src/resources/portlet-test-war/
modules/portlet/trunk/test/src/resources/portlet-test-war/WEB-INF/
modules/portlet/trunk/test/src/resources/portlet-test-war/WEB-INF/classes/
modules/portlet/trunk/test/src/resources/portlet-test-war/WEB-INF/classes/log4j.properties
modules/portlet/trunk/test/src/resources/portlet-test-war/WEB-INF/jboss-beans.xml
modules/portlet/trunk/test/src/resources/portlet-test-war/WEB-INF/web.xml
Modified:
modules/portlet/trunk/build/build-thirdparty.xml
modules/portlet/trunk/build/ide/intellij/idea60/modules/federation/federation.iml
modules/portlet/trunk/build/ide/intellij/idea60/modules/jsr168api/jsr168api.iml
modules/portlet/trunk/build/ide/intellij/idea60/modules/portlet/portlet.iml
modules/portlet/trunk/jboss-portal-portlet.ipr
modules/portlet/trunk/jboss-portal-portlet.iws
modules/portlet/trunk/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/PortletContainerImpl.java
Log:
started the portal test implementation for running the portlet testsuite
Modified: modules/portlet/trunk/build/build-thirdparty.xml
===================================================================
--- modules/portlet/trunk/build/build-thirdparty.xml 2007-08-20 22:42:42 UTC (rev 8006)
+++ modules/portlet/trunk/build/build-thirdparty.xml 2007-08-20 22:51:27 UTC (rev 8007)
@@ -50,12 +50,25 @@
<componentref name="jboss-portal/modules/common"
version="1.0.0-SNAPSHOT"/>
<componentref name="jboss-portal/modules/web"
version="1.0.0-SNAPSHOT"/>
<componentref name="jboss-portal/modules/test"
version="1.0.0-SNAPSHOT"/>
- <componentref name="jboss/jbossxb" version="1.0.0.CR4"/>
- <componentref name="apache-log4j" version="1.2.8"/>
+ <componentref name="sun-servlet" version="2.4"/>
+
+ <!-- Based on
http://anonsvn.jboss.org/repos/jbossas/tags/EMBEDDED_JBOSS_BETA_2/build/b...
-->
+ <componentref name="jboss/microcontainer"
version="2.0.0.Beta3"/>
+ <componentref name="jboss/aop" version="2.0.0.alpha4"/>
+ <componentref name="jboss/jbossxb" version="2.0.0.CR2"/>
+ <componentref name="jboss/jboss-vfs"
version="2.0.0.Beta4"/>
+ <componentref name="jboss/common-core"
version="2.0.4.Alpha"/>
+ <componentref name="jboss/common-logging-log4j"
version="2.0.2.GA"/>
+ <componentref name="jboss/common-logging-jdk"
version="2.0.2.GA"/>
+ <componentref name="jboss/common-logging-spi"
version="2.0.2.GA"/>
+ <componentref name="javassist" version="3.5.0.CR1"/>
+ <componentref name="apache-log4j" version="1.2.14"/>
+ <componentref name="apache-xerces" version="2.7.1"/>
+ <componentref name="sun-jaf" version="1.1"/>
<componentref name="junit" version="3.8.1"/>
- <componentref name="sun-servlet" version="2.4"/>
- <componentref name="oswego-concurrent" version="1.3.4"/>
- <componentref name="sun-jaf" version="1.0.2"/>
+ <componentref name="wutka-dtdparser" version="1.2.1"/>
+ <componentref name="trove" version="1.0.2"/>
+
</build>
<synchronizeinfo/>
Modified:
modules/portlet/trunk/build/ide/intellij/idea60/modules/federation/federation.iml
===================================================================
---
modules/portlet/trunk/build/ide/intellij/idea60/modules/federation/federation.iml 2007-08-20
22:42:42 UTC (rev 8006)
+++
modules/portlet/trunk/build/ide/intellij/idea60/modules/federation/federation.iml 2007-08-20
22:51:27 UTC (rev 8007)
@@ -20,5 +20,9 @@
<orderEntry type="module" module-name="portlet" />
<orderEntryProperties />
</component>
+ <component name="VcsManagerConfiguration">
+ <option name="ACTIVE_VCS_NAME" value="svn" />
+ <option name="USE_PROJECT_VCS" value="false" />
+ </component>
</module>
Modified: modules/portlet/trunk/build/ide/intellij/idea60/modules/jsr168api/jsr168api.iml
===================================================================
---
modules/portlet/trunk/build/ide/intellij/idea60/modules/jsr168api/jsr168api.iml 2007-08-20
22:42:42 UTC (rev 8006)
+++
modules/portlet/trunk/build/ide/intellij/idea60/modules/jsr168api/jsr168api.iml 2007-08-20
22:51:27 UTC (rev 8007)
@@ -10,5 +10,9 @@
<orderEntry type="sourceFolder" forTests="false" />
<orderEntryProperties />
</component>
+ <component name="VcsManagerConfiguration">
+ <option name="ACTIVE_VCS_NAME" value="svn" />
+ <option name="USE_PROJECT_VCS" value="false" />
+ </component>
</module>
Modified: modules/portlet/trunk/build/ide/intellij/idea60/modules/portlet/portlet.iml
===================================================================
--- modules/portlet/trunk/build/ide/intellij/idea60/modules/portlet/portlet.iml 2007-08-20
22:42:42 UTC (rev 8006)
+++ modules/portlet/trunk/build/ide/intellij/idea60/modules/portlet/portlet.iml 2007-08-20
22:51:27 UTC (rev 8007)
@@ -10,7 +10,7 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module-library">
+ <orderEntry type="module-library" exported="">
<library>
<CLASSES>
<root
url="jar://$MODULE_DIR$/../../../../../../thirdparty/sun-servlet/lib/jsp-api.jar!/"
/>
@@ -19,7 +19,7 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module-library">
+ <orderEntry type="module-library" exported="">
<library>
<CLASSES>
<root
url="jar://$MODULE_DIR$/../../../../../../thirdparty/sun-servlet/lib/servlet-api.jar!/"
/>
@@ -55,7 +55,7 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module-library">
+ <orderEntry type="module-library" exported="">
<library>
<CLASSES>
<root
url="jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-portal/modules/web/lib/portal-web-lib.jar!/"
/>
@@ -64,7 +64,7 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module-library">
+ <orderEntry type="module-library" exported="">
<library>
<CLASSES>
<root
url="jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-portal/modules/test/lib/portal-test-lib.jar!/"
/>
@@ -73,7 +73,7 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module-library">
+ <orderEntry type="module-library" exported="">
<library>
<CLASSES>
<root
url="jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-portal/modules/common/lib/portal-common-lib.jar!/"
/>
@@ -82,7 +82,7 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module-library">
+ <orderEntry type="module-library" exported="">
<library>
<CLASSES>
<root
url="jar://$MODULE_DIR$/../../../../../../thirdparty/jboss-portal/modules/common/lib/portal-common-portal-lib.jar!/"
/>
Modified: modules/portlet/trunk/jboss-portal-portlet.ipr
===================================================================
--- modules/portlet/trunk/jboss-portal-portlet.ipr 2007-08-20 22:42:42 UTC (rev 8006)
+++ modules/portlet/trunk/jboss-portal-portlet.ipr 2007-08-20 22:51:27 UTC (rev 8007)
@@ -255,6 +255,7 @@
<module
fileurl="file://$PROJECT_DIR$/build/ide/intellij/idea60/modules/federation/federation.iml"
filepath="$PROJECT_DIR$/build/ide/intellij/idea60/modules/federation/federation.iml"
/>
<module
fileurl="file://$PROJECT_DIR$/build/ide/intellij/idea60/modules/jsr168api/jsr168api.iml"
filepath="$PROJECT_DIR$/build/ide/intellij/idea60/modules/jsr168api/jsr168api.iml"
/>
<module
fileurl="file://$PROJECT_DIR$/build/ide/intellij/idea60/modules/portlet/portlet.iml"
filepath="$PROJECT_DIR$/build/ide/intellij/idea60/modules/portlet/portlet.iml"
/>
+ <module
fileurl="file://$PROJECT_DIR$/build/ide/intellij/idea60/modules/test/test.iml"
filepath="$PROJECT_DIR$/build/ide/intellij/idea60/modules/test/test.iml" />
<module
fileurl="file://$PROJECT_DIR$/build/ide/intellij/idea60/modules/testsuite/testsuite.iml"
filepath="$PROJECT_DIR$/build/ide/intellij/idea60/modules/testsuite/testsuite.iml"
/>
<module
fileurl="file://$PROJECT_DIR$/build/ide/intellij/idea60/modules/thirdparty/thirdparty.iml"
filepath="$PROJECT_DIR$/build/ide/intellij/idea60/modules/thirdparty/thirdparty.iml"
/>
<module
fileurl="file://$PROJECT_DIR$/build/ide/intellij/idea60/modules/tools/tools.iml"
filepath="$PROJECT_DIR$/build/ide/intellij/idea60/modules/tools/tools.iml"
/>
Modified: modules/portlet/trunk/jboss-portal-portlet.iws
===================================================================
--- modules/portlet/trunk/jboss-portal-portlet.iws 2007-08-20 22:42:42 UTC (rev 8006)
+++ modules/portlet/trunk/jboss-portal-portlet.iws 2007-08-20 22:51:27 UTC (rev 8007)
@@ -16,7 +16,9 @@
<option name="USER" value="" />
</component>
<component name="ChangeListManager">
- <list default="true" name="Default" comment=""
/>
+ <list default="true" name="Default" comment="">
+ <change type="MODIFICATION"
beforePath="$PROJECT_DIR$/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/PortletContainerImpl.java"
afterPath="$PROJECT_DIR$/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/PortletContainerImpl.java"
/>
+ </list>
</component>
<component name="ChangeListSynchronizer" />
<component name="ChangesViewManager" flattened_view="true"
/>
@@ -86,6 +88,21 @@
<disable_hints />
</component>
<component name="DebuggerManager">
+ <line_breakpoints>
+ <breakpoint
url="file://$PROJECT_DIR$/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/PortletApplicationImpl.java"
line="130"
class="org.jboss.portal.portlet.impl.jsr168.PortletApplicationImpl"
package="org.jboss.portal.portlet.impl.jsr168">
+ <option name="ENABLED" value="true" />
+ <option name="SUSPEND_POLICY" value="SuspendAll" />
+ <option name="LOG_ENABLED" value="false" />
+ <option name="LOG_EXPRESSION_ENABLED" value="false" />
+ <option name="COUNT_FILTER_ENABLED" value="false" />
+ <option name="COUNT_FILTER" value="0" />
+ <option name="CONDITION_ENABLED" value="false" />
+ <option name="CLASS_FILTERS_ENABLED" value="false" />
+ <option name="INSTANCE_FILTERS_ENABLED" value="false"
/>
+ <option name="CONDITION" value="" />
+ <option name="LOG_MESSAGE" value="" />
+ </breakpoint>
+ </line_breakpoints>
<breakpoint_any>
<breakpoint>
<option name="NOTIFY_CAUGHT" value="true" />
@@ -131,24 +148,84 @@
<component name="FavoritesProjectViewPane" />
<component name="FileEditorManager">
<leaf>
- <file leaf-file-name="portal-beans.xml" pinned="false"
current="false" current-in-tab="false">
- <entry
file="file://$PROJECT_DIR$/portlet/src/resources/test/test-portal-war/WEB-INF/portal-beans.xml">
+ <file leaf-file-name="PortletApplicationDeployment.java"
pinned="false" current="false" current-in-tab="false">
+ <entry
file="file://$PROJECT_DIR$/test/src/main/org/jboss/portal/portlet/test/PortletApplicationDeployment.java">
<provider selected="true"
editor-type-id="text-editor">
- <state line="31" column="0"
selection-start="1998" selection-end="1998"
vertical-scroll-proportion="0.45869297">
+ <state line="88" column="0"
selection-start="4226" selection-end="4226"
vertical-scroll-proportion="0.014796548">
+ <folding>
+ <element signature="imports" expanded="true"
/>
+ </folding>
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="PortalKernelBootstrap.java"
pinned="false" current="true" current-in-tab="true">
+ <entry
file="file://$PROJECT_DIR$/test/src/main/org/jboss/portal/portlet/test/PortalKernelBootstrap.java">
+ <provider selected="true"
editor-type-id="text-editor">
+ <state line="67" column="0"
selection-start="2950" selection-end="2950"
vertical-scroll-proportion="0.6004932">
+ <folding>
+ <element signature="imports" expanded="true"
/>
+ </folding>
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="PortletApplicationImpl.java"
pinned="false" current="false" current-in-tab="false">
+ <entry
file="file://$PROJECT_DIR$/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/PortletApplicationImpl.java">
+ <provider selected="true"
editor-type-id="text-editor">
+ <state line="130" column="0"
selection-start="4473" selection-end="4473"
vertical-scroll-proportion="0.24660912">
<folding />
</state>
</provider>
</entry>
</file>
- <file leaf-file-name="PortletInvokerRegistrationService.java"
pinned="false" current="true" current-in-tab="true">
- <entry
file="file://$PROJECT_DIR$/federation/src/main/org/jboss/portal/portlet/federation/impl/PortletInvokerRegistrationService.java">
+ <file leaf-file-name="PortalServlet.java" pinned="false"
current="false" current-in-tab="false">
+ <entry
file="file://$PROJECT_DIR$/test/src/main/org/jboss/portal/portlet/test/PortalServlet.java">
<provider selected="true"
editor-type-id="text-editor">
- <state line="81" column="19"
selection-start="3150" selection-end="3150"
vertical-scroll-proportion="0.87299633">
+ <state line="31" column="13"
selection-start="1991" selection-end="1991"
vertical-scroll-proportion="0.13316892">
<folding />
</state>
</provider>
</entry>
</file>
+ <file leaf-file-name="PortletApplicationDeployer.java"
pinned="false" current="false" current-in-tab="false">
+ <entry
file="file://$PROJECT_DIR$/test/src/main/org/jboss/portal/portlet/test/PortletApplicationDeployer.java">
+ <provider selected="true"
editor-type-id="text-editor">
+ <state line="52" column="13"
selection-start="2913" selection-end="2913"
vertical-scroll-proportion="-0.7788945">
+ <folding>
+ <element signature="imports" expanded="true"
/>
+ </folding>
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="build.xml" pinned="false"
current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/test/build.xml">
+ <provider selected="true"
editor-type-id="text-editor">
+ <state line="168" column="0"
selection-start="8708" selection-end="8708"
vertical-scroll-proportion="0.28853267">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="log4j.properties" pinned="false"
current="false" current-in-tab="false">
+ <entry
file="file://$PROJECT_DIR$/test/src/resources/portlet-test-war/WEB-INF/classes/log4j.properties">
+ <provider selected="true"
editor-type-id="text-editor">
+ <state line="9" column="38"
selection-start="523" selection-end="523"
vertical-scroll-proportion="0.13316892">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="PortletContainerImpl.java"
pinned="false" current="false" current-in-tab="false">
+ <entry
file="file://$PROJECT_DIR$/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/PortletContainerImpl.java">
+ <provider selected="true"
editor-type-id="text-editor">
+ <state line="159" column="0"
selection-start="6224" selection-end="6224"
vertical-scroll-proportion="0.4535176">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
</leaf>
</component>
<component name="FindManager">
@@ -237,6 +314,10 @@
<option name="myItemId" value="jboss-portal-portlet.ipr"
/>
<option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="tools" />
+ <option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
@@ -244,6 +325,168 @@
<option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
+ <option name="myItemId" value="tools" />
+ <option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId"
value="PsiDirectory:$PROJECT_DIR$/tools" />
+ <option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="jboss-portal-portlet.ipr"
/>
+ <option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="tools" />
+ <option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId"
value="PsiDirectory:$PROJECT_DIR$/tools" />
+ <option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId"
value="PsiDirectory:$PROJECT_DIR$/tools/etc" />
+ <option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="jboss-portal-portlet.ipr"
/>
+ <option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="tools" />
+ <option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId"
value="PsiDirectory:$PROJECT_DIR$/tools" />
+ <option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId"
value="PsiDirectory:$PROJECT_DIR$/tools/etc" />
+ <option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId"
value="PsiDirectory:$PROJECT_DIR$/tools/etc/buildfragments" />
+ <option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="jboss-portal-portlet.ipr"
/>
+ <option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="jboss-portal-portlet.ipr"
/>
+ <option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="test" />
+ <option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="jboss-portal-portlet.ipr"
/>
+ <option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="test" />
+ <option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId"
value="PsiDirectory:$PROJECT_DIR$/test" />
+ <option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="jboss-portal-portlet.ipr"
/>
+ <option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="test" />
+ <option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId"
value="PsiDirectory:$PROJECT_DIR$/test" />
+ <option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId"
value="PsiDirectory:$PROJECT_DIR$/test/src" />
+ <option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId"
value="PsiDirectory:$PROJECT_DIR$/test/src/resources" />
+ <option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="jboss-portal-portlet.ipr"
/>
+ <option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="test" />
+ <option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId"
value="PsiDirectory:$PROJECT_DIR$/test" />
+ <option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId"
value="PsiDirectory:$PROJECT_DIR$/test/src" />
+ <option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId"
value="PsiDirectory:$PROJECT_DIR$/test/src/resources" />
+ <option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId"
value="PsiDirectory:$PROJECT_DIR$/test/src/resources/portlet-test-war" />
+ <option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId"
value="PsiDirectory:$PROJECT_DIR$/test/src/resources/portlet-test-war/WEB-INF"
/>
+ <option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="jboss-portal-portlet.ipr"
/>
+ <option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="test" />
+ <option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId"
value="PsiDirectory:$PROJECT_DIR$/test" />
+ <option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId"
value="PsiDirectory:$PROJECT_DIR$/test/src" />
+ <option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId"
value="PsiDirectory:$PROJECT_DIR$/test/src/main" />
+ <option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId"
value="PsiDirectory:$PROJECT_DIR$/test/src/main/org/jboss/portal/portlet/test"
/>
+ <option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="jboss-portal-portlet.ipr"
/>
+ <option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
<option name="myItemId" value="portlet" />
<option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
</PATH_ELEMENT>
@@ -309,14 +552,6 @@
<option name="myItemId"
value="PsiDirectory:$PROJECT_DIR$/portlet/src/resources/test" />
<option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId"
value="PsiDirectory:$PROJECT_DIR$/portlet/src/resources/test/test-portal-war"
/>
- <option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId"
value="PsiDirectory:$PROJECT_DIR$/portlet/src/resources/test/test-portal-war/WEB-INF"
/>
- <option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
@@ -336,11 +571,11 @@
<option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId"
value="PsiDirectory:$PROJECT_DIR$/portlet/src/resources" />
+ <option name="myItemId"
value="PsiDirectory:$PROJECT_DIR$/portlet/src/main" />
<option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId"
value="PsiDirectory:$PROJECT_DIR$/portlet/src/resources/test" />
+ <option name="myItemId"
value="PsiDirectory:$PROJECT_DIR$/portlet/src/main/org/jboss/portal" />
<option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
@@ -370,13 +605,9 @@
<option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId"
value="PsiDirectory:$PROJECT_DIR$/portlet/src/main/org/jboss/portal/test" />
+ <option name="myItemId"
value="PsiDirectory:$PROJECT_DIR$/portlet/src/main/org/jboss/portal/portlet"
/>
<option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId"
value="PsiDirectory:$PROJECT_DIR$/portlet/src/main/org/jboss/portal/test/portlet"
/>
- <option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
@@ -404,9 +635,13 @@
<option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId"
value="PsiDirectory:$PROJECT_DIR$/portlet/src/main/org/jboss/portal/test" />
+ <option name="myItemId"
value="PsiDirectory:$PROJECT_DIR$/portlet/src/main/org/jboss/portal/portlet"
/>
<option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId"
value="PsiDirectory:$PROJECT_DIR$/portlet/src/main/org/jboss/portal/portlet/deployment"
/>
+ <option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
@@ -437,6 +672,10 @@
<option name="myItemId"
value="PsiDirectory:$PROJECT_DIR$/portlet/src/main/org/jboss/portal/portlet"
/>
<option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId"
value="PsiDirectory:$PROJECT_DIR$/portlet/src/main/org/jboss/portal/portlet/container"
/>
+ <option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
</PATH>
</subPane>
</component>
@@ -462,15 +701,46 @@
<property name="GoToClass.includeLibraries" value="false"
/>
<property name="MemberChooser.showClasses" value="true" />
<property name="MemberChooser.sorted" value="false" />
+ <property name="RunManagerConfig.compileBeforeRunning"
value="false" />
<property name="GoToFile.includeJavaFiles" value="false"
/>
<property name="GoToClass.toSaveIncludeLibraries"
value="false" />
+ <property name="RunManagerConfig.showSettingsBeforeRunnig"
value="false" />
</component>
<component name="ReadonlyStatusHandler">
<option name="SHOW_DIALOG" value="true" />
</component>
<component name="RecentsManager" />
<component name="RestoreUpdateTree" />
- <component name="RunManager">
+ <component name="RunManager" selected="Remote.Unnamed">
+ <configuration default="true" type="Remote"
factoryName="Remote">
+ <option name="USE_SOCKET_TRANSPORT" value="true" />
+ <option name="SERVER_MODE" value="false" />
+ <option name="SHMEM_ADDRESS" value="javadebug" />
+ <option name="HOST" value="localhost" />
+ <option name="PORT" value="5005" />
+ </configuration>
+ <configuration default="true" type="Application"
factoryName="Application" enabled="false" merge="false">
+ <option name="MAIN_CLASS_NAME" />
+ <option name="VM_PARAMETERS" />
+ <option name="PROGRAM_PARAMETERS" />
+ <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$"
/>
+ <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false"
/>
+ <option name="ALTERNATIVE_JRE_PATH" />
+ <option name="ENABLE_SWING_INSPECTOR" value="false" />
+ <module name="" />
+ </configuration>
+ <configuration default="true" type="Applet"
factoryName="Applet">
+ <module name="" />
+ <option name="MAIN_CLASS_NAME" />
+ <option name="HTML_FILE_NAME" />
+ <option name="HTML_USED" value="false" />
+ <option name="WIDTH" value="400" />
+ <option name="HEIGHT" value="300" />
+ <option name="POLICY_FILE"
value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
+ <option name="VM_PARAMETERS" />
+ <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false"
/>
+ <option name="ALTERNATIVE_JRE_PATH" />
+ </configuration>
<configuration default="true" type="JUnit"
factoryName="JUnit" enabled="false" merge="false">
<module name="" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false"
/>
@@ -490,35 +760,22 @@
<option name="Make" value="true" />
</method>
</configuration>
- <configuration default="true" type="Application"
factoryName="Application" enabled="false" merge="false">
- <option name="MAIN_CLASS_NAME" />
- <option name="VM_PARAMETERS" />
- <option name="PROGRAM_PARAMETERS" />
- <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$"
/>
- <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false"
/>
- <option name="ALTERNATIVE_JRE_PATH" />
- <option name="ENABLE_SWING_INSPECTOR" value="false" />
- <module name="" />
- </configuration>
- <configuration default="true" type="Remote"
factoryName="Remote">
+ <configuration default="false" name="Unnamed"
type="Remote" factoryName="Remote">
<option name="USE_SOCKET_TRANSPORT" value="true" />
<option name="SERVER_MODE" value="false" />
<option name="SHMEM_ADDRESS" value="javadebug" />
<option name="HOST" value="localhost" />
- <option name="PORT" value="5005" />
+ <option name="PORT" value="8000" />
+ <RunnerSettings RunnerId="Debug">
+ <option name="DEBUG_PORT" value="8000" />
+ <option name="TRANSPORT" value="0" />
+ <option name="LOCAL" value="false" />
+ </RunnerSettings>
+ <ConfigurationWrapper RunnerId="Debug" />
+ <method>
+ <option name="Make" value="true" />
+ </method>
</configuration>
- <configuration default="true" type="Applet"
factoryName="Applet">
- <module name="" />
- <option name="MAIN_CLASS_NAME" />
- <option name="HTML_FILE_NAME" />
- <option name="HTML_USED" value="false" />
- <option name="WIDTH" value="400" />
- <option name="HEIGHT" value="300" />
- <option name="POLICY_FILE"
value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
- <option name="VM_PARAMETERS" />
- <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false"
/>
- <option name="ALTERNATIVE_JRE_PATH" />
- </configuration>
<configuration name="<template>" type="WebApp"
default="true" selected="false">
<Host>localhost</Host>
<Port>5050</Port>
@@ -619,7 +876,7 @@
<window_info id="Run" active="false"
anchor="bottom" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="false" weight="0.33"
order="2" />
<window_info id="Hierarchy" active="false"
anchor="right" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="false" weight="0.25"
order="2" />
<window_info id="File View" active="false"
anchor="right" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="false" weight="0.33"
order="3" />
- <window_info id="Debug" active="false"
anchor="bottom" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="false" weight="0.4"
order="4" />
+ <window_info id="Debug" active="false"
anchor="bottom" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="false" weight="0.23577236"
order="4" />
<window_info id="Commander" active="false"
anchor="right" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="false" weight="0.4"
order="0" />
<window_info id="IDEtalk Messages" active="false"
anchor="bottom" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="false" weight="0.33"
order="8" />
<window_info id="Version Control" active="false"
anchor="bottom" auto_hide="false" internal_type="DOCKED"
type="DOCKED" visible="false" weight="0.33"
order="8" />
@@ -652,7 +909,7 @@
<option name="FILE_HISTORY_DIALOG_COMMENTS_SPLITTER_PROPORTION"
value="0.8" />
<option name="FILE_HISTORY_DIALOG_SPLITTER_PROPORTION"
value="0.5" />
<option name="ERROR_OCCURED" value="false" />
- <option name="ACTIVE_VCS_NAME" />
+ <option name="ACTIVE_VCS_NAME" value="" />
<option name="UPDATE_GROUP_BY_PACKAGES" value="false" />
<option name="SHOW_FILE_HISTORY_AS_TREE" value="false" />
<option name="FILE_HISTORY_SPLITTER_PROPORTION" value="0.6"
/>
@@ -701,102 +958,125 @@
<component
name="com.intellij.ide.util.scopeChooser.ScopeChooserConfigurable"
proportions="" version="1">
<option name="myLastEditedConfigurable" />
</component>
- <component
name="com.intellij.openapi.roots.ui.configuration.projectRoot.ProjectRootMasterDetailsConfigurable"
proportions="0.11111111" version="1">
+ <component
name="com.intellij.openapi.roots.ui.configuration.projectRoot.ProjectRootMasterDetailsConfigurable"
proportions="0.11111111,0.5" version="1">
<option name="myPlainMode" value="false" />
- <option name="myLastEditedConfigurable" value="federation"
/>
+ <option name="myLastEditedConfigurable" value="test" />
</component>
<component name="com.intellij.profile.ui.ErrorOptionsConfigurable"
proportions="" version="1">
<option name="myLastEditedConfigurable" />
</component>
<component name="editorHistoryManager">
- <entry
file="file://$PROJECT_DIR$/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/PortletContainerImpl.java">
+ <entry
file="jar://$PROJECT_DIR$/thirdparty/jboss/microcontainer/lib/jboss-microcontainer.jar!/org/jboss/kernel/spi/registry/KernelRegistryEntry.class">
<provider selected="true" editor-type-id="text-editor">
- <state line="24" column="0"
selection-start="1808" selection-end="1808"
vertical-scroll-proportion="0.04522613">
- <folding>
- <element signature="imports" expanded="true" />
- </folding>
+ <state line="5" column="106"
selection-start="260" selection-end="260"
vertical-scroll-proportion="0.05918619">
+ <folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/portlet/src/main/org/jboss/portal/portlet/invocation/response/ErrorResponse.java">
+ <entry
file="jar://$PROJECT_DIR$/thirdparty/jboss/microcontainer/lib/jboss-dependency.jar!/org/jboss/dependency/spi/ControllerContext.class">
<provider selected="true" editor-type-id="text-editor">
- <state line="24" column="0"
selection-start="1816" selection-end="1816"
vertical-scroll-proportion="0.044389643">
- <folding>
- <element signature="imports" expanded="true" />
- </folding>
+ <state line="5" column="17"
selection-start="166" selection-end="166"
vertical-scroll-proportion="0.06030151">
+ <folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/tools/build.xml">
+ <entry
file="file://$PROJECT_DIR$/portlet/src/main/org/jboss/portal/portlet/container/PortletApplicationContext.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="0" column="0" selection-start="0"
selection-end="0" vertical-scroll-proportion="0.0">
+ <state line="34" column="17"
selection-start="2204" selection-end="2204"
vertical-scroll-proportion="0.19235511">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/jsr168api/build.xml">
+ <entry
file="jar://$PROJECT_DIR$/thirdparty/jboss/microcontainer/lib/jboss-dependency.jar!/org/jboss/dependency/plugins/AbstractController.class">
<provider selected="true" editor-type-id="text-editor">
- <state line="144" column="40"
selection-start="7470" selection-end="7470"
vertical-scroll-proportion="0.42540073">
+ <state line="5" column="13"
selection-start="166" selection-end="166"
vertical-scroll-proportion="0.06030151">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/federation/build.xml">
+ <entry
file="file://$PROJECT_DIR$/test/src/resources/portlet-test-war/WEB-INF/web.xml">
<provider selected="true" editor-type-id="text-editor">
- <state line="100" column="35"
selection-start="5549" selection-end="5549"
vertical-scroll-proportion="0.6806412">
+ <state line="0" column="0" selection-start="0"
selection-end="0" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/portlet/build.xml">
+ <entry
file="jar:///System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Classes/classes.jar!/com/sun/tools/javadoc/Start.class">
<provider selected="true" editor-type-id="text-editor">
- <state line="104" column="35"
selection-start="5752" selection-end="5752"
vertical-scroll-proportion="0.54747224">
+ <state line="5" column="6" selection-start="152"
selection-end="152" vertical-scroll-proportion="0.10786517">
<folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/tools/etc/buildfragments/modules.ent">
+ <entry
file="file://$PROJECT_DIR$/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/PortletContainerImpl.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="24" column="62"
selection-start="1388" selection-end="1388"
vertical-scroll-proportion="0.35511714">
+ <state line="159" column="0"
selection-start="6224" selection-end="6224"
vertical-scroll-proportion="0.4535176">
<folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/portlet/src/main/org/jboss/portal/portlet/deployment/JBossApplicationMetaDataFactory.java">
+ <entry
file="file://$PROJECT_DIR$/test/src/resources/portlet-test-war/WEB-INF/classes/log4j.properties">
<provider selected="true" editor-type-id="text-editor">
- <state line="37" column="13"
selection-start="2379" selection-end="2379"
vertical-scroll-proportion="0.1356784">
+ <state line="9" column="38"
selection-start="523" selection-end="523"
vertical-scroll-proportion="0.13316892">
<folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/portlet/src/main/org/jboss/portal/test/portlet/session/ReplicatedValue.java">
+ <entry file="file://$PROJECT_DIR$/test/build.xml">
<provider selected="true" editor-type-id="text-editor">
- <state line="32" column="13"
selection-start="2041" selection-end="2041"
vertical-scroll-proportion="0.1356784">
+ <state line="168" column="0"
selection-start="8708" selection-end="8708"
vertical-scroll-proportion="0.28853267">
<folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/portlet/src/main/org/jboss/portal/test/portlet/session/SessionSynchronizationTestCase.java">
+ <entry
file="file://$PROJECT_DIR$/test/src/resources/portlet-test-war/WEB-INF/jboss-beans.xml">
<provider selected="true" editor-type-id="text-editor">
- <state line="30" column="13"
selection-start="1955" selection-end="1955"
vertical-scroll-proportion="0.13316892">
+ <state line="21" column="0"
selection-start="768" selection-end="768"
vertical-scroll-proportion="0.3107275">
<folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/portlet/src/resources/test/test-portal-war/WEB-INF/portal-beans.xml">
+ <entry
file="file://$PROJECT_DIR$/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/PortletApplicationImpl.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="31" column="0"
selection-start="1998" selection-end="1998"
vertical-scroll-proportion="0.45869297">
+ <state line="130" column="0"
selection-start="4473" selection-end="4473"
vertical-scroll-proportion="0.24660912">
<folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/federation/src/main/org/jboss/portal/portlet/federation/impl/PortletInvokerRegistrationService.java">
+ <entry
file="file://$PROJECT_DIR$/test/src/main/org/jboss/portal/portlet/test/PortletApplicationDeployment.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="81" column="19"
selection-start="3150" selection-end="3150"
vertical-scroll-proportion="0.87299633">
+ <state line="88" column="0"
selection-start="4226" selection-end="4226"
vertical-scroll-proportion="0.014796548">
+ <folding>
+ <element signature="imports" expanded="true" />
+ </folding>
+ </state>
+ </provider>
+ </entry>
+ <entry
file="file://$PROJECT_DIR$/test/src/main/org/jboss/portal/portlet/test/PortletApplicationDeployer.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="52" column="13"
selection-start="2913" selection-end="2913"
vertical-scroll-proportion="-0.7788945">
+ <folding>
+ <element signature="imports" expanded="true" />
+ </folding>
+ </state>
+ </provider>
+ </entry>
+ <entry
file="file://$PROJECT_DIR$/test/src/main/org/jboss/portal/portlet/test/PortalServlet.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="31" column="13"
selection-start="1991" selection-end="1991"
vertical-scroll-proportion="0.13316892">
<folding />
</state>
</provider>
</entry>
+ <entry
file="file://$PROJECT_DIR$/test/src/main/org/jboss/portal/portlet/test/PortalKernelBootstrap.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="67" column="0"
selection-start="2950" selection-end="2950"
vertical-scroll-proportion="0.6004932">
+ <folding>
+ <element signature="imports" expanded="true" />
+ </folding>
+ </state>
+ </provider>
+ </entry>
</component>
</project>
Modified:
modules/portlet/trunk/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/PortletContainerImpl.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/PortletContainerImpl.java 2007-08-20
22:42:42 UTC (rev 8006)
+++
modules/portlet/trunk/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/PortletContainerImpl.java 2007-08-20
22:51:27 UTC (rev 8007)
@@ -322,9 +322,9 @@
return application;
}
- public void setApplication(PortletApplicationImpl application)
+ public void setApplication(PortletApplication application)
{
- this.application = application;
+ this.application = (PortletApplicationImpl)application;
}
public Valve getValve()
@@ -344,7 +344,7 @@
public String toString()
{
- return "PortletContainer[name=" + getId() + ",+application=" +
application.getId() + "]";
+ return "PortletContainer[name=" + getId() + "]";
}
/** Initialize the portlet. */
Added: modules/portlet/trunk/test/build.bat
===================================================================
--- modules/portlet/trunk/test/build.bat (rev 0)
+++ modules/portlet/trunk/test/build.bat 2007-08-20 22:51:27 UTC (rev 8007)
@@ -0,0 +1,54 @@
+@echo off
+rem
+rem Invokes a script of the same name in the 'tools' module.
+rem
+rem The 'tools' module is expected to be a peer directory of the directory
+rem in which this script lives.
+rem
+rem @author Jason Dillon <jason(a)planet57.com>
+rem
+
+rem $Id: build.bat 21 2005-01-14 23:14:21Z vietj $
+
+setlocal
+
+set PROGNAME=%~nx0
+set DIRNAME=%~dp0
+
+rem Legacy shell support
+if x%PROGNAME%==x set PROGNAME=build.bat
+if x%DIRNAME%==x set DIRNAME=.\
+
+set MODULE_ROOT=%DIRNAME%
+if x%TOOLS_ROOT%==x set TOOLS_ROOT=%DIRNAME%..\tools
+set TARGET=%TOOLS_ROOT%\bin\build.bat
+set ARGS=%*
+
+rem Start'er up yo
+goto main
+
+:debug
+if not x%DEBUG%==x echo %PROGNAME%: %*
+goto :EOF
+
+:main
+call :debug PROGNAME=%PROGNAME%
+call :debug DIRNAME=%DIRNAME%
+call :debug TOOLS_ROOT=%TOOLS_ROOT%
+call :debug TARGET=%TARGET%
+
+if exist %TARGET% call :call-script & goto :EOF
+rem else fail, we can not go on
+
+echo %PROGNAME%: *ERROR* The target executable does not exist:
+echo %PROGNAME%:
+echo %PROGNAME%: %TARGET%
+echo %PROGNAME%:
+echo %PROGNAME%: Please make sure you have checked out the 'tools' module
+echo %PROGNAME%: and make sure it is up to date.
+goto :EOF
+
+:call-script
+call :debug Executing %TARGET% %ARGS%
+call %TARGET% %ARGS%
+goto :EOF
Property changes on: modules/portlet/trunk/test/build.bat
___________________________________________________________________
Name: svn:executable
+ *
Added: modules/portlet/trunk/test/build.sh
===================================================================
--- modules/portlet/trunk/test/build.sh (rev 0)
+++ modules/portlet/trunk/test/build.sh 2007-08-20 22:51:27 UTC (rev 8007)
@@ -0,0 +1,49 @@
+#!/bin/sh
+##
+## Invokes a script of the same name in the 'tools' module.
+##
+## The 'tools' module is expected to be a peer directory of the directory
+## in which this script lives.
+##
+## @author Jason Dillon <jason(a)planet57.com>
+##
+
+# $Id: build.sh 21 2005-01-14 23:14:21Z vietj $
+
+PROGNAME=`basename $0`
+DIRNAME=`dirname $0`
+
+# Buss it yo
+main() {
+ if [ "x$TOOLS_ROOT" = "x" ]; then
+ TOOLS_ROOT=`cd $DIRNAME/../tools && pwd`
+ fi
+
+ MODULE_ROOT=`cd $DIRNAME; pwd`
+ export TOOLS_ROOT MODULE_ROOT DEBUG TRACE
+
+ # Where is the target script?
+ target="$TOOLS_ROOT/bin/$PROGNAME"
+ if [ ! -f "$target" ]; then
+ echo "${PROGNAME}: *ERROR* The target executable does not exist:"
+ echo "${PROGNAME}:"
+ echo "${PROGNAME}: $target"
+ echo "${PROGNAME}:"
+ echo "${PROGNAME}: Please make sure you have checked out the 'tools'
module"
+ echo "${PROGNAME}: and make sure it is up to date."
+ exit 2
+ fi
+
+ # Get busy yo!
+ if [ "x$DEBUG" != "x" ]; then
+ echo "${PROGNAME}: Executing: /bin/sh $target $@"
+ fi
+ if [ "x$TRACE" = "x" ]; then
+ exec /bin/sh $target "$@"
+ else
+ exec /bin/sh -x $target "$@"
+ fi
+}
+
+# Lets get ready to rumble!
+main "$@"
Property changes on: modules/portlet/trunk/test/build.sh
___________________________________________________________________
Name: svn:executable
+ *
Added: modules/portlet/trunk/test/build.xml
===================================================================
--- modules/portlet/trunk/test/build.xml (rev 0)
+++ modules/portlet/trunk/test/build.xml 2007-08-20 22:51:27 UTC (rev 8007)
@@ -0,0 +1,226 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!DOCTYPE project [
+ <!ENTITY libraries SYSTEM "../thirdparty/libraries.ent">
+ <!ENTITY buildmagic SYSTEM
"../tools/etc/buildfragments/buildmagic.ent">
+ <!ENTITY tools SYSTEM "../tools/etc/buildfragments/tools.ent">
+ <!ENTITY modules SYSTEM "../tools/etc/buildfragments/modules.ent">
+ <!ENTITY defaults SYSTEM
"../tools/etc/buildfragments/defaults.ent">
+ <!ENTITY targets SYSTEM "../tools/etc/buildfragments/targets.ent">
+ ]>
+
+<!-- $Id: build.xml 7969 2007-08-17 09:29:00Z julien(a)jboss.com $ -->
+
+<!--+======================================================================+-->
+<!--| JBoss Portal (The OpenSource Portal) Build File |-->
+<!--| |-->
+<!--| Distributable under LGPL license. |-->
+<!--| See terms of license at
http://www.gnu.org. |-->
+<!--| |-->
+<!--| This file has been designed to work with the 'tools' module and
|-->
+<!--| Buildmagic extentions. |-->
+<!--+======================================================================+-->
+
+<project default="main" name="JBoss Portal">
+
+ <!--+====================================================================+-->
+ <!--| Setup |-->
+ <!--| |-->
+ <!--| Include the common build elements. |-->
+ <!--| |-->
+ <!--| This defines several different targets, properties and paths. |-->
+ <!--| It also sets up the basic extention tasks amoung other things. |-->
+ <!--+====================================================================+-->
+
+ &buildmagic;
+ &modules;
+ &defaults;
+ &tools;
+ &targets;
+
+ <!-- ================================================================== -->
+ <!-- Initialization -->
+ <!-- ================================================================== -->
+
+ <!--
+ | Initialize the build system. Must depend on '_buildmagic:init'.
+ | Other targets should depend on 'init' or things will mysteriously fail.
+ -->
+
+ <target name="init" unless="init.disable"
depends="_buildmagic:init">
+ </target>
+
+ <!--+====================================================================+-->
+ <!--| Configuration |-->
+ <!--| |-->
+ <!--| This target is invoked by the Buildmagic initialization logic |-->
+ <!--| and should contain module specific configuration elements. |-->
+ <!--+====================================================================+-->
+
+ <target name="configure" unless="configure.disable">
+
+ <!-- Configure some properties -->
+ <property name="jboss-junit-configuration" value=""/>
+ <property name="junit.formatter.usefile" value="true"/>
+
+ <!-- Configure thirdparty libraries -->
+ &libraries;
+ <path id="library.classpath">
+ <path refid="jboss.portal/modules/common.classpath"/>
+ <path refid="jboss.portal/modules/web.classpath"/>
+ <path refid="jboss.portal/modules/test.classpath"/>
+
+ <path refid="jboss.microcontainer.classpath"/>
+ <path refid="jboss/common.core.classpath"/>
+ <path refid="jboss/common.logging.spi.classpath"/>
+ <path refid="jboss.jbossxb.classpath"/>
+ <path refid="apache.log4j.classpath"/>
+ <path refid="sun.servlet.classpath"/>
+ </path>
+
+ <!-- Configure modules -->
+ <call target="configure-modules"/>
+ <path id="dependentmodule.classpath">
+ <path refid="jboss.portal-portlet-jsr168api.classpath"/>
+ <path refid="jboss.portal-portlet.classpath"/>
+ </path>
+
+ <!--+=======================================+-->
+ <!--| Override any default properties here. |-->
+ <!--+=======================================+-->
+
+ <!-- Configure defaults & build tools -->
+ <call target="configure-defaults"/>
+ <!--<call target="configure-tools"/>-->
+
+ <!--+=======================================+-->
+ <!--| Define module specific elements here. |-->
+ <!--+=======================================+-->
+ <property name="javadoc.private" value="true"/>
+ <property name="javadoc.protected" value="false"/>
+
+ </target>
+
+ <!--+====================================================================+-->
+ <!--| Compile |-->
+ <!--| |-->
+ <!--| This target should depend on other compile-* targets for each |-->
+ <!--| different type of compile that needs to be performed, short of |-->
+ <!--| documentation compiles. |-->
+ <!--+====================================================================+-->
+
+ <target name="compile"
+ description="Compile all source files."
+ depends="_default:compile-classes,
+ _default:compile-etc,
+ _default:compile-resources">
+ <!-- Add module specific elements here. -->
+ </target>
+
+ <!--+====================================================================+-->
+ <!--| Generate Output |-->
+ <!--| |-->
+ <!--| Generates the target output for this module. Target output is |-->
+ <!--| the output which is ment to be released or used by external |-->
+ <!--| modules. |-->
+ <!--+====================================================================+-->
+
+ <target name="output"
+ description="Generate all target output."
+ depends="compile">
+ <mkdir dir="${build.lib}"/>
+
+ <!-- Portlet lib jar -->
+ <jar jarfile="${build.lib}/portlet-test-lib.jar">
+ <fileset dir="${build.classes}"/>
+ </jar>
+
+ <!-- Portlet test lib jar -->
+ <copy todir="${build.resources}/portlet-test-war/WEB-INF/lib">
+ <fileset dir="${build.lib}"
includes="portlet-test-lib.jar"/>
+ <fileset dir="${jboss.portal/modules/common.lib}"
includes="*.jar"/>
+ <fileset dir="${jboss.portal-portlet.lib}"
includes="*.jar"/>
+
+ <fileset dir="${jboss.microcontainer.lib}"
includes="*.jar"/>
+ <fileset dir="${jboss/common.core.lib}"
includes="*.jar"/>
+ <fileset dir="${jboss/common.logging.log4j.lib}"
includes="*.jar"/>
+ <fileset dir="${jboss/common.logging.spi.lib}"
includes="*.jar"/>
+ <fileset dir="${jboss.aop.lib}" includes="*.jar"/>
+ <fileset dir="${jboss.jbossxb.lib}"
includes="*.jar"/>
+ <fileset dir="${jboss/jboss.vfs.lib}"
includes="*.jar"/>
+ <fileset dir="${javassist.javassist.lib}"
includes="*.jar"/>
+ <fileset dir="${apache.log4j.lib}" includes="*.jar"/>
+ <fileset dir="${apache.xerces.lib}"
includes="*.jar"/>
+ <fileset dir="${wutka.dtdparser.lib}"
includes="*.jar"/>
+ <fileset dir="${oswego.concurrent.lib}"
includes="*.jar"/>
+ <fileset dir="${trove.trove.lib}" includes="*.jar"/>
+ </copy>
+ <jar jarfile="${build.lib}/portlet-test.war">
+ <fileset dir="${build.resources}/portlet-test-war"/>
+ </jar>
+ </target>
+
+ <!-- create artifacts for running the portlet tests (except TCK) target output
should have already been executed -->
+ <target name="package-tests" depends="init">
+
+ </target>
+
+ <!-- ================================================================== -->
+ <!-- Cleaning -->
+ <!-- ================================================================== -->
+
+ <!-- Clean up all build output -->
+ <target name="clean" depends="_default:clean">
+ <!-- Add module specific elements here. -->
+ </target>
+
+ <!--+====================================================================+-->
+ <!--| Documents |-->
+ <!--| |-->
+ <!--| Generate all documentation for this module. |-->
+ <!--+====================================================================+-->
+
+ <target name="docs" depends="_default:docs">
+ <!-- Add module specific elements here. -->
+ </target>
+
+ <!-- ================================================================== -->
+ <!-- Misc. -->
+ <!-- ================================================================== -->
+
+ <target name="main" depends="most"/>
+ <target name="all" depends="_default:all"/>
+ <target name="most" depends="_default:most"/>
+ <target name="help" depends="_default:help"/>
+
+ <!-- ================================================================== -->
+ <!-- Deployment -->
+ <!-- ================================================================== -->
+
+ <target name="tests" depends="init,
_buildmagic:configure:deployment">
+ <!--<antcall target="test-framework"/>-->
+ </target>
+
+</project>
Property changes on: modules/portlet/trunk/test/build.xml
___________________________________________________________________
Name: svn:executable
+ *
Added:
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/PortalKernelBootstrap.java
===================================================================
---
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/PortalKernelBootstrap.java
(rev 0)
+++
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/PortalKernelBootstrap.java 2007-08-20
22:51:27 UTC (rev 8007)
@@ -0,0 +1,88 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.portlet.test;
+
+import org.jboss.kernel.plugins.bootstrap.basic.BasicBootstrap;
+import org.jboss.kernel.plugins.deployment.xml.BeanXMLDeployer;
+import org.jboss.kernel.spi.deployment.KernelDeployment;
+import org.apache.log4j.Logger;
+
+import javax.servlet.ServletContext;
+import javax.servlet.ServletContextListener;
+import javax.servlet.ServletContextEvent;
+import java.net.URL;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class PortalKernelBootstrap extends BasicBootstrap implements
ServletContextListener
+{
+
+ /** . */
+ private final static Logger log = Logger.getLogger(PortalKernelBootstrap.class);
+
+ /** . */
+ private ServletContext servletContext;
+
+ /** . */
+ protected BeanXMLDeployer deployer;
+
+ /** . */
+ protected KernelDeployment deployment;
+
+ protected void bootstrap() throws Throwable
+ {
+ super.bootstrap();
+
+ //
+ deployer = new BeanXMLDeployer(getKernel());
+
+ //
+ URL url = servletContext.getResource("/WEB-INF/jboss-beans.xml");
+ deployment = deployer.deploy(url);
+ }
+
+ public void contextInitialized(ServletContextEvent event)
+ {
+ servletContext = event.getServletContext();
+
+ // For now we do it here
+// System.setProperty("org.jboss.logging.Logger.pluginClass",
"org.jboss.logging.log4j.Log4jLoggerPlugin");
+
+ //
+ run();
+ }
+
+ public void contextDestroyed(ServletContextEvent event)
+ {
+ if (deployment != null)
+ {
+ deployer.undeploy(deployment);
+ }
+
+ //
+ servletContext = null;
+ log.info("Test Portal started");
+ }
+}
Added:
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/PortalServlet.java
===================================================================
--- modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/PortalServlet.java
(rev 0)
+++
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/PortalServlet.java 2007-08-20
22:51:27 UTC (rev 8007)
@@ -0,0 +1,38 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.portlet.test;
+
+import javax.servlet.http.HttpServlet;
+import javax.servlet.ServletException;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class PortalServlet extends HttpServlet
+{
+
+ public void init() throws ServletException
+ {
+ }
+}
Added:
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/PortletApplicationDeployer.java
===================================================================
---
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/PortletApplicationDeployer.java
(rev 0)
+++
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/PortletApplicationDeployer.java 2007-08-20
22:51:27 UTC (rev 8007)
@@ -0,0 +1,200 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.portlet.test;
+
+import org.jboss.portal.web.WebAppListener;
+import org.jboss.portal.web.WebAppEvent;
+import org.jboss.portal.web.WebAppLifeCycleEvent;
+import org.jboss.portal.web.WebApp;
+import org.jboss.portal.web.ServletContainer;
+import org.jboss.portal.web.spi.ServletContainerContext;
+import org.jboss.portal.portlet.impl.jsr168.metadata.PortletApplicationMetaData;
+import org.jboss.portal.portlet.deployment.PortletApplicationMetaDataFactory;
+import org.jboss.portal.portlet.deployment.ValueTrimmingFilter;
+import org.jboss.portal.common.io.IOTools;
+import org.jboss.kernel.spi.dependency.KernelControllerContextAware;
+import org.jboss.kernel.spi.dependency.KernelControllerContext;
+import org.jboss.kernel.Kernel;
+import org.jboss.xb.binding.Unmarshaller;
+import org.jboss.xb.binding.UnmarshallerFactory;
+import org.jboss.xb.binding.JBossXBException;
+import org.apache.log4j.Logger;
+
+import java.util.Map;
+import java.util.HashMap;
+import java.net.URL;
+import java.io.InputStream;
+import java.io.IOException;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class PortletApplicationDeployer implements WebAppListener,
KernelControllerContextAware
+{
+
+ /** . */
+ private Logger log = Logger.getLogger(PortletApplicationDeployer.class);
+
+ /** . */
+ private ServletContainerContext containerContext;
+
+ /** . */
+ private KernelControllerContext controllerContext;
+
+ /** . */
+ private Map deploymentMap = new HashMap();
+
+ /** . */
+ private ClassLoader classLoader;
+
+ public void onEvent(WebAppEvent event)
+ {
+ if (event instanceof WebAppLifeCycleEvent)
+ {
+ WebAppLifeCycleEvent lifeCycleEvent = (WebAppLifeCycleEvent)event;
+ switch(lifeCycleEvent.getType())
+ {
+ case WebAppLifeCycleEvent.ADDED:
+ add(event.getWebApp());
+ break;
+ case WebAppLifeCycleEvent.REMOVED:
+ remove(event.getWebApp());
+ break;
+ }
+ }
+ }
+
+ private void add(WebApp webApp)
+ {
+ PortletApplicationMetaData metaData = buildPortletApplicationMetaData(webApp);
+ if (metaData != null)
+ {
+ ClassLoader oldCL = Thread.currentThread().getContextClassLoader();
+ try
+ {
+ Thread.currentThread().setContextClassLoader(classLoader);
+ Kernel kernel = controllerContext.getKernel();
+ PortletApplicationDeployment deployment = new
PortletApplicationDeployment(kernel, webApp, metaData);
+ deploymentMap.put(webApp.getId(), deployment);
+ deployment.start();
+ }
+ finally
+ {
+ Thread.currentThread().setContextClassLoader(oldCL);
+ }
+ }
+ }
+
+ private void remove(WebApp webApp)
+ {
+ PortletApplicationDeployment deployment =
(PortletApplicationDeployment)deploymentMap.remove(webApp.getId());
+ if (deployment != null)
+ {
+ ClassLoader oldCL = Thread.currentThread().getContextClassLoader();
+ try
+ {
+ Thread.currentThread().setContextClassLoader(classLoader);
+ deployment.stop();
+ }
+ finally
+ {
+ Thread.currentThread().setContextClassLoader(oldCL);
+ }
+ }
+ }
+
+ public void setKernelControllerContext(KernelControllerContext controllerContext)
throws Exception
+ {
+ log.debug("Set controller context " + controllerContext);
+
+ //
+ this.controllerContext = controllerContext;
+ }
+
+ public void unsetKernelControllerContext(KernelControllerContext controllerContext)
throws Exception
+ {
+ log.debug("Unset controller context " + controllerContext);
+
+ //
+ this.controllerContext = null;
+ }
+
+ public void start()
+ {
+ containerContext = ServletContainer.getContext();
+ classLoader = Thread.currentThread().getContextClassLoader();
+
+ //
+ if (containerContext != null)
+ {
+ containerContext.addWebAppListener(this);
+ }
+ }
+
+ public void stop()
+ {
+ if (containerContext != null)
+ {
+ containerContext.removeWebAppListener(this);
+ }
+
+ //
+ containerContext = null;
+ classLoader = null;
+ }
+
+ private PortletApplicationMetaData buildPortletApplicationMetaData(WebApp webApp)
+ {
+ try
+ {
+ URL url =
webApp.getServletContext().getResource("/WEB-INF/portlet.xml");
+ if (url != null)
+ {
+ InputStream in = null;
+ try
+ {
+ in = IOTools.safeBufferedWrapper(url.openStream());
+ PortletApplicationMetaDataFactory factory = new
PortletApplicationMetaDataFactory();
+ Unmarshaller unmarshaller =
UnmarshallerFactory.newInstance().newUnmarshaller();
+ PortletApplicationMetaData portletAppMD =
(PortletApplicationMetaData)unmarshaller.unmarshal(in, new ValueTrimmingFilter(factory),
null);
+ portletAppMD.setId(webApp.getId());
+ return portletAppMD;
+ }
+ finally
+ {
+ IOTools.safeClose(in);
+ }
+ }
+ }
+ catch (IOException e)
+ {
+ log.error("Cannot read portlet.xml", e);
+ }
+ catch (JBossXBException e)
+ {
+ log.error("Cannot parse portlet.xml", e);
+ }
+ return null;
+ }
+}
Added:
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/PortletApplicationDeployment.java
===================================================================
---
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/PortletApplicationDeployment.java
(rev 0)
+++
modules/portlet/trunk/test/src/main/org/jboss/portal/portlet/test/PortletApplicationDeployment.java 2007-08-20
22:51:27 UTC (rev 8007)
@@ -0,0 +1,224 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.portlet.test;
+
+import org.jboss.portal.portlet.container.PortletApplicationContext;
+import org.jboss.portal.portlet.impl.jsr168.PortletApplicationImpl;
+import org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl;
+import org.jboss.portal.portlet.impl.jsr168.metadata.PortletApplicationMetaData;
+import org.jboss.portal.portlet.impl.jsr168.metadata.PortletMetaData;
+import org.jboss.portal.portlet.impl.jsr168.spi.PortletAPIFactory;
+import org.jboss.portal.portlet.impl.jsr168.spi.PortletInfoFactory;
+import org.jboss.portal.portlet.metadata.JBossApplicationMetaData;
+import org.jboss.portal.portlet.metadata.JBossPortletMetaData;
+import org.jboss.portal.web.WebApp;
+import org.jboss.portal.common.util.CollectionBuilder;
+import org.jboss.portal.common.NotYetImplemented;
+import org.jboss.kernel.Kernel;
+import org.jboss.kernel.spi.dependency.KernelController;
+import org.jboss.kernel.spi.dependency.KernelControllerContext;
+import org.jboss.beans.metadata.plugins.AbstractDependencyValueMetaData;
+import org.jboss.beans.metadata.plugins.AbstractBeanMetaData;
+import org.jboss.beans.metadata.plugins.AbstractConstructorMetaData;
+import org.jboss.beans.metadata.plugins.AbstractParameterMetaData;
+import org.jboss.beans.metadata.plugins.AbstractLifecycleMetaData;
+import org.jboss.beans.metadata.plugins.AbstractPropertyMetaData;
+import org.jboss.dependency.spi.ControllerState;
+import org.apache.log4j.Logger;
+
+import javax.servlet.ServletContext;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.Collections;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class PortletApplicationDeployment implements PortletApplicationContext
+{
+
+ /** . */
+ private final Logger log;
+
+ /** . */
+ private final Kernel kernel;
+
+ /** . */
+ private final WebApp webApp;
+
+ /** . */
+ private final PortletApplicationMetaData metaData;
+
+ /** . */
+ private KernelControllerContext portletApplicationControllerContext;
+
+ /** . */
+ private List portletContainerControllerContexts = new ArrayList();
+
+ public PortletApplicationDeployment(Kernel kernel, WebApp webApp,
PortletApplicationMetaData metaData)
+ {
+ this.kernel = kernel;
+ this.webApp = webApp;
+ this.metaData = metaData;
+ this.log = Logger.getLogger(PortletApplicationDeployment.class + "." +
webApp.getId().replace('.', '_'));
+ }
+
+ void start()
+ {
+
+ String id = "PortletApplication[" + webApp.getId() + "]";
+ log.debug("Starting installation");
+
+ //
+ KernelController controller = kernel.getController();
+
+ //
+ for (Iterator i = metaData.getPortlets().iterator(); i.hasNext();)
+ {
+ PortletMetaData portletMetaData = (PortletMetaData)i.next();
+ String portletContainerId = "PortletContainer[" + webApp.getId() +
"," + portletMetaData.getName() + "]";
+ AbstractBeanMetaData bmd = new AbstractBeanMetaData(portletContainerId,
PortletContainerImpl.class.getName());
+ AbstractConstructorMetaData ctormd = new AbstractConstructorMetaData();
+ ctormd.setParameters(new CollectionBuilder().
+ add(new AbstractParameterMetaData(PortletMetaData.class.getName(),
portletMetaData)).
+ add(new AbstractParameterMetaData(JBossPortletMetaData.class.getName(),
(Object)null)).
+ toArrayList());
+ bmd.setConstructor(ctormd);
+ bmd.setStart(new AbstractLifecycleMetaData("start"));
+ bmd.setStop(new AbstractLifecycleMetaData("stop"));
+ bmd.setProperties(Collections.singleton(new
AbstractPropertyMetaData("application", new
AbstractDependencyValueMetaData(id))));
+ try
+ {
+ KernelControllerContext portletContainerControllerContext =
kernel.getController().install(bmd);
+ portletContainerControllerContexts.add(portletContainerControllerContext);
+ }
+ catch (Throwable t)
+ {
+ log.debug("Cannot install portlet container " +
portletMetaData.getName() + " produced an error", t);
+ }
+ }
+
+ //
+ AbstractBeanMetaData bmd = new AbstractBeanMetaData(id,
PortletApplicationImpl.class.getName());
+ AbstractConstructorMetaData ctormd = new AbstractConstructorMetaData();
+ ctormd.setParameters(new CollectionBuilder().
+ add(new AbstractParameterMetaData(PortletApplicationMetaData.class.getName(),
metaData)).
+ add(new AbstractParameterMetaData(JBossApplicationMetaData.class.getName(),
(Object)null)).
+ add(new AbstractParameterMetaData(PortletApplicationContext.class.getName(),
this)).
+ add(new AbstractParameterMetaData(PortletAPIFactory.class.getName(), new
AbstractDependencyValueMetaData("PortletAPIFactory"))).
+ add(new AbstractParameterMetaData(PortletInfoFactory.class.getName(), new
AbstractDependencyValueMetaData("PortletInfoFactory"))).
+ toArrayList());
+ bmd.setConstructor(ctormd);
+ bmd.setStart(new AbstractLifecycleMetaData("start"));
+ bmd.setStop(new AbstractLifecycleMetaData("stop"));
+
+ //
+ try
+ {
+ portletApplicationControllerContext = controller.install(bmd);
+ }
+ catch (Throwable throwable)
+ {
+ log.debug("Installation of portlet application produced an error",
throwable);
+ }
+
+ logBeanFailure(portletApplicationControllerContext);
+ for (Iterator i = portletContainerControllerContexts.iterator(); i.hasNext();)
+ {
+ KernelControllerContext portletContainerControllerContext =
(KernelControllerContext)i.next();
+ logBeanFailure(portletContainerControllerContext);
+ }
+ }
+
+ private void logBeanFailure(KernelControllerContext context)
+ {
+ Throwable t = context.getError();
+ if (t != null)
+ {
+ log.debug("Installation of bean " + context.getName() + "
produced an error", t);
+ }
+ }
+
+ void stop()
+ {
+ log.debug("Stopping installation");
+ if (portletApplicationControllerContext != null)
+ {
+ KernelController controller = kernel.getController();
+ controller.uninstall(portletApplicationControllerContext.getName());
+ portletApplicationControllerContext = null;
+ for (Iterator i = portletContainerControllerContexts.iterator(); i.hasNext();)
+ {
+ KernelControllerContext portletContainerControllerContext =
(KernelControllerContext)i.next();
+ controller.uninstall(portletContainerControllerContext.getName());
+ }
+ }
+ }
+
+ public ServletContext getServletContext()
+ {
+ return webApp.getServletContext();
+ }
+
+ public ClassLoader getClassLoader()
+ {
+ return webApp.getClassLoader();
+ }
+
+ public void startPortletApplication() throws Exception
+ {
+ throw new NotYetImplemented();
+// try
+// {
+// kernel.getController().change(portletApplicationControllerContext,
ControllerState.INSTALLED);
+// }
+// catch (Throwable throwable)
+// {
+// }
+ }
+
+ public void stopPortletApplication()
+ {
+ throw new NotYetImplemented();
+// try
+// {
+// kernel.getController().change(portletApplicationControllerContext,
ControllerState.CREATE);
+// }
+// catch (Throwable throwable)
+// {
+// throwable.printStackTrace();
+// }
+ }
+
+ public void startPortletContainer(String portletName) throws Exception
+ {
+ throw new NotYetImplemented();
+ }
+
+ public void stopPortletContainer(String portletName)
+ {
+ throw new NotYetImplemented();
+ }
+}
Added: modules/portlet/trunk/test/src/resources/bean-deployer_1_0.xsd
===================================================================
--- modules/portlet/trunk/test/src/resources/bean-deployer_1_0.xsd
(rev 0)
+++ modules/portlet/trunk/test/src/resources/bean-deployer_1_0.xsd 2007-08-20 22:51:27 UTC
(rev 8007)
@@ -0,0 +1,803 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- A prototype xsd schema for the pojoserver xml deployer
+$Id: bean-deployer_1_0.xsd 60491 2007-02-12 15:20:09Z alesj $
+ -->
+<xsd:schema
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="urn:jboss:bean-deployer"
+ xmlns="urn:jboss:bean-deployer"
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified"
+ version="1.0">
+
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The xml deployer schema. The deployment document instance
+ root element should reference the schema in the root
+ deployment element using something like:
+
+ <deployment
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_1_0.xsd"
+ xmlns="urn:jboss:bean-deployer">
+ ...
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:element name="deployment" type="deploymentType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The root of the xml deployer instance document
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:complexType name="deploymentType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The deployment contains a number of beans and bean factories.
+
+ e.g.
+ <deployment ...>
+ <bean .../>
+ <bean .../>
+ <beanfactory .../>
+ </deployment>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="annotation" type="annotationType"
minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="classloader" type="classloaderType"
minOccurs="0"/>
+ <xsd:element name="bean" type="beanType"
minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="beanfactory" type="beanfactoryType"
minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:choice>
+ </xsd:complexType>
+
+ <xsd:complexType name="beanType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The bean is an instance of a pojo.
+
+ e.g.
+ <bean name="MyName" class="com.acme.POJO">
+ <classloader .../>
+ <constructor .../>
+ <property .../>
+ <property .../>
+ <depends .../>
+ </bean>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="annotation" type="annotationType"
minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="classloader" type="classloaderType"
minOccurs="0"/>
+ <xsd:element name="constructor" type="constructorType"
minOccurs="0"/>
+ <xsd:element name="property" type="propertyType"
minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="create" type="lifecycleType"
minOccurs="0"/>
+ <xsd:element name="start" type="lifecycleType"
minOccurs="0"/>
+ <xsd:element name="stop" type="lifecycleType"
minOccurs="0"/>
+ <xsd:element name="destroy" type="lifecycleType"
minOccurs="0"/>
+ <xsd:element name="depends" type="dependsType"
minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="demand" type="demandType"
minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="supply" type="supplyType"
minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string"
use="optional"/>
+ <xsd:attribute name="class" type="xsd:token"
use="required"/>
+ <xsd:attribute name="mode" type="controllerModeType"
use="optional"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="classloaderType" mixed="true">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The classloader is to load the bean
+
+ e.g.
+ <bean ...>
+ <classloader><inject
bean="Classloader"/></classloader>
+ </bean>
+
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="classLoaderValueType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="beanfactoryType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The beanfactory is a
org.jboss.beans.metadata.plugins.factory.GenericBeanFactory deployment.
+ This gives you a factory such you can invoke createBean() multiple times with
the guarantee
+ that the injected objects are "installed".
+
+ e.g.
+ <bean name="User" class="com.acme.User">
+ <property name="factory"><inject
bean="Factory"/></property>
+ </bean>
+
+ <beanfactory name="Factory"
class="com.acme.SomeBean">
+ <property name="someProperty"><inject
bean="SomeOtherBean"/></property>
+ </beanFactory>
+
+ package com.acme.User;
+ public class User {
+ // factory has been configured at this point
+ public void setFactory(GenericBeanFactory factory) {
+ SomeBean bean1 = factory.createBean();
+ System.out.println(bean1.getSomeProperty()); //
"SomeOtherBean"
+ SomeBean bean2 = factory.createBean();
+ System.out.println(bean2.getSomeProperty()); //
"SomeOtherBean"
+ }
+ }
+ ]]>
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="annotation" type="annotationType"
minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="classloader" type="classloaderType"
minOccurs="0"/>
+ <xsd:element name="constructor" type="constructorType"
minOccurs="0"/>
+ <xsd:element name="property" type="propertyType"
minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="create" type="lifecycleType"
minOccurs="0"/>
+ <xsd:element name="start" type="lifecycleType"
minOccurs="0"/>
+ <xsd:element name="depends" type="dependsType"
minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="demand" type="demandType"
minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="supply" type="supplyType"
minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string"
use="optional"/>
+ <xsd:attribute name="class" type="xsd:token"
use="required"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="constructorType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The constructor for this bean(factory) instance.
+
+ e.g. simple constructor - new POJO(new String("String value"));
+ <bean name="MyBean" class="com.acme.POJO">
+ <constructor>
+ <parameter>String value</parameter>
+ </constructor>
+ </bean>
+
+ e.g. static factory - com.acme.Factory.newInstance(new String("String
value"));
+ <bean name="MyBean" class="com.acme.POJO">
+ <constructor factoryClass="com.acme.Factory"
factoryMethod="newInstance">
+ <parameter>String value</parameter>
+ </constructor>
+ </bean>
+
+ e.g. instance factory - "SomeOtherBean".newInstance(new
String("String value"));
+ <bean name="MyBean" class="com.acme.POJO">
+ <constructor factoryMethod="newInstance">
+ <factory bean="SomeOtherBean"/>
+ <parameter>String value</parameter>
+ </constructor>
+ </bean>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="annotation" type="annotationType"
minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="factory" type="dependencyType"
minOccurs="0"/>
+ <xsd:element name="parameter" type="parameterType"
minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="factoryClass" type="classNameType"
use="optional"/>
+ <xsd:attribute name="factoryMethod" type="xsd:token"
use="optional"/>
+ <xsd:attribute name="classLoader" type="xsd:token"
use="optional"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="lifecycleType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The lifecycle lets you override the method parameters passed to the
+ create, start, stop, destroy lifecycle callbacks.
+
+ e.g.
+ <bean>
+ <create method="initialize">
+ <parameter>String value</parameter>
+ </create>
+ </bean>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="annotation" type="annotationType"
minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="parameter" type="parameterType"
minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="method" type="xsd:token"
use="optional"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="dependencyType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A dependency represents an injection into the bean.
+ They can be used anywhere a string value can appear.
+
+ e.g. Bean instance -
"InjectedIntoMe".setSomeProperty("BeanInjected");
+ <bean name="InjectedIntoMe" ...>
+ <property name="someProperty"><inject
bean="BeanInjected"/>
+ </bean>
+ <bean name="BeanInjected" .../>
+
+ e.g. Bean property -
"InjectedIntoMe".setSomeProperty("BeanInjected".getOtherProperty());
+ <bean name="InjectedIntoMe" ...>
+ <property name="someProperty"><inject
bean="BeanInjected" property="otherProperty"/>
+ </bean>
+ <bean name="BeanInjected" .../>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="bean" type="xsd:string"
use="required"/>
+ <xsd:attribute name="property" type="xsd:string"
use="optional"/>
+ <xsd:attribute name="state" type="controllerStateType"
use="optional"/>
+ <xsd:attribute name="whenRequired"
type="controllerStateType" use="optional"/>
+ </xsd:complexType>
+
+ <!-- todo use extension with dependencyType -->
+ <xsd:complexType name="injectionType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A dependency represents an injection into the bean.
+ They can be used anywhere a string value can appear.
+
+ e.g. Bean instance -
"InjectedIntoMe".setSomeProperty("BeanInjected");
+ <bean name="InjectedIntoMe" ...>
+ <property name="someProperty"><inject
bean="BeanInjected"/>
+ </bean>
+ <bean name="BeanInjected" .../>
+
+ e.g. Bean property -
"InjectedIntoMe".setSomeProperty("BeanInjected".getOtherProperty());
+ <bean name="InjectedIntoMe" ...>
+ <property name="someProperty"><inject
bean="BeanInjected" property="otherProperty"/>
+ </bean>
+ <bean name="BeanInjected" .../>
+
+ e.g. Contextual injection - finding exactly one instance which matches
property's class type
+ <bean name="InjectedIntoMe" ...>
+ <property
name="transactionManager"><inject/></property>
+ </bean>
+
+ e.g. Contextual injection - finding exactly one instance which matches
property's name
+ <bean name="InjectedIntoMe" ...>
+ <property name="transactionManager"><inject
type="ByName"/></property>
+ </bean>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="bean" type="xsd:string"
use="optional"/>
+ <xsd:attribute name="property" type="xsd:string"
use="optional"/>
+ <xsd:attribute name="state" type="controllerStateType"
use="optional"/>
+ <xsd:attribute name="whenRequired"
type="controllerStateType" use="optional"/>
+ <xsd:attribute name="type" type="injectionTypeType"
use="optional" default="ByClass"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="parameterType" mixed="true">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A parameter is used to define the constructor, factory
+ and lifecycle method usage.
+
+ e.g. Using number of parameters when this is unique enough
+ <bean ...>
+ <constructor>
+ <parameter>1st Parameter</parameter>
+ <parameter>2nd Parameter</parameter>
+ </constructor>
+ </bean>
+
+ e.g. Explicitly stating the parameter type to resolve overloading
+ <bean ...>
+ <constructor>
+ <parameter>1st Parameter</parameter>
+ <parameter class="java.lang.String">2nd
Parameter</parameter>
+ </constructor>
+ </bean>
+
+ e.g. To override the injected type use <value/>
+ <bean ...>
+ <constructor>
+ <parameter>1st Parameter</parameter>
+ <!-- Parameter is java.lang.Object, but we inject a String -->
+ <parameter class="java.lang.Object">
+ <value class="java.lang.String">2nd
Parameter</value>
+ </parameter>
+ </constructor>
+ </bean>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="annotatedValueType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="propertyType" mixed="true">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A property defines values passed to the setters.
+
+ e.g. Using the type from the setter argument
+ <bean ...>
+ <property name="someProperty">Some value</property>
+ </bean>
+
+ e.g. Overridding the injected type
+ <bean ...>
+ <property name="someProperty"
class="java.lang.String">Some value</property>
+ </bean>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="namedValueType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="annotationType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The annotation type represents an annotation on the particular join point.
+ TODO: This is currently unimplemented.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="attribute"
type="annotationAttributeType" minOccurs="0"
maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string"
use="required"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="annotationAttributeType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ An attribute attached to a particular annotation.
+ TODO: This is currently unimplemented.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="name" type="xsd:string"
use="required"/>
+ <xsd:attribute name="value" type="xsd:string"
use="required"/>
+ </xsd:complexType>
+
+ <xsd:simpleType name="classNameType">
+ <xsd:annotation>
+ <xsd:documentation> The elements that use this type designate the name
+ of a Java class or interface. The name is in the form of a "binary
+ name", as defined in the JLS and as used in Class.forName().
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:string">
+ <xsd:whiteSpace value="collapse"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:group name="valueGroup">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The value group represents the comment elements of the other configurations
+ <parameter/>, <property/> or collection components
+ e.g.
+
+ <property name="someProperty">
+ <list><value
class="java.lang.String">Hello</value></list>
+ </property>
+
+ e.g. This also defines the null value
+ <property name="someProperty"><null/></property>
+ as opposed to the empty string
+ <property name="someProperty"></property>
+ or the string "null"
+ <property name="someProperty">null</property>
+
+ TODO: "any" is currently unimplemented.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:choice>
+ <xsd:element name="bean" type="beanType"/>
+ <xsd:element name="value" type="plainValueType"/>
+ <xsd:element name="collection"
type="collectionType"/>
+ <xsd:element name="list" type="listType"/>
+ <xsd:element name="set" type="setType"/>
+ <xsd:element name="array" type="arrayType"/>
+ <xsd:element name="map" type="mapType"/>
+ <xsd:element name="inject" type="injectionType"/>
+ <xsd:element name="null">
+ <xsd:complexType/>
+ </xsd:element>
+ <xsd:any namespace="##other"
processContents="strict">
+ <xsd:annotation>
+ <xsd:documentation>An extension value</xsd:documentation>
+ </xsd:annotation>
+ </xsd:any>
+ </xsd:choice>
+ </xsd:group>
+
+ <xsd:complexType name="plainValueType" mixed="true">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A simple value, used in collections and to specify a type for parameters.
+
+ e.g.
+ <parameter><value
class="com.acme.MyClass">xxx</value></parameter>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="class" type="classNameType"
use="optional"/>
+ <xsd:attribute name="replace" type="xsd:boolean"
use="optional"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="valueType" mixed="true">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A value that can take other values, i.e. properties and parameters.
+
+ e.g.
+ <parameter><value
class="com.acme.MyClass">xxx</value></parameter>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="plainValueType">
+ <xsd:sequence>
+ <xsd:choice minOccurs="0">
+ <xsd:group ref="valueGroup"/>
+ </xsd:choice>
+ </xsd:sequence>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="classLoaderValueType" mixed="true">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A value that represents a classloader.
+
+ e.g.
+ <classloader><inject
bean="SomeClassLoader"/></parameter>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:choice>
+ <xsd:element name="bean" type="beanType"/>
+ <xsd:element name="inject" type="dependencyType"/>
+ <xsd:element name="null">
+ <xsd:complexType/>
+ </xsd:element>
+ <xsd:any namespace="##other"
processContents="strict">
+ <xsd:annotation>
+ <xsd:documentation>An extension value</xsd:documentation>
+ </xsd:annotation>
+ </xsd:any>
+ </xsd:choice>
+ </xsd:complexType>
+
+ <xsd:complexType name="annotatedValueType" mixed="true">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A value that can take annotations.
+ TODO: This is currently unimplemented.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="valueType">
+ <xsd:sequence>
+ <xsd:element name="annotation"
type="annotationType" minOccurs="0"
maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="namedValueType" mixed="true">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A value that has a name, currently only a property.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="annotatedValueType">
+ <xsd:attribute name="name" type="xsd:string"
use="required"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="baseCollectionType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A collection defines a java.util.Collection object.
+ It has two class definitions:
+ class: The implementation class of the collection
+ elementClass: The default implementation class of the elements
+ The default "class" is a java.util.ArrayList unless the point of
injection
+ defines a concrete type, e.g. in the signature of the setter
+
+ example:
+ <property name="whatever" class="java.util.ArrayList"
elementClass="java.net.URL">
+ <value>http://localhost</value> <!-- Creates a URL -->
+ <value
class="java.lang.String">http://localhost</value> <!-- Creates a
String -->
+ </property>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:group ref="valueGroup"/>
+ </xsd:choice>
+ <xsd:attribute name="class" type="classNameType"
use="optional"/>
+ <xsd:attribute name="elementClass" type="classNameType"
use="optional"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="collectionType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A collection, see baseCollectionType
+ the default collection is a java.util.ArrayList
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="baseCollectionType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="listType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A list, see baseCollectionType
+ the default list is a java.util.ArrayList
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="baseCollectionType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="setType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A set, see baseCollectionType
+ the default set is a java.util.HashSet
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="baseCollectionType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="arrayType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ An array, see baseCollectionType
+ the default array is a java.lang.Object[]
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="baseCollectionType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="mapType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A map defines a java.util.Map object.
+ It has three class definitions:
+ class: The implementation class of the class
+ keyClass: The default implementation class of the keys
+ valueClass: The default implementation class of the values
+ The default "class" is a java.util.HashMap unless the point of
injection
+ defines a concrete type, e.g. in the signature of the setter
+
+ e.g.:
+ <property name="whatever" class="java.util.HashMap"
keyClass="java.lang.String" valueClas="java.net.URL">
+ <!-- map.put(new String("default"), new
URL("http://localhost"));
+
<entry><key>default</key><value>http://localhost</value>
+ <!-- map.put(new String("default"), new
String("http://localhost"));
+ <entry><key>default</key><value
class="java.lang.String">http://localhost</value>
+ </property>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="entry" type="entryType"
minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="class" type="classNameType"
use="optional"/>
+ <xsd:attribute name="keyClass" type="classNameType"
use="optional"/>
+ <xsd:attribute name="valueClass" type="classNameType"
use="optional"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="entryType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ An entry in map. These are made of key/value pairs
+
+ e.g.:
+
<entry><key>default</key><value>http://localhost</value>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="key" type="valueType"
minOccurs="0"/>
+ <xsd:element name="value" type="valueType"
minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="dependsType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The depends element is used to define that one bean depends upon
+ another for the create/start/stop/destroy lifecycle
+
+ e.g.:
+ <bean name="IGoFirst" .../>
+ <bean name="IGoSecond" ...>
+ <depends>IGoFirst</depends>
+ </bean>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string"/>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="demandType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The demand is used to specify a dependency on a supply
+ and when the demand is should be deplied
+
+ e.g.:
+ ISupply must be installed before IDemand is constructed
+
+ <bean name="IDemand">
+ <demand state="Instantiated">theSupply</demand>
+ </bean>
+ <bean name="ISupply" ...>
+ <supply>theSupply</supply>
+ </bean>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="state" type="controllerStateType"
use="optional"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="supplyType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The supply is used to specify that the bean supplies a demanded dependency
+
+ e.g.:
+ <bean name="IDemand" ...>
+ <demand>theSupply</demand>
+ </bean>
+ <bean name="ISupply" ...>
+ <supply>theSupply</supply>
+ </bean>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string"/>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <xsd:simpleType name="controllerStateType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The controller state is used to say when dependencies must be satisfied.
+ Valid values include:
+ Described
+ Instantiated
+ Configured
+ Create
+ Start
+ Installed
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:string">
+ <xsd:whiteSpace value="collapse"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="controllerModeType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The controller mode, used to control how automatic the bean progresses
+ through the controller lifecyle (the states).
+ Valid values include:
+ Automatic (default) - the controller takes the bean to "Installed"
+ Manual - the user must tell the controller the required state
+ On Demand - the controller takes the bean to "Installed" when
another bean depends on it
+ Disabled - the controller or user cannot change the state
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:string">
+ <xsd:whiteSpace value="collapse"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="injectionTypeType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ You can set the type of lookup requirement - class type (ByClass) or property
name (ByName)
+ Valid values include:
+ ByClass (default)
+ ByName
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:string">
+ <xsd:whiteSpace value="collapse"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <!--
+ WARN:
+ Do not use this in the bean deployer, it won't work!
+ FIXME:
+ The correct way to do this is to have two separate
+ schemas (one for deployments the other for beans)
+ then use schema imports.
+ -->
+ <xsd:element name="bean" type="beanType"/>
+
+ <!--
+ WARN:
+ Do not use this in the bean deployer, it won't work!
+ FIXME:
+ The correct way to do this is to have two separate
+ schemas (one for deployments the other for beans)
+ then use schema imports.
+ -->
+ <xsd:element name="beanfactory" type="beanfactoryType"/>
+
+</xsd:schema>
Added: modules/portlet/trunk/test/src/resources/bean-deployer_2_0.xsd
===================================================================
--- modules/portlet/trunk/test/src/resources/bean-deployer_2_0.xsd
(rev 0)
+++ modules/portlet/trunk/test/src/resources/bean-deployer_2_0.xsd 2007-08-20 22:51:27 UTC
(rev 8007)
@@ -0,0 +1,898 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- A prototype xsd schema for the pojoserver xml deployer
+$Id: bean-deployer_2_0.xsd 60491 2007-02-12 15:20:09Z alesj $
+ -->
+<xsd:schema
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="urn:jboss:bean-deployer:2.0"
+ xmlns="urn:jboss:bean-deployer:2.0"
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified"
+ version="1.0">
+
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The xml deployer schema. The deployment document instance
+ root element should reference the schema in the root
+ deployment element using something like:
+
+ <deployment xmlns="urn:jboss:bean-deployer:2.0">
+ ...
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:element name="deployment" type="deploymentType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The root of the xml deployer instance document
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:complexType name="deploymentType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The deployment contains a number of beans and bean factories.
+
+ e.g.
+ <deployment ...>
+ <bean .../>
+ <bean .../>
+ <beanfactory .../>
+ </deployment>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="annotation" type="annotationType"
minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="classloader" type="classloaderType"
minOccurs="0"/>
+ <xsd:element name="bean" type="beanType"
minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="beanfactory" type="beanfactoryType"
minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:any namespace="##other" processContents="strict"
minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>An extension value</xsd:documentation>
+ </xsd:annotation>
+ </xsd:any>
+ </xsd:choice>
+ <xsd:attribute name="name" type="xsd:string"
use="optional"/>
+ <xsd:attribute name="scoped" type="xsd:boolean"
use="optional"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="beanType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The bean is an instance of a pojo.
+
+ e.g.
+ <bean name="MyName" class="com.acme.POJO">
+ <classloader .../>
+ <constructor .../>
+ <property .../>
+ <property .../>
+ <depends .../>
+ </bean>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="annotation" type="annotationType"
minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="classloader" type="classloaderType"
minOccurs="0"/>
+ <xsd:element name="constructor" type="constructorType"
minOccurs="0"/>
+ <xsd:element name="property" type="propertyType"
minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="create" type="lifecycleType"
minOccurs="0"/>
+ <xsd:element name="start" type="lifecycleType"
minOccurs="0"/>
+ <xsd:element name="stop" type="lifecycleType"
minOccurs="0"/>
+ <xsd:element name="destroy" type="lifecycleType"
minOccurs="0"/>
+ <xsd:element name="depends" type="dependsType"
minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="demand" type="demandType"
minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="supply" type="supplyType"
minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="install" type="installType"
minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="uninstall" type="installType"
minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string"
use="optional"/>
+ <xsd:attribute name="class" type="xsd:token"
use="optional"/>
+ <xsd:attribute name="mode" type="controllerModeType"
use="optional"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="classloaderType" mixed="true">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The classloader is to load the bean
+
+ e.g.
+ <bean ...>
+ <classloader><inject
bean="Classloader"/></classloader>
+ </bean>
+
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="classLoaderValueType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="beanfactoryType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The beanfactory is a
org.jboss.beans.metadata.plugins.factory.GenericBeanFactory deployment.
+ This gives you a factory such you can invoke createBean() multiple times with
the guarantee
+ that the injected objects are "installed".
+
+ e.g.
+ <bean name="User" class="com.acme.User">
+ <property name="factory"><inject
bean="Factory"/></property>
+ </bean>
+
+ <beanfactory name="Factory"
class="com.acme.SomeBean">
+ <property name="someProperty"><inject
bean="SomeOtherBean"/></property>
+ </beanFactory>
+
+ package com.acme.User;
+ public class User {
+ // factory has been configured at this point
+ public void setFactory(GenericBeanFactory factory) {
+ SomeBean bean1 = factory.createBean();
+ System.out.println(bean1.getSomeProperty()); //
"SomeOtherBean"
+ SomeBean bean2 = factory.createBean();
+ System.out.println(bean2.getSomeProperty()); //
"SomeOtherBean"
+ }
+ }
+ ]]>
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="classloader" type="classloaderType"
minOccurs="0"/>
+ <xsd:element name="constructor" type="constructorType"
minOccurs="0"/>
+ <xsd:element name="property" type="propertyType"
minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="create" type="lifecycleType"
minOccurs="0"/>
+ <xsd:element name="start" type="lifecycleType"
minOccurs="0"/>
+ <xsd:element name="depends" type="dependsType"
minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="demand" type="demandType"
minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="supply" type="supplyType"
minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="install" type="installType"
minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="uninstall" type="installType"
minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string"
use="optional"/>
+ <xsd:attribute name="class" type="xsd:token"
use="required"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="constructorType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The constructor for this bean(factory) instance.
+
+ e.g. simple constructor - new POJO(new String("String value"));
+ <bean name="MyBean" class="com.acme.POJO">
+ <constructor>
+ <parameter>String value</parameter>
+ </constructor>
+ </bean>
+
+ e.g. static factory - com.acme.Factory.newInstance(new String("String
value"));
+ <bean name="MyBean" class="com.acme.POJO">
+ <constructor factoryClass="com.acme.Factory"
factoryMethod="newInstance">
+ <parameter>String value</parameter>
+ </constructor>
+ </bean>
+
+ e.g. instance factory - "SomeOtherBean".newInstance(new
String("String value"));
+ <bean name="MyBean" class="com.acme.POJO">
+ <constructor factoryMethod="newInstance">
+ <factory bean="SomeOtherBean"/>
+ <parameter>String value</parameter>
+ </constructor>
+ </bean>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="annotation" type="annotationType"
minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:choice minOccurs="0">
+ <xsd:sequence>
+ <xsd:element name="factory" type="factoryType"
minOccurs="0"/>
+ <xsd:element name="parameter" type="parameterType"
minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:element name="bean" type="beanType"/>
+ <xsd:element name="value" type="plainValueType"/>
+ <xsd:element name="collection"
type="collectionType"/>
+ <xsd:element name="list" type="listType"/>
+ <xsd:element name="set" type="setType"/>
+ <xsd:element name="array" type="arrayType"/>
+ <xsd:element name="map" type="mapType"/>
+ <xsd:element name="inject" type="injectionType"/>
+ <xsd:any namespace="##other"
processContents="strict">
+ <xsd:annotation>
+ <xsd:documentation>An extension value</xsd:documentation>
+ </xsd:annotation>
+ </xsd:any>
+ </xsd:choice>
+ </xsd:sequence>
+ <xsd:attribute name="factoryClass" type="classNameType"
use="optional"/>
+ <xsd:attribute name="factoryMethod" type="xsd:token"
use="optional"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="lifecycleType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The lifecycle lets you override the method parameters passed to the
+ create, start, stop, destroy lifecycle callbacks.
+
+ e.g.
+ <bean>
+ <create method="initialize">
+ <parameter>String value</parameter>
+ </create>
+ </bean>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="annotation" type="annotationType"
minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="parameter" type="parameterType"
minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="method" type="xsd:token"
use="optional"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="installType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The install type you write your installation methods state operations.
+ The install operation is invoked after the start lifecycle.
+ The uninstall operation is invoked before the stop lifecycle.
+
+ e.g.
+ <bean>
+ <install bean="Repository" method="add">
+ <parameter><this/></parameter>
+ </install>
+ <uninstall bean="Repository" method="remove">
+ <parameter><this/></parameter>
+ </uninstall>
+ </bean>
+
+ If you don't include a bean attribute, the method is invoked on your bean
+
+ e.g.
+ <bean>
+ <install method="install"/>
+ <uninstall bean="method="uninstall"/>
+ </bean>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="annotation" type="annotationType"
minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="parameter" type="parameterType"
minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="bean" type="xsd:string"
use="optional"/>
+ <xsd:attribute name="method" type="xsd:token"
use="required"/>
+ <xsd:attribute name="state" type="controllerStateType"
use="optional"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="dependencyType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A dependency represents an injection into the bean.
+ They can be used anywhere a string value can appear.
+
+ e.g. Bean instance -
"InjectedIntoMe".setSomeProperty("BeanInjected");
+ <bean name="InjectedIntoMe" ...>
+ <property name="someProperty"><inject
bean="BeanInjected"/>
+ </bean>
+ <bean name="BeanInjected" .../>
+
+ e.g. Bean property -
"InjectedIntoMe".setSomeProperty("BeanInjected".getOtherProperty());
+ <bean name="InjectedIntoMe" ...>
+ <property name="someProperty"><inject
bean="BeanInjected" property="otherProperty"/>
+ </bean>
+ <bean name="BeanInjected" .../>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="bean" type="xsd:string"
use="required"/>
+ <xsd:attribute name="property" type="xsd:string"
use="optional"/>
+ <xsd:attribute name="state" type="controllerStateType"
use="optional"/>
+ <xsd:attribute name="whenRequired"
type="controllerStateType" use="optional"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="injectionType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A dependency represents an injection into the bean.
+ They can be used anywhere a string value can appear.
+
+ e.g. Bean instance -
"InjectedIntoMe".setSomeProperty("BeanInjected");
+ <bean name="InjectedIntoMe" ...>
+ <property name="someProperty"><inject
bean="BeanInjected"/>
+ </bean>
+ <bean name="BeanInjected" .../>
+
+ e.g. Bean property -
"InjectedIntoMe".setSomeProperty("BeanInjected".getOtherProperty());
+ <bean name="InjectedIntoMe" ...>
+ <property name="someProperty"><inject
bean="BeanInjected" property="otherProperty"/>
+ </bean>
+ <bean name="BeanInjected" .../>
+
+ e.g. Contextual injection - finding exactly one instance which matches
property's class type
+ <bean name="InjectedIntoMe" ...>
+ <property
name="transactionManager"><inject/></property>
+ </bean>
+
+ e.g. Contextual injection - finding exactly one instance which matches
property's name
+ <bean name="InjectedIntoMe" ...>
+ <property name="transactionManager"><inject
type="ByName"/></property>
+ </bean>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="bean" type="xsd:string"
use="optional"/>
+ <xsd:attribute name="property" type="xsd:string"
use="optional"/>
+ <xsd:attribute name="state" type="controllerStateType"
use="optional"/>
+ <xsd:attribute name="whenRequired"
type="controllerStateType" use="optional"/>
+ <xsd:attribute name="type" type="injectionTypeType"
use="optional" default="ByClass"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="factoryType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A factory represents another bean used to construct an object.
+
+ e.g. Bean instance -
"InjectedIntoMe".setSomeProperty("BeanInjected");
+ <bean name="ConstructMe" ...>
+ <constructor factoryMethod="someMethod">
+ <factory bean="Factory"/>
+ </constructor>
+ </bean>
+ <bean name="Factory" .../>
+
+ You can also inject a property of the bean bean
+ e.g.
+ <bean name="ConstructMe" ...>
+ <constructor factoryMethod="someMethod">
+ <factory bean="Builder"
property="getFactory"/>
+ </constructor>
+ </bean>
+
+ Or you can construct a factory in place using a different schema/namsapce
+ e.g.
+ <bean name="ConstructMe" ...>
+ <constructor factoryMethod="someMethod">
+ <factory>
+ <javabean xmlns="someOtherNamespace"
class="com.acme.FactoryClass"/>
+ </factory>
+ </constructor>
+ </bean>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:choice minOccurs="0">
+ <xsd:any namespace="##other"
processContents="strict"/>
+ </xsd:choice>
+ <xsd:attribute name="bean" type="xsd:string"
use="optional"/>
+ <xsd:attribute name="property" type="xsd:string"
use="optional"/>
+ <xsd:attribute name="state" type="controllerStateType"
use="optional"/>
+ <xsd:attribute name="whenRequired"
type="controllerStateType" use="optional"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="parameterType" mixed="true">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A parameter is used to define the constructor, factory
+ and lifecycle method usage.
+
+ e.g. Using number of parameters when this is unique enough
+ <bean ...>
+ <constructor>
+ <parameter>1st Parameter</parameter>
+ <parameter>2nd Parameter</parameter>
+ </constructor>
+ </bean>
+
+ e.g. Explicitly stating the parameter type to resolve overloading
+ <bean ...>
+ <constructor>
+ <parameter>1st Parameter</parameter>
+ <parameter class="java.lang.String">2nd
Parameter</parameter>
+ </constructor>
+ </bean>
+
+ e.g. To override the injected type use <value/>
+ <bean ...>
+ <constructor>
+ <parameter>1st Parameter</parameter>
+ <!-- Parameter is java.lang.Object, but we inject a String -->
+ <parameter class="java.lang.Object">
+ <value class="java.lang.String">2nd
Parameter</value>
+ </parameter>
+ </constructor>
+ </bean>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="annotatedValueType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="propertyType" mixed="true">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A property defines values passed to the setters.
+
+ e.g. Using the type from the setter argument
+ <bean ...>
+ <property name="someProperty">Some value</property>
+ </bean>
+
+ e.g. Overridding the injected type
+ <bean ...>
+ <property name="someProperty"
class="java.lang.String">Some value</property>
+ </bean>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="namedValueType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="annotationType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The annotation type represents a Java5 annotation on the particular join
point.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="replace" type="xsd:boolean"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <xsd:simpleType name="classNameType">
+ <xsd:annotation>
+ <xsd:documentation> The elements that use this type designate the name
+ of a Java class or interface. The name is in the form of a "binary
+ name", as defined in the JLS and as used in Class.forName().
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:string">
+ <xsd:whiteSpace value="collapse"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:group name="valueGroup">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The value group represents the comment elements of the other configurations
+ <parameter/>, <property/> or collection components
+ e.g.
+
+ <property name="someProperty">
+ <list><value
class="java.lang.String">Hello</value></list>
+ </property>
+
+ e.g. This also defines the null value
+ <property name="someProperty"><null/></property>
+ as opposed to the empty string
+ <property name="someProperty"></property>
+ or the string "null"
+ <property name="someProperty">null</property>
+
+ The this operation lets you pass yourself as a parameter.
+ e.g.
+ <install bean="SomeOtherBean> method="install">
+ <parameter><this/></parameter>
+ </install>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:choice>
+ <!--<xsd:element name="bean"
type="beanType"/>-->
+ <xsd:element name="value" type="plainValueType"/>
+ <xsd:element name="inject" type="injectionType"/>
+ <xsd:element name="collection"
type="collectionType"/>
+ <xsd:element name="list" type="listType"/>
+ <xsd:element name="set" type="setType"/>
+ <xsd:element name="array" type="arrayType"/>
+ <xsd:element name="map" type="mapType"/>
+ <xsd:element name="null">
+ <xsd:complexType/>
+ </xsd:element>
+ <xsd:element name="this">
+ <xsd:complexType/>
+ </xsd:element>
+ <xsd:any namespace="##other"
processContents="strict">
+ <xsd:annotation>
+ <xsd:documentation>An extension value</xsd:documentation>
+ </xsd:annotation>
+ </xsd:any>
+ </xsd:choice>
+ </xsd:group>
+
+ <xsd:complexType name="plainValueType" mixed="true">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A simple value, used in collections and to specify a type for parameters.
+
+ e.g.
+ <parameter><value
class="com.acme.MyClass">xxx</value></parameter>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="class" type="classNameType"
use="optional"/>
+ <xsd:attribute name="replace" type="xsd:boolean"
use="optional"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="valueType" mixed="true">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A value that can take other values, i.e. properties and parameters.
+
+ e.g.
+ <parameter><value
class="com.acme.MyClass">xxx</value></parameter>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="plainValueType">
+ <xsd:sequence>
+ <xsd:choice minOccurs="0">
+ <xsd:group ref="valueGroup"/>
+ </xsd:choice>
+ </xsd:sequence>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="classLoaderValueType" mixed="true">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A value that represents a classloader.
+
+ e.g.
+ <classloader><inject
bean="SomeClassLoader"/></parameter>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:choice>
+ <xsd:element name="bean" type="beanType"/>
+ <xsd:element name="inject" type="dependencyType"/>
+ <xsd:element name="null">
+ <xsd:complexType/>
+ </xsd:element>
+ <xsd:any namespace="##other"
processContents="strict">
+ <xsd:annotation>
+ <xsd:documentation>An extension value</xsd:documentation>
+ </xsd:annotation>
+ </xsd:any>
+ </xsd:choice>
+ </xsd:complexType>
+
+ <xsd:complexType name="annotatedValueType" mixed="true">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A value that can take annotations.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="valueType">
+ <xsd:sequence>
+ <xsd:element name="annotation"
type="annotationType" minOccurs="0"
maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="namedValueType" mixed="true">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A value that has a name, currently only a property.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="annotatedValueType">
+ <xsd:attribute name="name" type="xsd:string"
use="required"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="baseCollectionType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A collection defines a java.util.Collection object.
+ It has two class definitions:
+ class: The implementation class of the collection
+ elementClass: The default implementation class of the elements
+ The default "class" is a java.util.ArrayList unless the point of
injection
+ defines a concrete type, e.g. in the signature of the setter
+
+ example:
+ <property name="whatever" class="java.util.ArrayList"
elementClass="java.net.URL">
+ <value>http://localhost</value> <!-- Creates a URL -->
+ <value
class="java.lang.String">http://localhost</value> <!-- Creates a
String -->
+ </property>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:group ref="valueGroup"/>
+ </xsd:choice>
+ <xsd:attribute name="class" type="classNameType"
use="optional"/>
+ <xsd:attribute name="elementClass" type="classNameType"
use="optional"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="collectionType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A collection, see baseCollectionType
+ the default collection is a java.util.ArrayList
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="baseCollectionType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="listType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A list, see baseCollectionType
+ the default list is a java.util.ArrayList
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="baseCollectionType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="setType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A set, see baseCollectionType
+ the default set is a java.util.HashSet
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="baseCollectionType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="arrayType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ An array, see baseCollectionType
+ the default array is a java.lang.Object[]
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="baseCollectionType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="mapType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A map defines a java.util.Map object.
+ It has three class definitions:
+ class: The implementation class of the class
+ keyClass: The default implementation class of the keys
+ valueClass: The default implementation class of the values
+ The default "class" is a java.util.HashMap unless the point of
injection
+ defines a concrete type, e.g. in the signature of the setter
+
+ e.g.:
+ <property name="whatever" class="java.util.HashMap"
keyClass="java.lang.String" valueClas="java.net.URL">
+ <!-- map.put(new String("default"), new
URL("http://localhost"));
+
<entry><key>default</key><value>http://localhost</value>
+ <!-- map.put(new String("default"), new
String("http://localhost"));
+ <entry><key>default</key><value
class="java.lang.String">http://localhost</value>
+ </property>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="entry" type="entryType"
minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="class" type="classNameType"
use="optional"/>
+ <xsd:attribute name="keyClass" type="classNameType"
use="optional"/>
+ <xsd:attribute name="valueClass" type="classNameType"
use="optional"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="entryType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ An entry in map. These are made of key/value pairs
+
+ e.g.:
+
<entry><key>default</key><value>http://localhost</value>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="key" type="valueType"
minOccurs="0"/>
+ <xsd:element name="value" type="valueType"
minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="dependsType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The depends element is used to define that one bean depends upon
+ another for the create/start/stop/destroy lifecycle
+
+ e.g.:
+ <bean name="IGoFirst" .../>
+ <bean name="IGoSecond" ...>
+ <depends>IGoFirst</depends>
+ </bean>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string"/>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="demandType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The demand is used to specify a dependency on a supply
+ and when the demand is should be deplied
+
+ e.g.:
+ ISupply must be installed before IDemand is constructed
+
+ <bean name="IDemand">
+ <demand state="Instantiated">theSupply</demand>
+ </bean>
+ <bean name="ISupply" ...>
+ <supply>theSupply</supply>
+ </bean>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="state" type="controllerStateType"
use="optional"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="supplyType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The supply is used to specify that the bean supplies a demanded dependency
+
+ e.g.:
+ <bean name="IDemand" ...>
+ <demand>theSupply</demand>
+ </bean>
+ <bean name="ISupply" ...>
+ <supply>theSupply</supply>
+ </bean>
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string"/>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <xsd:simpleType name="controllerStateType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The controller state is used to say when dependencies must be satisfied.
+ Valid values include:
+ Described
+ Instantiated
+ Configured
+ Create
+ Start
+ Installed
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:string">
+ <xsd:whiteSpace value="collapse"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="controllerModeType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The controller mode, used to control how automatic the bean progresses
+ through the controller lifecyle (the states).
+ Valid values include:
+ Automatic (default) - the controller takes the bean to "Installed"
+ Manual - the user must tell the controller the required state
+ On Demand - the controller takes the bean to "Installed" when
another bean depends on it
+ Disabled - the controller or user cannot change the state
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:string">
+ <xsd:whiteSpace value="collapse"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="injectionTypeType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ You can set the type of lookup requirement - class type (ByClass) or property
name (ByName)
+ Valid values include:
+ ByClass (default)
+ ByName
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:string">
+ <xsd:whiteSpace value="collapse"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <!--
+ WARN:
+ Do not use this in the bean deployer, it won't work!
+ FIXME:
+ The correct way to do this is to have two separate
+ schemas (one for deployments the other for beans)
+ then use schema imports.
+ -->
+ <xsd:element name="bean" type="beanType"/>
+
+ <!--
+ WARN:
+ Do not use this in the bean deployer, it won't work!
+ FIXME:
+ The correct way to do this is to have two separate
+ schemas (one for deployments the other for beans)
+ then use schema imports.
+ -->
+ <xsd:element name="beanfactory" type="beanfactoryType"/>
+
+</xsd:schema>
Added:
modules/portlet/trunk/test/src/resources/portlet-test-war/WEB-INF/classes/log4j.properties
===================================================================
---
modules/portlet/trunk/test/src/resources/portlet-test-war/WEB-INF/classes/log4j.properties
(rev 0)
+++
modules/portlet/trunk/test/src/resources/portlet-test-war/WEB-INF/classes/log4j.properties 2007-08-20
22:51:27 UTC (rev 8007)
@@ -0,0 +1,13 @@
+### ====================================================================== ###
+## ##
+## JBoss Bootstrap Log4j Configuration ##
+## ##
+### ====================================================================== ###
+
+log4j.rootCategory=ALL, CONSOLE
+
+log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
+log4j.appender.CONSOLE.Threshold=DEBUG
+log4j.appender.CONSOLE.Target=System.out
+log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
+log4j.appender.CONSOLE.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c{1}] %m%n
Added: modules/portlet/trunk/test/src/resources/portlet-test-war/WEB-INF/jboss-beans.xml
===================================================================
--- modules/portlet/trunk/test/src/resources/portlet-test-war/WEB-INF/jboss-beans.xml
(rev 0)
+++
modules/portlet/trunk/test/src/resources/portlet-test-war/WEB-INF/jboss-beans.xml 2007-08-20
22:51:27 UTC (rev 8007)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Deployment holds beans -->
+<deployment
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_2_0.xsd"
+ xmlns="urn:jboss:bean-deployer:2.0">
+ <bean name="PortletApplicationDeployer"
class="org.jboss.portal.portlet.test.PortletApplicationDeployer">
+ </bean>
+
+ <bean name="PortletApplicationRegistry"
class="org.jboss.portal.portlet.impl.container.PortletApplicationRegistryImpl">
+
+ </bean>
+
+ <bean name="PortletAPIFactory"
class="org.jboss.portal.portlet.impl.jsr168.PortletAPIFactoryImpl">
+
+ </bean>
+
+ <bean name="PortletInfoFactory"
class="org.jboss.portal.portlet.impl.jsr168.PortletInfoFactoryImpl">
+
+ </bean>
+
+</deployment>
Added: modules/portlet/trunk/test/src/resources/portlet-test-war/WEB-INF/web.xml
===================================================================
--- modules/portlet/trunk/test/src/resources/portlet-test-war/WEB-INF/web.xml
(rev 0)
+++ modules/portlet/trunk/test/src/resources/portlet-test-war/WEB-INF/web.xml 2007-08-20
22:51:27 UTC (rev 8007)
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!DOCTYPE web-app PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+<web-app>
+ <listener>
+
<listener-class>org.jboss.portal.portlet.test.PortalKernelBootstrap</listener-class>
+ </listener>
+</web-app>