JBoss Portal SVN: r8245 - in modules/common/trunk/common/src/main: java and 2 other directories.
by portal-commits@lists.jboss.org
Author: wesleyhales
Date: 2007-09-12 14:27:35 -0400 (Wed, 12 Sep 2007)
New Revision: 8245
Added:
modules/common/trunk/common/src/main/java/
modules/common/trunk/common/src/main/java/org/
modules/common/trunk/common/src/main/java/org/jboss/
Removed:
modules/common/trunk/common/src/main/java/org/jboss/
modules/common/trunk/common/src/main/java/org/jboss/portal/test/common/
modules/common/trunk/common/src/main/org/
Log:
- Migrate common to maven and let ant build coexist
- Moved unit tests to maven test dir
- moved portal code under src/main
- setup initial pom
Copied: modules/common/trunk/common/src/main/java/org (from rev 8225, modules/common/trunk/common/src/main/org)
Copied: modules/common/trunk/common/src/main/java/org/jboss (from rev 8242, modules/common/trunk/common/src/main/org/jboss)
18 years, 7 months
JBoss Portal SVN: r8244 - modules.
by portal-commits@lists.jboss.org
Author: wesleyhales
Date: 2007-09-12 14:08:20 -0400 (Wed, 12 Sep 2007)
New Revision: 8244
Added:
modules/pom.xml
Log:
initial modules pom
Added: modules/pom.xml
===================================================================
--- modules/pom.xml (rev 0)
+++ modules/pom.xml 2007-09-12 18:08:20 UTC (rev 8244)
@@ -0,0 +1,23 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <artifactId>jbossportal</artifactId>
+ <groupId>org.jboss.portal</groupId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jboss.portal</groupId>
+ <artifactId>modules</artifactId>
+ <packaging>pom</packaging>
+ <name>Jboss Portal Modules</name>
+ <version>1.0-SNAPSHOT</version>
+
+ <dependencies/>
+
+ <build/>
+
+ <modules>
+ <module>common/trunk/common</module>
+ </modules>
+
+</project>
\ No newline at end of file
18 years, 7 months
JBoss Portal SVN: r8243 - /.
by portal-commits@lists.jboss.org
Author: wesleyhales
Date: 2007-09-12 14:06:59 -0400 (Wed, 12 Sep 2007)
New Revision: 8243
Added:
pom.xml
Log:
initial portal root pom
Added: pom.xml
===================================================================
--- pom.xml (rev 0)
+++ pom.xml 2007-09-12 18:06:59 UTC (rev 8243)
@@ -0,0 +1,119 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jboss.portal</groupId>
+ <artifactId>jbossportal</artifactId>
+ <packaging>pom</packaging>
+ <name>Jboss Portal</name>
+ <version>1.0-SNAPSHOT</version>
+ <url>http://labs.jboss.com/jbossportal</url>
+
+ <dependencies/>
+
+ <repositories>
+ <repository>
+ <id>my repository</id>
+ <url>http://localhost:8081/artifactory/repo</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <inherited>true</inherited>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+
+ <!--<distributionManagement>
+ <repository>
+ Copy the distribution jar file to a local checkout of the maven repository
+ - This variable can be set in $MAVEN_HOME/conf/settings.xml
+ <id>repository.jboss.org</id>
+ <url>file://${maven.repository.root}</url>
+ </repository>
+ <snapshotRepository>
+ <id>snapshots.jboss.org</id>
+ <name>JBoss Snapshot Repository</name>
+ <url>dav:https://snapshots.jboss.org/maven2</url>
+ </snapshotRepository>
+ </distributionManagement>-->
+
+ <modules>
+ <module>modules</module>
+ </modules>
+
+
+
+ <issueManagement>
+ <system>JIRA</system>
+ <url>http://jira.jboss.com/jira/browse/JBPORTAL</url>
+ </issueManagement>
+ <ciManagement>
+ <system>cruisecontrol</system>
+ </ciManagement>
+ <developers>
+ <developer>
+ <id>jviet</id>
+ <name>Julien Viet</name>
+ <email>jviet(a)redhat.com</email>
+ <organization>Jboss a division of Red Hat</organization>
+ <organizationUrl>http://www.jboss.org</organizationUrl>
+ <roles>
+ <role>Portal lead</role>
+ </roles>
+ <timezone>+1</timezone>
+ </developer>
+ <developer>
+ <id>whales</id>
+ <name>Wesley Hales</name>
+ <email>whales(a)redhat.com</email>
+ <organization>Jboss a division of Red Hat</organization>
+ <organizationUrl>http://www.jboss.org</organizationUrl>
+ <roles>
+ <role>ui</role>
+ <role>developer</role>
+ </roles>
+ <timezone>-4</timezone>
+ </developer>
+ <!--TODO: Add rest of team-->
+ <!--developer>
+ <id></id>
+ <name></name>
+ <email></email>
+ <organization>Jboss a division of Red Hat</organization>
+ <organizationUrl>http://www.jboss.org</organizationUrl>
+ <roles>
+ <role></role>
+ </roles>
+ <timezone></timezone>
+ </developer-->
+ </developers>
+ <licenses>
+ <license>
+ <name>LGPL 2.1</name>
+ <url>http://www.gnu.org/licenses/lgpl.html</url>
+ <distribution>repo</distribution>
+ <comments>
+ GNU LESSER GENERAL PUBLIC LICENSE Version 2.1
+ </comments>
+ </license>
+ </licenses>
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/portal/trunk</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/portal/trunk</developerConnection>
+ <url>https://svn.jboss.org/repos/portal/trunk</url>
+ </scm>
+
+</project>
\ No newline at end of file
18 years, 7 months
JBoss Portal SVN: r8242 - docs/trunk/referenceGuide/en/images/setup.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-09-12 07:39:07 -0400 (Wed, 12 Sep 2007)
New Revision: 8242
Modified:
docs/trunk/referenceGuide/en/images/setup/svncodir.png
Log:
minor
Modified: docs/trunk/referenceGuide/en/images/setup/svncodir.png
===================================================================
(Binary files differ)
18 years, 7 months
JBoss Portal SVN: r8241 - docs/trunk/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-09-12 07:37:29 -0400 (Wed, 12 Sep 2007)
New Revision: 8241
Modified:
docs/trunk/referenceGuide/en/modules/identityportlets.xml
docs/trunk/referenceGuide/en/modules/xmldescriptors.xml
Log:
Doc update
Modified: docs/trunk/referenceGuide/en/modules/identityportlets.xml
===================================================================
--- docs/trunk/referenceGuide/en/modules/identityportlets.xml 2007-09-12 10:34:10 UTC (rev 8240)
+++ docs/trunk/referenceGuide/en/modules/identityportlets.xml 2007-09-12 11:37:29 UTC (rev 8241)
@@ -10,41 +10,46 @@
<sect1 id="identity_portlet_introduction">
<title>Introduction</title>
<para>
- Since JBoss Portal 2.6.2 two new Identity User Portlets are
+ Since JBoss Portal 2.6.2 two new Identity Portlets are
shipped by default:
<itemizedlist>
<listitem>
<para>The User Portlet</para>
</listitem>
<listitem>
- <para>The User Management Portlet</para>
+ <para>The Identity Management Portlet</para>
</listitem>
</itemizedlist>
As the names indicate - the User Portlet is responsible for
- actions related to the end user. Whereas the User Management
+ actions related to the end user. Whereas the Identity Management
Portlet contains all the functionality for managing users and roles.
</para>
<warning>
- The Identity Portlets will evolve over time! Therefore usage and
- configuration can change.
+ The identity portlets will evolve over time, therefore usage and
+ configuration might change.
</warning>
<sect2>
<title>Features</title>
<para>
- The Identity User Portlets provide features like:
+ The identity portlets provide the following features:
<itemizedlist>
<listitem>
- <para>Captcha support</para>
+ <para>Email verification: The users can receive an email with a link on which they must click to confirm the
+ creation of the new account. (Disabled by default,see <xref linkend="identity_portlet_configuration_jbpm"/>)</para>
</listitem>
<listitem>
- <para>Lost password</para>
+ <para>Captcha support: The users are prompted to copy letters from a deformed image. (Enabled by default, see <xref linkend="identity_portlet_configuration_captcha"/>)</para>
</listitem>
<listitem>
- <para>jBPM based user registration</para>
+ <para>Lost password: The users can receive a new password by email, any user with access to the admin portlet can also reset another user's password and send the new one by email in one click. (Disabled by default, see <xref linkend="identity_portlet_configuration_lost_password"/>)</para>
</listitem>
<listitem>
- <para>User and role management</para>
+ <para>jBPM based user registration: Several business processes are available out of the box (this includes administration approval), this can
+ be extended to custom ones. See <xref linkend="identity_portlet_configuration_jbpm"/>.</para>
</listitem>
+ <listitem>
+ <para>User and role management: Ability for the administrator to add and edit users as well as adding, </para>
+ </listitem>
</itemizedlist>
</para>
</sect2>
@@ -58,19 +63,17 @@
<sect2 id="identity_portlet_configuration_captcha">
<title>Captcha support</title>
<para>
- CAPTCHA is an acronym for Completely Automated Public
- Turing test to tell Computers and Humans Apart. They are
+ CAPTCHA is an acronym for <literal>Completely Automated Public
+ Turing test to tell Computers and Humans Apart</literal>. This is
providing a mechanism to prevent automated programs
- (like bots) of using different services. The User
- Portlet uses JCaptcha for providing a challenge-response
- test.
+ from using different services. The User
+ Portlet uses JCaptcha to provide a challenge-response.
</para>
- <note>
- By default the captcha service needs a XServer to
+ <note><para>By default the captcha service needs a XServer to
generate the images. For using the captcha service
without a XServer make sure you run the jvm with the
following option:
- <programlisting>-Djava.awt.headless=true</programlisting>
+ <programlisting>-Djava.awt.headless=true</programlisting></para>
</note>
<para></para>
<mediaobject>
@@ -84,8 +87,8 @@
</mediaobject>
<para>
The captcha support can be enabled by changing the
- portlet preference 'captcha' to 'true'. If enabling
- captcha it will be used for the registration and lost
+ portlet preference 'captcha' to 'true'. If enabled,
+ captcha will be used for the registration and lost
password action.
</para>
<programlisting><![CDATA[...
@@ -109,7 +112,7 @@
his password by entering his username.
</para>
<note>
- This feature requires a properly configured MailModule.
+ This feature requires a properly configured MailModule. See <xref linkend="emailConfiguration"/>.
</note>
<para></para>
<mediaobject>
@@ -174,21 +177,19 @@
subscription modes:
<itemizedlist>
<listitem>
- <para>
- Automatic subscription (no jBPM required)
- </para>
+ <para>Automatic subscription (no jBPM required), the users can register and directly login.</para>
</listitem>
<listitem>
- <para>E-Mail validation</para>
+ <para>E-Mail validation, the users need to click on a link sent by email before being able to login.</para>
</listitem>
<listitem>
- <para>E-Mail validation and approval</para>
+ <para>E-Mail validation and admin approval, the users need to validate their email, then an admin needs to
+ approve the newly created account.</para>
</listitem>
</itemizedlist>
</para>
<note>
- It is not recommended to change the subscription mode
- while runtime.
+ Defining the subscription mode has to be done in the configuration file as explained here: <xref linkend="identity_portlet_configuration_file"/>. It is not recommended to change the subscription mode during runtime.
</note>
<para></para>
<mediaobject>
@@ -209,7 +210,7 @@
<para>
The Identity Portlets use some metadata which can be
easily changed in the main configuration file, which is
- shown in the following listing:
+ located at <literal>jboss-portal.sar/portal-identity.sar/conf/identity-ui-configuration.xml</literal> as shown here:
</para>
<programlisting><![CDATA[<identity-ui-configuration>
@@ -290,7 +291,7 @@
<emphasis role="bold">
overwrite-workflow:
</emphasis>
- if set to 'true' the workflow will be overwritten (default: false)
+ if set to 'true' the workflow will be overwritten during the next startup (default: false)
</para>
</listitem>
<listitem>
@@ -298,13 +299,13 @@
<emphasis role="bold">
email-domain:
</emphasis>
- e-mail domain in the validation e-mail
+ e-mail domain used in the validation e-mail by the template (can be anything)
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">email-from:</emphasis>
- e-mail from in the validation e-mail
+ e-mail fro field used by the validation e-mail
</para>
</listitem>
<listitem>
@@ -312,7 +313,7 @@
<emphasis role="bold">
password-generation-characters:
</emphasis>
- used characters for generating a random password
+ characters to use to generate a random password
</para>
</listitem>
<listitem>
@@ -334,7 +335,7 @@
ui-components:
</emphasis>
Defines the available user interface components. Take a look at the next section
- for further information.
+ for further details.
</para>
</listitem>
</itemizedlist>
@@ -388,10 +389,12 @@
<sect2 id="identity_portlet_configuration_example1">
<title>Example 1: required fields</title>
<para>
- This example covers changing not required properties to
- required and adding them to the registration page.
+ This example explains how to changed optional properties to
+ required properties, of course once this is done, we will also need to
+ add the corresponding fields in the registration page.
<sbr />
- changes in <emphasis>portal-identity.sar/conf/identity-ui-configuration.xml</emphasis>
+ Here are the modifications in <emphasis>portal-identity.sar/conf/identity-ui-configuration.xml</emphasis>,
+ we simply changed the required element to true on our two fields corresponding to the given and family names.
</para>
<programlisting><![CDATA[<identity-ui-configuration>
...
@@ -408,7 +411,8 @@
...
</identity-ui-configuration>]]></programlisting>
<para>
- changes in <emphasis>portal-identity.sar/portal-identity.war/WEB-INF/jsf/common/register.xhtml</emphasis>
+ Now that we changed those values to "required" we need to give a chance to the user to enter those
+ values, here are the changes done in <emphasis>portal-identity.sar/portal-identity.war/WEB-INF/jsf/common/register.xhtml</emphasis>
</para>
<programlisting><![CDATA[
...
@@ -425,8 +429,10 @@
<h:message for="lastname"/>
...]]></programlisting>
<para>
- That's it - from now on the given and familyname will be
- required on registration as well in the edit profile.
+ That's it - from now on the given name and family name will be
+ required on registration. You may also want to add this piece of code on the edit profile page.
+ We dynamically obtain the values from the descriptor. Now if i just wanted to make them back to optional,
+ i would change the values only in the descriptor, letting the user enter or not those values.
</para>
</sect2>
<sect2 id="identity_portlet_configuration_example2">
@@ -435,7 +441,8 @@
values)
</title>
<para>
- changes in<emphasis>portal-identity.sar/conf/identity-ui-configuration.xml</emphasis>
+ If the data to enter is a choice instead of a free-text value, you can also define those
+ in the descriptor like shown here:
</para>
<programlisting><![CDATA[<identity-ui-configuration>
...
@@ -452,9 +459,8 @@
...
</identity-ui-configuration>]]></programlisting>
<para>
- changes in
<emphasis>
- portal-identity.sar/portal-identity.war/WEB-INF/jsf/common/profile.xhtml
+ In portal-identity.sar/portal-identity.war/WEB-INF/jsf/common/profile.xhtml
</emphasis>
- change inputText to a selectOneMenu:
</para>
@@ -470,7 +476,7 @@
...
]]></programlisting>
<para>
- localization: in e.g.
+ For localization, we can use the resource bundle: in e.g.
<emphasis>
portal-identity.sar/conf/bundles/Identity.properties
</emphasis>
@@ -479,21 +485,22 @@
</para>
<programlisting><![CDATA[
...
-IDENTIY_DYNAMIC_VALUE_BOARD=localized snowboarding
-IDENTIY_DYNAMIC_VALUE_SKI=localized skiing
-IDENTIY_DYNAMIC_VALUE_SLEDGE=localized sledging
+IDENTITY_DYNAMIC_VALUE_BOARD=localized snowboarding
+IDENTITY_DYNAMIC_VALUE_SKI=localized skiing
+IDENTITY_DYNAMIC_VALUE_SLEDGE=localized sledging
...
]]></programlisting>
<note>
- If the value is not required a blank element will be
- added at the top.
+ <para>If the value is not required a blank element will be
+ added at the top.</para>
</note>
</sect2>
<sect2 id="identity_portlet_configuration_example3">
<title>Example 3: adding new properties</title>
<note>
Please make sure you read at least the section about
- user profile configuration: <xref linkend="user_profile_configuration"/>
+ user profile configuration: <xref linkend="user_profile_configuration"/>, to add a new value on
+ the interface it also has to be defined in your model, as shown on Step 1.
</note>
<para>
<emphasis role="bold">step 1:</emphasis>
@@ -664,24 +671,23 @@
</listitem>
</itemizedlist>
</para>
- <note>
- The values of the profile-config.xml have a higher
+ <warning>
+ <para>The values of the profile-config.xml have a higher
priority than the values in the user portlet
configuration. That means if the 'usage' is 'mandatory'
in
<emphasis>profile-config.xml</emphasis>
and 'required' is 'false' it will be overwritten by the
- value from the profile config!
- </note>
+ value from the profile config!</para>
+ </warning>
</sect2>
</sect1>
<sect1>
<title>Customizing the workflow</title>
- <note>jBPM is not part of this documentation.</note>
+ <note><para>For more details about jBPM please read the jBPM documentation</para></note>
<para>
The process definitions are located in:
- <emphasis>portal-identity.sar/conf/processes</emphasis>. For creating a custom workflow the custom workflow (<emphasis>custom.xml</emphasis>) can be extended.
- It is not recommended to change the predefined workflow definitions.
+ <emphasis>portal-identity.sar/conf/processes</emphasis>. To create a custom workflow , the workflow <emphasis>custom.xml</emphasis> can be extended.
</para>
<para>
Available variables in the business process:
@@ -782,7 +788,7 @@
<programlisting><![CDATA[<process-definition>
...
<state name="validate_email">
- <timer name="time_to_expire" duedate="24 hours" transition="timedOut" />
+ <timer name="time_to_expire" duedate="2 days" transition="timedOut" />
</state>
...
</process-definition>]]></programlisting>
@@ -794,15 +800,15 @@
<sect1>
<title>Disabling the Identity Portlets</title>
<para>
- Due to the fact that the common User portlet is still
+ Due to the fact that the former user portlets are still
included in JBoss Portal 2.6.2 it is possible to activate
it over the Portal Admin interface, by using the PortletInstances:
<itemizedlist>
<listitem>
- <emphasis>UserPortletInstance:</emphasis> The common user portlet
+ <emphasis>UserPortletInstance:</emphasis> The former user portlet
</listitem>
<listitem>
- <emphasis>RolePortletInstance:</emphasis> The common role managment portlet
+ <emphasis>RolePortletInstance:</emphasis> The former role managment portlet
</listitem>
</itemizedlist>
</para>
@@ -810,7 +816,8 @@
<title>Enabling the Identity Portlets</title>
<para>
When migrating from former versions of JBoss Portal the Identity User Portlets won't be displayed by default,
- but Windows can be created on basis of the existing Portlet Instances which are by default deployed.
+ but Windows can be created on basis of the existing Portlet Instances which are by default deployed. (The instances
+ names being <literal>IdentityUserPortletInstance</literal> and <literal>IdentityAdminPortletInstance</literal>.
</para>
</sect2>
</sect1>
Modified: docs/trunk/referenceGuide/en/modules/xmldescriptors.xml
===================================================================
--- docs/trunk/referenceGuide/en/modules/xmldescriptors.xml 2007-09-12 10:34:10 UTC (rev 8240)
+++ docs/trunk/referenceGuide/en/modules/xmldescriptors.xml 2007-09-12 11:37:29 UTC (rev 8241)
@@ -1101,7 +1101,7 @@
directory:
<mediaobject>
<imageobject>
- <imagedata align="center" fileref="images/setup/package.gif"
+ <imagedata align="center" fileref="images/setup/package.png"
valign="middle"/>
</imageobject>
</mediaobject>
@@ -1110,7 +1110,7 @@
should contain the following files, that you can customize for your own Database/Connector:
<mediaobject>
<imageobject>
- <imagedata align="center" fileref="images/setup/dsfiles.gif"
+ <imagedata align="center" fileref="images/setup/dsfiles.png"
valign="middle"/>
</imageobject>
</mediaobject>
@@ -1131,7 +1131,7 @@
<programlisting>build datasource</programlisting>
<mediaobject>
<imageobject>
- <imagedata align="center" valign="middle" fileref="images/setup/build_ds.gif"/>
+ <imagedata align="center" valign="middle" fileref="images/setup/build_ds.png"/>
</imageobject>
</mediaobject>
</para>
@@ -1139,7 +1139,7 @@
Once complete, the datasource build should produce the following directory and file structure:
<mediaobject>
<imageobject>
- <imagedata align="center" valign="middle" fileref="images/setup/build_ds_dir.gif"/>
+ <imagedata align="center" valign="middle" fileref="images/setup/build_ds_dir.png"/>
</imageobject>
</mediaobject>
</para>
18 years, 7 months
JBoss Portal SVN: r8240 - docs/trunk/referenceGuide/en/images/setup.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-09-12 06:34:10 -0400 (Wed, 12 Sep 2007)
New Revision: 8240
Modified:
docs/trunk/referenceGuide/en/images/setup/svncodir.png
Log:
Update screenshot
Modified: docs/trunk/referenceGuide/en/images/setup/svncodir.png
===================================================================
(Binary files differ)
18 years, 7 months
JBoss Portal SVN: r8239 - docs/trunk/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-09-12 06:17:51 -0400 (Wed, 12 Sep 2007)
New Revision: 8239
Modified:
docs/trunk/referenceGuide/en/modules/configuration.xml
Log:
Added email server and proxy configurations
Modified: docs/trunk/referenceGuide/en/modules/configuration.xml
===================================================================
--- docs/trunk/referenceGuide/en/modules/configuration.xml 2007-09-12 08:36:00 UTC (rev 8238)
+++ docs/trunk/referenceGuide/en/modules/configuration.xml 2007-09-12 10:17:51 UTC (rev 8239)
@@ -203,8 +203,66 @@
</para>
</sect2>
</sect1>
+ <sect1 id="emailConfiguration">
+ <title>Setting up the email service</title>
+ <para>To be able to use the email service (for example to verify user emails when someone subscribes or for CMS
+ workflow notifications) it has to be configured correctly. To configure it, go to
+ <literal>jboss-portal.sar/portal-core.sar/META-INF/jboss-service.xml</literal>.
+ In this file, the mail module is configured like this:
+ <programlisting><![CDATA[<mbean
+ code="org.jboss.portal.core.impl.mail.MailModuleImpl"
+ name="portal:service=Module,type=Mail"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <depends>jboss:service=Mail</depends>
+ <depends>portal:service=Module,type=IdentityServiceController</depends>
+ <attribute name="QueueCapacity">-1</attribute>
+ <attribute name="Gateway">localhost</attribute>
+ <attribute name="SmtpUser"></attribute>
+ <attribute name="SmtpPassword"></attribute>
+ <attribute name="JavaMailDebugEnabled">false</attribute>
+ <attribute name="SMTPConnectionTimeout">100000</attribute>
+ <attribute name="SMTPTimeout">10000</attribute>
+ <attribute name="JNDIName">java:portal/MailModule</attribute>
+</mbean>]]></programlisting>
+ Here you can specify a different SMTP server than localhost, then precise the Smtp username and Smtp passwords to
+ use to send the mails.</para>
+ <para>If i wanted to use GMail smtp server, i would write:
+ <programlisting><![CDATA[<mbean
+ code="org.jboss.portal.core.impl.mail.MailModuleImpl"
+ name="portal:service=Module,type=Mail"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <depends>jboss:service=Mail</depends>
+ <depends>portal:service=Module,type=IdentityServiceController</depends>
+ <attribute name="QueueCapacity">-1</attribute>
+ <attribute name="Gateway">smtp.gmail.com</attribute>
+ <attribute name="SmtpUser">username(a)gmail.com</attribute>
+ <attribute name="SmtpPassword">myPassword</attribute>
+ <attribute name="JavaMailDebugEnabled">false</attribute>
+ <attribute name="SMTPConnectionTimeout">100000</attribute>
+ <attribute name="SMTPTimeout">10000</attribute>
+ <attribute name="JNDIName">java:portal/MailModule</attribute>
+</mbean>]]></programlisting>
+ </para>
+ <note><para>If you have a 'standard' setup and a mail server installed
+ (That's the case on most Linux distribution out of the box), it will work out of the box.</para></note>
+ </sect1>
<sect1>
- <title>Disabling dynamic proxy unwrapping</title>
+ <title>Setting up proxy settings</title>
+ <para>There are a couple of scenarios where you will need your proxy to be correctly defined at the JVM
+ level so that you can access documents from Internet. It could be to get the thirdparty libraries if you
+ decided to build JBoss Portal from the sources, to access RSS feeds or weather information in the samples
+ portlet we provide or for your own needs.</para>
+ <para>To set up the proxy settings you will need to know the proxy host and the port to use then
+ add them when starting java.</para>
+ <para>Usually setting up JAVA_OPTS environment variable to <literal>-Dhttp.proxyHost=YOUR_PROXY_HOST -Dhttp.proxyPort=YOUR_PROXY_PORT</literal>
+ is enough.</para>
+ </sect1>
+ <sect1>
+ <title>Disabling dynamic proxy unwrapping</title>
<para>JBoss Portal use the JBoss Microkernel for the service infrastructure. The JBoss Microkernel provides
injection of services into other services, also known as wiring. Unfortunately it is only possible to inject
dynamic proxies that talks to the MBeanServer due to the fact the Microkernel is JMX based. The overhead
18 years, 7 months
JBoss Portal SVN: r8238 - trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/dashboard and 1 other directory.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-09-12 04:36:00 -0400 (Wed, 12 Sep 2007)
New Revision: 8238
Modified:
branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/dashboard/dashboard.xhtml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/dashboard/dashboard.xhtml
Log:
Don't let the user rename the default dashboard page
Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/dashboard/dashboard.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/dashboard/dashboard.xhtml 2007-09-12 08:31:16 UTC (rev 8237)
+++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/dashboard/dashboard.xhtml 2007-09-12 08:36:00 UTC (rev 8238)
@@ -31,6 +31,7 @@
</h:form>
</td>
</tr>
+ <c:if test="#{dashboard.selectedPage.name != 'default'}">
<tr>
<td align="left" valign="top"><b>Rename this Page:</b><br/>New page name: 
<h:form id="renameForm" style="padding:0;margin:0">
@@ -43,6 +44,7 @@
</h:form>
</td>
</tr>
+ </c:if>
</table>
</td>
<td align="left" valign="top">
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/dashboard/dashboard.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/dashboard/dashboard.xhtml 2007-09-12 08:31:16 UTC (rev 8237)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/dashboard/dashboard.xhtml 2007-09-12 08:36:00 UTC (rev 8238)
@@ -31,6 +31,7 @@
</h:form>
</td>
</tr>
+ <c:if test="#{dashboard.selectedPage.name != 'default'}">
<tr>
<td align="left" valign="top"><b>Rename this Page:</b><br/>New page name: 
<h:form id="renameForm" style="padding:0;margin:0">
@@ -43,6 +44,7 @@
</h:form>
</td>
</tr>
+ </c:if>
</table>
</td>
<td align="left" valign="top">
18 years, 7 months
JBoss Portal SVN: r8237 - in docs/trunk/referenceGuide/en: images and 2 other directories.
by portal-commits@lists.jboss.org
Author: emuckenhuber
Date: 2007-09-12 04:31:16 -0400 (Wed, 12 Sep 2007)
New Revision: 8237
Added:
docs/trunk/referenceGuide/en/images/identityportlets/
docs/trunk/referenceGuide/en/images/identityportlets/illustration.png
docs/trunk/referenceGuide/en/images/identityportlets/lost_password.png
docs/trunk/referenceGuide/en/images/identityportlets/pending_users.png
docs/trunk/referenceGuide/en/images/identityportlets/role_management.png
docs/trunk/referenceGuide/en/images/identityportlets/user_management_start.png
docs/trunk/referenceGuide/en/images/identityportlets/user_register.png
docs/trunk/referenceGuide/en/modules/identityportlets.xml
Modified:
docs/trunk/referenceGuide/en/master.xml
docs/trunk/referenceGuide/en/modules/identity.xml
Log:
- initial commit of Identity Portlet chapter
Added: docs/trunk/referenceGuide/en/images/identityportlets/illustration.png
===================================================================
(Binary files differ)
Property changes on: docs/trunk/referenceGuide/en/images/identityportlets/illustration.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/trunk/referenceGuide/en/images/identityportlets/lost_password.png
===================================================================
(Binary files differ)
Property changes on: docs/trunk/referenceGuide/en/images/identityportlets/lost_password.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/trunk/referenceGuide/en/images/identityportlets/pending_users.png
===================================================================
(Binary files differ)
Property changes on: docs/trunk/referenceGuide/en/images/identityportlets/pending_users.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/trunk/referenceGuide/en/images/identityportlets/role_management.png
===================================================================
(Binary files differ)
Property changes on: docs/trunk/referenceGuide/en/images/identityportlets/role_management.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/trunk/referenceGuide/en/images/identityportlets/user_management_start.png
===================================================================
(Binary files differ)
Property changes on: docs/trunk/referenceGuide/en/images/identityportlets/user_management_start.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/trunk/referenceGuide/en/images/identityportlets/user_register.png
===================================================================
(Binary files differ)
Property changes on: docs/trunk/referenceGuide/en/images/identityportlets/user_register.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: docs/trunk/referenceGuide/en/master.xml
===================================================================
--- docs/trunk/referenceGuide/en/master.xml 2007-09-12 08:25:28 UTC (rev 8236)
+++ docs/trunk/referenceGuide/en/master.xml 2007-09-12 08:31:16 UTC (rev 8237)
@@ -18,6 +18,7 @@
<!ENTITY themeandlayouts SYSTEM "modules/themeandlayouts.xml">
<!ENTITY ajax SYSTEM "modules/ajax.xml">
<!ENTITY identity SYSTEM "modules/identity.xml">
+ <!ENTITY identityportlets SYSTEM "modules/identityportlets.xml">
<!ENTITY authentication SYSTEM "modules/authentication.xml">
<!ENTITY ldap SYSTEM "modules/ldap.xml">
<!ENTITY sso SYSTEM "modules/sso.xml">
@@ -82,6 +83,7 @@
<!-- WSRP --> &wsrp;
<!-- Security administration --> &security;
<!-- Identity --> &identity;
+ <!-- Identity Portlets --> &identityportlets;
<!-- Authentication --> &authentication;
<!-- LDAP --> &ldap;
<!-- SSO --> &sso;
Modified: docs/trunk/referenceGuide/en/modules/identity.xml
===================================================================
--- docs/trunk/referenceGuide/en/modules/identity.xml 2007-09-12 08:25:28 UTC (rev 8236)
+++ docs/trunk/referenceGuide/en/modules/identity.xml 2007-09-12 08:31:16 UTC (rev 8237)
@@ -695,7 +695,7 @@
</sect3>
</sect2>
</sect1>
- <sect1>
+ <sect1 id="user_profile_configuration">
<title>User profile configuration</title>
<para>UserProfileModule has additional configuration file that defines user properties. It is specified in configuration in:</para>
<programlisting>
Added: docs/trunk/referenceGuide/en/modules/identityportlets.xml
===================================================================
--- docs/trunk/referenceGuide/en/modules/identityportlets.xml (rev 0)
+++ docs/trunk/referenceGuide/en/modules/identityportlets.xml 2007-09-12 08:31:16 UTC (rev 8237)
@@ -0,0 +1,817 @@
+<chapter id="identityportlets">
+ <chapterinfo>
+ <author>
+ <firstname>Emanuel</firstname>
+ <surname>Muckenhuber</surname>
+ <email>emuckenh(a)redhat.com</email>
+ </author>
+ </chapterinfo>
+ <title>JBoss Portal Identity Portlets</title>
+ <sect1 id="identity_portlet_introduction">
+ <title>Introduction</title>
+ <para>
+ Since JBoss Portal 2.6.2 two new Identity User Portlets are
+ shipped by default:
+ <itemizedlist>
+ <listitem>
+ <para>The User Portlet</para>
+ </listitem>
+ <listitem>
+ <para>The User Management Portlet</para>
+ </listitem>
+ </itemizedlist>
+ As the names indicate - the User Portlet is responsible for
+ actions related to the end user. Whereas the User Management
+ Portlet contains all the functionality for managing users and roles.
+ </para>
+ <warning>
+ The Identity Portlets will evolve over time! Therefore usage and
+ configuration can change.
+ </warning>
+ <sect2>
+ <title>Features</title>
+ <para>
+ The Identity User Portlets provide features like:
+ <itemizedlist>
+ <listitem>
+ <para>Captcha support</para>
+ </listitem>
+ <listitem>
+ <para>Lost password</para>
+ </listitem>
+ <listitem>
+ <para>jBPM based user registration</para>
+ </listitem>
+ <listitem>
+ <para>User and role management</para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ </sect2>
+ </sect1>
+ <sect1>
+ <title>Configuration</title>
+ <para>
+ This section covers the configuration of the Identity
+ Portlets.
+ </para>
+ <sect2 id="identity_portlet_configuration_captcha">
+ <title>Captcha support</title>
+ <para>
+ CAPTCHA is an acronym for Completely Automated Public
+ Turing test to tell Computers and Humans Apart. They are
+ providing a mechanism to prevent automated programs
+ (like bots) of using different services. The User
+ Portlet uses JCaptcha for providing a challenge-response
+ test.
+ </para>
+ <note>
+ By default the captcha service needs a XServer to
+ generate the images. For using the captcha service
+ without a XServer make sure you run the jvm with the
+ following option:
+ <programlisting>-Djava.awt.headless=true</programlisting>
+ </note>
+ <para></para>
+ <mediaobject>
+ <imageobject>
+ <imagedata align="center"
+ fileref="images/identityportlets/user_register.png" format="png" />
+ </imageobject>
+ <caption>
+ <para>The registration page with captcha.</para>
+ </caption>
+ </mediaobject>
+ <para>
+ The captcha support can be enabled by changing the
+ portlet preference 'captcha' to 'true'. If enabling
+ captcha it will be used for the registration and lost
+ password action.
+ </para>
+ <programlisting><![CDATA[...
+<portlet>
+...
+ <display-name>User portlet</display-name>
+...
+ <portlet-preferences>
+ <preference>
+ <name>captcha</name>
+ <value>true</value>
+ </preference>
+ </portlet-preferences>
+</portlet>
+...]]></programlisting>
+ </sect2>
+ <sect2 id="identity_portlet_configuration_lost_password">
+ <title>Lost password</title>
+ <para>
+ The lost password feature enables the end user to reset
+ his password by entering his username.
+ </para>
+ <note>
+ This feature requires a properly configured MailModule.
+ </note>
+ <para></para>
+ <mediaobject>
+ <imageobject>
+ <imagedata align="center"
+ fileref="images/identityportlets/lost_password.png" format="png" />
+ </imageobject>
+ <caption>
+ <para>
+ The lost password page with captcha enabled.
+ </para>
+ </caption>
+ </mediaobject>
+ <para>
+ The lost password feature can be enabled by changing the
+ portlet preference 'lostPassword' to 'true'. If captcha
+ is enabled it will be also used for verifying the lost
+ password action.
+ </para>
+ <programlisting><![CDATA[...
+<portlet>
+...
+ <display-name>User portlet</display-name>
+...
+ <portlet-preferences>
+ <preference>
+ <name>lostPassword</name>
+ <value>true</value>
+ </preference>
+ </portlet-preferences>
+</portlet>
+...]]></programlisting>
+ </sect2>
+ <sect2 id="identity_portlet_configuration_reset_password">
+ <title>Reset password</title>
+ <para>
+ The reset password feature is similar to the lost
+ password feature, but it is used in the User Management
+ Portlet to reset the password of a user. That means
+ changing the password of a user is slightly simplified,
+ because a random password will be generated and sent to
+ the users e-mail address.
+ </para>
+ <programlisting><![CDATA[...
+<portlet>
+...
+ <display-name>User management portlet</display-name>
+...
+ <portlet-preferences>
+ <preference>
+ <name>resetPassword</name>
+ <value>true</value>
+ </preference>
+ </portlet-preferences>
+</portlet>
+...]]></programlisting>
+ </sect2>
+ <sect2 id="identity_portlet_configuration_jbpm">
+ <title>jBPM based user registration</title>
+ <para>
+ JBoss Portal supports by default three different
+ subscription modes:
+ <itemizedlist>
+ <listitem>
+ <para>
+ Automatic subscription (no jBPM required)
+ </para>
+ </listitem>
+ <listitem>
+ <para>E-Mail validation</para>
+ </listitem>
+ <listitem>
+ <para>E-Mail validation and approval</para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ <note>
+ It is not recommended to change the subscription mode
+ while runtime.
+ </note>
+ <para></para>
+ <mediaobject>
+ <imageobject>
+ <imagedata align="center"
+ fileref="images/identityportlets/pending_users.png" format="png" />
+ </imageobject>
+ <caption>
+ <para>
+ Approve or reject pending registrations (<emphasis>jbp_identity_validation_approval_workflow</emphasis>).
+ </para>
+ </caption>
+ </mediaobject>
+
+ </sect2>
+ <sect2 id="identity_portlet_configuration_file">
+ <title>The configuration file</title>
+ <para>
+ The Identity Portlets use some metadata which can be
+ easily changed in the main configuration file, which is
+ shown in the following listing:
+ </para>
+ <programlisting><![CDATA[<identity-ui-configuration>
+
+ <subscription-mode>automatic</subscription-mode>
+ <admin-subscription-mode>automatic</admin-subscription-mode>
+ <overwrite-workflow>false</overwrite-workflow>
+ <email-domain>jboss.org</email-domain>
+ <email-from>no-reply(a)jboss.com</email-from>
+ <password-generation-characters>a...Z</password-generation-characters>
+ <default-roles>
+ <role>User</role>
+ </default-roles>
+
+ <!-- user interface components -->
+ <ui-components>
+ <ui-component name="givenname">
+ <property-ref>user.name.given</property-ref>
+ </ui-component>
+ <ui-component name="familyname">
+ <property-ref>user.name.family</property-ref>
+ </ui-component>
+ ...
+</identity-ui-configuration>]]></programlisting>
+ <para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <emphasis role="bold">
+ subscription-mode:
+ </emphasis>
+ defines the User Portlet registration
+ process
+ <itemizedlist>
+ <listitem>
+ <emphasis>automatic:</emphasis> no validation nor approval (default)
+ </listitem>
+ <listitem>
+ <emphasis>jbp_identity_validation_workflow:</emphasis> e-mail validation, no approval
+ </listitem>
+ <listitem>
+ <emphasis>jbp_identity_validation_approval_workflow:</emphasis> e-mail validation and approval
+ </listitem>
+ <listitem>
+ <emphasis>custom:</emphasis> Take a look at Customizing the workflow
+ </listitem>
+ </itemizedlist>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis role="bold">
+ admin-subscription-mode:
+ </emphasis>
+ jBPM process used in the User Management Portlet for creating users
+ <itemizedlist>
+ <listitem>
+ <emphasis>automatic:</emphasis>
+ no validation nor approval (default)
+ </listitem>
+ <listitem>
+ <emphasis>jbp_identity_validation_workflow:</emphasis>
+ e-mail validation, no approval
+ </listitem>
+ <listitem>
+ <emphasis>jbp_identity_validation_approval_workflow:</emphasis>
+ e-mail validation and approval
+ </listitem>
+ <listitem>
+ <emphasis>custom:</emphasis>
+ Take a look at Customizing the
+ workflow
+ </listitem>
+ </itemizedlist>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis role="bold">
+ overwrite-workflow:
+ </emphasis>
+ if set to 'true' the workflow will be overwritten (default: false)
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis role="bold">
+ email-domain:
+ </emphasis>
+ e-mail domain in the validation e-mail
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis role="bold">email-from:</emphasis>
+ e-mail from in the validation e-mail
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis role="bold">
+ password-generation-characters:
+ </emphasis>
+ used characters for generating a random password
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis role="bold">
+ default-roles:
+ </emphasis>
+ one or more default roles
+ <itemizedlist>
+ <listitem>
+ available element: <emphasis role="bold">role</emphasis>
+ </listitem>
+ </itemizedlist>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis role="bold">
+ ui-components:
+ </emphasis>
+ Defines the available user interface components. Take a look at the next section
+ for further information.
+ </para>
+ </listitem>
+ </itemizedlist>
+ Due to the differentiation between subscription-mode and
+ admin-subscription-mode it is possible to require e-mail
+ validation and approval for new registrations and e-mail
+ validation only when a user is created in the user
+ management portlet.
+ </para>
+ </sect2>
+ <sect2>
+ <title>Customize e-mail templates</title>
+ <para>
+ The email templates can be found in the folder: <emphasis>portal-identity.sar/conf/templates/</emphasis><sbr/>
+ New languages can be added by creating a new file like: <emphasis>emailTemplate_fr.tpl</emphasis>
+ </para>
+ </sect2>
+ </sect1>
+ <sect1 id="identity_portlet_configuration_ui_components">
+ <title>User interface customization</title>
+ <para>
+ The following three examples describe common use cases for customizing the User Portlet.
+ <itemizedlist>
+ <listitem>
+ <para>
+ <emphasis role="bold">Example 1:</emphasis>
+ Describes how to tag a input field as required
+ and add it to the registration page.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis role="bold">Example 2:</emphasis>
+ Shows how to create a simple dropdown menu.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis role="bold">Example 3:</emphasis>
+ Describes how to add new properties.
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ </para>
+ <note>
+ This is not a JavaServer Faces tutorial. Basic knowledge of
+ this technology is a precondition for customizing the User
+ Portlet Interface.
+ </note>
+ <sect2 id="identity_portlet_configuration_example1">
+ <title>Example 1: required fields</title>
+ <para>
+ This example covers changing not required properties to
+ required and adding them to the registration page.
+ <sbr />
+ changes in <emphasis>portal-identity.sar/conf/identity-ui-configuration.xml</emphasis>
+ </para>
+ <programlisting><![CDATA[<identity-ui-configuration>
+...
+ <!-- user interface components -->
+ ...
+ <ui-component name="givenname">
+ <property-ref>user.name.given</property-ref>
+ <required>true</required>
+ </ui-component>
+ <ui-component name="familyname">
+ <property-ref>user.name.family</property-ref>
+ <required>true</required>
+ </ui-component>
+ ...
+</identity-ui-configuration>]]></programlisting>
+ <para>
+ changes in <emphasis>portal-identity.sar/portal-identity.war/WEB-INF/jsf/common/register.xhtml</emphasis>
+ </para>
+ <programlisting><![CDATA[
+...
+ <h:outputText value="#{bundle.IDENTITY_GIVENNAME}"/>
+ <h:inputText id="givenname" value="#{manager.uiUser.attribute.givenname}"
+ required="#{metadataservice.givenname.required}"/>
+ <h:panelGroup />
+ <h:message for="givenname" />
+
+ <h:outputText value="#{bundle.IDENTITY_FAMILYNAME}"/>
+ <h:inputText id="lastname" value="#{manager.uiUser.attribute.familyname}"
+ required="#{metadataservice.familyname.required}"/>
+ <h:panelGroup />
+ <h:message for="lastname"/>
+...]]></programlisting>
+ <para>
+ That's it - from now on the given and familyname will be
+ required on registration as well in the edit profile.
+ </para>
+ </sect2>
+ <sect2 id="identity_portlet_configuration_example2">
+ <title>
+ Example 2: dynamic values (dropdown menu with predefined
+ values)
+ </title>
+ <para>
+ changes in<emphasis>portal-identity.sar/conf/identity-ui-configuration.xml</emphasis>
+ </para>
+ <programlisting><![CDATA[<identity-ui-configuration>
+...
+ <!-- user interface components -->
+ ...
+ <ui-component name="interests">
+ <property-ref>portal.user.interests</property-ref>
+ <values>
+ <value key="board">snowboarding</value>
+ <value key="ski">skiing</value>
+ <value key="sledge">sledging</value>
+ </values>
+ </ui-component>
+ ...
+</identity-ui-configuration>]]></programlisting>
+ <para>
+ changes in
+ <emphasis>
+ portal-identity.sar/portal-identity.war/WEB-INF/jsf/common/profile.xhtml
+ </emphasis>
+ - change inputText to a selectOneMenu:
+ </para>
+ <programlisting><![CDATA[
+ ...
+ <h:outputText value="#{bundle.IDENTITY_INTERESTS}"/>
+ <h:selectOneMenu id="interests" value="#{manager.uiUser.attribute.interests}"
+ required="#{metadataservice.interests.required}">
+ <f:selectItems value="#{metadataservice.interests.values}" />
+ </h.selectOneMenu>
+ <h:panelGroup />
+ <h:message for="interests"/>
+...
+]]></programlisting>
+ <para>
+ localization: in e.g.
+ <emphasis>
+ portal-identity.sar/conf/bundles/Identity.properties
+ </emphasis>
+ - The value will only be used if the element does not
+ have any localization information.
+ </para>
+ <programlisting><![CDATA[
+...
+IDENTIY_DYNAMIC_VALUE_BOARD=localized snowboarding
+IDENTIY_DYNAMIC_VALUE_SKI=localized skiing
+IDENTIY_DYNAMIC_VALUE_SLEDGE=localized sledging
+...
+]]></programlisting>
+ <note>
+ If the value is not required a blank element will be
+ added at the top.
+ </note>
+ </sect2>
+ <sect2 id="identity_portlet_configuration_example3">
+ <title>Example 3: adding new properties</title>
+ <note>
+ Please make sure you read at least the section about
+ user profile configuration: <xref linkend="user_profile_configuration"/>
+ </note>
+ <para>
+ <emphasis role="bold">step 1:</emphasis>
+ add a new property to <emphasis>profile-config.xml</emphasis> e.g. a dynamic property called gender:
+ </para>
+ <programlisting><![CDATA[
+...
+ <property>
+ <name>user.gender</name>
+ <type>java.lang.String</type>
+ <access-mode>read-write</access-mode>
+ <usage>optional</usage>
+ <display-name xml:lang="en">Gender</display-name>
+ <description xml:lang="en">The gender</description>
+ <mapping>
+ <database>
+ <type>dynamic</type>
+ <value>user.gender</value>
+ </database>
+ </mapping>
+ </property>
+...
+]]></programlisting>
+ <note>
+ It is recommended to use the 'User Information Attribute Names' from the <ulink url="http://jcp.org/en/jsr/detail?id=168">Portlet Specification</ulink> for defining properties.
+ </note>
+ <para>
+ <emphasis role="bold">step 2:</emphasis>
+ add the property to the identity-ui-configuration: (<emphasis>portal-identity.sar/conf/identity-ui-configuration.xml</emphasis>)
+ </para>
+ <programlisting><![CDATA[
+...
+ <ui-component name="gender">
+ <property-ref>user.gender</property-ref>
+ <required>true</required>
+ <values>
+ <value key="male">Male</value>
+ <value key="female">Female</value>
+ </values>
+ </ui-component>
+...
+]]></programlisting>
+ <note>
+ The property-ref must match a property from the
+ <emphasis>profile-config.xml</emphasis>
+ .
+ </note>
+ <para>
+ <emphasis role="bold">step 3:</emphasis>
+ add your custom ui-component to the profile page: (<emphasis>portal-identity.sar/portal-identity.war/WEB-INF/jsf/profile.xhtml</emphasis>)
+ </para>
+ <programlisting><![CDATA[
+...
+ <h:outputText value="#{bundle.IDENTITY_GENDER}"/>
+ <h:selectOneMenu id="gender" value="#{manager.uiUser.attribute.gender}"
+ required="#{metadataservice.gender.required}">
+ <f:selectItems value="#{metadataservice.gender.values}" />
+ </h.selectOneMenu>
+ <h:panelGroup />
+ <h:message for="gender"/>
+...
+]]></programlisting>
+ <note>Don't forget to add the localization elements.</note>
+ </sect2>
+ <sect2>
+ <title>Illustration</title>
+ <para>
+
+ </para>
+ <mediaobject>
+ <imageobject>
+ <imagedata align="center"
+ fileref="images/identityportlets/illustration.png" format="png" />
+ </imageobject>
+ <caption>
+ <para>
+ Illustration of the relationship between the
+ configuration files.
+ </para>
+ </caption>
+ </mediaobject>
+ <para>
+ The JSF-View in more detail:
+ <itemizedlist>
+ <listitem>
+ <para>
+ <emphasis role="bold">
+ manager.uiUser.attribute:
+ </emphasis>
+ manages and stores the dynamic properties
+ <itemizedlist>
+ <listitem>
+ <para>
+ <emphasis role="bold">
+ examples:
+ </emphasis>
+ <emphasis>manager.uiUser.attribute.gender</emphasis>,
+ <emphasis>manager.uiUser.attribute.interests</emphasis>
+ <programlisting><![CDATA[<h:inputText id="gender" value="#{manager.uiUser.attribute.gender}" />]]></programlisting>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis role="bold">
+ metadataservice
+ </emphasis>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <emphasis role="bold">
+ required
+ </emphasis>
+ - references the required attribute from the ui-component<sbr />
+ example: <emphasis>metadataservice.gender.required</emphasis>
+ <programlisting><![CDATA[<h:inputText id="gender" value="#{manager.uiUser.attribute.gender}" required="#{metadataservice.gender.required}"/>]]></programlisting>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis role="bold">
+ values
+ </emphasis>
+ - references the values list from the ui-component<sbr />
+ example: <emphasis>metadataservice.gender.values</emphasis>
+ <programlisting><![CDATA[<h:selectOneMenu id="interests" value="#{manager.uiUser.attribute.interests}">
+ <f:selectItems value="#{metadataservice.interests.values}" />
+</h:selectOneMenu>]]></programlisting>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis role="bold">
+ validator
+ </emphasis>
+ - references the name of a registered JSF validator<sbr />
+ example:<emphasis>metadataservice.gender.validator</emphasis>
+ - the first validator of the validator list<sbr />
+ example: <emphasis>metadataservice.gender.validators[0]</emphasis>
+ - the validator list with an index<sbr />
+ <programlisting><![CDATA[<f:validator validatorId="#{metadataservice.gender.validator}"/>]]></programlisting>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis role="bold">
+ converter
+ </emphasis>
+ - references the name of aregistered JSF converter<sbr />
+ example: <emphasis>metadataservice.gender.converter</emphasis>
+ <programlisting><![CDATA[<f:converter converterId="#{metadataservice.gender.converter}"/>]]></programlisting>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis role="bold">
+ readOnly
+ </emphasis>
+ - references the access-mode of <emphasis>profile-config.xml</emphasis><sbr />
+ possible usage i.e. in <emphasis>/WEB-INF/jsf/common/profile.xhtml</emphasis>
+ <programlisting><![CDATA[<h:inputText value="#{manager.uiUser.attribute.nickname}" disabled="#{metadataservice.nickname.readOnly}" />]]></programlisting>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ <note>
+ The values of the profile-config.xml have a higher
+ priority than the values in the user portlet
+ configuration. That means if the 'usage' is 'mandatory'
+ in
+ <emphasis>profile-config.xml</emphasis>
+ and 'required' is 'false' it will be overwritten by the
+ value from the profile config!
+ </note>
+ </sect2>
+ </sect1>
+ <sect1>
+ <title>Customizing the workflow</title>
+ <note>jBPM is not part of this documentation.</note>
+ <para>
+ The process definitions are located in:
+ <emphasis>portal-identity.sar/conf/processes</emphasis>. For creating a custom workflow the custom workflow (<emphasis>custom.xml</emphasis>) can be extended.
+ It is not recommended to change the predefined workflow definitions.
+ </para>
+ <para>
+ Available variables in the business process:
+ <itemizedlist>
+ <listitem>
+ <para>
+ <emphasis role="bold">name:</emphasis>
+ portalURL
+ <sbr />
+ <emphasis role="bold">type:</emphasis>
+ <emphasis>java.lang.String</emphasis>
+ <sbr />
+ <emphasis role="bold">description:</emphasis>
+ the full url of the portal e.g.
+ <emphasis>
+ http://localhost:8080/portal
+ </emphasis>
+ <sbr />
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis role="bold">name:</emphasis>
+ locale
+ <sbr />
+ <emphasis role="bold">type:</emphasis>
+ <emphasis>java.util.Locale</emphasis>
+ <sbr />
+ <emphasis role="bold">description:</emphasis>
+ the requested locale at registration
+ <sbr />
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis role="bold">name:</emphasis>
+ email
+ <sbr />
+ <emphasis role="bold">type:</emphasis>
+ <emphasis>java.lang.String</emphasis>
+ <sbr />
+ <emphasis role="bold">description:</emphasis>
+ the e-mail address of the user in case of registration.<sbr />
+ In case of changing the e-mail the new e-mail address.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis role="bold">name:</emphasis>
+ user
+ <sbr />
+ <emphasis role="bold">type:</emphasis>
+ <emphasis>
+ org.jboss.portal.core.identity.services.workflow.UserContainer
+ </emphasis>
+ <sbr />
+ <emphasis role="bold">description:</emphasis>
+ Seralizable Object containing user information through the jBPM process <sbr />
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis role="bold">name:</emphasis>
+ validationHash
+ <sbr />
+ <emphasis role="bold">type:</emphasis>
+ <emphasis>java.lang.String</emphasis>
+ <sbr />
+ <emphasis role="bold">description:</emphasis>
+ hash used for the validation part. Only available after executing SendValidationEmailAction<sbr />
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ <note>
+ Make sure that the filename and the process name match! e.g.
+ <emphasis>conf/processes/custom.xml</emphasis>
+ and process-definition name="custom".
+ </note>
+ <para>
+ When using a custom workflow it is possible to customize the
+ status message after registering in the locale bundle: ( e.g.
+ <emphasis>portal-identity.sar/conf/bundles/Identity.properties</emphasis>)
+ </para>
+ <programlisting><![CDATA[
+...
+IDENTITY_VERIFICATION_STATUS_REGISTER_CUSTOM=Customized message here
+...
+]]></programlisting>
+ <sect2>
+ <title>Duration of process validity</title>
+ <para>
+ By default requests (e.g. e-mail validation and registrations) expire after some time in the validation state.
+ Therefore it is not required to add additional maintenance mechanism to invalidate a request. The default expiration time is 2 days,
+ but is quite easy to change the timing by editing the <emphasis>duedate</emphasis> attribute in the process definition.
+ changes in: <emphasis>portal-identity.sar/conf/processes/*.xml</emphasis>
+ </para>
+ <programlisting><![CDATA[<process-definition>
+...
+ <state name="validate_email">
+ <timer name="time_to_expire" duedate="24 hours" transition="timedOut" />
+ </state>
+...
+</process-definition>]]></programlisting>
+ </sect2>
+ <para>
+ For further information take a look at the <ulink url="http://docs.jboss.com/jbpm/v3/userguide/index.html">jBPM documentation</ulink> on <emphasis>Duration</emphasis>.
+ </para>
+ </sect1>
+ <sect1>
+ <title>Disabling the Identity Portlets</title>
+ <para>
+ Due to the fact that the common User portlet is still
+ included in JBoss Portal 2.6.2 it is possible to activate
+ it over the Portal Admin interface, by using the PortletInstances:
+ <itemizedlist>
+ <listitem>
+ <emphasis>UserPortletInstance:</emphasis> The common user portlet
+ </listitem>
+ <listitem>
+ <emphasis>RolePortletInstance:</emphasis> The common role managment portlet
+ </listitem>
+ </itemizedlist>
+ </para>
+ <sect2>
+ <title>Enabling the Identity Portlets</title>
+ <para>
+ When migrating from former versions of JBoss Portal the Identity User Portlets won't be displayed by default,
+ but Windows can be created on basis of the existing Portlet Instances which are by default deployed.
+ </para>
+ </sect2>
+ </sect1>
+</chapter>
18 years, 7 months
JBoss Portal SVN: r8236 - in trunk: cms/src/main/org/jboss/portal/cms/impl/interceptors and 25 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-09-12 04:25:28 -0400 (Wed, 12 Sep 2007)
New Revision: 8236
Added:
trunk/cms/src/main/org/jboss/portal/cms/workflow/ApprovePublish.java
trunk/cms/src/main/org/jboss/portal/cms/workflow/ApprovePublishImpl.java
trunk/cms/src/main/org/jboss/portal/cms/workflow/ApprovePublishServlet.java
trunk/cms/src/main/org/jboss/portal/cms/workflow/Content.java
trunk/cms/src/main/org/jboss/portal/cms/workflow/TaskExceptionHandler.java
trunk/core/src/resources/portal-core-sar/conf/hibernate/workflow/
trunk/core/src/resources/portal-core-sar/conf/hibernate/workflow/ehcache.xml
trunk/core/src/resources/portal-core-sar/conf/hibernate/workflow/hibernate.cfg.xml
trunk/widget/src/resources/portal-widget-war/
trunk/widget/src/resources/portal-widget-war/WEB-INF/
trunk/widget/src/resources/portal-widget-war/WEB-INF/jsp/
trunk/widget/src/resources/portal-widget-war/WEB-INF/jsp/edit.jsp
trunk/widget/src/resources/portal-widget-war/WEB-INF/portlet-instances.xml
trunk/widget/src/resources/portal-widget-war/WEB-INF/portlet.xml
trunk/widget/src/resources/portal-widget-war/WEB-INF/web.xml
trunk/workflow/src/main/org/jboss/portal/workflow/service/JbpmThreadService.java
trunk/workflow/src/main/org/jboss/portal/workflow/service/JbpmThreadServiceMBean.java
trunk/workflow/src/resources/portal-workflow-sar/META-INF/jboss-service.xml
Removed:
trunk/core/src/resources/portal-core-sar/conf/hibernate/workflow/ehcache.xml
trunk/core/src/resources/portal-core-sar/conf/hibernate/workflow/hibernate.cfg.xml
trunk/widget/src/resources/portal-widget-war/WEB-INF/
trunk/widget/src/resources/portal-widget-war/WEB-INF/jsp/
trunk/widget/src/resources/portal-widget-war/WEB-INF/jsp/edit.jsp
trunk/widget/src/resources/portal-widget-war/WEB-INF/portlet-instances.xml
trunk/widget/src/resources/portal-widget-war/WEB-INF/portlet.xml
trunk/widget/src/resources/portal-widget-war/WEB-INF/web.xml
trunk/widget/src/resources/widget-war/
trunk/workflow/src/main/org/jboss/portal/workflow/cms/
trunk/workflow/src/resources/portal-workflow-sar/META-INF/jboss-service.xml
trunk/workflow/src/resources/portal-workflow-war/
Modified:
trunk/build/build-thirdparty.xml
trunk/build/build.xml
trunk/build/distrib.xml
trunk/cms/src/main/org/jboss/portal/cms/impl/interceptors/ApprovalWorkflowInterceptor.java
trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/JCRCMS.java
trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/command/ACLEnforcer.java
trunk/cms/src/main/org/jboss/portal/cms/workflow/FinalizePublish.java
trunk/cms/src/main/org/jboss/portal/cms/workflow/PublishAssignmentHandler.java
trunk/cms/src/main/org/jboss/portal/test/cms/workflow/AbstractWorkflowTestCase.java
trunk/cms/src/main/org/jboss/portal/test/cms/workflow/TestApprovedPublish.java
trunk/cms/src/main/org/jboss/portal/test/cms/workflow/TestDeniedPublish.java
trunk/cms/src/main/org/jboss/portal/test/cms/workflow/TestWorkflowEnvironment.java
trunk/cms/src/resources/portal-cms-jar/org/jboss/portal/cms/jboss-beans-workflow.xml
trunk/core-cms/build.xml
trunk/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSAdminPortlet.java
trunk/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSContentEditorPortlet.java
trunk/core-cms/src/resources/portal-cms-sar/META-INF/jboss-service.xml
trunk/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/pending_items.jsp
trunk/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/viewfile.jsp
trunk/core-cms/src/resources/portal-cms-war/WEB-INF/web.xml
trunk/core/build.xml
trunk/core/src/resources/portal-core-sar/conf/data/default-object.xml
trunk/widget/build.xml
trunk/workflow/build.xml
trunk/workflow/src/resources/portal-workflow-sar/conf/hibernate/workflow/hibernate.cfg.xml
Log:
Merge from 2_6 Branch.
- CMS/workflow seperation
- New identity portlets integration
Modified: trunk/build/build-thirdparty.xml
===================================================================
--- trunk/build/build-thirdparty.xml 2007-09-12 08:04:19 UTC (rev 8235)
+++ trunk/build/build-thirdparty.xml 2007-09-12 08:25:28 UTC (rev 8236)
@@ -85,14 +85,15 @@
<componentref name="jboss/backport-concurrent" version="2.1.0.GA"/>
<componentref name="jboss/cache" version="1.4.0.SP1"/>
<componentref name="jboss/jbossretro-rt" version="1.0.3.GA"/>
- <componentref name="jboss/jbossws14" version="1.0.0.GA"/>
- <componentref name="jboss/jbossxb" version="1.0.0.CR4"/>
+ <componentref name="jboss/jbossws14" version="1.0.3.GA"/>
+ <componentref name="jboss/jbossxb" version="1.0.0.CR7"/>
<componentref name="jboss/microcontainer" version="1.0.2"/>
<componentref name="jboss/remoting" version="1.4.3.GA"/>
<componentref name="jboss/serialization" version="1.0.1.GA"/>
<componentref name="jboss/test" version="1.0.0.CR1"/>
<componentref name="jboss-jsfunit" version="1.0-snapshot"/>
<componentref name="jflex" version="1.4.0"/>
+ <componentref name="jcaptcha" version="1.0.6"/>
<componentref name="jwebunit" version="1.2"/>
<componentref name="jcr" version="1.0"/>
<componentref name="jcaptcha" version="1.0.6"/>
Modified: trunk/build/build.xml
===================================================================
--- trunk/build/build.xml 2007-09-12 08:04:19 UTC (rev 8235)
+++ trunk/build/build.xml 2007-09-12 08:25:28 UTC (rev 8236)
@@ -132,6 +132,7 @@
<module name="core-management"/>
<module name="core-admin"/>
<module name="core-wsrp"/>
+ <module name="core-identity"/>
<module name="search"/>
<module name="core-samples"/>
<module name="wsrp"/>
@@ -144,7 +145,7 @@
<group name="portal">
<include
- modules="common, test, api, web, jems, server, security, identity, search, format, portlet, portlet-server, bridge, faces, portlet-federation, theme, workflow, cms, registration, core, wsrp, core-admin, core-cms, core-management, core-samples, widget"/>
+ modules="common, test, api, web, jems, server, security, identity, search, format, portlet, portlet-server, bridge, faces, portlet-federation, theme, workflow, cms, registration, core, wsrp, core-admin, core-cms, core-management, core-samples, core-identity, widget"/>
</group>
<group name="cms">
@@ -293,13 +294,14 @@
<copy file="../core/output/lib/jboss-portal.sar" todir="${jboss.home}/server/${portal.deploy.dir}" overwrite="true"/>
<copy file="../core-admin/output/lib//portal-admin.sar" todir="${jboss.home}/server/${portal.deploy.dir}" overwrite="true"/>
<copy file="../core-cms/output/lib/portal-cms.sar" todir="${jboss.home}/server/${portal.deploy.dir}" overwrite="true"/>
+ <copy file="../core-identity/output/lib/portal-identity.sar" todir="${jboss.home}/server/${portal.deploy.dir}" overwrite="true"/>
<copy file="../core-management/output/lib/portal-management.sar" todir="${jboss.home}/server/${portal.deploy.dir}" overwrite="true"/>
<copy file="../core-samples/output/lib/portal-basic-samples.sar" todir="${jboss.home}/server/${portal.deploy.dir}" overwrite="true"/>
<copy file="../core-samples/output/lib/portal-news-samples.war" todir="${jboss.home}/server/${portal.deploy.dir}" overwrite="true"/>
<copy file="../core-samples/output/lib/portal-jsp-samples.war" todir="${jboss.home}/server/${portal.deploy.dir}" overwrite="true"/>
<copy file="../core-samples/output/lib/portal-weather-samples.war" todir="${jboss.home}/server/${portal.deploy.dir}" overwrite="true"/>
<!--<copy file="../core-search/output/lib/portal-search.sar" todir="${jboss.home}/server/${portal.deploy.dir}" overwrite="true"/>-->
- <copy file="../widget/output/lib/widget.war" todir="${jboss.home}/server/${portal.deploy.dir}" overwrite="true"/>
+ <copy file="../widget/output/lib/portal-widget.war" todir="${jboss.home}/server/${portal.deploy.dir}" overwrite="true"/>
<copy file="../wsrp/output/lib/portal-wsrp.sar" todir="${jboss.home}/server/${portal.deploy.dir}" overwrite="true"/>
</target>
@@ -310,13 +312,14 @@
<delete file="${jboss.home}/server/${portal.deploy.dir}/jboss-portal.sar"/>
<delete file="${jboss.home}/server/${portal.deploy.dir}/portal-admin.sar"/>
<delete file="${jboss.home}/server/${portal.deploy.dir}/portal-cms.sar"/>
+ <delete file="${jboss.home}/server/${portal.deploy.dir}/portal-identity.sar"/>
<delete file="${jboss.home}/server/${portal.deploy.dir}/portal-management.sar"/>
<delete file="${jboss.home}/server/${portal.deploy.dir}/portal-basic-samples.sar"/>
<delete file="${jboss.home}/server/${portal.deploy.dir}/portal-news-samples.war"/>
<delete file="${jboss.home}/server/${portal.deploy.dir}/portal-jsp-samples.war"/>
<delete file="${jboss.home}/server/${portal.deploy.dir}/portal-weather-samples.war"/>
<!--<delete file="${jboss.home}/server/${portal.deploy.dir}/portal-search.sar"/>-->
- <delete file="${jboss.home}/server/${portal.deploy.dir}/widget.war"/>
+ <delete file="${jboss.home}/server/${portal.deploy.dir}/portal-widget.war"/>
<delete file="${jboss.home}/server/${portal.deploy.dir}/portal-wsrp.sar"/>
</target>
Modified: trunk/build/distrib.xml
===================================================================
--- trunk/build/distrib.xml 2007-09-12 08:04:19 UTC (rev 8235)
+++ trunk/build/distrib.xml 2007-09-12 08:25:28 UTC (rev 8236)
@@ -224,7 +224,6 @@
<antcall target="package-normal"/>
<antcall target="package-ha"/>
<antcall target="package-normal-bundled"/>
- <antcall target="package-ha-bundled"/>
</target>
<!--
@@ -243,9 +242,11 @@
<fileset dir="${source.dir}/core-cms/output/resources/portal-cms.sar" includes="**"/>
</copy>
<copy todir="${portal.build.normal.bin}/jboss-portal.sar">
- <fileset dir="${source.dir}/widget/output/resources" includes="widget.war/**"/>
+ <fileset dir="${source.dir}/workflow/output/resources" includes="portal-workflow.sar/**"/>
+ <fileset dir="${source.dir}/widget/output/resources" includes="portal-widget.war/**"/>
<fileset dir="${source.dir}/core-management/output/resources" includes="portal-management.sar/**"/>
<fileset dir="${source.dir}/core-admin/output/resources" includes="portal-admin.sar/**"/>
+ <fileset dir="${source.dir}/core-identity/output/resources" includes="portal-identity.sar/**"/>
</copy>
<copy todir="${portal.build.normal.bin}/jboss-portal.sar/samples">
<fileset dir="${source.dir}/core-samples/output/resources" includes="portal-jsp-samples.war/**"/>
@@ -273,9 +274,11 @@
<fileset dir="${source.dir}/core-cms/output/resources/portal-cms-ha.sar" includes="**"/>
</copy>
<copy todir="${portal.build.ha.bin}/jboss-portal-ha.sar">
- <fileset dir="${source.dir}/widget/output/resources" includes="widget.war/**"/>
+ <fileset dir="${source.dir}/workflow/output/resources" includes="portal-workflow.sar/**"/>
+ <fileset dir="${source.dir}/widget/output/resources" includes="portal-widget.war/**"/>
<fileset dir="${source.dir}/core-management/output/resources" includes="portal-management.sar/**"/>
<fileset dir="${source.dir}/core-admin/output/resources" includes="portal-admin.sar/**"/>
+ <fileset dir="${source.dir}/core-identity/output/resources" includes="portal-identity.sar/**"/>
</copy>
<copy todir="${portal.build.ha.bin}/jboss-portal-ha.sar/samples">
<fileset dir="${source.dir}/core-samples/output/resources" includes="portal-jsp-samples.war/**"/>
@@ -323,7 +326,7 @@
<!--
| JBoss Portal ha bundled distribution
-->
-
+ <!--
<target name="package-ha-bundled" depends="package-ha" if="jboss.home"
description="package jboss-portal-ha bundled with JBoss AS">
<mkdir dir="${portal.build.ha.bundled}"/>
@@ -346,9 +349,9 @@
<antcall target="patch-log4j">
<param name="todir" value="${portal.build.normal.bundled}/server/default"/>
</antcall>
+ </target>
+ -->
- </target>
-
<!-- Create packages -->
<target name="zip">
Modified: trunk/cms/src/main/org/jboss/portal/cms/impl/interceptors/ApprovalWorkflowInterceptor.java
===================================================================
--- trunk/cms/src/main/org/jboss/portal/cms/impl/interceptors/ApprovalWorkflowInterceptor.java 2007-09-12 08:04:19 UTC (rev 8235)
+++ trunk/cms/src/main/org/jboss/portal/cms/impl/interceptors/ApprovalWorkflowInterceptor.java 2007-09-12 08:25:28 UTC (rev 8236)
@@ -37,8 +37,8 @@
import org.jboss.portal.identity.User;
import org.jboss.portal.jems.as.JNDI;
-import org.jboss.portal.workflow.cms.ApprovePublish;
-import org.jboss.portal.workflow.cms.Content;
+import org.jboss.portal.cms.workflow.ApprovePublish;
+import org.jboss.portal.cms.workflow.Content;
/**
Modified: trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/JCRCMS.java
===================================================================
--- trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/JCRCMS.java 2007-09-12 08:04:19 UTC (rev 8235)
+++ trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/JCRCMS.java 2007-09-12 08:25:28 UTC (rev 8236)
@@ -55,7 +55,7 @@
import org.jboss.portal.identity.IdentityException;
import org.jboss.portal.jems.as.system.AbstractJBossService;
-import org.jboss.portal.workflow.cms.ApprovePublish;
+import org.jboss.portal.cms.workflow.ApprovePublish;
import org.jboss.util.StopWatch;
import org.w3c.dom.DOMImplementation;
@@ -613,14 +613,14 @@
JCRCommandContext ctx = new JCRCommandContext(session, commandFactory, defaultLocale);
jcrCmd.setContext(ctx);
- ctx.setAttribute(ctx.scope, "user", JCRCMS.getUserInfo().get());
+ ctx.setAttribute(JCRCommandContext.scope, "user", JCRCMS.getUserInfo().get());
Object isWorkflowOff = JCRCMS.turnOffWorkflow.get();
if( this.approvePublishWorkflow!=null //this checks and makes sure workflow is activated for the CMS
&&
isWorkflowOff==null //this checks and makes sure workflow is not turned off only for this particular request
)
{
- ctx.setAttribute(ctx.scope, "approvePublishWorkflow", this.approvePublishWorkflow);
+ ctx.setAttribute(JCRCommandContext.scope, "approvePublishWorkflow", this.approvePublishWorkflow);
}
Modified: trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/command/ACLEnforcer.java
===================================================================
--- trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/command/ACLEnforcer.java 2007-09-12 08:04:19 UTC (rev 8235)
+++ trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/command/ACLEnforcer.java 2007-09-12 08:25:28 UTC (rev 8236)
@@ -40,7 +40,7 @@
import org.jboss.portal.identity.User;
import org.jboss.portal.identity.Role;
-import org.jboss.portal.workflow.cms.ApprovePublish;
+import org.jboss.portal.cms.workflow.ApprovePublish;
/**
* ACLEnforcer checks proper access privileges for actions before
@@ -58,7 +58,7 @@
private static final int read = 0;
private static final int write = 1;
private static final int manage = 2;
- private static final int manageWorkflow = 3;
+// private static final int manageWorkflow = 3;
private AuthorizationManager authorizationManager = null;
Copied: trunk/cms/src/main/org/jboss/portal/cms/workflow/ApprovePublish.java (from rev 8187, branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/workflow/ApprovePublish.java)
===================================================================
--- trunk/cms/src/main/org/jboss/portal/cms/workflow/ApprovePublish.java (rev 0)
+++ trunk/cms/src/main/org/jboss/portal/cms/workflow/ApprovePublish.java 2007-09-12 08:25:28 UTC (rev 8236)
@@ -0,0 +1,82 @@
+/******************************************************************************
+ * 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.cms.workflow;
+
+import java.util.Set;
+
+import org.jboss.portal.workflow.WorkflowException;
+
+import java.util.Collection;
+
+/**
+ * Created on : Dec 19, 2006
+ *
+ * @author Sohil Shah - sohil.shah(a)jboss.com
+ */
+public interface ApprovePublish
+{
+ /**
+ * Called when content is added to the CMS, and needs to be approved by the managers
+ * before it can be published to go live
+ *
+ * @param content
+ * @return returns the process id of the workflow process set in motion
+ */
+ public long requestApproval(Content content) throws WorkflowException;
+
+ /**
+ * Called when a manager either approves or rejects the publishing of a specific content to
+ * go live
+ *
+ * @param processId
+ * @param manager userId of the manager
+ * @param approved true if approved, false if rejected
+ */
+ public void processManagerResponse(long processId, String manager, boolean approved) throws WorkflowException;
+
+ /**
+ * Retrieves a queue of unapproved content associated with the specified file in the CMS
+ *
+ * @param filePath
+ * @return
+ * @throws WorkflowException
+ */
+ public Collection getPendingQueue(String filePath) throws WorkflowException;
+
+ /**
+ * Retrieves a queue of unapproved content for everything in the CMS.
+ *
+ * @return
+ * @throws WorkflowException
+ */
+ public Collection getAllPendingInQueue() throws WorkflowException;
+
+ /**
+ * Returns role names of Roles that are designated to be Managers in this workflow.
+ * Managers approve/deny all content publish requests before the content goes live in the
+ * CMS
+ *
+ * @return a Set of role names
+ */
+ public Set getManagers();
+}
Copied: trunk/cms/src/main/org/jboss/portal/cms/workflow/ApprovePublishImpl.java (from rev 8187, branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/workflow/ApprovePublishImpl.java)
===================================================================
--- trunk/cms/src/main/org/jboss/portal/cms/workflow/ApprovePublishImpl.java (rev 0)
+++ trunk/cms/src/main/org/jboss/portal/cms/workflow/ApprovePublishImpl.java 2007-09-12 08:25:28 UTC (rev 8236)
@@ -0,0 +1,582 @@
+/******************************************************************************
+ * 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.cms.workflow;
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+import java.util.StringTokenizer;
+
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import org.apache.log4j.Logger;
+import org.jboss.portal.common.io.IOTools;
+import org.jboss.portal.identity.IdentityContext;
+import org.jboss.portal.identity.IdentityServiceController;
+import org.jboss.portal.identity.MembershipModule;
+import org.jboss.portal.identity.Role;
+import org.jboss.portal.identity.UserModule;
+import org.jboss.portal.jems.as.JNDI;
+import org.jboss.portal.jems.as.system.AbstractJBossService;
+import org.jboss.portal.workflow.WorkflowException;
+import org.jboss.portal.workflow.service.WorkflowService;
+import org.jbpm.JbpmContext;
+import org.jbpm.db.GraphSession;
+import org.jbpm.graph.def.ProcessDefinition;
+import org.jbpm.graph.exe.ProcessInstance;
+import org.jbpm.graph.exe.Token;
+import org.jbpm.taskmgmt.exe.TaskInstance;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+
+
+/**
+ * Created on : Dec 19, 2006
+ *
+ * @author Sohil Shah - sohil.shah(a)jboss.com
+ */
+public class ApprovePublishImpl extends AbstractJBossService implements ApprovePublish
+{
+ /**
+ *
+ */
+ private static final Logger log = Logger.getLogger(ApprovePublishImpl.class);
+
+ /**
+ *
+ */
+ private WorkflowService workflowService = null;
+ private IdentityServiceController identityServiceController = null;
+ private String process = null;
+ private String processName = null;
+ private String managerRoles = null;
+ private String[] managers = null;
+ private Set managerSet = null;
+ private boolean overwrite = false;
+ private String from = null;
+ private String subject = null;
+ private String body = null;
+ private JNDI.Binding jndiBinding;
+
+ private MembershipModule membershipModule = null;
+ private UserModule userModule = null;
+
+ private String jndiName = null;
+
+ /**
+ *
+ *
+ */
+ public ApprovePublishImpl()
+ {
+
+ }
+
+ /**
+ *
+ */
+ public void startService() throws Exception
+ {
+ super.startService();
+
+ if (this.jndiName != null)
+ {
+ jndiBinding = new JNDI.Binding(jndiName, this);
+ jndiBinding.bind();
+ }
+
+ InputStream is = null;
+ JbpmContext jbpmContext = null;
+ try
+ {
+ is = new ByteArrayInputStream(this.process.getBytes());
+ jbpmContext = this.workflowService.getJbpmConfiguration().createJbpmContext();
+
+ Document document = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(is);
+
+ Element root = document.getDocumentElement();
+ this.processName = root.getAttribute("name");
+ ProcessDefinition processDefinition = jbpmContext.getGraphSession().findLatestProcessDefinition(this.processName);
+ if (processDefinition == null)
+ {
+ processDefinition = ProcessDefinition.parseXmlString(this.process);
+ jbpmContext.deployProcessDefinition(processDefinition);
+ }
+ else
+ {
+ // A process definition already exists....should deploy a new version
+ // of the definition if overwrite is true
+ ProcessDefinition fromConfig = ProcessDefinition.parseXmlString(this.process);
+ if (this.overwrite)
+ {
+ // If the two of them are not same, create a new version
+ // of this process definition
+ jbpmContext.deployProcessDefinition(fromConfig);
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ //
+ this.stopService();
+
+ //
+ throw e;
+ }
+ finally
+ {
+ IOTools.safeClose(is);
+ IOTools.safeClose(jbpmContext);
+ }
+
+ //process managers that can serve as approvers/rejecters
+ StringTokenizer st = new StringTokenizer(this.managerRoles, ",");
+ this.managers = new String[st.countTokens()];
+ this.managerSet = new HashSet();
+ for (int i = 0; i < managers.length; i++)
+ {
+ this.managers[i] = st.nextToken();
+ this.managerSet.add(this.managers[i]);
+ }
+
+ this.membershipModule = (MembershipModule)identityServiceController.getIdentityContext().
+ getObject(IdentityContext.TYPE_MEMBERSHIP_MODULE);
+
+ this.userModule = (UserModule)identityServiceController.getIdentityContext().
+ getObject(IdentityContext.TYPE_USER_MODULE);
+ }
+
+ /**
+ *
+ */
+ public void stopService() throws Exception
+ {
+ super.stopService();
+
+ if (jndiBinding != null)
+ {
+ jndiBinding.unbind();
+ jndiBinding = null;
+ }
+ }
+
+ /** @return */
+ public WorkflowService getWorkflowService()
+ {
+ return this.workflowService;
+ }
+
+ /** @param workflowService */
+ public void setWorkflowService(WorkflowService workflowService)
+ {
+ this.workflowService = workflowService;
+ }
+
+ /** @return */
+ public String getProcess()
+ {
+ return this.process;
+ }
+
+ /** @param process */
+ public void setProcess(String process)
+ {
+ this.process = process;
+ }
+
+
+ /** @return the managerRoles */
+ public String getManagerRoles()
+ {
+ return managerRoles;
+ }
+
+ /** @param managerRoles the manager managerRoles to set */
+ public void setManagerRoles(String managerRoles)
+ {
+ this.managerRoles = managerRoles;
+ }
+
+
+ /** @return the overwrite */
+ public boolean isOverwrite()
+ {
+ return overwrite;
+ }
+
+ /** @param overwrite the overwrite to set */
+ public void setOverwrite(boolean overwrite)
+ {
+ this.overwrite = overwrite;
+ }
+
+ /** @return */
+ public String getJNDIName()
+ {
+ return this.jndiName;
+ }
+
+ /** @param jndiName */
+ public void setJNDIName(String jndiName)
+ {
+ this.jndiName = jndiName;
+ }
+
+ /**
+ *
+ */
+ public IdentityServiceController getIdentityServiceController()
+ {
+ return identityServiceController;
+ }
+
+ /**
+ *
+ * @param identityServiceController
+ */
+ public void setIdentityServiceController(
+ IdentityServiceController identityServiceController)
+ {
+ this.identityServiceController = identityServiceController;
+ }
+
+
+ /** @return the body */
+ public String getBody()
+ {
+ return body;
+ }
+
+ /** @param body the body to set */
+ public void setBody(String body)
+ {
+ this.body = body;
+ }
+
+ /** @return the from */
+ public String getFrom()
+ {
+ return from;
+ }
+
+ /** @param from the from to set */
+ public void setFrom(String from)
+ {
+ this.from = from;
+ }
+
+ /** @return the subject */
+ public String getSubject()
+ {
+ return subject;
+ }
+
+ /** @param subject the subject to set */
+ public void setSubject(String subject)
+ {
+ this.subject = subject;
+ }
+
+ //----------ApprovePublish Implementation------------------------------------------------------------------
+ /**
+ * Called when content is added to the CMS, and needs to be approved by the managers
+ * before it can be published to go live
+ *
+ * @param content
+ * @return returns the process id of the workflow process set in motion
+ */
+ public long requestApproval(Content content) throws WorkflowException
+ {
+ long processId = 0;
+ JbpmContext jbpmContext = null;
+ ProcessInstance processInstance = null;
+ boolean success = false;
+ try
+ {
+ jbpmContext = this.workflowService.getJbpmConfiguration().createJbpmContext();
+
+ //The next line creates one execution of the process definition.
+ // After construction, the process execution has one main path
+ // of execution (=the root token) that is positioned in the
+ // start-state.
+ processInstance = jbpmContext.newProcessInstance(this.processName);
+
+ //After construction, the process execution has one main path
+ // of execution (=the root token).
+ Token token = processInstance.getRootToken();
+
+ //set the process variables
+ processInstance.getContextInstance().setVariable("content", content);
+ processInstance.getContextInstance().setVariable("managers", this.managers);
+ processInstance.getContextInstance().setVariable("from", this.from);
+ processInstance.getContextInstance().setVariable("subject", this.subject);
+ processInstance.getContextInstance().setVariable("body", this.body);
+
+ //start the workflow, starts the cms publish approval workflow
+ //this creates a task to approve/reject a cms publish for the Admins
+ token.signal();
+
+ //mark as a successfull process initiation
+ success = true;
+ }
+ catch (Exception e)
+ {
+ success = false;
+ throw new WorkflowException(e);
+ }
+ finally
+ {
+ if (processInstance != null && success)
+ {
+ jbpmContext.save(processInstance);
+ processId = processInstance.getId();
+ }
+ IOTools.safeClose(jbpmContext);
+ }
+ return processId;
+ }
+
+ /**
+ * Called when a manager either approves or rejects the publishing of a specific content to
+ * go live
+ *
+ * @param processId
+ * @param manager userId of the manager
+ * @param approved true if approved, false if rejected
+ */
+ public void processManagerResponse(long processId, String manager, boolean approved) throws WorkflowException
+ {
+ JbpmContext jbpmContext = null;
+ ProcessInstance processInstance = null;
+ boolean isManager = false;
+ try
+ {
+ jbpmContext = this.workflowService.getJbpmConfiguration().createJbpmContext();
+
+ //Now, we search for all process instances of this process definition.
+ processInstance = jbpmContext.loadProcessInstance(processId);
+
+ if (processInstance.hasEnded())
+ {
+ log.debug("This process has already ended...");
+ return;
+ }
+
+ processInstance.getContextInstance().setVariable("approved", new Boolean(approved));
+
+ Collection allTasks = processInstance.getTaskMgmtInstance().getTaskInstances();
+ if (allTasks != null)
+ {
+ for (Iterator itr = allTasks.iterator(); itr.hasNext();)
+ {
+ TaskInstance cour = (TaskInstance)itr.next();
+ if (this.isManager(manager,cour.getActorId()))
+ {
+ isManager = true;
+ log.debug("Manager=" + cour.getActorId() + "(" + processId + ")");
+
+ //check and make sure this task instance is not marked for deletion
+ if (cour.getVariable(processInstance.getId() + ":" + cour.getId()) != null)
+ {
+ continue;
+ }
+
+ if (!approved)
+ {
+ cour.start();
+ cour.end("rejection");
+ break;
+ }
+ else
+ {
+ cour.start();
+ cour.end("approval");
+ break;
+ }
+ }
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ throw new WorkflowException(e);
+ }
+ finally
+ {
+ if (processInstance != null)
+ {
+ jbpmContext.save(processInstance);
+ }
+
+ if(!isManager)
+ {
+ WorkflowException we = new WorkflowException("You are not authorized to Approve/Deny content publish requests");
+ throw we;
+ }
+ IOTools.safeClose(jbpmContext);
+ }
+ }
+
+ /**
+ * Retrieves a queue of unapproved content associated with the specified file in the CMS
+ *
+ * @param filePath
+ * @return
+ * @throws WorkflowException
+ */
+ public Collection getPendingQueue(String filePath) throws WorkflowException
+ {
+ Collection pendingQueue = new ArrayList();
+ JbpmContext jbpmContext = null;
+ try
+ {
+ jbpmContext = this.workflowService.getJbpmConfiguration().createJbpmContext();
+
+ GraphSession graphSession = jbpmContext.getGraphSession();
+ ProcessDefinition processDef = graphSession.findLatestProcessDefinition(this.processName);
+ List processInstances = graphSession.findProcessInstances(processDef.getId());
+
+ if (processInstances != null)
+ {
+ for (int i = 0; i < processInstances.size(); i++)
+ {
+ ProcessInstance cour = (ProcessInstance)processInstances.get(i);
+ //iterate through a list of currently pending approval tasks
+ if (!cour.hasEnded())
+ {
+ Content content = (Content)cour.getContextInstance().getVariable("content");
+
+ //apply proper criteria to extract pending content only for the specified file
+ if (content != null)
+ {
+ int lastIndex = content.getPath().lastIndexOf('/');
+ String criteriaPath = content.getPath().substring(0, lastIndex);
+
+ if (criteriaPath.trim().equals(filePath.trim()))
+ {
+ content.setProcessId(String.valueOf(cour.getId()));
+ pendingQueue.add(content);
+ }
+ }
+ }
+ }
+ }
+ }
+ finally
+ {
+ IOTools.safeClose(jbpmContext);
+ }
+ return pendingQueue;
+ }
+
+ /**
+ * Retrieves a queue of unapproved content for everything in the CMS.
+ *
+ * @return
+ * @throws WorkflowException
+ */
+ public Collection getAllPendingInQueue() throws WorkflowException
+ {
+ Collection pendingQueue = new ArrayList();
+ JbpmContext jbpmContext = null;
+ try
+ {
+ jbpmContext = this.workflowService.getJbpmConfiguration().createJbpmContext();
+
+ GraphSession graphSession = jbpmContext.getGraphSession();
+ ProcessDefinition processDef = graphSession.findLatestProcessDefinition(this.processName);
+ List processInstances = graphSession.findProcessInstances(processDef.getId());
+
+ if (processInstances != null)
+ {
+ for (int i = 0; i < processInstances.size(); i++)
+ {
+ ProcessInstance cour = (ProcessInstance)processInstances.get(i);
+ //iterate through a list of currently pending approval tasks
+ if (!cour.hasEnded())
+ {
+ Content content = (Content)cour.getContextInstance().getVariable("content");
+
+ //apply proper criteria to extract pending content only for the specified file
+ if (content != null)
+ {
+ content.setProcessId(String.valueOf(cour.getId()));
+ pendingQueue.add(content);
+ }
+ }
+ }
+ }
+ }
+ finally
+ {
+ IOTools.safeClose(jbpmContext);
+ }
+ return pendingQueue;
+ }
+
+ /**
+ *
+ * @return
+ */
+ public Set getManagers()
+ {
+ return this.managerSet;
+ }
+ //----------------------------------------------------------------------------------------------------------------
+ /**
+ * checks to see if the user trying to approve/deny a publish request belongs to the
+ * approved list of managers
+ *
+ * @param user
+ * @param managerRole
+ * @return
+ */
+ private boolean isManager(String user,String managerRole) throws Exception
+ {
+ boolean isManager = false;
+
+ Set userRoles = this.membershipModule.getRoles(
+ this.userModule.findUserByUserName(user));
+ if(userRoles != null)
+ {
+ for(Iterator itr=userRoles.iterator();itr.hasNext();)
+ {
+ Role cour = (Role)itr.next();
+ if(cour.getName().equalsIgnoreCase(managerRole))
+ {
+ //user is allowed to be a manager for this workflow
+ isManager = true;
+ break;
+ }
+ }
+ }
+
+ return isManager;
+ }
+}
Copied: trunk/cms/src/main/org/jboss/portal/cms/workflow/ApprovePublishServlet.java (from rev 8187, branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/workflow/ApprovePublishServlet.java)
===================================================================
--- trunk/cms/src/main/org/jboss/portal/cms/workflow/ApprovePublishServlet.java (rev 0)
+++ trunk/cms/src/main/org/jboss/portal/cms/workflow/ApprovePublishServlet.java 2007-09-12 08:25:28 UTC (rev 8236)
@@ -0,0 +1,108 @@
+/******************************************************************************
+ * 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.cms.workflow;
+
+import java.io.IOException;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.UnavailableException;
+
+import javax.naming.InitialContext;
+
+/**
+ * Created on : Dec 20, 2006
+ *
+ * @author Sohil Shah - sohil.shah(a)jboss.com
+ */
+public class ApprovePublishServlet extends HttpServlet
+{
+ private ApprovePublish approvePublishWorkflow = null;
+
+ /**
+ *
+ */
+ public void init() throws ServletException
+ {
+ try
+ {
+ super.init();
+ InitialContext context = new InitialContext();
+ approvePublishWorkflow = (ApprovePublish)context.lookup("java:portal/ApprovePublishWorkflow");
+ }
+ catch (Exception e)
+ {
+ throw new UnavailableException(e.toString());
+ }
+ }
+
+ /**
+ *
+ */
+ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
+ {
+ this.doPost(request, response);
+ }
+
+ /**
+ *
+ */
+ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
+ {
+ try
+ {
+ String processId = request.getParameter("pId");
+ String manager = request.getParameter("manager");
+ boolean approve = request.getRequestURI().indexOf("approve") != -1;
+
+ this.approvePublishWorkflow.processManagerResponse(
+ Long.parseLong(processId), manager, approve
+ );
+
+ /**
+ * TODO: this is a hack job until a decent GUI is integrated
+ * with this workflow..Yes Yes, this will be based on JSP then
+ */
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("<html>\n");
+ if (approve)
+ {
+ buffer.append("<span>The content was successfully published</span>\n");
+ }
+ else
+ {
+ buffer.append("<span>The content publish request was rejected</span>\n");
+ }
+ buffer.append("</html>\n");
+
+ response.getWriter().write(buffer.toString());
+ response.getWriter().flush();
+ }
+ catch (Exception e)
+ {
+ response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.toString());
+ }
+ }
+}
Copied: trunk/cms/src/main/org/jboss/portal/cms/workflow/Content.java (from rev 8187, branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/workflow/Content.java)
===================================================================
--- trunk/cms/src/main/org/jboss/portal/cms/workflow/Content.java (rev 0)
+++ trunk/cms/src/main/org/jboss/portal/cms/workflow/Content.java 2007-09-12 08:25:28 UTC (rev 8236)
@@ -0,0 +1,168 @@
+/******************************************************************************
+ * 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.cms.workflow;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.text.Format;
+import java.text.SimpleDateFormat;
+
+/**
+ * Created on : Dec 20, 2006
+ *
+ * @author Sohil Shah - sohil.shah(a)jboss.com
+ */
+public class Content implements Serializable
+{
+
+ private String path = null;
+ private String userName = null;
+ private String mimeType = null;
+ private int size = 0;
+ private Date creationDate = null;
+
+ private String processId = null;
+
+ /**
+ *
+ *
+ */
+ public Content()
+ {
+
+ }
+
+ /**
+ * @return the path
+ */
+ public String getPath()
+ {
+ return path;
+ }
+
+ /**
+ * @param path the path to set
+ */
+ public void setPath(String path)
+ {
+ this.path = path;
+ }
+
+ /**
+ * @return the userName
+ */
+ public String getUserName()
+ {
+ return userName;
+ }
+
+ /**
+ * @param userName the userName to set
+ */
+ public void setUserName(String userName)
+ {
+ this.userName = userName;
+ }
+
+ /**
+ * @return the mimeType
+ */
+ public String getMimeType()
+ {
+ return mimeType;
+ }
+
+ /**
+ * @param mimeType the mimeType to set
+ */
+ public void setMimeType(String mimeType)
+ {
+ this.mimeType = mimeType;
+ }
+
+ /**
+ * @return the size
+ */
+ public int getSize()
+ {
+ return size;
+ }
+
+ /**
+ * @param size the size to set
+ */
+ public void setSize(int size)
+ {
+ this.size = size;
+ }
+
+ public String getSizeStr()
+ {
+ return String.valueOf((this.size / 1024)) + "kb";
+ }
+
+ /**
+ * @return the creationDate
+ */
+ public Date getCreationDate()
+ {
+ return creationDate;
+ }
+
+ /**
+ * @param creationDate the creationDate to set
+ */
+ public void setCreationDate(Date creationDate)
+ {
+ this.creationDate = creationDate;
+ }
+
+ public String getCreationDateStr()
+ {
+ String date = "";
+ if (this.creationDate != null)
+ {
+ Format formatter = new SimpleDateFormat("MM/dd/yy HH:mm");
+ date = formatter.format(this.creationDate);
+ }
+ return date;
+ }
+
+ /**
+ *
+ * @return
+ */
+ public String getProcessId()
+ {
+ return processId;
+ }
+
+ /**
+ *
+ * @param processId
+ */
+ public void setProcessId(String processId)
+ {
+ this.processId = processId;
+ }
+}
Modified: trunk/cms/src/main/org/jboss/portal/cms/workflow/FinalizePublish.java
===================================================================
--- trunk/cms/src/main/org/jboss/portal/cms/workflow/FinalizePublish.java 2007-09-12 08:04:19 UTC (rev 8235)
+++ trunk/cms/src/main/org/jboss/portal/cms/workflow/FinalizePublish.java 2007-09-12 08:25:28 UTC (rev 8236)
@@ -33,7 +33,7 @@
import org.jbpm.graph.def.*;
import org.jbpm.graph.exe.*;
-import org.jboss.portal.workflow.cms.Content;
+import org.jboss.portal.cms.workflow.Content;
import org.jboss.portal.cms.CMS;
import org.jboss.portal.cms.Command;
import org.jboss.portal.cms.model.File;
Modified: trunk/cms/src/main/org/jboss/portal/cms/workflow/PublishAssignmentHandler.java
===================================================================
--- trunk/cms/src/main/org/jboss/portal/cms/workflow/PublishAssignmentHandler.java 2007-09-12 08:04:19 UTC (rev 8235)
+++ trunk/cms/src/main/org/jboss/portal/cms/workflow/PublishAssignmentHandler.java 2007-09-12 08:25:28 UTC (rev 8236)
@@ -22,34 +22,15 @@
******************************************************************************/
package org.jboss.portal.cms.workflow;
-import org.apache.log4j.Logger;
-
import java.util.Collection;
-import java.util.Iterator;
-import java.util.Set;
-import java.net.URLEncoder;
-import java.text.MessageFormat;
-import javax.naming.InitialContext;
-
-import org.jbpm.graph.exe.*;
-import org.jbpm.taskmgmt.def.*;
+import org.apache.log4j.Logger;
+import org.jbpm.graph.exe.ExecutionContext;
+import org.jbpm.taskmgmt.def.AssignmentHandler;
import org.jbpm.taskmgmt.exe.Assignable;
import org.jbpm.taskmgmt.exe.TaskInstance;
-//import org.jboss.portal.core.modules.MailModule;
-import org.jboss.portal.identity.IdentityServiceController;
-import org.jboss.portal.identity.MembershipModule;
-import org.jboss.portal.identity.UserModule;
-import org.jboss.portal.identity.RoleModule;
-import org.jboss.portal.identity.UserProfileModule;
-import org.jboss.portal.identity.IdentityContext;
-import org.jboss.portal.identity.User;
-
-import org.jboss.portal.workflow.cms.Content;
-
-
/**
*
* Created on : Dec 20, 2006
@@ -58,7 +39,7 @@
*/
public class PublishAssignmentHandler implements AssignmentHandler
{
- private static Logger log = Logger.getLogger(PublishAssignmentHandler.class);
+ // private static Logger log = Logger.getLogger(PublishAssignmentHandler.class);
/**
*
Copied: trunk/cms/src/main/org/jboss/portal/cms/workflow/TaskExceptionHandler.java (from rev 8187, branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/workflow/TaskExceptionHandler.java)
===================================================================
--- trunk/cms/src/main/org/jboss/portal/cms/workflow/TaskExceptionHandler.java (rev 0)
+++ trunk/cms/src/main/org/jboss/portal/cms/workflow/TaskExceptionHandler.java 2007-09-12 08:25:28 UTC (rev 8236)
@@ -0,0 +1,53 @@
+/******************************************************************************
+ * 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.cms.workflow;
+
+import org.jbpm.taskmgmt.exe.TaskInstance;
+import org.jbpm.graph.exe.ExecutionContext;
+import org.jbpm.graph.def.ActionHandler;
+
+
+/**
+ * Created on : Dec 21, 2006
+ *
+ * @author Sohil Shah - sohil.shah(a)jboss.com
+ */
+public class TaskExceptionHandler implements ActionHandler
+{
+
+ /**
+ *
+ */
+ public void execute(ExecutionContext executionContext)
+ {
+ TaskInstance current = executionContext.getTaskInstance();
+
+ TaskInstance t = executionContext.getTaskMgmtInstance().
+ createTaskInstance(executionContext.getTask(), executionContext);
+ t.setActorId(current.getActorId());
+
+ current.setVariable(executionContext.getProcessInstance().getId() + ":" + current.getId(), "markAsDeleted");
+
+ throw new RuntimeException(executionContext.getException());
+ }
+}
Modified: trunk/cms/src/main/org/jboss/portal/test/cms/workflow/AbstractWorkflowTestCase.java
===================================================================
--- trunk/cms/src/main/org/jboss/portal/test/cms/workflow/AbstractWorkflowTestCase.java 2007-09-12 08:04:19 UTC (rev 8235)
+++ trunk/cms/src/main/org/jboss/portal/test/cms/workflow/AbstractWorkflowTestCase.java 2007-09-12 08:25:28 UTC (rev 8236)
@@ -34,8 +34,8 @@
import org.jboss.portal.identity.db.HibernateRoleImpl;
import org.jboss.portal.identity.db.HibernateUserImpl;
import org.jboss.portal.server.impl.invocation.JBossInterceptorStack;
-import org.jboss.portal.workflow.cms.ApprovePublish;
-import org.jboss.portal.workflow.cms.ApprovePublishImpl;
+import org.jboss.portal.cms.workflow.ApprovePublish;
+import org.jboss.portal.cms.workflow.ApprovePublishImpl;
import org.jboss.portal.test.cms.commands.AbstractCommandTestCase;
import org.jboss.portal.test.cms.commands.CMSInterceptorStackFactory;
Modified: trunk/cms/src/main/org/jboss/portal/test/cms/workflow/TestApprovedPublish.java
===================================================================
--- trunk/cms/src/main/org/jboss/portal/test/cms/workflow/TestApprovedPublish.java 2007-09-12 08:04:19 UTC (rev 8235)
+++ trunk/cms/src/main/org/jboss/portal/test/cms/workflow/TestApprovedPublish.java 2007-09-12 08:25:28 UTC (rev 8236)
@@ -37,7 +37,7 @@
import org.jboss.portal.cms.model.Content;
import org.jboss.portal.cms.impl.FileImpl;
import org.jboss.portal.cms.impl.ContentImpl;
-import org.jboss.portal.workflow.cms.ApprovePublish;
+import org.jboss.portal.cms.workflow.ApprovePublish;
import org.jboss.portal.cms.impl.jcr.JCRCMS;
/**
@@ -132,7 +132,7 @@
//Approve and publish this file into the CMS
Set managers = approvePublish.getManagers();
String manager = (String)managers.iterator().next();
- org.jboss.portal.workflow.cms.Content pendingItem = (org.jboss.portal.workflow.cms.Content)queueItems.iterator().next();
+ org.jboss.portal.cms.workflow.Content pendingItem = (org.jboss.portal.cms.workflow.Content)queueItems.iterator().next();
approvePublish.processManagerResponse(Long.parseLong(pendingItem.getProcessId()), manager.toLowerCase(), true);
//Make sure this resource is successfully published into the CMS, and removed from the pending queue
@@ -168,7 +168,7 @@
assertEquals(1,queueItems.size());
//Approve and publish this new version into the CMS
- pendingItem = (org.jboss.portal.workflow.cms.Content)queueItems.iterator().next();
+ pendingItem = (org.jboss.portal.cms.workflow.Content)queueItems.iterator().next();
approvePublish.processManagerResponse(Long.parseLong(pendingItem.getProcessId()), manager.toLowerCase(),true);
//Check for the success of this publish, and removal from the pending queue
Modified: trunk/cms/src/main/org/jboss/portal/test/cms/workflow/TestDeniedPublish.java
===================================================================
--- trunk/cms/src/main/org/jboss/portal/test/cms/workflow/TestDeniedPublish.java 2007-09-12 08:04:19 UTC (rev 8235)
+++ trunk/cms/src/main/org/jboss/portal/test/cms/workflow/TestDeniedPublish.java 2007-09-12 08:25:28 UTC (rev 8236)
@@ -39,7 +39,7 @@
import org.jboss.portal.cms.model.Content;
import org.jboss.portal.cms.impl.FileImpl;
import org.jboss.portal.cms.impl.ContentImpl;
-import org.jboss.portal.workflow.cms.ApprovePublish;
+import org.jboss.portal.cms.workflow.ApprovePublish;
import org.jboss.portal.cms.impl.jcr.JCRCMS;
/**
@@ -135,7 +135,7 @@
//Deny the publish of this file into the CMS
Set managers = approvePublish.getManagers();
String manager = (String)managers.iterator().next();
- org.jboss.portal.workflow.cms.Content pendingItem = (org.jboss.portal.workflow.cms.Content)queueItems.iterator().next();
+ org.jboss.portal.cms.workflow.Content pendingItem = (org.jboss.portal.cms.workflow.Content)queueItems.iterator().next();
approvePublish.processManagerResponse(Long.parseLong(pendingItem.getProcessId()), manager.toLowerCase(), false);
//Make sure this resource is not published into the CMS, and removed from the pending queue
@@ -187,7 +187,7 @@
assertEquals(1,queueItems.size());
//Deny publishing of this new version into the CMS
- pendingItem = (org.jboss.portal.workflow.cms.Content)queueItems.iterator().next();
+ pendingItem = (org.jboss.portal.cms.workflow.Content)queueItems.iterator().next();
approvePublish.processManagerResponse(Long.parseLong(pendingItem.getProcessId()), manager.toLowerCase(),false);
//Check for the success of this denial, and removal from the pending queue
Modified: trunk/cms/src/main/org/jboss/portal/test/cms/workflow/TestWorkflowEnvironment.java
===================================================================
--- trunk/cms/src/main/org/jboss/portal/test/cms/workflow/TestWorkflowEnvironment.java 2007-09-12 08:04:19 UTC (rev 8235)
+++ trunk/cms/src/main/org/jboss/portal/test/cms/workflow/TestWorkflowEnvironment.java 2007-09-12 08:25:28 UTC (rev 8236)
@@ -23,10 +23,12 @@
package org.jboss.portal.test.cms.workflow;
import java.util.Set;
+
+import junit.framework.Assert;
import junit.framework.TestSuite;
import org.jboss.portal.cms.CMSException;
-import org.jboss.portal.workflow.cms.ApprovePublish;
+import org.jboss.portal.cms.workflow.ApprovePublish;
/**
@@ -71,7 +73,7 @@
//Assert and make sure there is atleast one portal role that is allowed
//to function of content manager
- this.assertNotNull(managers);
- this.assertTrue(managers.size()>0);
+ Assert.assertNotNull(managers);
+ Assert.assertTrue(managers.size()>0);
}
}
Modified: trunk/cms/src/resources/portal-cms-jar/org/jboss/portal/cms/jboss-beans-workflow.xml
===================================================================
--- trunk/cms/src/resources/portal-cms-jar/org/jboss/portal/cms/jboss-beans-workflow.xml 2007-09-12 08:04:19 UTC (rev 8235)
+++ trunk/cms/src/resources/portal-cms-jar/org/jboss/portal/cms/jboss-beans-workflow.xml 2007-09-12 08:25:28 UTC (rev 8236)
@@ -185,7 +185,7 @@
</property>
</bean>
- <bean name="ApprovePublish" class="org.jboss.portal.workflow.cms.ApprovePublishImpl">
+ <bean name="ApprovePublish" class="org.jboss.portal.cms.workflow.ApprovePublishImpl">
<property name="workflowService"><inject bean="WorkflowService"/></property>
<property name="identityServiceController"><inject bean="IdentityServiceController"/></property>
<property name="overwrite">false</property>
@@ -205,7 +205,7 @@
<action class="org.jboss.portal.cms.workflow.FinalizePublish"/>
</event>
<exception-handler>
- <action class="org.jboss.portal.workflow.cms.TaskExceptionHandler"/>
+ <action class="org.jboss.portal.cms.workflow.TaskExceptionHandler"/>
</exception-handler>
</task>
<transition name="approval" to="end"/>
Modified: trunk/core/build.xml
===================================================================
--- trunk/core/build.xml 2007-09-12 08:04:19 UTC (rev 8235)
+++ trunk/core/build.xml 2007-09-12 08:25:28 UTC (rev 8236)
@@ -333,6 +333,7 @@
<fileset dir="${jboss.portal-security.root}/lib" includes="portal-security-lib.jar"/>
<fileset dir="${jboss.portal-search.root}/lib" includes="portal-search-lib.jar"/>
<fileset dir="${jboss.portal-identity.root}/lib" includes="portal-identity-lib.jar"/>
+ <fileset dir="${jboss.portal-workflow.root}/lib" includes="portal-workflow-lib.jar"/>
<fileset dir="${jboss.portal-registration.root}/lib" includes="portal-registration-lib.jar"/>
<fileset dir="${ehcache.ehcache.lib}" includes="ehcache.jar"/>
<fileset dir="${apache.collections.lib}" includes="commons-collections.jar"/>
@@ -342,6 +343,9 @@
<fileset dir="${freemarker.freemarker.lib}" includes="freemarker.jar"/>
<fileset dir="${portals.bridges.lib}" includes="portals-bridges-common.jar"/>
<fileset dir="${jboss/backport.concurrent.lib}" includes="jboss-backport-concurrent.jar"/>
+ <fileset dir="${jbpm.jaronly.lib}" includes="jbpm.jar"/>
+ <fileset dir="${jbpm.jaronly.lib}" includes="jbpm-identity.jar"/>
+
</copy>
<!--dtd-->
Modified: trunk/core/src/resources/portal-core-sar/conf/data/default-object.xml
===================================================================
--- trunk/core/src/resources/portal-core-sar/conf/data/default-object.xml 2007-09-12 08:04:19 UTC (rev 8235)
+++ trunk/core/src/resources/portal-core-sar/conf/data/default-object.xml 2007-09-12 08:25:28 UTC (rev 8236)
@@ -155,11 +155,11 @@
<content-uri>/default/index.html</content-uri>
</content>
<region>center</region>
- <height>0</height>
+ <height>1</height>
</window>
<window>
- <window-name>UserPortletWindow</window-name>
- <instance-ref>UserPortletInstance</instance-ref>
+ <window-name>IdentityUserPortletWindow</window-name>
+ <instance-ref>IdentityUserPortletInstance</instance-ref>
<region>left</region>
<height>1</height>
</window>
@@ -303,8 +303,8 @@
<height>0</height>
</window>
<window>
- <window-name>UserPortletWindow</window-name>
- <instance-ref>UserPortletInstance</instance-ref>
+ <window-name>IdentityUserPortletWindow</window-name>
+ <instance-ref>IdentityUserPortletInstance</instance-ref>
<region>left</region>
<height>1</height>
</window>
@@ -345,17 +345,11 @@
<page>
<page-name>Members</page-name>
<window>
- <window-name>UserPortletWindow</window-name>
- <instance-ref>UserPortletInstance</instance-ref>
+ <window-name>IdentityAdminPortletWindow</window-name>
+ <instance-ref>IdentityAdminPortletInstance</instance-ref>
<region>center</region>
<height>0</height>
</window>
- <window>
- <window-name>RolePortletWindow</window-name>
- <instance-ref>RolePortletInstance</instance-ref>
- <region>left</region>
- <height>0</height>
- </window>
</page>
</portal>
</deployment>
Copied: trunk/core/src/resources/portal-core-sar/conf/hibernate/workflow (from rev 8230, branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-sar/conf/hibernate/workflow)
Deleted: trunk/core/src/resources/portal-core-sar/conf/hibernate/workflow/ehcache.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-sar/conf/hibernate/workflow/ehcache.xml 2007-09-11 15:27:23 UTC (rev 8230)
+++ trunk/core/src/resources/portal-core-sar/conf/hibernate/workflow/ehcache.xml 2007-09-12 08:25:28 UTC (rev 8236)
@@ -1,61 +0,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. ~
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
-
-<ehcache>
-
- <!-- Sets the path to the directory where cache .data files are created.
-
- If the path is a Java System Property it is replaced by
- its value in the running VM.
-
- The following properties are translated:
- user.home - User's home directory
- user.dir - User's current working directory
- java.io.tmpdir - Default temp file path -->
- <diskStore path="java.io.tmpdir/workflow"/>
-
-
- <!--Default Cache configuration. These will applied to caches programmatically created through
- the CacheManager.
-
- The following attributes are required for defaultCache:
-
- maxInMemory - Sets the maximum number of objects that will be created in memory
- eternal - Sets whether elements are eternal. If eternal, timeouts are ignored and the element
- is never expired.
- timeToIdleSeconds - Sets the time to idle for an element before it expires. Is only used
- if the element is not eternal. Idle time is now - last accessed time
- timeToLiveSeconds - Sets the time to live for an element before it expires. Is only used
- if the element is not eternal. TTL is now - creation time
- overflowToDisk - Sets whether elements can overflow to disk when the in-memory cache
- has reached the maxInMemory limit.
-
- -->
- <defaultCache
- maxElementsInMemory="10000"
- eternal="false"
- timeToIdleSeconds="120"
- timeToLiveSeconds="120"
- overflowToDisk="false"
- />
-</ehcache>
Copied: trunk/core/src/resources/portal-core-sar/conf/hibernate/workflow/ehcache.xml (from rev 8230, branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-sar/conf/hibernate/workflow/ehcache.xml)
===================================================================
--- trunk/core/src/resources/portal-core-sar/conf/hibernate/workflow/ehcache.xml (rev 0)
+++ trunk/core/src/resources/portal-core-sar/conf/hibernate/workflow/ehcache.xml 2007-09-12 08:25:28 UTC (rev 8236)
@@ -0,0 +1,61 @@
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<ehcache>
+
+ <!-- Sets the path to the directory where cache .data files are created.
+
+ If the path is a Java System Property it is replaced by
+ its value in the running VM.
+
+ The following properties are translated:
+ user.home - User's home directory
+ user.dir - User's current working directory
+ java.io.tmpdir - Default temp file path -->
+ <diskStore path="java.io.tmpdir/workflow"/>
+
+
+ <!--Default Cache configuration. These will applied to caches programmatically created through
+ the CacheManager.
+
+ The following attributes are required for defaultCache:
+
+ maxInMemory - Sets the maximum number of objects that will be created in memory
+ eternal - Sets whether elements are eternal. If eternal, timeouts are ignored and the element
+ is never expired.
+ timeToIdleSeconds - Sets the time to idle for an element before it expires. Is only used
+ if the element is not eternal. Idle time is now - last accessed time
+ timeToLiveSeconds - Sets the time to live for an element before it expires. Is only used
+ if the element is not eternal. TTL is now - creation time
+ overflowToDisk - Sets whether elements can overflow to disk when the in-memory cache
+ has reached the maxInMemory limit.
+
+ -->
+ <defaultCache
+ maxElementsInMemory="10000"
+ eternal="false"
+ timeToIdleSeconds="120"
+ timeToLiveSeconds="120"
+ overflowToDisk="false"
+ />
+</ehcache>
Deleted: trunk/core/src/resources/portal-core-sar/conf/hibernate/workflow/hibernate.cfg.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-sar/conf/hibernate/workflow/hibernate.cfg.xml 2007-09-11 15:27:23 UTC (rev 8230)
+++ trunk/core/src/resources/portal-core-sar/conf/hibernate/workflow/hibernate.cfg.xml 2007-09-12 08:25:28 UTC (rev 8236)
@@ -1,170 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-
-<!DOCTYPE hibernate-configuration PUBLIC
- "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
- "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
-
-<hibernate-configuration>
- <session-factory>
- <!-- jdbc connection properties -->
- <property name="connection.datasource">java:@portal.datasource.name@</property>
-
- <!-- other hibernate properties -->
- <property name="show_sql">@portal.sql.show@</property>
- <property name="hibernate.format_sql">true</property>
- <property name="hibernate.use_sql_comments">true</property>
-
- <!-- caching properties -->
- <property name="cache.use_second_level_cache">true</property>
- <property name="cache.use_query_cache">true</property>
- <property name="cache.provider_configuration_file_resource_path">conf/hibernate/workflow/ehcache.xml</property>
- <property name="cache.provider_class">org.hibernate.cache.EhCacheProvider</property>
-
- <!-- managed environment transaction configuration -->
- <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
- <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
-
- <!-- ############################################ -->
- <!-- # mapping files with external dependencies # -->
- <!-- ############################################ -->
-
- <!-- following mapping file has a dependendy on -->
- <!-- 'bsh-{version}.jar'. -->
- <!-- uncomment this if you don't have bsh on your -->
- <!-- classpath. you won't be able to use the -->
- <!-- script element in process definition files -->
- <mapping resource="org/jbpm/graph/action/Script.hbm.xml"/>
-
- <!-- following mapping files have a dependendy on -->
- <!-- 'jbpm-identity-{version}.jar', mapping files -->
- <!-- of the pluggable jbpm identity component. -->
- <!-- comment out the following 3 lines if you don't-->
- <!-- want to use the default jBPM identity mgmgt -->
- <!-- component -->
- <mapping resource="org/jbpm/identity/User.hbm.xml"/>
- <mapping resource="org/jbpm/identity/Group.hbm.xml"/>
- <mapping resource="org/jbpm/identity/Membership.hbm.xml"/>
-
- <!-- ###################### -->
- <!-- # jbpm mapping files # -->
- <!-- ###################### -->
-
- <!-- hql queries and type defs -->
- <mapping resource="org/jbpm/db/hibernate.queries.hbm.xml"/>
-
- <!-- graph.def mapping files -->
- <mapping resource="org/jbpm/graph/def/ProcessDefinition.hbm.xml"/>
- <mapping resource="org/jbpm/graph/def/Node.hbm.xml"/>
- <mapping resource="org/jbpm/graph/def/Transition.hbm.xml"/>
- <mapping resource="org/jbpm/graph/def/Event.hbm.xml"/>
- <mapping resource="org/jbpm/graph/def/Action.hbm.xml"/>
- <mapping resource="org/jbpm/graph/def/SuperState.hbm.xml"/>
- <mapping resource="org/jbpm/graph/def/ExceptionHandler.hbm.xml"/>
- <mapping resource="org/jbpm/instantiation/Delegation.hbm.xml"/>
-
- <!-- graph.node mapping files -->
- <mapping resource="org/jbpm/graph/node/StartState.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/EndState.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/ProcessState.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/Decision.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/Fork.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/Join.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/State.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/TaskNode.hbm.xml"/>
-
- <!-- context.def mapping files -->
- <mapping resource="org/jbpm/context/def/ContextDefinition.hbm.xml"/>
- <mapping resource="org/jbpm/context/def/VariableAccess.hbm.xml"/>
-
- <!-- taskmgmt.def mapping files -->
- <mapping resource="org/jbpm/taskmgmt/def/TaskMgmtDefinition.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/def/Swimlane.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/def/Task.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/def/TaskController.hbm.xml"/>
-
- <!-- module.def mapping files -->
- <mapping resource="org/jbpm/module/def/ModuleDefinition.hbm.xml"/>
-
- <!-- bytes mapping files -->
- <mapping resource="org/jbpm/bytes/ByteArray.hbm.xml"/>
-
- <!-- file.def mapping files -->
- <mapping resource="org/jbpm/file/def/FileDefinition.hbm.xml"/>
-
- <!-- scheduler.def mapping files -->
- <mapping resource="org/jbpm/scheduler/def/CreateTimerAction.hbm.xml"/>
- <mapping resource="org/jbpm/scheduler/def/CancelTimerAction.hbm.xml"/>
-
- <!-- graph.exe mapping files -->
- <mapping resource="org/jbpm/graph/exe/Comment.hbm.xml"/>
- <mapping resource="org/jbpm/graph/exe/ProcessInstance.hbm.xml"/>
- <mapping resource="org/jbpm/graph/exe/Token.hbm.xml"/>
- <mapping resource="org/jbpm/graph/exe/RuntimeAction.hbm.xml"/>
-
- <!-- module.exe mapping files -->
- <mapping resource="org/jbpm/module/exe/ModuleInstance.hbm.xml"/>
-
- <!-- context.exe mapping files -->
- <mapping resource="org/jbpm/context/exe/ContextInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/TokenVariableMap.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/VariableInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/ByteArrayInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/DateInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/DoubleInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/HibernateLongInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/HibernateStringInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/LongInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/NullInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/StringInstance.hbm.xml"/>
-
- <!-- msg.db mapping files -->
- <mapping resource="org/jbpm/msg/Message.hbm.xml"/>
- <mapping resource="org/jbpm/msg/db/TextMessage.hbm.xml"/>
- <mapping resource="org/jbpm/command/ExecuteActionCommand.hbm.xml"/>
- <mapping resource="org/jbpm/command/ExecuteNodeCommand.hbm.xml"/>
- <mapping resource="org/jbpm/command/SignalCommand.hbm.xml"/>
- <mapping resource="org/jbpm/command/TaskInstanceEndCommand.hbm.xml"/>
-
- <!-- taskmgmt.exe mapping files -->
- <mapping resource="org/jbpm/taskmgmt/exe/TaskMgmtInstance.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/exe/TaskInstance.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/exe/PooledActor.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/exe/SwimlaneInstance.hbm.xml"/>
-
- <!-- scheduler.exe mapping files -->
- <mapping resource="org/jbpm/scheduler/exe/Timer.hbm.xml"/>
-
- <!-- logging mapping files -->
- <mapping resource="org/jbpm/logging/log/ProcessLog.hbm.xml"/>
- <mapping resource="org/jbpm/logging/log/MessageLog.hbm.xml"/>
- <mapping resource="org/jbpm/logging/log/CompositeLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/ActionLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/NodeLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/ProcessInstanceCreateLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/ProcessInstanceEndLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/ProcessStateLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/SignalLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/TokenCreateLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/TokenEndLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/TransitionLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/VariableLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/VariableCreateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/VariableDeleteLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/VariableUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/ByteArrayUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/DateUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/DoubleUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/HibernateLongUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/HibernateStringUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/LongUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/StringUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/TaskLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/TaskCreateLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/TaskAssignLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/TaskEndLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/SwimlaneLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/SwimlaneCreateLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/SwimlaneAssignLog.hbm.xml"/>
-
- </session-factory>
-</hibernate-configuration>
Copied: trunk/core/src/resources/portal-core-sar/conf/hibernate/workflow/hibernate.cfg.xml (from rev 8230, branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-sar/conf/hibernate/workflow/hibernate.cfg.xml)
===================================================================
--- trunk/core/src/resources/portal-core-sar/conf/hibernate/workflow/hibernate.cfg.xml (rev 0)
+++ trunk/core/src/resources/portal-core-sar/conf/hibernate/workflow/hibernate.cfg.xml 2007-09-12 08:25:28 UTC (rev 8236)
@@ -0,0 +1,170 @@
+<?xml version='1.0' encoding='utf-8'?>
+
+<!DOCTYPE hibernate-configuration PUBLIC
+ "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
+
+<hibernate-configuration>
+ <session-factory>
+ <!-- jdbc connection properties -->
+ <property name="connection.datasource">java:@portal.datasource.name@</property>
+
+ <!-- other hibernate properties -->
+ <property name="show_sql">@portal.sql.show@</property>
+ <property name="hibernate.format_sql">true</property>
+ <property name="hibernate.use_sql_comments">true</property>
+
+ <!-- caching properties -->
+ <property name="cache.use_second_level_cache">true</property>
+ <property name="cache.use_query_cache">true</property>
+ <property name="cache.provider_configuration_file_resource_path">conf/hibernate/workflow/ehcache.xml</property>
+ <property name="cache.provider_class">org.hibernate.cache.EhCacheProvider</property>
+
+ <!-- managed environment transaction configuration -->
+ <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
+ <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
+
+ <!-- ############################################ -->
+ <!-- # mapping files with external dependencies # -->
+ <!-- ############################################ -->
+
+ <!-- following mapping file has a dependendy on -->
+ <!-- 'bsh-{version}.jar'. -->
+ <!-- uncomment this if you don't have bsh on your -->
+ <!-- classpath. you won't be able to use the -->
+ <!-- script element in process definition files -->
+ <mapping resource="org/jbpm/graph/action/Script.hbm.xml"/>
+
+ <!-- following mapping files have a dependendy on -->
+ <!-- 'jbpm-identity-{version}.jar', mapping files -->
+ <!-- of the pluggable jbpm identity component. -->
+ <!-- comment out the following 3 lines if you don't-->
+ <!-- want to use the default jBPM identity mgmgt -->
+ <!-- component -->
+ <mapping resource="org/jbpm/identity/User.hbm.xml"/>
+ <mapping resource="org/jbpm/identity/Group.hbm.xml"/>
+ <mapping resource="org/jbpm/identity/Membership.hbm.xml"/>
+
+ <!-- ###################### -->
+ <!-- # jbpm mapping files # -->
+ <!-- ###################### -->
+
+ <!-- hql queries and type defs -->
+ <mapping resource="org/jbpm/db/hibernate.queries.hbm.xml"/>
+
+ <!-- graph.def mapping files -->
+ <mapping resource="org/jbpm/graph/def/ProcessDefinition.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/def/Node.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/def/Transition.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/def/Event.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/def/Action.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/def/SuperState.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/def/ExceptionHandler.hbm.xml"/>
+ <mapping resource="org/jbpm/instantiation/Delegation.hbm.xml"/>
+
+ <!-- graph.node mapping files -->
+ <mapping resource="org/jbpm/graph/node/StartState.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/node/EndState.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/node/ProcessState.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/node/Decision.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/node/Fork.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/node/Join.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/node/State.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/node/TaskNode.hbm.xml"/>
+
+ <!-- context.def mapping files -->
+ <mapping resource="org/jbpm/context/def/ContextDefinition.hbm.xml"/>
+ <mapping resource="org/jbpm/context/def/VariableAccess.hbm.xml"/>
+
+ <!-- taskmgmt.def mapping files -->
+ <mapping resource="org/jbpm/taskmgmt/def/TaskMgmtDefinition.hbm.xml"/>
+ <mapping resource="org/jbpm/taskmgmt/def/Swimlane.hbm.xml"/>
+ <mapping resource="org/jbpm/taskmgmt/def/Task.hbm.xml"/>
+ <mapping resource="org/jbpm/taskmgmt/def/TaskController.hbm.xml"/>
+
+ <!-- module.def mapping files -->
+ <mapping resource="org/jbpm/module/def/ModuleDefinition.hbm.xml"/>
+
+ <!-- bytes mapping files -->
+ <mapping resource="org/jbpm/bytes/ByteArray.hbm.xml"/>
+
+ <!-- file.def mapping files -->
+ <mapping resource="org/jbpm/file/def/FileDefinition.hbm.xml"/>
+
+ <!-- scheduler.def mapping files -->
+ <mapping resource="org/jbpm/scheduler/def/CreateTimerAction.hbm.xml"/>
+ <mapping resource="org/jbpm/scheduler/def/CancelTimerAction.hbm.xml"/>
+
+ <!-- graph.exe mapping files -->
+ <mapping resource="org/jbpm/graph/exe/Comment.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/exe/ProcessInstance.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/exe/Token.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/exe/RuntimeAction.hbm.xml"/>
+
+ <!-- module.exe mapping files -->
+ <mapping resource="org/jbpm/module/exe/ModuleInstance.hbm.xml"/>
+
+ <!-- context.exe mapping files -->
+ <mapping resource="org/jbpm/context/exe/ContextInstance.hbm.xml"/>
+ <mapping resource="org/jbpm/context/exe/TokenVariableMap.hbm.xml"/>
+ <mapping resource="org/jbpm/context/exe/VariableInstance.hbm.xml"/>
+ <mapping resource="org/jbpm/context/exe/variableinstance/ByteArrayInstance.hbm.xml"/>
+ <mapping resource="org/jbpm/context/exe/variableinstance/DateInstance.hbm.xml"/>
+ <mapping resource="org/jbpm/context/exe/variableinstance/DoubleInstance.hbm.xml"/>
+ <mapping resource="org/jbpm/context/exe/variableinstance/HibernateLongInstance.hbm.xml"/>
+ <mapping resource="org/jbpm/context/exe/variableinstance/HibernateStringInstance.hbm.xml"/>
+ <mapping resource="org/jbpm/context/exe/variableinstance/LongInstance.hbm.xml"/>
+ <mapping resource="org/jbpm/context/exe/variableinstance/NullInstance.hbm.xml"/>
+ <mapping resource="org/jbpm/context/exe/variableinstance/StringInstance.hbm.xml"/>
+
+ <!-- msg.db mapping files -->
+ <mapping resource="org/jbpm/msg/Message.hbm.xml"/>
+ <mapping resource="org/jbpm/msg/db/TextMessage.hbm.xml"/>
+ <mapping resource="org/jbpm/command/ExecuteActionCommand.hbm.xml"/>
+ <mapping resource="org/jbpm/command/ExecuteNodeCommand.hbm.xml"/>
+ <mapping resource="org/jbpm/command/SignalCommand.hbm.xml"/>
+ <mapping resource="org/jbpm/command/TaskInstanceEndCommand.hbm.xml"/>
+
+ <!-- taskmgmt.exe mapping files -->
+ <mapping resource="org/jbpm/taskmgmt/exe/TaskMgmtInstance.hbm.xml"/>
+ <mapping resource="org/jbpm/taskmgmt/exe/TaskInstance.hbm.xml"/>
+ <mapping resource="org/jbpm/taskmgmt/exe/PooledActor.hbm.xml"/>
+ <mapping resource="org/jbpm/taskmgmt/exe/SwimlaneInstance.hbm.xml"/>
+
+ <!-- scheduler.exe mapping files -->
+ <mapping resource="org/jbpm/scheduler/exe/Timer.hbm.xml"/>
+
+ <!-- logging mapping files -->
+ <mapping resource="org/jbpm/logging/log/ProcessLog.hbm.xml"/>
+ <mapping resource="org/jbpm/logging/log/MessageLog.hbm.xml"/>
+ <mapping resource="org/jbpm/logging/log/CompositeLog.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/log/ActionLog.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/log/NodeLog.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/log/ProcessInstanceCreateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/log/ProcessInstanceEndLog.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/log/ProcessStateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/log/SignalLog.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/log/TokenCreateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/log/TokenEndLog.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/log/TransitionLog.hbm.xml"/>
+ <mapping resource="org/jbpm/context/log/VariableLog.hbm.xml"/>
+ <mapping resource="org/jbpm/context/log/VariableCreateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/context/log/VariableDeleteLog.hbm.xml"/>
+ <mapping resource="org/jbpm/context/log/VariableUpdateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/context/log/variableinstance/ByteArrayUpdateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/context/log/variableinstance/DateUpdateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/context/log/variableinstance/DoubleUpdateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/context/log/variableinstance/HibernateLongUpdateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/context/log/variableinstance/HibernateStringUpdateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/context/log/variableinstance/LongUpdateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/context/log/variableinstance/StringUpdateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/taskmgmt/log/TaskLog.hbm.xml"/>
+ <mapping resource="org/jbpm/taskmgmt/log/TaskCreateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/taskmgmt/log/TaskAssignLog.hbm.xml"/>
+ <mapping resource="org/jbpm/taskmgmt/log/TaskEndLog.hbm.xml"/>
+ <mapping resource="org/jbpm/taskmgmt/log/SwimlaneLog.hbm.xml"/>
+ <mapping resource="org/jbpm/taskmgmt/log/SwimlaneCreateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/taskmgmt/log/SwimlaneAssignLog.hbm.xml"/>
+
+ </session-factory>
+</hibernate-configuration>
Modified: trunk/core-cms/build.xml
===================================================================
--- trunk/core-cms/build.xml 2007-09-12 08:04:19 UTC (rev 8235)
+++ trunk/core-cms/build.xml 2007-09-12 08:25:28 UTC (rev 8236)
@@ -270,18 +270,6 @@
<fileset dir="${source.bin}/portal-cms-war"/>
<fileset dir="${build.resources}/portal-cms-war"/>
</copy>
-
- <!-- workflow service -->
- <copy todir="${build.resources}/portal-cms/portal-workflow.sar">
- <fileset dir="${jboss.portal-workflow.root}/lib" includes="portal-workflow-lib.jar"/>
- <fileset dir="${jbpm.jaronly.lib}" includes="jbpm.jar"/>
- <fileset dir="${jbpm.jaronly.lib}" includes="jbpm-identity.jar"/>
- <fileset dir="${jboss.portal-workflow.root}/resources/portal-workflow-sar"/>
- </copy>
- <!-- this war file is not needed for now -->
- <!--copy todir="${build.resources}/portal-cms/portal-workflow.sar/portal-workflow.war">
- <fileset dir="${jboss.portal-workflow.root}/lib/portal-workflow.war"/>
- </copy-->
</target>
Modified: trunk/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSAdminPortlet.java
===================================================================
--- trunk/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSAdminPortlet.java 2007-09-12 08:04:19 UTC (rev 8235)
+++ trunk/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSAdminPortlet.java 2007-09-12 08:25:28 UTC (rev 8236)
@@ -55,13 +55,14 @@
import org.jboss.portal.cms.model.Content;
import org.jboss.portal.cms.model.File;
import org.jboss.portal.cms.model.Folder;
+import org.jboss.portal.cms.security.AuthorizationManager;
import org.jboss.portal.cms.security.CMSPermission;
import org.jboss.portal.cms.security.Criteria;
import org.jboss.portal.cms.security.Permission;
-import org.jboss.portal.cms.security.AuthorizationManager;
import org.jboss.portal.cms.security.PortalCMSSecurityContext;
import org.jboss.portal.cms.util.FileUtil;
import org.jboss.portal.cms.util.NodeUtil;
+import org.jboss.portal.cms.workflow.ApprovePublish;
import org.jboss.portal.core.cms.command.StreamContentCommand;
import org.jboss.portal.core.controller.ControllerContext;
import org.jboss.portal.identity.AnonymousRole;
@@ -77,7 +78,6 @@
import org.jboss.portal.server.request.URLContext;
import org.jboss.portal.server.request.URLFormat;
import org.jboss.portal.workflow.WorkflowException;
-import org.jboss.portal.workflow.cms.ApprovePublish;
import org.jboss.portlet.JBossActionRequest;
import org.jboss.portlet.JBossActionResponse;
import org.jboss.portlet.JBossPortlet;
@@ -1549,4 +1549,4 @@
this.setApprovePublish(null);
}
}
-}
\ No newline at end of file
+}
Modified: trunk/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSContentEditorPortlet.java
===================================================================
--- trunk/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSContentEditorPortlet.java 2007-09-12 08:04:19 UTC (rev 8235)
+++ trunk/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSContentEditorPortlet.java 2007-09-12 08:25:28 UTC (rev 8236)
@@ -23,11 +23,10 @@
package org.jboss.portal.core.cms.ui.admin;
import java.io.IOException;
+import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
-import java.util.HashMap;
-import java.util.Iterator;
import javax.portlet.ActionRequest;
import javax.portlet.ActionResponse;
@@ -41,7 +40,6 @@
import org.jboss.portal.cms.CMS;
import org.jboss.portal.cms.Command;
import org.jboss.portal.cms.model.Content;
-import org.jboss.portal.cms.model.File;
import org.jboss.portal.cms.model.Folder;
/**
Modified: trunk/core-cms/src/resources/portal-cms-sar/META-INF/jboss-service.xml
===================================================================
--- trunk/core-cms/src/resources/portal-cms-sar/META-INF/jboss-service.xml 2007-09-12 08:04:19 UTC (rev 8235)
+++ trunk/core-cms/src/resources/portal-cms-sar/META-INF/jboss-service.xml 2007-09-12 08:25:28 UTC (rev 8236)
@@ -573,4 +573,93 @@
optional-attribute-name="PortalAuthorizationManagerFactory"
proxy-type="attribute">portal:service=PortalAuthorizationManagerFactory</depends>
</mbean>
+
+ <!-- ApprovePublish workflow service -->
+ <mbean
+ code="org.jboss.portal.cms.workflow.ApprovePublishImpl"
+ name="portal:service=ApprovePublish,type=Workflow"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <depends optional-attribute-name="WorkflowService" proxy-type="attribute">
+ portal:service=Workflow,type=WorkflowService
+ </depends>
+ <depends optional-attribute-name="IdentityServiceController" proxy-type="attribute">
+ portal:service=Module,type=IdentityServiceController
+ </depends>
+ <!-- JBPM process definition -->
+ <attribute name="Process">
+ <![CDATA[
+ <!-- cms approval workflow -->
+ <process-definition name="approval_workflow">
+ <start-state>
+ <transition to="request_approval"/>
+ </start-state>
+ <task-node name="request_approval" signal="first">
+ <task name="approve_publish">
+ <assignment class="org.jboss.portal.cms.workflow.PublishAssignmentHandler"/>
+ <event type="task-start">
+ <action class="org.jboss.portal.cms.workflow.FinalizePublish"/>
+ </event>
+ <exception-handler>
+ <action class="org.jboss.portal.cms.workflow.TaskExceptionHandler"/>
+ </exception-handler>
+ </task>
+ <transition name="approval" to="end"/>
+ <transition name="rejection" to="end"/>
+ </task-node>
+ <end-state name="end"/>
+ </process-definition>
+ ]]>
+ </attribute>
+ <!--
+ overwrite = false creates the process first time if does not exist, for
+ subsequent server restarts, this process definition remains in tact
+
+ overwrite = true creates the process first time if does not exist,
+ for subsequent server restarts, it creates a new version of the process definition
+ which will be used for processes created from then onwards. Old processes created
+ for an older version of the definition remain in tact and use their corresponding
+ process definition.
+
+ Typically use overwrite=false and overwrite=true only when a new process definition
+ related to this workflow needs to be deployed
+ -->
+ <attribute name="Overwrite">false</attribute>
+ <!--
+ a comma separated list of portal roles that are designated
+ to act as workflow managers. They are allowed to
+ approve/reject content publish requests
+ -->
+ <attribute name="ManagerRoles">Admin</attribute>
+ <attribute name="JNDIName">java:portal/ApprovePublishWorkflow</attribute>
+
+ <!-- Now that a manager GUI is integrated..no need for email based manager screen -->
+<!--
+ <attribute name="From">do-not-reply(a)jboss.com</attribute>
+ <attribute name="Subject">Content Approval Requested</attribute>
+ <attribute name="Body">
+ <![CDATA[
+ Approval is needed to publish the following Content:
+
+ Content Location : {0}
+
+ Content Type : {1}
+
+ Content Size : {2}
+
+ Creation Date : {3}
+
+ User : {4}
+
+
+ <a href="http://localhost/workflow/approve?pId={5}&manager={6}">Approve</a>
+
+
+ <a href="http://localhost/workflow/reject?pId={7}&manager={8}">Reject</a>
+ ]]>
+ </attribute>
+-->
+ </mbean>
+
</server>
Modified: trunk/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/pending_items.jsp
===================================================================
--- trunk/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/pending_items.jsp 2007-09-12 08:04:19 UTC (rev 8235)
+++ trunk/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/pending_items.jsp 2007-09-12 08:25:28 UTC (rev 8236)
@@ -91,7 +91,7 @@
{
%>
<%
- org.jboss.portal.workflow.cms.Content cour = (org.jboss.portal.workflow.cms.Content)itr.next();
+ org.jboss.portal.cms.workflow.Content cour = (org.jboss.portal.cms.workflow.Content)itr.next();
String linkPath = cour.getPath().substring(0, cour.getPath().lastIndexOf("/"));
Modified: trunk/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/viewfile.jsp
===================================================================
--- trunk/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/viewfile.jsp 2007-09-12 08:04:19 UTC (rev 8235)
+++ trunk/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/viewfile.jsp 2007-09-12 08:25:28 UTC (rev 8236)
@@ -341,7 +341,7 @@
{
%>
<%
- org.jboss.portal.workflow.cms.Content cour = (org.jboss.portal.workflow.cms.Content)itr.next();
+ org.jboss.portal.cms.workflow.Content cour = (org.jboss.portal.cms.workflow.Content)itr.next();
if (i % 2 == 0)
{
rowClass = "portlet-section-body";
Modified: trunk/core-cms/src/resources/portal-cms-war/WEB-INF/web.xml
===================================================================
--- trunk/core-cms/src/resources/portal-cms-war/WEB-INF/web.xml 2007-09-12 08:04:19 UTC (rev 8235)
+++ trunk/core-cms/src/resources/portal-cms-war/WEB-INF/web.xml 2007-09-12 08:25:28 UTC (rev 8236)
@@ -43,4 +43,17 @@
<servlet-name>CMSExportServlet</servlet-name>
<url-pattern>/cmsexport/*</url-pattern>
</servlet-mapping>
+
+ <servlet>
+ <servlet-name>ApprovePublishServlet</servlet-name>
+ <servlet-class>org.jboss.portal.cms.workflow.ApprovePublishServlet</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>ApprovePublishServlet</servlet-name>
+ <url-pattern>/approve/*</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>ApprovePublishServlet</servlet-name>
+ <url-pattern>/reject/*</url-pattern>
+ </servlet-mapping>
</web-app>
Modified: trunk/widget/build.xml
===================================================================
--- trunk/widget/build.xml 2007-09-12 08:04:19 UTC (rev 8235)
+++ trunk/widget/build.xml 2007-09-12 08:25:28 UTC (rev 8236)
@@ -165,18 +165,18 @@
description="Generate all target output."
depends="compile">
- <!-- widget-lib.jar -->
+ <!-- portal-widget-lib.jar -->
<mkdir dir="${build.lib}"/>
- <jar jarfile="${build.lib}/widget-lib.jar">
+ <jar jarfile="${build.lib}/portal-widget-lib.jar">
<fileset dir="${build.classes}"/>
</jar>
- <!-- widget.war -->
- <copy todir="${build.resources}/widget.war">
- <fileset dir="${build.resources}/widget-war"/>
+ <!-- portal-widget.war -->
+ <copy todir="${build.resources}/portal-widget.war">
+ <fileset dir="${build.resources}/portal-widget-war"/>
</copy>
- <copy todir="${build.resources}/widget.war/WEB-INF/lib">
- <fileset dir="${build.lib}" includes="widget-lib.jar"/>
+ <copy todir="${build.resources}/portal-widget.war/WEB-INF/lib">
+ <fileset dir="${build.lib}" includes="portal-widget-lib.jar"/>
</copy>
</target>
@@ -187,8 +187,8 @@
depends="artifacts">
<implode
- dir="${build.resources}/widget.war"
- tofile="${build.lib}/widget.war"/>
+ dir="${build.resources}/portal-widget.war"
+ tofile="${build.lib}/portal-widget.war"/>
</target>
@@ -228,14 +228,14 @@
description="Deploy."
depends="output">
<require file="${jboss.home}/server/${portal.deploy.dir}"/>
- <copy file="${build.lib}/widget.war" todir="${jboss.home}/server/${portal.deploy.dir}"/>
+ <copy file="${build.lib}/portal-widget.war" todir="${jboss.home}/server/${portal.deploy.dir}"/>
</target>
<target name="undeploy"
description="Undeploy."
depends="init">
<require file="${jboss.home}/server/${portal.deploy.dir}"/>
- <delete file="${jboss.home}/server/${portal.deploy.dir}/widget.war"/>
+ <delete file="${jboss.home}/server/${portal.deploy.dir}/portal-widget.war"/>
</target>
<target name="package-tests" depends="init, output">
@@ -265,7 +265,7 @@
<test todir="${test.reports}" name="org.jboss.portal.test.widget.google.QueryResultParserTestCase"/>
</x-test>
<x-classpath>
- <pathelement location="${build.lib}/widget-lib.jar"/>
+ <pathelement location="${build.lib}/portal-widget-lib.jar"/>
<pathelement location="${build.resources}/test"/>
<path refid="beanshell.beanshell.classpath"/>
Copied: trunk/widget/src/resources/portal-widget-war (from rev 8187, branches/JBoss_Portal_Branch_2_6/widget/src/resources/portal-widget-war)
Copied: trunk/widget/src/resources/portal-widget-war/WEB-INF (from rev 8187, branches/JBoss_Portal_Branch_2_6/widget/src/resources/portal-widget-war/WEB-INF)
Copied: trunk/widget/src/resources/portal-widget-war/WEB-INF/jsp (from rev 8187, branches/JBoss_Portal_Branch_2_6/widget/src/resources/portal-widget-war/WEB-INF/jsp)
Deleted: trunk/widget/src/resources/portal-widget-war/WEB-INF/jsp/edit.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/resources/portal-widget-war/WEB-INF/jsp/edit.jsp 2007-09-06 12:48:33 UTC (rev 8187)
+++ trunk/widget/src/resources/portal-widget-war/WEB-INF/jsp/edit.jsp 2007-09-12 08:25:28 UTC (rev 8236)
@@ -1,262 +0,0 @@
-<%@ page import="org.jboss.portal.widget.google.provider.GGQueryResult" %>
-<%@ page import="org.jboss.portal.widget.google.provider.GGProvider" %>
-<%@ page import="java.util.Iterator" %>
-<%@ page import="org.jboss.portal.widget.google.GGWidget" %>
-<%@ page import="org.jboss.portal.widget.google.info.GGPreferenceInfo" %>
-<%@ page import="org.jboss.portal.widget.google.type.DataType" %>
-<%@ page import="org.jboss.portal.widget.google.info.GGWidgetCategoryInfo" %>
-<%@ page import="org.jboss.portal.widget.google.provider.GGQuery" %>
-<%@ page import="org.jboss.portal.widget.google.type.EnumType" %>
-<%@ page import="javax.portlet.PortletURL" %>
-<%@ page import="org.jboss.portal.common.util.IteratorStatus" %>
-<%@ page import="java.util.Collection" %>
-<%@ page language="java"%>
-<%@ taglib uri="http://java.sun.com/portlet" prefix="p" %>
-<%@ page isELIgnored="false" %>
-
-<p:defineObjects/>
-<div>
-
-<%
- // Get useful request attributes
- GGProvider provider = (GGProvider)request.getAttribute("provider");
-
- // Get the selected widget if any
- GGWidget selWidget = null;
- String uri = request.getParameter("content.uri");
- if (uri != null)
- {
- selWidget = provider.getWidget(uri);
- }
-
- // Get query term
- String queryTerm = request.getParameter("query");
- if (queryTerm == null)
- {
- queryTerm = "";
- }
-
- // Get category term
- String catTerm = request.getParameter("cat");
- if (catTerm == null)
- {
- catTerm = "";
- }
-
- // Compute query
- GGQuery query = new GGQuery(0, catTerm, queryTerm, request.getLocale());
- Collection widgets = provider.search(query);
-
- String ggPickMethod = request.getParameter("gg_pick_method");
- boolean uriPickMethod = false;
- if (ggPickMethod != null && ggPickMethod.equals("uri"))
- {
- uriPickMethod = true;
- }
- else
- {
- }
-%>
-<div id="<p:namespace/>selection">
- <input type="RADIO" name="gg_pick_method" value="directory" <%= !uriPickMethod ? "CHECKED" : "" %> onclick="document.getElementById('<p:namespace/>directory_search_div').style.display = 'block'; document.getElementById('<p:namespace/>gadget_url_div').style.display = 'none'; "> Gadget Directory
- <input type="RADIO" name="gg_pick_method" value="uri" <%= uriPickMethod ? "CHECKED" : "" %> onclick="document.getElementById('<p:namespace/>directory_search_div').style.display = 'none'; document.getElementById('<p:namespace/>gadget_url_div').style.display = 'block'; "> Gadget URI
- <br>
- <hr>
-</div>
-
-<div id="<p:namespace/>gadget_url_div" style="display: <%= uriPickMethod ? "block" : "none" %>;">
- <%
- PortletURL contentURL = renderResponse.createActionURL();
- contentURL.setParameter("content.action.select","content.action.select");
- contentURL.setParameter("gg_pick_method", "uri");
- %>
- <form action="<%= contentURL %>" method="post">
-
- <%
- if (uri != null && selWidget == null)
- {
-
- %>
- <p style="color: red;">
- <%
- out.println("Failed to obtain widget with URI: " + uri);
- %>
- </p>
- <%
- }
- else if (selWidget != null)
- {
- %>
- <p style="color: blue;">
- Selected Widget: <%= selWidget.getDirectoryTitle().getDefaultString().length() > 0 ? selWidget.getDirectoryTitle().getDefaultString() : selWidget.getTitle().getDefaultString() %>
- </p>
- <%
- }
- %>
-
- <input type="text" name="content.uri" value="<%= uri != null ? uri : "" %>" class="portlet-form-field"/>
- <input type="submit" value="Select Gadget" class="portlet-form-button"/>
- </form>
-</div>
-
-<div id="<p:namespace/>directory_search_div" style="display: <%= !uriPickMethod ? "block" : "none" %>;">
-
- <form action="<p:renderURL></p:renderURL>" method="post">
- <input type="text" name="query" class="portlet-form-field"/>
- <select name="cat" class="portlet-form-field">
- <option value=""> </option>
- <%
- for (Iterator i = provider.getCategories().iterator(); i.hasNext();)
- {
- GGWidgetCategoryInfo cat = (GGWidgetCategoryInfo)i.next();
- boolean selected = cat.getName().equals(catTerm);
- %>
- <option value="<%= cat.getName() %>" <%= selected ? "selected=\"selected\"" : "" %>><%= cat.getDisplayName() %></option>
- <%
- }
- %>
- </select>
- <input type="submit" value="Search Gadgets" class="portlet-form-button"/>
- </form>
-
- <p>
- <table style="width:100%;border:1px solid" cellspacing="0" cellpadding="0">
- <%
- for (IteratorStatus i = new IteratorStatus(widgets.iterator()); i.hasNext();)
- {
- GGWidget widget = (GGWidget)i.next();
- boolean selected = selWidget != null && selWidget.getId().equals(widget.getId());
- PortletURL selectURL = renderResponse.createActionURL();
-
- // Set parameters for selection
- selectURL.setParameter("content.action.select", "content.action.select");
- selectURL.setParameter("content.uri", widget.getId());
-
- // Set default parametrization state
- for (Iterator j = widget.getInfo().getPreferences().getPreferences().iterator(); j.hasNext();)
- {
- GGPreferenceInfo prefInfo = (GGPreferenceInfo)j.next();
- String paramName = "content.param." + prefInfo.getName();
- String defaultValue = prefInfo.getDefaultValue() != null ? prefInfo.getDefaultValue() : "";
- selectURL.setParameter(paramName, defaultValue);
- }
-
- // Propagage search nav state
- selectURL.setParameter("cat", catTerm);
- selectURL.setParameter("query", queryTerm);
-
- //
- String rowClass = selected ? "portlet-section-selected" : (i.getIndex() % 2 == 0 ? "portlet-section-body" : "portlet-section-alternate");
- %>
- <tr class="<%= rowClass %>">
- <td><a href="<%= selectURL %>"><%= widget.getDirectoryTitle().getDefaultString().length() > 0 ? widget.getDirectoryTitle().getDefaultString() : widget.getTitle().getDefaultString() %></a></td>
- </tr>
- <%
- }
- %>
- </table>
- </p>
-
-</div>
-<div>
- <%
- if (selWidget != null && !selWidget.getInfo().getPreferences().getPreferences().isEmpty())
- {
- PortletURL selectURL = renderResponse.createActionURL();
-
- // Set parameters for selection
- selectURL.setParameter("content.action.select", "content.action.select");
- selectURL.setParameter("content.uri", selWidget.getId());
-
- // Propagage search nav state
- selectURL.setParameter("cat", catTerm);
- selectURL.setParameter("query", queryTerm);
-
- //propagate visable div
- if (uriPickMethod)
- {
- selectURL.setParameter("gg_pick_method", "uri");
- }
- %>
- <p>
- <form action="<%= selectURL %>" method="post">
- <%
- for (Iterator i = selWidget.getInfo().getPreferences().getPreferences().iterator(); i.hasNext();)
- {
- GGPreferenceInfo prefInfo = (GGPreferenceInfo)i.next();
- if (prefInfo.getType().getOrdinal() == DataType.HIDDEN)
- {
-
- %>
- <input type="hidden" name="content.param.<%= prefInfo.getName() %>" value="<%= prefInfo.getDefaultValue() != null ? prefInfo.getDefaultValue() : "" %>"/>
- <%
- }
- }
- %>
- <table>
- <tbody>
- <%
- for (Iterator i = selWidget.getInfo().getPreferences().getPreferences().iterator(); i.hasNext();)
- {
- GGPreferenceInfo prefInfo = (GGPreferenceInfo)i.next();
-
- // Get param value from nav state otherwise we use the default value
- String prefValue = request.getParameter("content.param." + prefInfo.getName());
- if (prefValue == null)
- {
- prefInfo.getDefaultValue();
- }
- if (prefValue == null)
- {
- prefValue = "";
- }
- %>
- <tr>
- <td><%= prefInfo.getDisplayName() != null ? prefInfo.getDisplayName() : prefInfo.getName() %>:</td>
- <%
- switch (prefInfo.getType().getOrdinal())
- {
- case DataType.HIDDEN:
- break;
- case DataType.ENUM:
- %>
- <td><select name="content.param.<%= prefInfo.getName() %>" class="portlet-form-field">
- <%
- EnumType e = (EnumType)prefInfo.getType();
- for (int j = 0;j < e.getSize();j++)
- {
- EnumType.Value value = e.getValue(j);
- boolean selected = value.getValue().equals(prefValue);
- %>
- <option <%= selected ? "selected=\"selected\"" : "" %> value="<%= value.getValue() %>"><%= value.getDisplayValue() != null ? value.getDisplayValue() : value.getValue() %></option>
- <%
- }
- %>
- </select></td>
- <%
- break;
- default:
- %>
- <td><input type="text" name="content.param.<%= prefInfo.getName() %>" class="portlet-form-field" value="<%= prefValue %>"/></td>
- <%
- break;
- }
- %>
- </tr>
- <%
- }
- %>
- <tr>
- <td colspan="2"><input type="submit" value="Update" class="portlet-form-button"/></td>
- </tr>
- </tbody>
- </table>
- </form>
- </p>
- <%
- }
- %>
-</div>
-
-</div>
-
\ No newline at end of file
Copied: trunk/widget/src/resources/portal-widget-war/WEB-INF/jsp/edit.jsp (from rev 8187, branches/JBoss_Portal_Branch_2_6/widget/src/resources/portal-widget-war/WEB-INF/jsp/edit.jsp)
===================================================================
--- trunk/widget/src/resources/portal-widget-war/WEB-INF/jsp/edit.jsp (rev 0)
+++ trunk/widget/src/resources/portal-widget-war/WEB-INF/jsp/edit.jsp 2007-09-12 08:25:28 UTC (rev 8236)
@@ -0,0 +1,262 @@
+<%@ page import="org.jboss.portal.widget.google.provider.GGQueryResult" %>
+<%@ page import="org.jboss.portal.widget.google.provider.GGProvider" %>
+<%@ page import="java.util.Iterator" %>
+<%@ page import="org.jboss.portal.widget.google.GGWidget" %>
+<%@ page import="org.jboss.portal.widget.google.info.GGPreferenceInfo" %>
+<%@ page import="org.jboss.portal.widget.google.type.DataType" %>
+<%@ page import="org.jboss.portal.widget.google.info.GGWidgetCategoryInfo" %>
+<%@ page import="org.jboss.portal.widget.google.provider.GGQuery" %>
+<%@ page import="org.jboss.portal.widget.google.type.EnumType" %>
+<%@ page import="javax.portlet.PortletURL" %>
+<%@ page import="org.jboss.portal.common.util.IteratorStatus" %>
+<%@ page import="java.util.Collection" %>
+<%@ page language="java"%>
+<%@ taglib uri="http://java.sun.com/portlet" prefix="p" %>
+<%@ page isELIgnored="false" %>
+
+<p:defineObjects/>
+<div>
+
+<%
+ // Get useful request attributes
+ GGProvider provider = (GGProvider)request.getAttribute("provider");
+
+ // Get the selected widget if any
+ GGWidget selWidget = null;
+ String uri = request.getParameter("content.uri");
+ if (uri != null)
+ {
+ selWidget = provider.getWidget(uri);
+ }
+
+ // Get query term
+ String queryTerm = request.getParameter("query");
+ if (queryTerm == null)
+ {
+ queryTerm = "";
+ }
+
+ // Get category term
+ String catTerm = request.getParameter("cat");
+ if (catTerm == null)
+ {
+ catTerm = "";
+ }
+
+ // Compute query
+ GGQuery query = new GGQuery(0, catTerm, queryTerm, request.getLocale());
+ Collection widgets = provider.search(query);
+
+ String ggPickMethod = request.getParameter("gg_pick_method");
+ boolean uriPickMethod = false;
+ if (ggPickMethod != null && ggPickMethod.equals("uri"))
+ {
+ uriPickMethod = true;
+ }
+ else
+ {
+ }
+%>
+<div id="<p:namespace/>selection">
+ <input type="RADIO" name="gg_pick_method" value="directory" <%= !uriPickMethod ? "CHECKED" : "" %> onclick="document.getElementById('<p:namespace/>directory_search_div').style.display = 'block'; document.getElementById('<p:namespace/>gadget_url_div').style.display = 'none'; "> Gadget Directory
+ <input type="RADIO" name="gg_pick_method" value="uri" <%= uriPickMethod ? "CHECKED" : "" %> onclick="document.getElementById('<p:namespace/>directory_search_div').style.display = 'none'; document.getElementById('<p:namespace/>gadget_url_div').style.display = 'block'; "> Gadget URI
+ <br>
+ <hr>
+</div>
+
+<div id="<p:namespace/>gadget_url_div" style="display: <%= uriPickMethod ? "block" : "none" %>;">
+ <%
+ PortletURL contentURL = renderResponse.createActionURL();
+ contentURL.setParameter("content.action.select","content.action.select");
+ contentURL.setParameter("gg_pick_method", "uri");
+ %>
+ <form action="<%= contentURL %>" method="post">
+
+ <%
+ if (uri != null && selWidget == null)
+ {
+
+ %>
+ <p style="color: red;">
+ <%
+ out.println("Failed to obtain widget with URI: " + uri);
+ %>
+ </p>
+ <%
+ }
+ else if (selWidget != null)
+ {
+ %>
+ <p style="color: blue;">
+ Selected Widget: <%= selWidget.getDirectoryTitle().getDefaultString().length() > 0 ? selWidget.getDirectoryTitle().getDefaultString() : selWidget.getTitle().getDefaultString() %>
+ </p>
+ <%
+ }
+ %>
+
+ <input type="text" name="content.uri" value="<%= uri != null ? uri : "" %>" class="portlet-form-field"/>
+ <input type="submit" value="Select Gadget" class="portlet-form-button"/>
+ </form>
+</div>
+
+<div id="<p:namespace/>directory_search_div" style="display: <%= !uriPickMethod ? "block" : "none" %>;">
+
+ <form action="<p:renderURL></p:renderURL>" method="post">
+ <input type="text" name="query" class="portlet-form-field"/>
+ <select name="cat" class="portlet-form-field">
+ <option value=""> </option>
+ <%
+ for (Iterator i = provider.getCategories().iterator(); i.hasNext();)
+ {
+ GGWidgetCategoryInfo cat = (GGWidgetCategoryInfo)i.next();
+ boolean selected = cat.getName().equals(catTerm);
+ %>
+ <option value="<%= cat.getName() %>" <%= selected ? "selected=\"selected\"" : "" %>><%= cat.getDisplayName() %></option>
+ <%
+ }
+ %>
+ </select>
+ <input type="submit" value="Search Gadgets" class="portlet-form-button"/>
+ </form>
+
+ <p>
+ <table style="width:100%;border:1px solid" cellspacing="0" cellpadding="0">
+ <%
+ for (IteratorStatus i = new IteratorStatus(widgets.iterator()); i.hasNext();)
+ {
+ GGWidget widget = (GGWidget)i.next();
+ boolean selected = selWidget != null && selWidget.getId().equals(widget.getId());
+ PortletURL selectURL = renderResponse.createActionURL();
+
+ // Set parameters for selection
+ selectURL.setParameter("content.action.select", "content.action.select");
+ selectURL.setParameter("content.uri", widget.getId());
+
+ // Set default parametrization state
+ for (Iterator j = widget.getInfo().getPreferences().getPreferences().iterator(); j.hasNext();)
+ {
+ GGPreferenceInfo prefInfo = (GGPreferenceInfo)j.next();
+ String paramName = "content.param." + prefInfo.getName();
+ String defaultValue = prefInfo.getDefaultValue() != null ? prefInfo.getDefaultValue() : "";
+ selectURL.setParameter(paramName, defaultValue);
+ }
+
+ // Propagage search nav state
+ selectURL.setParameter("cat", catTerm);
+ selectURL.setParameter("query", queryTerm);
+
+ //
+ String rowClass = selected ? "portlet-section-selected" : (i.getIndex() % 2 == 0 ? "portlet-section-body" : "portlet-section-alternate");
+ %>
+ <tr class="<%= rowClass %>">
+ <td><a href="<%= selectURL %>"><%= widget.getDirectoryTitle().getDefaultString().length() > 0 ? widget.getDirectoryTitle().getDefaultString() : widget.getTitle().getDefaultString() %></a></td>
+ </tr>
+ <%
+ }
+ %>
+ </table>
+ </p>
+
+</div>
+<div>
+ <%
+ if (selWidget != null && !selWidget.getInfo().getPreferences().getPreferences().isEmpty())
+ {
+ PortletURL selectURL = renderResponse.createActionURL();
+
+ // Set parameters for selection
+ selectURL.setParameter("content.action.select", "content.action.select");
+ selectURL.setParameter("content.uri", selWidget.getId());
+
+ // Propagage search nav state
+ selectURL.setParameter("cat", catTerm);
+ selectURL.setParameter("query", queryTerm);
+
+ //propagate visable div
+ if (uriPickMethod)
+ {
+ selectURL.setParameter("gg_pick_method", "uri");
+ }
+ %>
+ <p>
+ <form action="<%= selectURL %>" method="post">
+ <%
+ for (Iterator i = selWidget.getInfo().getPreferences().getPreferences().iterator(); i.hasNext();)
+ {
+ GGPreferenceInfo prefInfo = (GGPreferenceInfo)i.next();
+ if (prefInfo.getType().getOrdinal() == DataType.HIDDEN)
+ {
+
+ %>
+ <input type="hidden" name="content.param.<%= prefInfo.getName() %>" value="<%= prefInfo.getDefaultValue() != null ? prefInfo.getDefaultValue() : "" %>"/>
+ <%
+ }
+ }
+ %>
+ <table>
+ <tbody>
+ <%
+ for (Iterator i = selWidget.getInfo().getPreferences().getPreferences().iterator(); i.hasNext();)
+ {
+ GGPreferenceInfo prefInfo = (GGPreferenceInfo)i.next();
+
+ // Get param value from nav state otherwise we use the default value
+ String prefValue = request.getParameter("content.param." + prefInfo.getName());
+ if (prefValue == null)
+ {
+ prefInfo.getDefaultValue();
+ }
+ if (prefValue == null)
+ {
+ prefValue = "";
+ }
+ %>
+ <tr>
+ <td><%= prefInfo.getDisplayName() != null ? prefInfo.getDisplayName() : prefInfo.getName() %>:</td>
+ <%
+ switch (prefInfo.getType().getOrdinal())
+ {
+ case DataType.HIDDEN:
+ break;
+ case DataType.ENUM:
+ %>
+ <td><select name="content.param.<%= prefInfo.getName() %>" class="portlet-form-field">
+ <%
+ EnumType e = (EnumType)prefInfo.getType();
+ for (int j = 0;j < e.getSize();j++)
+ {
+ EnumType.Value value = e.getValue(j);
+ boolean selected = value.getValue().equals(prefValue);
+ %>
+ <option <%= selected ? "selected=\"selected\"" : "" %> value="<%= value.getValue() %>"><%= value.getDisplayValue() != null ? value.getDisplayValue() : value.getValue() %></option>
+ <%
+ }
+ %>
+ </select></td>
+ <%
+ break;
+ default:
+ %>
+ <td><input type="text" name="content.param.<%= prefInfo.getName() %>" class="portlet-form-field" value="<%= prefValue %>"/></td>
+ <%
+ break;
+ }
+ %>
+ </tr>
+ <%
+ }
+ %>
+ <tr>
+ <td colspan="2"><input type="submit" value="Update" class="portlet-form-button"/></td>
+ </tr>
+ </tbody>
+ </table>
+ </form>
+ </p>
+ <%
+ }
+ %>
+</div>
+
+</div>
+
\ No newline at end of file
Deleted: trunk/widget/src/resources/portal-widget-war/WEB-INF/portlet-instances.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/resources/portal-widget-war/WEB-INF/portlet-instances.xml 2007-09-06 12:48:33 UTC (rev 8187)
+++ trunk/widget/src/resources/portal-widget-war/WEB-INF/portlet-instances.xml 2007-09-12 08:25:28 UTC (rev 8236)
@@ -1,36 +0,0 @@
-<?xml version="1.0" standalone="yes"?>
-<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- ~ 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 deployments PUBLIC
- "-//JBoss Portal//DTD Portlet Instances 2.6//EN"
- "http://www.jboss.org/portal/dtd/portlet-instances_2_6.dtd">
-
-<deployments>
- <deployment>
- <instance>
- <instance-id>GoogleWidgetPortletInstance</instance-id>
- <portlet-ref>GoogleWidgetPortlet</portlet-ref>
- </instance>
- </deployment>
-</deployments>
\ No newline at end of file
Copied: trunk/widget/src/resources/portal-widget-war/WEB-INF/portlet-instances.xml (from rev 8187, branches/JBoss_Portal_Branch_2_6/widget/src/resources/portal-widget-war/WEB-INF/portlet-instances.xml)
===================================================================
--- trunk/widget/src/resources/portal-widget-war/WEB-INF/portlet-instances.xml (rev 0)
+++ trunk/widget/src/resources/portal-widget-war/WEB-INF/portlet-instances.xml 2007-09-12 08:25:28 UTC (rev 8236)
@@ -0,0 +1,36 @@
+<?xml version="1.0" standalone="yes"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ 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 deployments PUBLIC
+ "-//JBoss Portal//DTD Portlet Instances 2.6//EN"
+ "http://www.jboss.org/portal/dtd/portlet-instances_2_6.dtd">
+
+<deployments>
+ <deployment>
+ <instance>
+ <instance-id>GoogleWidgetPortletInstance</instance-id>
+ <portlet-ref>GoogleWidgetPortlet</portlet-ref>
+ </instance>
+ </deployment>
+</deployments>
\ No newline at end of file
Deleted: trunk/widget/src/resources/portal-widget-war/WEB-INF/portlet.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/resources/portal-widget-war/WEB-INF/portlet.xml 2007-09-06 12:48:33 UTC (rev 8187)
+++ trunk/widget/src/resources/portal-widget-war/WEB-INF/portlet.xml 2007-09-12 08:25:28 UTC (rev 8236)
@@ -1,50 +0,0 @@
-<?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. ~
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
-
-<portlet-app
- xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
- version="1.0">
- <portlet>
- <description>Google Widget Portlet</description>
- <portlet-name>GoogleWidgetPortlet</portlet-name>
- <display-name>Google Widget Portlet</display-name>
- <portlet-class>org.jboss.portal.widget.WidgetPortlet</portlet-class>
- <init-param>
- <description>Connection timeout when retreiving gadgets from google directory</description>
- <name>connectionTimeout</name>
- <value>5000</value>
- </init-param>
- <supports>
- <mime-type>text/html</mime-type>
- <portlet-mode>VIEW</portlet-mode>
- <portlet-mode>EDIT_CONTENT</portlet-mode>
- </supports>
- <portlet-info>
- <title>Google Widget</title>
- <keywords>widget</keywords>
- </portlet-info>
- </portlet>
-</portlet-app>
Copied: trunk/widget/src/resources/portal-widget-war/WEB-INF/portlet.xml (from rev 8187, branches/JBoss_Portal_Branch_2_6/widget/src/resources/portal-widget-war/WEB-INF/portlet.xml)
===================================================================
--- trunk/widget/src/resources/portal-widget-war/WEB-INF/portlet.xml (rev 0)
+++ trunk/widget/src/resources/portal-widget-war/WEB-INF/portlet.xml 2007-09-12 08:25:28 UTC (rev 8236)
@@ -0,0 +1,50 @@
+<?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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<portlet-app
+ xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
+ version="1.0">
+ <portlet>
+ <description>Google Widget Portlet</description>
+ <portlet-name>GoogleWidgetPortlet</portlet-name>
+ <display-name>Google Widget Portlet</display-name>
+ <portlet-class>org.jboss.portal.widget.WidgetPortlet</portlet-class>
+ <init-param>
+ <description>Connection timeout when retreiving gadgets from google directory</description>
+ <name>connectionTimeout</name>
+ <value>5000</value>
+ </init-param>
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ <portlet-mode>EDIT_CONTENT</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Google Widget</title>
+ <keywords>widget</keywords>
+ </portlet-info>
+ </portlet>
+</portlet-app>
Deleted: trunk/widget/src/resources/portal-widget-war/WEB-INF/web.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/resources/portal-widget-war/WEB-INF/web.xml 2007-09-06 12:48:33 UTC (rev 8187)
+++ trunk/widget/src/resources/portal-widget-war/WEB-INF/web.xml 2007-09-12 08:25:28 UTC (rev 8236)
@@ -1,41 +0,0 @@
-<?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. ~
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
-
-<web-app
- xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
- version="2.4">
- <context-param>
- <param-name>org.jboss.portal.content_type</param-name>
- <param-value>widget/google</param-value>
- </context-param>
- <context-param>
- <param-name>org.jboss.portal.portlet_instance</param-name>
- <param-value>GoogleWidgetPortletInstance</param-value>
- </context-param>
- <listener>
- <listener-class>org.jboss.portlet.content.ContentTypeRegistration</listener-class>
- </listener>
-</web-app>
Copied: trunk/widget/src/resources/portal-widget-war/WEB-INF/web.xml (from rev 8187, branches/JBoss_Portal_Branch_2_6/widget/src/resources/portal-widget-war/WEB-INF/web.xml)
===================================================================
--- trunk/widget/src/resources/portal-widget-war/WEB-INF/web.xml (rev 0)
+++ trunk/widget/src/resources/portal-widget-war/WEB-INF/web.xml 2007-09-12 08:25:28 UTC (rev 8236)
@@ -0,0 +1,41 @@
+<?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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<web-app
+ xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
+ <context-param>
+ <param-name>org.jboss.portal.content_type</param-name>
+ <param-value>widget/google</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.jboss.portal.portlet_instance</param-name>
+ <param-value>GoogleWidgetPortletInstance</param-value>
+ </context-param>
+ <listener>
+ <listener-class>org.jboss.portlet.content.ContentTypeRegistration</listener-class>
+ </listener>
+</web-app>
Modified: trunk/workflow/build.xml
===================================================================
--- trunk/workflow/build.xml 2007-09-12 08:04:19 UTC (rev 8235)
+++ trunk/workflow/build.xml 2007-09-12 08:25:28 UTC (rev 8236)
@@ -134,10 +134,30 @@
<!--| Define module specific elements here. |-->
<!--+=======================================+-->
<property name="javadoc.private" value="true"/>
- <property name="javadoc.protected" value="false"/>
+ <property name="javadoc.protected" value="false"/>
+
+ <taskdef name="explode"
+ classname="org.jboss.portal.common.ant.Explode"
+ classpathref="explode.task.classpath"/>
+
+ <taskdef name="implode"
+ classname="org.jboss.portal.common.ant.Implode"
+ classpathref="explode.task.classpath"/>
- </target>
+ </target>
+
+ <target name="configure-explode">
+ <path id="explode.task.classpath">
+ <pathelement location="${project.tools}/lib/explode.jar"/>
+ <path refid="apache.ant.classpath"/>
+ </path>
+ <taskdef
+ name="explode"
+ classname="org.jboss.portal.common.ant.Explode"
+ classpathref="explode.task.classpath"/>
+ </target>
+
<!--+====================================================================+-->
<!--| Compile |-->
<!--| |-->
@@ -168,16 +188,41 @@
<mkdir dir="${build.lib}"/>
<jar jarfile="${build.lib}/portal-workflow-lib.jar" manifest="${build.etc}/portal-workflow-lib-jar.mf">
- <fileset dir="${build.classes}"/>
- <!--fileset dir="${build.resources}/portal-workflow-jar"/-->
+ <fileset dir="${build.classes}"/>
</jar>
-
- <!-- create the war file, not needed anymore -->
- <!--copy todir="${build.lib}/portal-workflow.war">
+
+ <!--
+ <copy todir="${build.resources}/portal-workflow.war">
<fileset dir="${build.resources}/portal-workflow-war"/>
- </copy-->
+ </copy>
+
+ <jar jarfile="${build.lib}/portal-workflow.war">
+ <fileset dir="${build.resources}/portal-workflow.war"/>
+ </jar>
+ -->
+
+ <!-- workflow service -->
+ <copy todir="${build.resources}/portal-workflow.sar">
+ <fileset dir="${build.resources}/portal-workflow-sar"/>
+ </copy>
+
+ <!--
+ <copy todir="${build.resources}/portal-workflow.sar/portal-worflow.war">
+ <fileset dir="${build.resources}/portal-workflow.war"/>
+ </copy>
+ -->
+ <implode
+ dir="${build.resources}/portal-workflow.sar"
+ tofile="${build.lib}/portal-workflow.sar"/>
</target>
-
+
+ <target name="deploy"
+ description="Deploy."
+ depends="output">
+ <require file="${jboss.home}/server/${portal.deploy.dir}"/>
+ <copy file="${build.lib}/portal-workflow.sar" todir="${jboss.home}/server/${portal.deploy.dir}" overwrite="true"/>
+ </target>
+
<!--
generates artifacts used for tests, requires output to be previously run
-->
Copied: trunk/workflow/src/main/org/jboss/portal/workflow/service/JbpmThreadService.java (from rev 8187, branches/JBoss_Portal_Branch_2_6/workflow/src/main/org/jboss/portal/workflow/service/JbpmThreadService.java)
===================================================================
--- trunk/workflow/src/main/org/jboss/portal/workflow/service/JbpmThreadService.java (rev 0)
+++ trunk/workflow/src/main/org/jboss/portal/workflow/service/JbpmThreadService.java 2007-09-12 08:25:28 UTC (rev 8236)
@@ -0,0 +1,95 @@
+/******************************************************************************
+ * 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.workflow.service;
+
+import org.jbpm.JbpmConfiguration;
+import org.jbpm.msg.command.CommandExecutorThread;
+import org.jbpm.scheduler.impl.SchedulerThread;
+
+/**
+ * @author <a href="mailto:theute@jboss.org">Thomas Heute</a>
+ * @version $Revision$
+ */
+public class JbpmThreadService implements JbpmThreadServiceMBean
+{
+
+ private int schedulerInterval = 5000;
+
+ private int priority = 1;
+
+ private WorkflowService workflowService = null;
+
+ private CommandExecutorThread commandExecutorThread = null;
+
+ private SchedulerThread schedulerThread = null;
+
+ public void start()
+ {
+ JbpmConfiguration jbpmConfiguration = workflowService.getJbpmConfiguration();
+
+ commandExecutorThread = new CommandExecutorThread(jbpmConfiguration);
+ commandExecutorThread.setPriority(priority);
+ commandExecutorThread.start();
+
+ schedulerThread = new SchedulerThread(jbpmConfiguration);
+ schedulerThread.setPriority(priority);
+ schedulerThread.setInterval(schedulerInterval);
+ schedulerThread.start();
+ }
+
+ public void stop()
+ {
+ }
+
+ public int getSchedulerInterval()
+ {
+ return schedulerInterval;
+ }
+
+ public void setSchedulerInterval(int schedulerInterval)
+ {
+ this.schedulerInterval = schedulerInterval;
+ }
+
+ public int getPriority()
+ {
+ return priority;
+ }
+
+ public void setPriority(int priority)
+ {
+ this.priority = priority;
+ }
+
+ public WorkflowService getWorkflowService()
+ {
+ return workflowService;
+ }
+
+ public void setWorkflowService(WorkflowService workflowService)
+ {
+ this.workflowService = workflowService;
+ }
+
+}
+
Copied: trunk/workflow/src/main/org/jboss/portal/workflow/service/JbpmThreadServiceMBean.java (from rev 8187, branches/JBoss_Portal_Branch_2_6/workflow/src/main/org/jboss/portal/workflow/service/JbpmThreadServiceMBean.java)
===================================================================
--- trunk/workflow/src/main/org/jboss/portal/workflow/service/JbpmThreadServiceMBean.java (rev 0)
+++ trunk/workflow/src/main/org/jboss/portal/workflow/service/JbpmThreadServiceMBean.java 2007-09-12 08:25:28 UTC (rev 8236)
@@ -0,0 +1,48 @@
+/******************************************************************************
+ * 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.workflow.service;
+
+
+/**
+ * @author <a href="mailto:theute@jboss.org">Thomas Heute</a>
+ * @version $Revision$
+ */
+public interface JbpmThreadServiceMBean
+{
+ public void start();
+
+ public void stop();
+
+ public WorkflowService getWorkflowService();
+
+ public void setWorkflowService(WorkflowService workflowService);
+
+ public int getSchedulerInterval();
+
+ public void setSchedulerInterval(int schedulerInterval);
+
+ public int getPriority();
+
+ public void setPriority(int priority);
+}
+
Deleted: trunk/workflow/src/resources/portal-workflow-sar/META-INF/jboss-service.xml
===================================================================
--- trunk/workflow/src/resources/portal-workflow-sar/META-INF/jboss-service.xml 2007-09-12 08:04:19 UTC (rev 8235)
+++ trunk/workflow/src/resources/portal-workflow-sar/META-INF/jboss-service.xml 2007-09-12 08:25:28 UTC (rev 8236)
@@ -1,153 +0,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. ~
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
-
-<server>
- <!-- Hibernate service -->
- <mbean
- code="org.jboss.portal.jems.hibernate.SessionFactoryBinder"
- name="portal:service=Hibernate,type=Workflow"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends>jboss.jca:service=DataSourceBinding,name=@portal.datasource.name@</depends>
- <attribute name="DoChecking">true</attribute>
- <attribute name="ConfigLocation">conf/hibernate/workflow/hibernate.cfg.xml</attribute>
- <attribute name="JNDIName">java:/portal/workflow/WorkFlowSessionFactory</attribute>
- </mbean>
-
- <!-- Workflow service -->
- <mbean
- code="org.jboss.portal.workflow.service.WorkflowServiceImpl"
- name="portal:service=Workflow,type=WorkflowService"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends>portal:service=Hibernate,type=Workflow</depends>
- <attribute name="JbpmConfigurationXml">
- <![CDATA[
- <jbpm-configuration>
- <jbpm-context>
- <service name="persistence" factory="org.jbpm.persistence.db.DbPersistenceServiceFactory" />
- <service name="scheduler" factory="org.jbpm.scheduler.db.DbSchedulerServiceFactory" />
- </jbpm-context>
- <string name="resource.hibernate.cfg.xml" value="conf/hibernate/workflow/hibernate.cfg.xml"/>
- <string name="resource.business.calendar" value="org/jbpm/calendar/jbpm.business.calendar.properties"/>
- <string name="resource.default.modules" value="org/jbpm/graph/def/jbpm.default.modules.properties"/>
- <string name="resource.converter" value="org/jbpm/db/hibernate/jbpm.converter.properties"/>
- <string name="resource.action.types" value="org/jbpm/graph/action/action.types.xml"/>
- <string name="resource.node.types" value="org/jbpm/graph/node/node.types.xml"/>
- <string name="resource.varmapping" value="org/jbpm/context/exe/jbpm.varmapping.xml"/>
- </jbpm-configuration>
- ]]>
- </attribute>
- <attribute name="JNDIName">java:/portal/WorkflowService</attribute>
- </mbean>
-
- <!-- ApprovePublish workflow service -->
- <mbean
- code="org.jboss.portal.workflow.cms.ApprovePublishImpl"
- name="portal:service=ApprovePublish,type=Workflow"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends optional-attribute-name="WorkflowService" proxy-type="attribute">
- portal:service=Workflow,type=WorkflowService
- </depends>
- <depends optional-attribute-name="IdentityServiceController" proxy-type="attribute">
- portal:service=Module,type=IdentityServiceController
- </depends>
- <!-- JBPM process definition -->
- <attribute name="Process">
- <![CDATA[
- <!-- cms approval workflow -->
- <process-definition name="approval_workflow">
- <start-state>
- <transition to="request_approval"/>
- </start-state>
- <task-node name="request_approval" signal="first">
- <task name="approve_publish">
- <assignment class="org.jboss.portal.cms.workflow.PublishAssignmentHandler"/>
- <event type="task-start">
- <action class="org.jboss.portal.cms.workflow.FinalizePublish"/>
- </event>
- <exception-handler>
- <action class="org.jboss.portal.workflow.cms.TaskExceptionHandler"/>
- </exception-handler>
- </task>
- <transition name="approval" to="end"/>
- <transition name="rejection" to="end"/>
- </task-node>
- <end-state name="end"/>
- </process-definition>
- ]]>
- </attribute>
- <!--
- overwrite = false creates the process first time if does not exist, for
- subsequent server restarts, this process definition remains in tact
-
- overwrite = true creates the process first time if does not exist,
- for subsequent server restarts, it creates a new version of the process definition
- which will be used for processes created from then onwards. Old processes created
- for an older version of the definition remain in tact and use their corresponding
- process definition.
-
- Typically use overwrite=false and overwrite=true only when a new process definition
- related to this workflow needs to be deployed
- -->
- <attribute name="Overwrite">false</attribute>
- <!--
- a comma separated list of portal roles that are designated
- to act as workflow managers. They are allowed to
- approve/reject content publish requests
- -->
- <attribute name="ManagerRoles">Admin</attribute>
- <attribute name="JNDIName">java:portal/ApprovePublishWorkflow</attribute>
-
- <!-- Now that a manager GUI is integrated..no need for email based manager screen -->
-<!--
- <attribute name="From">do-not-reply(a)jboss.com</attribute>
- <attribute name="Subject">Content Approval Requested</attribute>
- <attribute name="Body">
- <![CDATA[
- Approval is needed to publish the following Content:
-
- Content Location : {0}
-
- Content Type : {1}
-
- Content Size : {2}
-
- Creation Date : {3}
-
- User : {4}
-
-
- <a href="http://localhost/workflow/approve?pId={5}&manager={6}">Approve</a>
-
-
- <a href="http://localhost/workflow/reject?pId={7}&manager={8}">Reject</a>
- ]]>
- </attribute>
--->
- </mbean>
-</server>
Copied: trunk/workflow/src/resources/portal-workflow-sar/META-INF/jboss-service.xml (from rev 8187, branches/JBoss_Portal_Branch_2_6/workflow/src/resources/portal-workflow-sar/META-INF/jboss-service.xml)
===================================================================
--- trunk/workflow/src/resources/portal-workflow-sar/META-INF/jboss-service.xml (rev 0)
+++ trunk/workflow/src/resources/portal-workflow-sar/META-INF/jboss-service.xml 2007-09-12 08:25:28 UTC (rev 8236)
@@ -0,0 +1,74 @@
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<server>
+ <!-- Hibernate service -->
+ <mbean
+ code="org.jboss.portal.jems.hibernate.SessionFactoryBinder"
+ name="portal:service=Hibernate,type=Workflow"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <depends>jboss.jca:service=DataSourceBinding,name=@portal.datasource.name@</depends>
+ <attribute name="DoChecking">true</attribute>
+ <attribute name="ConfigLocation">conf/hibernate/workflow/hibernate.cfg.xml</attribute>
+ <attribute name="JNDIName">java:/portal/workflow/WorkFlowSessionFactory</attribute>
+ </mbean>
+
+ <mbean
+ code="org.jboss.portal.workflow.service.JbpmThreadService"
+ name="portal:service=Thread,type=WorkflowService">
+ <depends optional-attribute-name="WorkflowService"
+ proxy-type="attribute">portal:service=Workflow,type=WorkflowService</depends>
+ <attribute name="SchedulerInterval">60000</attribute>
+ </mbean>
+
+ <!-- Workflow service -->
+ <mbean
+ code="org.jboss.portal.workflow.service.WorkflowServiceImpl"
+ name="portal:service=Workflow,type=WorkflowService"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <depends>portal:service=Hibernate,type=Workflow</depends>
+ <attribute name="JbpmConfigurationXml">
+ <![CDATA[
+ <jbpm-configuration>
+ <jbpm-context>
+ <service name="persistence" factory="org.jbpm.persistence.db.DbPersistenceServiceFactory" />
+ <service name="scheduler" factory="org.jbpm.scheduler.db.DbSchedulerServiceFactory" />
+ <service name="message" factory="org.jbpm.msg.db.DbMessageServiceFactory" />
+ </jbpm-context>
+ <string name="resource.hibernate.cfg.xml" value="conf/hibernate/workflow/hibernate.cfg.xml"/>
+ <string name="resource.business.calendar" value="org/jbpm/calendar/jbpm.business.calendar.properties"/>
+ <string name="resource.default.modules" value="org/jbpm/graph/def/jbpm.default.modules.properties"/>
+ <string name="resource.converter" value="org/jbpm/db/hibernate/jbpm.converter.properties"/>
+ <string name="resource.action.types" value="org/jbpm/graph/action/action.types.xml"/>
+ <string name="resource.node.types" value="org/jbpm/graph/node/node.types.xml"/>
+ <string name="resource.varmapping" value="org/jbpm/context/exe/jbpm.varmapping.xml"/>
+ </jbpm-configuration>
+ ]]>
+ </attribute>
+ </mbean>
+
+</server>
Modified: trunk/workflow/src/resources/portal-workflow-sar/conf/hibernate/workflow/hibernate.cfg.xml
===================================================================
--- trunk/workflow/src/resources/portal-workflow-sar/conf/hibernate/workflow/hibernate.cfg.xml 2007-09-12 08:04:19 UTC (rev 8235)
+++ trunk/workflow/src/resources/portal-workflow-sar/conf/hibernate/workflow/hibernate.cfg.xml 2007-09-12 08:25:28 UTC (rev 8236)
@@ -17,7 +17,7 @@
<!-- caching properties -->
<property name="cache.use_second_level_cache">true</property>
<property name="cache.use_query_cache">true</property>
- <property name="cache.provider_configuration_file_resource_path">conf/hibernate/cms/ehcache.xml</property>
+ <property name="cache.provider_configuration_file_resource_path">conf/hibernate/workflow/ehcache.xml</property>
<property name="cache.provider_class">org.hibernate.cache.EhCacheProvider</property>
<!-- managed environment transaction configuration -->
18 years, 7 months