gatein SVN: r972 - portal/trunk/docs/reference-guide/en/modules/development.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-12-08 04:06:53 -0500 (Tue, 08 Dec 2009)
New Revision: 972
Modified:
portal/trunk/docs/reference-guide/en/modules/development/Dynamic_Layouts.xml
Log:
Reformat
Modified: portal/trunk/docs/reference-guide/en/modules/development/Dynamic_Layouts.xml
===================================================================
--- portal/trunk/docs/reference-guide/en/modules/development/Dynamic_Layouts.xml 2009-12-08 08:42:46 UTC (rev 971)
+++ portal/trunk/docs/reference-guide/en/modules/development/Dynamic_Layouts.xml 2009-12-08 09:06:53 UTC (rev 972)
@@ -2,65 +2,63 @@
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
]>
<section id="sect-Reference_Guide-Dynamic_Layouts">
- <!--
-
- Copyright (C) 2009 eXo Platform SAS.
-
- 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.
-
- --><title>Dynamic Layouts</title>
- <section id="sect-Reference_Guide-Dynamic_Layouts-Overview">
- <title>Overview</title>
- <para>
- Indeed, the usual way of rendering a portal page is a static one where you need a template, usually a jsp page, for each layout (2 columns, 3 columns and so on). That makes you depend on the integrator or developers as for each new layout you will need to ask for a custom development.
+ <title>Dynamic Layouts</title>
+ <section id="sect-Reference_Guide-Dynamic_Layouts-Overview">
+ <title>Overview</title>
+ <para>
+ The traditional way of rendering a portal page is a static one where you
+ need a template, usually a jsp page, for each layout (2
+ columns, 3 columns and so on). That makes you depend on the
+ integrator or developers as for each new layout you will need
+ to ask for a custom development.
</para>
- <para>
- GateIn, with its dynamic way that creates a tree of nested UI containers that contain portlets as shown in the picture below. Each container is responsible for rendering its children. In the picture, the main container renders its children in several rows while the nested container displays them as columns.
+ <para>
+ GateIn has a dynamic way which creates a tree of nested UI containers
+ that contain portlets as shown in the picture below. Each
+ container is responsible for rendering its children. In the
+ picture, the main container renders its children in several
+ rows while the nested container displays them as columns.
+ </para>
+ <para>
+ Furthermore, by manipulating the tree using the WYSIWYG editor, it allows you to
+ create new containers, define how they will render their
+ children, add new portlets.
</para>
- <para>
- Furthermore, by manipulating the tree using the WYSIWYG editor, it allows you to create new containers, define how they will render their children, add new portlets.
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/portal.gif" format="GIF" />
+ </imageobject>
+ </mediaobject>
+ </section>
+
+ <section
+ id="sect-Reference_Guide-Dynamic_Layouts-Advanced_Drag_and_Drop_mechanism">
+ <title>Advanced Drag and Drop mechanism</title>
+ <para>
+ As most portal use the static layout mechanism, they can only drag
+ portlets from one static location, let's say a column, to
+ another one.
</para>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/portal.gif" format="GIF" />
- </imageobject>
- </mediaobject>
- </section>
-
- <section id="sect-Reference_Guide-Dynamic_Layouts-Advanced_Drag_and_Drop_mechanism">
- <title>Advanced Drag and Drop mechanism</title>
- <para>
- As most portal use the static layout mechanism, they can only drag portlets from one static location, let's say a column, to another one.
+ <para>
+ With GateIn Portal, it is possible to also drag the UI containers and the
+ portlets and drop them in containers that are deeper or upper
+ in the Portal component tree. This feature is unique and not
+ just a tool!
</para>
- <para>
- With GateIn Portal, it is possible to also drag the UI containers and the portlets and drop them in containers that are deeper or upper in the Portal component tree. This feature is unique and not just a tool!
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/image3.jpg" format="JPG" />
+ </imageobject>
+ </mediaobject>
+ </section>
+
+ <section id="sect-Reference_Guide-Dynamic_Layouts-Summary">
+ <title>Summary</title>
+ <para>
+ With this innovative concept of dynamic layout, you can easily create
+ portal pages with complex layout.
</para>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/image3.jpg" format="JPG" />
- </imageobject>
- </mediaobject>
- </section>
-
- <section id="sect-Reference_Guide-Dynamic_Layouts-Summary">
- <title>Summary</title>
- <para>
- With this innovative concept of dynamic layout, you can easily create portal pages with complex layout.
- </para>
- </section>
+ </section>
</section>
15 years
gatein SVN: r971 - portal/trunk/docs/reference-guide/en/modules/development.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-12-08 03:42:46 -0500 (Tue, 08 Dec 2009)
New Revision: 971
Modified:
portal/trunk/docs/reference-guide/en/modules/development/XML_Resource_Bundles.xml
Log:
Reformat
Modified: portal/trunk/docs/reference-guide/en/modules/development/XML_Resource_Bundles.xml
===================================================================
--- portal/trunk/docs/reference-guide/en/modules/development/XML_Resource_Bundles.xml 2009-12-08 07:15:13 UTC (rev 970)
+++ portal/trunk/docs/reference-guide/en/modules/development/XML_Resource_Bundles.xml 2009-12-08 08:42:46 UTC (rev 971)
@@ -2,65 +2,67 @@
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
]>
<section id="sect-Reference_Guide-XML_Resources_Bundles">
- <!--
-
- Copyright (C) 2009 eXo Platform SAS.
-
- 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.
-
- --><title>XML Resources Bundles</title>
+ <title>XML Resources Bundles</title>
<section id="sect-Reference_Guide-XML_Resources_Bundles-Motivation">
<title>Motivation</title>
<para>
- Usually resource bundles are stored in property files however as property files are plain files it raise issues with the encoding of the file. The XML resource bundle format has been developped to provide an alternative to property files.
+ Usually resource bundles are stored in property files however as
+ property files are plain files it raise issues with the encoding of
+ the file. The XML resource bundle format has been developed to
+ provide an alternative to property files.
</para>
<itemizedlist>
<listitem>
<para>
- The XML format declares the encoding of the file in the XML declaration which avoids to use the native2ascii program and mess with encoding
+ The XML format declares the encoding of the file in the XML
+ declaration which avoids to use the native2ascii program and mess
+ with encoding.
</para>
</listitem>
<listitem>
<para>
- Property files use the ISO 8859-1 which does not cover the full unicode charset and language such as arab would not be supported natively and require the use of escaping, leading the files to be barely maintainable
+ Property files use the ISO 8859-1 which does not cover the
+ full unicode charset and language such as Arabic would not be
+ supported natively and require the use of escaping, leading the
+ files to be barely maintainable.
</para>
</listitem>
<listitem>
<para>
- Tooling support for XML files is better than the tooling for Java property files and usually the XML editor cope very well with the file encoding.
+ Tooling support for XML files is better than the tooling for
+ Java property files and usually the XML editor cope very well with
+ the file encoding.
</para>
</listitem>
</itemizedlist>
</section>
-
+
<section id="sect-Reference_Guide-XML_Resources_Bundles-Portal_support">
<title>Portal support</title>
<para>
- In order to be loaded by the portal at runtime (actually the resource bundle service), the name of the file must be the same as a property file but instead of ending with the <emphasis role="bold">.properties</emphasis> suffix, it ends with the <emphasis role="bold">.xml</emphasis> suffix. For instance <emphasis role="bold"> AccountPortlet <emphasis role="bold">ar.xml</emphasis> instead of <emphasis>AccountPortlet</emphasis> ar.properties </emphasis> .
+ In order to be loaded by the portal at runtime (actually the resource
+ bundle service), the name of the file must be the same as a property
+ file but instead of ending with the
+ <emphasis role="bold">.properties</emphasis>
+ suffix, it ends with the
+ <emphasis role="bold">.xml</emphasis>
+ suffix. For instance
+ <emphasis role="bold">
+ AccountPortlet_ar.xml</emphasis>
+ instead of
+ <emphasis role="bold">AccountPortlet_ar.properties</emphasis>.
</para>
</section>
-
+
<section id="sect-Reference_Guide-XML_Resources_Bundles-XML_format">
<title>XML format</title>
<para>
- The XML format is very simple and has been developed based on the DRY (Don't Repeat Yourself) principle. Usually resource bundle keys are hierarchically defined and we can leverage the hierarchic nature of the XML for that purpose. Here is an example of turning a property file into an XML resource bundle file:
+ The XML format is very simple and has been developed based on
+ the DRY (Don't Repeat Yourself) principle. Usually resource bundle
+ keys are hierarchically defined and we can leverage the hierarchic
+ nature of the XML for that purpose. Here is an example of turning a
+ property file into an XML resource bundle file:
</para>
- <para>
- <STYLE type="text/css"> .code {width: 97%} </STYLE>
- </para>
<programlisting>UIAccountForm.tab.label.AccountInputSet = ...
UIAccountForm.tab.label.UIUserProfileInputSet = ...
@@ -73,29 +75,29 @@
UIAccountForm.action.Reset= ...
</programlisting>
-<programlisting><?xml version="1.0" encoding="UTF-8"?>
-<bundle>
- <UIAccountForm>
- <tab>
- <label>
- <AccountInputSet>...</AccountInputSet>
- <UIUserProfileInputSet>...</UIUserProfileInputSet>
- </label>
- </tab>
- <label>
- <Profile>...</Profile>
- <HomeInfo>...</HomeInfo>
- <BusinessInfo>...</BusinessInfo>
- <password>...</password>
- <Confirmpassword>...</Confirmpassword>
- <email>...</email>
- </label>
- <action>
- <Reset>...</Reset>
- </action>
- </UIAccountForm>
-</bundle>
-</programlisting>
+<programlisting role="XML"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
+<bundle>
+ <UIAccountForm>
+ <tab>
+ <label>
+ <AccountInputSet>...</AccountInputSet>
+ <UIUserProfileInputSet>...</UIUserProfileInputSet>
+ </label>
+ </tab>
+ <label>
+ <Profile>...</Profile>
+ <HomeInfo>...</HomeInfo>
+ <BusinessInfo>...</BusinessInfo>
+ <password>...</password>
+ <Confirmpassword>...</Confirmpassword>
+ <email>...</email>
+ </label>
+ <action>
+ <Reset>...</Reset>
+ </action>
+ </UIAccountForm>
+</bundle>
+]]></programlisting>
</section>
</section>
15 years
gatein SVN: r970 - in portal/trunk: web/portal/src/main/webapp/groovy/portal/webui/application and 1 other directories.
by do-not-reply@jboss.org
Author: tan_pham_dinh
Date: 2009-12-08 02:15:13 -0500 (Tue, 08 Dec 2009)
New Revision: 970
Modified:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIApplicationOrganizer.java
portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/application/UIApplicationList.gtmpl
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIApplicationList.java
Log:
GTNPORTAL-361: Correct thumbnail of gadgets in Application Registry
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIApplicationOrganizer.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIApplicationOrganizer.java 2009-12-08 04:37:18 UTC (rev 969)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIApplicationOrganizer.java 2009-12-08 07:15:13 UTC (rev 970)
@@ -19,6 +19,8 @@
package org.exoplatform.applicationregistry.webui.component;
+import org.exoplatform.application.gadget.Gadget;
+import org.exoplatform.application.gadget.GadgetRegistryService;
import org.exoplatform.application.registry.Application;
import org.exoplatform.application.registry.ApplicationCategory;
import org.exoplatform.application.registry.ApplicationRegistryService;
@@ -128,14 +130,25 @@
public void setSelectedCategory(ApplicationCategory category) throws Exception
{
selectedCategory = category;
- ApplicationRegistryService service = getApplicationComponent(ApplicationRegistryService.class);
- applications =
- service.getApplications(selectedCategory, new Util.ApplicationComparator(), new ApplicationType[0]);
+ applications = category.getApplications();
if (applications == null || applications.isEmpty())
{
setSelectedApplication(null);
return;
}
+
+ //Correct IconUrl of gadget
+ GadgetRegistryService gadgetService = getApplicationComponent(GadgetRegistryService.class);
+ for (Application app : applications)
+ {
+ if (ApplicationType.GADGET.equals(app.getType()))
+ {
+ Gadget gadget = gadgetService.getGadget(app.getApplicationName());
+ if (gadget != null)
+ app.setIconURL(gadget.getThumbnail());
+ }
+ }
+
setSelectedApplication(applications.get(0));
}
Modified: portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/application/UIApplicationList.gtmpl
===================================================================
--- portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/application/UIApplicationList.gtmpl 2009-12-08 04:37:18 UTC (rev 969)
+++ portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/application/UIApplicationList.gtmpl 2009-12-08 07:15:13 UTC (rev 970)
@@ -34,7 +34,7 @@
<% if(isSelected) { %>
<div class="UIVTabContent" style="display: block">
<%
- for(application in category.getApplications()) {
+ for(application in uicomponent.getApplications()) {
String applicationLabel = application.getDisplayName();
if(applicationLabel.length() > 30) applicationLabel = applicationLabel.substring(0, 27) + "...";
String srcBG = application.getIconURL();
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIApplicationList.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIApplicationList.java 2009-12-08 04:37:18 UTC (rev 969)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIApplicationList.java 2009-12-08 07:15:13 UTC (rev 970)
@@ -19,9 +19,12 @@
package org.exoplatform.portal.webui.application;
+import org.exoplatform.application.gadget.Gadget;
+import org.exoplatform.application.gadget.GadgetRegistryService;
import org.exoplatform.application.registry.Application;
import org.exoplatform.application.registry.ApplicationCategory;
import org.exoplatform.application.registry.ApplicationRegistryService;
+import org.exoplatform.portal.config.model.ApplicationType;
import org.exoplatform.portal.webui.util.Util;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.EventConfig;
@@ -101,6 +104,33 @@
}
}
+ public List<Application> getApplications()
+ {
+ if (selectedCategory == null)
+ return null;
+ List<Application> apps = selectedCategory.getApplications();
+
+ //Correct IconURL of Gadget
+ GadgetRegistryService gadgetService = getApplicationComponent(GadgetRegistryService.class);
+ for (Application app : apps)
+ {
+ if (ApplicationType.GADGET.equals(app.getType()))
+ {
+ try
+ {
+ Gadget gadget;
+ gadget = gadgetService.getGadget(app.getApplicationName());
+ if (gadget != null)
+ app.setIconURL(gadget.getThumbnail());
+ }
+ catch (Exception e)
+ {
+ }
+ }
+ }
+ return apps;
+ }
+
public List<ApplicationCategory> getCategories()
{
return categories;
15 years
gatein SVN: r969 - portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal.
by do-not-reply@jboss.org
Author: liem_nguyen
Date: 2009-12-07 23:37:18 -0500 (Mon, 07 Dec 2009)
New Revision: 969
Modified:
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js
Log:
GTNPORTAL-334 Can drag & drop gadget in Dashboard workspace when click switch view mode
Don't show portlet controls in container view mode
Modified: portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js 2009-12-08 03:33:42 UTC (rev 968)
+++ portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js 2009-12-08 04:37:18 UTC (rev 969)
@@ -101,7 +101,7 @@
DOMUtil.replaceClass(normalBlock, "NormalContainerBlock", "OverContainerBlock");
}
newLayer.parentNode.style.top = -height + "px";
- editBlock.style.display = "block";
+ editBlock.style.display = "block";
} else {
editBlock.style.display = "none";
if(!DOMUtil.hasClass(portlet, "UIPortlet")) {
@@ -109,6 +109,13 @@
DOMUtil.replaceClass(normalBlock, "OverContainerBlock", "NormalContainerBlock");
}
}
+
+ // Don't displat portlet control when View Container
+ var controlPortlet = DOMUtil.findFirstDescendantByClass(editBlock, "div", "CONTROL-PORTLET");
+ controlPortlet.style.display = "block";
+ if (controlPortlet != null && eXo.portal.portalMode == 4) {
+ controlPortlet.style.display = "none";
+ }
};
UIPortal.prototype.getUIPortlets = function() {
15 years
gatein SVN: r968 - portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal.
by do-not-reply@jboss.org
Author: liem_nguyen
Date: 2009-12-07 22:33:42 -0500 (Mon, 07 Dec 2009)
New Revision: 968
Modified:
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js
Log:
GTNPORTAL-334 Can drag & drop gadget in Dashboard workspace when click switch view mode
Modified: portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js 2009-12-08 01:03:58 UTC (rev 967)
+++ portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js 2009-12-08 03:33:42 UTC (rev 968)
@@ -63,7 +63,7 @@
var DOMUtil = eXo.core.DOMUtil;
if(!eXo.portal.portalMode || eXo.portal.isInDragging) return;
if(eXo.portal.portalMode <= 2 && DOMUtil.hasClass(portlet, "UIContainer")) return;
- if(eXo.portal.portalMode > 2 && DOMUtil.hasClass(portlet, "UIPortlet")) return;
+ if(eXo.portal.portalMode > 2 && eXo.portal.portalMode != 4 && DOMUtil.hasClass(portlet, "UIPortlet")) return;
if(!event) event = window.event;
event.cancelBubble = true;
15 years
gatein SVN: r967 - portal/trunk/packaging/pkg.
by do-not-reply@jboss.org
Author: wesleyhales
Date: 2009-12-07 20:03:58 -0500 (Mon, 07 Dec 2009)
New Revision: 967
Modified:
portal/trunk/packaging/pkg/pom.xml
Log:
somebody forgot to add kernel version
Modified: portal/trunk/packaging/pkg/pom.xml
===================================================================
--- portal/trunk/packaging/pkg/pom.xml 2009-12-07 22:46:25 UTC (rev 966)
+++ portal/trunk/packaging/pkg/pom.xml 2009-12-08 01:03:58 UTC (rev 967)
@@ -43,6 +43,7 @@
<dependency>
<groupId>org.exoplatform.kernel</groupId>
<artifactId>kernel.packaging.module</artifactId>
+ <version>${org.exoplatform.kernel.version}</version>
<type>js</type>
</dependency>
<dependency>
15 years
gatein SVN: r966 - in portal/trunk: component/pc and 7 other directories.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2009-12-07 17:46:25 -0500 (Mon, 07 Dec 2009)
New Revision: 966
Modified:
portal/trunk/component/pc/pom.xml
portal/trunk/component/resources/pom.xml
portal/trunk/component/scripting/pom.xml
portal/trunk/component/test/core/pom.xml
portal/trunk/component/wsrp/pom.xml
portal/trunk/component/xml-parser/pom.xml
portal/trunk/packaging/pkg/pom.xml
portal/trunk/pom.xml
portal/trunk/webui/portal/pom.xml
Log:
- exclude slf4j binding for log4j coming from the kernel as we want to use our binding
- define the dependency management for the kernel module for the whole build
Modified: portal/trunk/component/pc/pom.xml
===================================================================
--- portal/trunk/component/pc/pom.xml 2009-12-07 20:28:02 UTC (rev 965)
+++ portal/trunk/component/pc/pom.xml 2009-12-07 22:46:25 UTC (rev 966)
@@ -101,7 +101,6 @@
<dependency>
<groupId>org.exoplatform.kernel</groupId>
<artifactId>exo.kernel.container</artifactId>
- <version>${org.exoplatform.kernel.version}</version>
</dependency>
</dependencies>
Modified: portal/trunk/component/resources/pom.xml
===================================================================
--- portal/trunk/component/resources/pom.xml 2009-12-07 20:28:02 UTC (rev 965)
+++ portal/trunk/component/resources/pom.xml 2009-12-07 22:46:25 UTC (rev 966)
@@ -36,19 +36,16 @@
<dependency>
<groupId>org.exoplatform.kernel</groupId>
<artifactId>exo.kernel.commons</artifactId>
- <version>${org.exoplatform.kernel.version}</version>
</dependency>
<dependency>
<groupId>org.exoplatform.kernel</groupId>
<artifactId>exo.kernel.component.common</artifactId>
- <version>${org.exoplatform.kernel.version}</version>
</dependency>
<dependency>
<groupId>org.exoplatform.kernel</groupId>
<artifactId>exo.kernel.component.command</artifactId>
- <version>${org.exoplatform.kernel.version}</version>
</dependency>
<dependency>
Modified: portal/trunk/component/scripting/pom.xml
===================================================================
--- portal/trunk/component/scripting/pom.xml 2009-12-07 20:28:02 UTC (rev 965)
+++ portal/trunk/component/scripting/pom.xml 2009-12-07 22:46:25 UTC (rev 966)
@@ -35,7 +35,6 @@
<dependency>
<groupId>org.exoplatform.kernel</groupId>
<artifactId>exo.kernel.component.cache</artifactId>
- <version>${org.exoplatform.kernel.version}</version>
</dependency>
<dependency>
Modified: portal/trunk/component/test/core/pom.xml
===================================================================
--- portal/trunk/component/test/core/pom.xml 2009-12-07 20:28:02 UTC (rev 965)
+++ portal/trunk/component/test/core/pom.xml 2009-12-07 22:46:25 UTC (rev 966)
@@ -47,28 +47,19 @@
<dependency>
<groupId>org.exoplatform.kernel</groupId>
<artifactId>exo.kernel.commons</artifactId>
- <version>${org.exoplatform.kernel.version}</version>
</dependency>
<dependency>
<groupId>org.exoplatform.kernel</groupId>
<artifactId>exo.kernel.component.common</artifactId>
- <version>${org.exoplatform.kernel.version}</version>
</dependency>
<dependency>
<groupId>org.exoplatform.kernel</groupId>
<artifactId>exo.kernel.container</artifactId>
- <version>${org.exoplatform.kernel.version}</version>
</dependency>
<dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-simple</artifactId>
- <version>1.5.6</version>
- </dependency>
-
- <dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.2.2</version>
Modified: portal/trunk/component/wsrp/pom.xml
===================================================================
--- portal/trunk/component/wsrp/pom.xml 2009-12-07 20:28:02 UTC (rev 965)
+++ portal/trunk/component/wsrp/pom.xml 2009-12-07 22:46:25 UTC (rev 966)
@@ -81,7 +81,6 @@
<dependency>
<groupId>org.exoplatform.kernel</groupId>
<artifactId>exo.kernel.container</artifactId>
- <version>${org.exoplatform.kernel.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
Modified: portal/trunk/component/xml-parser/pom.xml
===================================================================
--- portal/trunk/component/xml-parser/pom.xml 2009-12-07 20:28:02 UTC (rev 965)
+++ portal/trunk/component/xml-parser/pom.xml 2009-12-07 22:46:25 UTC (rev 966)
@@ -39,7 +39,6 @@
<dependency>
<groupId>org.exoplatform.kernel</groupId>
<artifactId>exo.kernel.component.common</artifactId>
- <version>${org.exoplatform.kernel.version}</version>
</dependency>
<dependency>
Modified: portal/trunk/packaging/pkg/pom.xml
===================================================================
--- portal/trunk/packaging/pkg/pom.xml 2009-12-07 20:28:02 UTC (rev 965)
+++ portal/trunk/packaging/pkg/pom.xml 2009-12-07 22:46:25 UTC (rev 966)
@@ -43,7 +43,6 @@
<dependency>
<groupId>org.exoplatform.kernel</groupId>
<artifactId>kernel.packaging.module</artifactId>
- <version>${org.exoplatform.kernel.version}</version>
<type>js</type>
</dependency>
<dependency>
Modified: portal/trunk/pom.xml
===================================================================
--- portal/trunk/pom.xml 2009-12-07 20:28:02 UTC (rev 965)
+++ portal/trunk/pom.xml 2009-12-07 22:46:25 UTC (rev 966)
@@ -86,6 +86,46 @@
<module>packaging</module>
</modules>
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.commons</artifactId>
+ <version>${org.exoplatform.kernel.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.component.cache</artifactId>
+ <version>${org.exoplatform.kernel.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.component.command</artifactId>
+ <version>${org.exoplatform.kernel.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.component.common</artifactId>
+ <version>${org.exoplatform.kernel.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.container</artifactId>
+ <version>${org.exoplatform.kernel.version}</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
Modified: portal/trunk/webui/portal/pom.xml
===================================================================
--- portal/trunk/webui/portal/pom.xml 2009-12-07 20:28:02 UTC (rev 965)
+++ portal/trunk/webui/portal/pom.xml 2009-12-07 22:46:25 UTC (rev 966)
@@ -35,13 +35,11 @@
<dependency>
<groupId>org.exoplatform.kernel</groupId>
<artifactId>exo.kernel.commons</artifactId>
- <version>${org.exoplatform.kernel.version}</version>
</dependency>
<dependency>
<groupId>org.exoplatform.kernel</groupId>
<artifactId>exo.kernel.component.common</artifactId>
- <version>${org.exoplatform.kernel.version}</version>
</dependency>
<dependency>
15 years
gatein SVN: r965 - in portal/trunk: component/portal/src/test/java/conf/portal and 6 other directories.
by do-not-reply@jboss.org
Author: bdaw
Date: 2009-12-07 15:28:02 -0500 (Mon, 07 Dec 2009)
New Revision: 965
Added:
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/mappings/
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/mappings/HibernateIdentityObject.hbm.xml
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/mappings/HibernateIdentityObjectAttribute.hbm.xml
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/mappings/HibernateIdentityObjectCredential.hbm.xml
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/mappings/HibernateIdentityObjectCredentialType.hbm.xml
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/mappings/HibernateIdentityObjectRelationship.hbm.xml
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/mappings/HibernateIdentityObjectRelationshipName.hbm.xml
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/mappings/HibernateIdentityObjectRelationshipType.hbm.xml
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/mappings/HibernateIdentityObjectType.hbm.xml
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/mappings/HibernateRealm.hbm.xml
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/sybase-mappings/
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/sybase-mappings/HibernateIdentityObject.hbm.xml
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/sybase-mappings/HibernateIdentityObjectAttribute.hbm.xml
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/sybase-mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/sybase-mappings/HibernateIdentityObjectCredential.hbm.xml
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/sybase-mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/sybase-mappings/HibernateIdentityObjectCredentialType.hbm.xml
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/sybase-mappings/HibernateIdentityObjectRelationship.hbm.xml
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/sybase-mappings/HibernateIdentityObjectRelationshipName.hbm.xml
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/sybase-mappings/HibernateIdentityObjectRelationshipType.hbm.xml
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/sybase-mappings/HibernateIdentityObjectType.hbm.xml
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/sybase-mappings/HibernateRealm.hbm.xml
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/picketlink-idm-config.xml
Removed:
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/idm-config.xml
Modified:
portal/trunk/component/application-registry/src/test/java/conf/portal/idm-configuration.xml
portal/trunk/component/portal/src/test/java/conf/portal/idm-configuration.xml
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/idm-configuration.xml
Log:
- extract picketlink idm hibernate mapping files
Modified: portal/trunk/component/application-registry/src/test/java/conf/portal/idm-configuration.xml
===================================================================
--- portal/trunk/component/application-registry/src/test/java/conf/portal/idm-configuration.xml 2009-12-07 18:05:05 UTC (rev 964)
+++ portal/trunk/component/application-registry/src/test/java/conf/portal/idm-configuration.xml 2009-12-07 20:28:02 UTC (rev 965)
@@ -30,7 +30,7 @@
<init-params>
<value-param>
<name>config</name>
- <value>war:/conf/organization/idm-config.xml</value>
+ <value>war:/conf/organization/picketlink-idm/picketlink-idm-config.xml</value>
</value-param>
</init-params>
</component>
Modified: portal/trunk/component/portal/src/test/java/conf/portal/idm-configuration.xml
===================================================================
--- portal/trunk/component/portal/src/test/java/conf/portal/idm-configuration.xml 2009-12-07 18:05:05 UTC (rev 964)
+++ portal/trunk/component/portal/src/test/java/conf/portal/idm-configuration.xml 2009-12-07 20:28:02 UTC (rev 965)
@@ -30,7 +30,7 @@
<init-params>
<value-param>
<name>config</name>
- <value>war:/conf/organization/idm-config.xml</value>
+ <value>war:/conf/organization/picketlink-idm/picketlink-idm-config.xml</value>
</value-param>
</init-params>
</component>
Added: portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/mappings/HibernateIdentityObject.hbm.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/mappings/HibernateIdentityObject.hbm.xml (rev 0)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/mappings/HibernateIdentityObject.hbm.xml 2009-12-07 20:28:02 UTC (rev 965)
@@ -0,0 +1,95 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class name="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObject"
+ table="jbid_io">
+ <cache usage="read-write"/>
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="ID" />
+ <generator class="native"/>
+ </id>
+ <set name="attributes"
+ inverse="true"
+ cascade="all, delete-orphan"
+ lazy="extra"
+ fetch="subselect">
+ <cache usage="read-write"/>
+ <key>
+ <column name="IDENTITY_OBJECT_ID" />
+ </key>
+ <one-to-many class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectAttribute" />
+ </set>
+ <set name="credentials"
+ inverse="true"
+ cascade="all, delete-orphan"
+ lazy="extra"
+ fetch="subselect">
+ <cache usage="read-write"/>
+ <key>
+ <column name="IDENTITY_OBJECT_ID" />
+ </key>
+ <one-to-many class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectCredential" />
+ </set>
+ <set name="fromRelationships"
+ inverse="true"
+ lazy="extra"
+ fetch="subselect">
+ <cache usage="read-write"/>
+ <key>
+ <column name="FROM_IDENTITY" />
+ </key>
+ <one-to-many class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectRelationship" />
+ </set>
+ <many-to-one name="identityType"
+ class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectType"
+ access="field"
+ fetch="join"
+ lazy="false">
+ <column name="IDENTITY_TYPE"
+ not-null="true"
+ unique-key="id"/>
+ </many-to-one>
+ <property name="name"
+ type="java.lang.String"
+ access="field"
+ lazy="false">
+ <column name="NAME"
+ not-null="true"
+ unique-key="id"/>
+ </property>
+ <map name="properties"
+ table="jbid_io_props"
+ cascade="all, delete-orphan"
+ lazy="extra"
+ fetch="subselect">
+ <cache usage="read-write"/>
+ <key column="PROP_ID"/>
+ <map-key type="string"
+ column="PROP_NAME"/>
+ <element type="string"
+ column="PROP_VALUE"
+ not-null="true"/>
+ </map>
+ <many-to-one name="realm"
+ class="org.picketlink.idm.impl.model.hibernate.HibernateRealm"
+ access="field"
+ fetch="select">
+ <column name="REALM"
+ not-null="true"
+ unique-key="id"/>
+ </many-to-one>
+ <set name="toRelationships"
+ inverse="true"
+ lazy="extra"
+ fetch="subselect">
+ <cache usage="read-write"/>
+ <key>
+ <column name="TO_IDENTITY" />
+ </key>
+ <one-to-many class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectRelationship" />
+ </set>
+ </class>
+</hibernate-mapping>
Added: portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/mappings/HibernateIdentityObjectAttribute.hbm.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/mappings/HibernateIdentityObjectAttribute.hbm.xml (rev 0)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/mappings/HibernateIdentityObjectAttribute.hbm.xml 2009-12-07 20:28:02 UTC (rev 965)
@@ -0,0 +1,55 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class name="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectAttribute"
+ table="jbid_io_attr">
+ <cache usage="read-write"/>
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="ATTRIBUTE_ID" />
+ <generator class="native"/>
+ </id>
+ <many-to-one name="identityObject"
+ class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObject"
+ access="field"
+ fetch="join">
+ <column name="IDENTITY_OBJECT_ID" not-null="true" unique-key="id"/>
+ </many-to-one>
+ <property name="name"
+ type="java.lang.String"
+ access="property"
+ lazy="false">
+ <column name="NAME"
+ unique-key="id" />
+ </property>
+ <property name="type"
+ type="java.lang.String"
+ access="field"
+ lazy="false"
+ not-null="true">
+ <column name="ATTRIBUTE_TYPE"/>
+ </property>
+ <set name="textValues"
+ table="jbid_io_attr_text_values"
+ cascade="all, delete-orphan"
+ access="field"
+ lazy="extra"
+ fetch="subselect">
+ <cache usage="read-write"/>
+ <key column="TEXT_ATTR_VALUE_ID"/>
+ <element type="string"
+ column="ATTR_VALUE"/>
+ </set>
+ <many-to-one name="binaryValue"
+ class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectAttributeBinaryValue"
+ not-null="false"
+ column="BIN_VALUE_ID"
+ unique="false"
+ lazy="proxy"
+ access="field"
+ fetch="select"
+ cascade="all"/>
+ </class>
+</hibernate-mapping>
Added: portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml (rev 0)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml 2009-12-07 20:28:02 UTC (rev 965)
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class name="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectAttributeBinaryValue"
+ table="jbid_attr_bin_value">
+ <cache usage="read-write"/>
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="BIN_VALUE_ID" />
+ <generator class="native"/>
+ </id>
+ <property name="value"
+ type="org.hibernate.type.PrimitiveByteArrayBlobType"
+ access="field"
+ lazy="false"
+ not-null="true">
+ <column name="VALUE" length="10240000"/>
+ </property>
+ </class>
+</hibernate-mapping>
Added: portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/mappings/HibernateIdentityObjectCredential.hbm.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/mappings/HibernateIdentityObjectCredential.hbm.xml (rev 0)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/mappings/HibernateIdentityObjectCredential.hbm.xml 2009-12-07 20:28:02 UTC (rev 965)
@@ -0,0 +1,62 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class name="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectCredential"
+ table="jbid_io_creden">
+ <cache usage="read-write"/>
+
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="ID" />
+ <generator class="native"/>
+ </id>
+ <many-to-one name="binaryValue"
+ class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectCredentialBinaryValue"
+ not-null="false"
+ column="BIN_VALUE_ID"
+ unique="false"
+ lazy="proxy"
+ access="field"
+ fetch="select"
+ cascade="all"/>
+ <many-to-one name="identityObject"
+ class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObject"
+ access="field"
+ fetch="select"
+ lazy="proxy">
+ <column name="IDENTITY_OBJECT_ID"
+ not-null="true"
+ unique-key="id" />
+ </many-to-one>
+ <map name="properties"
+ table="jbid_io_creden_props"
+ cascade="all, delete-orphan"
+ lazy="extra"
+ fetch="subselect">
+ <cache usage="read-write"/>
+ <key column="PROP_ID"/>
+ <map-key type="string"
+ column="PROP_NAME"/>
+ <element type="string"
+ column="PROP_VALUE"
+ not-null="true"/>
+ </map>
+ <property name="textValue"
+ type="java.lang.String"
+ access="field"
+ lazy="false">
+ <column name="TEXT" />
+ </property>
+ <many-to-one name="type"
+ class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectCredentialType"
+ access="field"
+ fetch="join"
+ lazy="false">
+ <column name="CREDENTIAL_TYPE"
+ not-null="true"
+ unique-key="id"/>
+ </many-to-one>
+ </class>
+</hibernate-mapping>
Added: portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml (rev 0)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml 2009-12-07 20:28:02 UTC (rev 965)
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class name="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectCredentialBinaryValue"
+ table="jbid_creden_bin_value">
+ <cache usage="read-write"/>
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="BIN_VALUE_ID" />
+ <generator class="native"/>
+ </id>
+ <property name="value"
+ type="org.hibernate.type.PrimitiveByteArrayBlobType"
+ access="field"
+ lazy="false"
+ not-null="true">
+ <column name="VALUE" length="10240000"/>
+ </property>
+ </class>
+</hibernate-mapping>
Added: portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/mappings/HibernateIdentityObjectCredentialType.hbm.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/mappings/HibernateIdentityObjectCredentialType.hbm.xml (rev 0)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/mappings/HibernateIdentityObjectCredentialType.hbm.xml 2009-12-07 20:28:02 UTC (rev 965)
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class name="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectCredentialType"
+ table="jbid_io_creden_type">
+ <cache usage="read-write"/>
+
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="ID" />
+ <generator class="native"/>
+ </id>
+ <property name="name"
+ type="java.lang.String"
+ access="field"
+ lazy="false">
+ <column name="NAME"
+ unique="true" />
+ </property>
+ </class>
+</hibernate-mapping>
Added: portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/mappings/HibernateIdentityObjectRelationship.hbm.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/mappings/HibernateIdentityObjectRelationship.hbm.xml (rev 0)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/mappings/HibernateIdentityObjectRelationship.hbm.xml 2009-12-07 20:28:02 UTC (rev 965)
@@ -0,0 +1,63 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class name="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectRelationship"
+ table="jbid_io_rel">
+ <cache usage="read-write"/>
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="ID" />
+ <generator class="native"/>
+ </id>
+ <many-to-one name="fromIdentityObject"
+ class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObject"
+ access="field"
+ fetch="select"
+ lazy="proxy">
+ <column name="FROM_IDENTITY"
+ not-null="true"
+ unique-key="id"/>
+ </many-to-one>
+ <many-to-one name="name"
+ class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipName"
+ access="field"
+ fetch="join"
+ lazy="proxy">
+ <column name="NAME"
+ unique-key="id"/>
+ </many-to-one>
+ <many-to-one name="toIdentityObject"
+ class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObject"
+ access="field"
+ fetch="select"
+ lazy="proxy">
+ <column name="TO_IDENTITY"
+ not-null="true"
+ unique-key="id"/>
+ </many-to-one>
+ <many-to-one name="type"
+ class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipType"
+ access="field"
+ fetch="select"
+ lazy="proxy">
+ <column name="REL_TYPE"
+ not-null="true"
+ unique-key="id" />
+ </many-to-one>
+ <map name="properties"
+ table="jbid_io_rel_props"
+ cascade="all, delete-orphan"
+ fetch="subselect"
+ lazy="extra">
+ <cache usage="read-write"/>
+ <key column="PROP_ID"/>
+ <map-key type="string"
+ column="PROP_NAME"/>
+ <element type="string"
+ column="PROP_VALUE"
+ not-null="true"/>
+ </map>
+ </class>
+</hibernate-mapping>
Added: portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/mappings/HibernateIdentityObjectRelationshipName.hbm.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/mappings/HibernateIdentityObjectRelationshipName.hbm.xml (rev 0)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/mappings/HibernateIdentityObjectRelationshipName.hbm.xml 2009-12-07 20:28:02 UTC (rev 965)
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class name="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipName"
+ table="jbid_io_rel_name">
+ <cache usage="read-write"/>
+
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="ID"/>
+ <generator class="native"/>
+ </id>
+ <property name="name"
+ type="java.lang.String"
+ access="field"
+ lazy="false">
+ <column name="NAME"
+ not-null="true"
+ unique="true"
+ unique-key="id"/>
+ </property>
+ <map name="properties"
+ table="jbid_io_rel_name_props"
+ cascade="all, delete-orphan"
+ lazy="extra"
+ fetch="subselect">
+ <cache usage="read-write"/>
+ <key column="PROP_ID"/>
+ <map-key type="string"
+ column="PROP_NAME"/>
+ <element type="string"
+ column="PROP_VALUE"
+ not-null="true"/>
+ </map>
+ <many-to-one name="realm"
+ class="org.picketlink.idm.impl.model.hibernate.HibernateRealm"
+ access="field"
+ fetch="select"
+ lazy="proxy">
+ <column name="REALM"
+ not-null="true"
+ unique-key="id"/>
+ </many-to-one>
+
+ </class>
+</hibernate-mapping>
Added: portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/mappings/HibernateIdentityObjectRelationshipType.hbm.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/mappings/HibernateIdentityObjectRelationshipType.hbm.xml (rev 0)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/mappings/HibernateIdentityObjectRelationshipType.hbm.xml 2009-12-07 20:28:02 UTC (rev 965)
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class name="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipType"
+ table="jbid_io_rel_type">
+ <cache usage="read-write"/>
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="ID" />
+ <generator class="native"/>
+ </id>
+ <property name="name"
+ type="java.lang.String"
+ access="field"
+ lazy="false">
+ <column name="NAME"
+ not-null="true"
+ unique="true" />
+ </property>
+ </class>
+</hibernate-mapping>
Added: portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/mappings/HibernateIdentityObjectType.hbm.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/mappings/HibernateIdentityObjectType.hbm.xml (rev 0)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/mappings/HibernateIdentityObjectType.hbm.xml 2009-12-07 20:28:02 UTC (rev 965)
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class name="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectType"
+ table="jbid_io_type">
+ <cache usage="read-write"/>
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="ID" />
+ <generator class="native"/>
+ </id>
+ <property name="name"
+ type="java.lang.String"
+ access="field"
+ lazy="false">
+ <column name="NAME"
+ not-null="true"
+ unique="true" />
+ </property>
+ </class>
+</hibernate-mapping>
Added: portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/mappings/HibernateRealm.hbm.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/mappings/HibernateRealm.hbm.xml (rev 0)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/mappings/HibernateRealm.hbm.xml 2009-12-07 20:28:02 UTC (rev 965)
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class name="org.picketlink.idm.impl.model.hibernate.HibernateRealm"
+ table="jbid_realm">
+ <cache usage="read-write"/>
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="ID" />
+ <generator class="native"/>
+ </id>
+ <property name="name"
+ type="java.lang.String"
+ access="field"
+ lazy="false">
+ <column name="NAME"
+ not-null="true"
+ unique-key="id"/>
+ </property>
+ <map name="properties"
+ table="jbid_real_props"
+ cascade="all, delete-orphan"
+ fetch="subselect"
+ lazy="extra">
+ <cache usage="read-write"/>
+ <key column="PROP_ID"/>
+ <map-key type="string"
+ column="PROP_NAME"/>
+ <element type="string"
+ column="PROP_VALUE"
+ not-null="true"/>
+ </map>
+ </class>
+</hibernate-mapping>
Added: portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/sybase-mappings/HibernateIdentityObject.hbm.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/sybase-mappings/HibernateIdentityObject.hbm.xml (rev 0)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/sybase-mappings/HibernateIdentityObject.hbm.xml 2009-12-07 20:28:02 UTC (rev 965)
@@ -0,0 +1,95 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class name="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObject"
+ table="jbid_io">
+ <cache usage="read-write"/>
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="ID" />
+ <generator class="native"/>
+ </id>
+ <set name="attributes"
+ inverse="true"
+ cascade="all, delete-orphan"
+ lazy="extra"
+ fetch="subselect">
+ <cache usage="read-write"/>
+ <key>
+ <column name="IDENTITY_OBJECT_ID" />
+ </key>
+ <one-to-many class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectAttribute" />
+ </set>
+ <set name="credentials"
+ inverse="true"
+ cascade="all, delete-orphan"
+ lazy="extra"
+ fetch="subselect">
+ <cache usage="read-write"/>
+ <key>
+ <column name="IDENTITY_OBJECT_ID" />
+ </key>
+ <one-to-many class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectCredential" />
+ </set>
+ <set name="fromRelationships"
+ inverse="true"
+ lazy="extra"
+ fetch="subselect">
+ <cache usage="read-write"/>
+ <key>
+ <column name="FROM_IDENTITY" />
+ </key>
+ <one-to-many class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectRelationship" />
+ </set>
+ <many-to-one name="identityType"
+ class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectType"
+ access="field"
+ fetch="join"
+ lazy="false">
+ <column name="IDENTITY_TYPE"
+ not-null="true"
+ unique-key="id"/>
+ </many-to-one>
+ <property name="name"
+ type="java.lang.String"
+ access="field"
+ lazy="false">
+ <column name="NAME"
+ not-null="true"
+ unique-key="id"/>
+ </property>
+ <map name="properties"
+ table="jbid_io_props"
+ cascade="all, delete-orphan"
+ lazy="extra"
+ fetch="subselect">
+ <cache usage="read-write"/>
+ <key column="PROP_ID"/>
+ <map-key type="string"
+ column="PROP_NAME"/>
+ <element type="string"
+ column="PROP_VALUE"
+ not-null="true"/>
+ </map>
+ <many-to-one name="realm"
+ class="org.picketlink.idm.impl.model.hibernate.HibernateRealm"
+ access="field"
+ fetch="select">
+ <column name="REALM"
+ not-null="true"
+ unique-key="id"/>
+ </many-to-one>
+ <set name="toRelationships"
+ inverse="true"
+ lazy="extra"
+ fetch="subselect">
+ <cache usage="read-write"/>
+ <key>
+ <column name="TO_IDENTITY" />
+ </key>
+ <one-to-many class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectRelationship" />
+ </set>
+ </class>
+</hibernate-mapping>
Added: portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/sybase-mappings/HibernateIdentityObjectAttribute.hbm.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/sybase-mappings/HibernateIdentityObjectAttribute.hbm.xml (rev 0)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/sybase-mappings/HibernateIdentityObjectAttribute.hbm.xml 2009-12-07 20:28:02 UTC (rev 965)
@@ -0,0 +1,55 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class name="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectAttribute"
+ table="jbid_io_attr">
+ <cache usage="read-write"/>
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="ATTRIBUTE_ID" />
+ <generator class="native"/>
+ </id>
+ <many-to-one name="identityObject"
+ class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObject"
+ access="field"
+ fetch="join">
+ <column name="IDENTITY_OBJECT_ID" not-null="true" unique-key="id"/>
+ </many-to-one>
+ <property name="name"
+ type="java.lang.String"
+ access="property"
+ lazy="false">
+ <column name="NAME"
+ unique-key="id" />
+ </property>
+ <property name="type"
+ type="java.lang.String"
+ access="field"
+ lazy="false"
+ not-null="true">
+ <column name="ATTRIBUTE_TYPE"/>
+ </property>
+ <set name="textValues"
+ table="jbid_io_attr_text_values"
+ cascade="all, delete-orphan"
+ access="field"
+ lazy="extra"
+ fetch="subselect">
+ <cache usage="read-write"/>
+ <key column="TEXT_ATTR_VALUE_ID"/>
+ <element type="string"
+ column="ATTR_VALUE"/>
+ </set>
+ <many-to-one name="binaryValue"
+ class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectAttributeBinaryValue"
+ not-null="false"
+ column="BIN_VALUE_ID"
+ unique="false"
+ lazy="proxy"
+ access="field"
+ fetch="select"
+ cascade="all"/>
+ </class>
+</hibernate-mapping>
Added: portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/sybase-mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/sybase-mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml (rev 0)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/sybase-mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml 2009-12-07 20:28:02 UTC (rev 965)
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class name="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectAttributeBinaryValue"
+ table="jbid_attr_bin_value">
+ <cache usage="read-write"/>
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="BIN_VALUE_ID" />
+ <generator class="native"/>
+ </id>
+ <property name="value"
+ type="org.picketlink.idm.impl.model.hibernate.MaterializedBlobType"
+ access="field"
+ lazy="false"
+ not-null="true">
+ <column name="VALUE" length="10240000"/>
+ </property>
+ </class>
+</hibernate-mapping>
Added: portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/sybase-mappings/HibernateIdentityObjectCredential.hbm.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/sybase-mappings/HibernateIdentityObjectCredential.hbm.xml (rev 0)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/sybase-mappings/HibernateIdentityObjectCredential.hbm.xml 2009-12-07 20:28:02 UTC (rev 965)
@@ -0,0 +1,62 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class name="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectCredential"
+ table="jbid_io_creden">
+ <cache usage="read-write"/>
+
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="ID" />
+ <generator class="native"/>
+ </id>
+ <many-to-one name="binaryValue"
+ class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectCredentialBinaryValue"
+ not-null="false"
+ column="BIN_VALUE_ID"
+ unique="false"
+ lazy="proxy"
+ access="field"
+ fetch="select"
+ cascade="all"/>
+ <many-to-one name="identityObject"
+ class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObject"
+ access="field"
+ fetch="select"
+ lazy="proxy">
+ <column name="IDENTITY_OBJECT_ID"
+ not-null="true"
+ unique-key="id" />
+ </many-to-one>
+ <map name="properties"
+ table="jbid_io_creden_props"
+ cascade="all, delete-orphan"
+ lazy="extra"
+ fetch="subselect">
+ <cache usage="read-write"/>
+ <key column="PROP_ID"/>
+ <map-key type="string"
+ column="PROP_NAME"/>
+ <element type="string"
+ column="PROP_VALUE"
+ not-null="true"/>
+ </map>
+ <property name="textValue"
+ type="java.lang.String"
+ access="field"
+ lazy="false">
+ <column name="TEXT" />
+ </property>
+ <many-to-one name="type"
+ class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectCredentialType"
+ access="field"
+ fetch="join"
+ lazy="false">
+ <column name="CREDENTIAL_TYPE"
+ not-null="true"
+ unique-key="id"/>
+ </many-to-one>
+ </class>
+</hibernate-mapping>
Added: portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/sybase-mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/sybase-mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml (rev 0)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/sybase-mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml 2009-12-07 20:28:02 UTC (rev 965)
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class name="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectCredentialBinaryValue"
+ table="jbid_creden_bin_value">
+ <cache usage="read-write"/>
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="BIN_VALUE_ID" />
+ <generator class="native"/>
+ </id>
+ <property name="value"
+ type="org.picketlink.idm.impl.model.hibernate.MaterializedBlobType"
+ access="field"
+ lazy="false"
+ not-null="true">
+ <column name="VALUE" length="10240000"/>
+ </property>
+ </class>
+</hibernate-mapping>
Added: portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/sybase-mappings/HibernateIdentityObjectCredentialType.hbm.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/sybase-mappings/HibernateIdentityObjectCredentialType.hbm.xml (rev 0)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/sybase-mappings/HibernateIdentityObjectCredentialType.hbm.xml 2009-12-07 20:28:02 UTC (rev 965)
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class name="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectCredentialType"
+ table="jbid_io_creden_type">
+ <cache usage="read-write"/>
+
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="ID" />
+ <generator class="native"/>
+ </id>
+ <property name="name"
+ type="java.lang.String"
+ access="field"
+ lazy="false">
+ <column name="NAME"
+ unique="true" />
+ </property>
+ </class>
+</hibernate-mapping>
Added: portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/sybase-mappings/HibernateIdentityObjectRelationship.hbm.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/sybase-mappings/HibernateIdentityObjectRelationship.hbm.xml (rev 0)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/sybase-mappings/HibernateIdentityObjectRelationship.hbm.xml 2009-12-07 20:28:02 UTC (rev 965)
@@ -0,0 +1,63 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class name="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectRelationship"
+ table="jbid_io_rel">
+ <cache usage="read-write"/>
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="ID" />
+ <generator class="native"/>
+ </id>
+ <many-to-one name="fromIdentityObject"
+ class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObject"
+ access="field"
+ fetch="select"
+ lazy="proxy">
+ <column name="FROM_IDENTITY"
+ not-null="true"
+ unique-key="id"/>
+ </many-to-one>
+ <many-to-one name="name"
+ class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipName"
+ access="field"
+ fetch="join"
+ lazy="proxy">
+ <column name="NAME"
+ unique-key="id"/>
+ </many-to-one>
+ <many-to-one name="toIdentityObject"
+ class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObject"
+ access="field"
+ fetch="select"
+ lazy="proxy">
+ <column name="TO_IDENTITY"
+ not-null="true"
+ unique-key="id"/>
+ </many-to-one>
+ <many-to-one name="type"
+ class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipType"
+ access="field"
+ fetch="select"
+ lazy="proxy">
+ <column name="REL_TYPE"
+ not-null="true"
+ unique-key="id" />
+ </many-to-one>
+ <map name="properties"
+ table="jbid_io_rel_props"
+ cascade="all, delete-orphan"
+ fetch="subselect"
+ lazy="extra">
+ <cache usage="read-write"/>
+ <key column="PROP_ID"/>
+ <map-key type="string"
+ column="PROP_NAME"/>
+ <element type="string"
+ column="PROP_VALUE"
+ not-null="true"/>
+ </map>
+ </class>
+</hibernate-mapping>
Added: portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/sybase-mappings/HibernateIdentityObjectRelationshipName.hbm.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/sybase-mappings/HibernateIdentityObjectRelationshipName.hbm.xml (rev 0)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/sybase-mappings/HibernateIdentityObjectRelationshipName.hbm.xml 2009-12-07 20:28:02 UTC (rev 965)
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class name="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipName"
+ table="jbid_io_rel_name">
+ <cache usage="read-write"/>
+
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="ID"/>
+ <generator class="native"/>
+ </id>
+ <property name="name"
+ type="java.lang.String"
+ access="field"
+ lazy="false">
+ <column name="NAME"
+ not-null="true"
+ unique="true"
+ unique-key="id"/>
+ </property>
+ <map name="properties"
+ table="jbid_io_rel_name_props"
+ cascade="all, delete-orphan"
+ lazy="extra"
+ fetch="subselect">
+ <cache usage="read-write"/>
+ <key column="PROP_ID"/>
+ <map-key type="string"
+ column="PROP_NAME"/>
+ <element type="string"
+ column="PROP_VALUE"
+ not-null="true"/>
+ </map>
+ <many-to-one name="realm"
+ class="org.picketlink.idm.impl.model.hibernate.HibernateRealm"
+ access="field"
+ fetch="select"
+ lazy="proxy">
+ <column name="REALM"
+ not-null="true"
+ unique-key="id"/>
+ </many-to-one>
+
+ </class>
+</hibernate-mapping>
Added: portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/sybase-mappings/HibernateIdentityObjectRelationshipType.hbm.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/sybase-mappings/HibernateIdentityObjectRelationshipType.hbm.xml (rev 0)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/sybase-mappings/HibernateIdentityObjectRelationshipType.hbm.xml 2009-12-07 20:28:02 UTC (rev 965)
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class name="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipType"
+ table="jbid_io_rel_type">
+ <cache usage="read-write"/>
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="ID" />
+ <generator class="native"/>
+ </id>
+ <property name="name"
+ type="java.lang.String"
+ access="field"
+ lazy="false">
+ <column name="NAME"
+ not-null="true"
+ unique="true" />
+ </property>
+ </class>
+</hibernate-mapping>
Added: portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/sybase-mappings/HibernateIdentityObjectType.hbm.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/sybase-mappings/HibernateIdentityObjectType.hbm.xml (rev 0)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/sybase-mappings/HibernateIdentityObjectType.hbm.xml 2009-12-07 20:28:02 UTC (rev 965)
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class name="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectType"
+ table="jbid_io_type">
+ <cache usage="read-write"/>
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="ID" />
+ <generator class="native"/>
+ </id>
+ <property name="name"
+ type="java.lang.String"
+ access="field"
+ lazy="false">
+ <column name="NAME"
+ not-null="true"
+ unique="true" />
+ </property>
+ </class>
+</hibernate-mapping>
Added: portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/sybase-mappings/HibernateRealm.hbm.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/sybase-mappings/HibernateRealm.hbm.xml (rev 0)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/sybase-mappings/HibernateRealm.hbm.xml 2009-12-07 20:28:02 UTC (rev 965)
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class name="org.picketlink.idm.impl.model.hibernate.HibernateRealm"
+ table="jbid_realm">
+ <cache usage="read-write"/>
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="ID" />
+ <generator class="native"/>
+ </id>
+ <property name="name"
+ type="java.lang.String"
+ access="field"
+ lazy="false">
+ <column name="NAME"
+ not-null="true"
+ unique-key="id"/>
+ </property>
+ <map name="properties"
+ table="jbid_real_props"
+ cascade="all, delete-orphan"
+ fetch="subselect"
+ lazy="extra">
+ <cache usage="read-write"/>
+ <key column="PROP_ID"/>
+ <map-key type="string"
+ column="PROP_NAME"/>
+ <element type="string"
+ column="PROP_VALUE"
+ not-null="true"/>
+ </map>
+ </class>
+</hibernate-mapping>
Deleted: portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/idm-config.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/idm-config.xml 2009-12-07 18:05:05 UTC (rev 964)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/idm-config.xml 2009-12-07 20:28:02 UTC (rev 965)
@@ -1,95 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright (C) 2009 eXo Platform SAS.
-
- 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.
-
--->
-
-<jboss-identity xmlns="urn:picketlink:idm:config:v1_0_0_cr1"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:picketlink:idm:config:v1_0_0_cr1 identity-config.xsd">
- <realms>
- <realm>
- <id>PortalRealm</id>
- <repository-id-ref>PortalRepository</repository-id-ref>
- <identity-type-mappings>
- <user-mapping>USER</user-mapping>
- </identity-type-mappings>
- </realm>
- </realms>
- <repositories>
- <repository>
- <id>PortalRepository</id>
- <class>org.picketlink.idm.impl.repository.WrapperIdentityStoreRepository</class>
- <external-config/>
- <default-identity-store-id>HibernateStore</default-identity-store-id>
- <default-attribute-store-id>HibernateStore</default-attribute-store-id>
- </repository>
- </repositories>
- <stores>
- <attribute-stores/>
- <identity-stores>
- <identity-store>
- <id>HibernateStore</id>
- <class>org.picketlink.idm.impl.store.hibernate.HibernateIdentityStoreImpl</class>
- <external-config/>
- <supported-relationship-types>
- <relationship-type>JBOSS_IDENTITY_MEMBERSHIP</relationship-type>
- <relationship-type>JBOSS_IDENTITY_ROLE</relationship-type>
- </supported-relationship-types>
- <supported-identity-object-types>
- <identity-object-type>
- <name>USER</name>
- <relationships/>
- <credentials>
- <credential-type>PASSWORD</credential-type>
- </credentials>
- <attributes/>
- <options/>
- </identity-object-type>
- </supported-identity-object-types>
- <options>
- <option>
- <name>hibernateSessionFactoryRegistryName</name>
- <value>hibernateSessionFactory</value>
- </option>
- <option>
- <name>allowNotDefinedIdentityObjectTypes</name>
- <value>true</value>
- </option>
- <option>
- <name>populateRelationshipTypes</name>
- <value>true</value>
- </option>
- <option>
- <name>populateIdentityObjectTypes</name>
- <value>true</value>
- </option>
- <option>
- <name>allowNotDefinedAttributes</name>
- <value>true</value>
- </option>
- <option>
- <name>isRealmAware</name>
- <value>true</value>
- </option>
- </options>
- </identity-store>
- </identity-stores>
- </stores>
-</jboss-identity>
\ No newline at end of file
Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/idm-configuration.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/idm-configuration.xml 2009-12-07 18:05:05 UTC (rev 964)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/idm-configuration.xml 2009-12-07 20:28:02 UTC (rev 965)
@@ -32,7 +32,7 @@
<init-params>
<value-param>
<name>config</name>
- <value>war:/conf/organization/idm-config.xml</value>
+ <value>war:/conf/organization/picketlink-idm/picketlink-idm-config.xml</value>
</value-param>
</init-params>
</component>
@@ -52,17 +52,17 @@
<init-params>
<values-param>
<name>hibernate.mapping</name>
- <value>mappings/HibernateRealm.hbm.xml</value>
- <value>mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml</value>
- <value>mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml</value>
- <value>mappings/HibernateIdentityObject.hbm.xml</value>
- <value>mappings/HibernateIdentityObjectCredential.hbm.xml</value>
- <value>mappings/HibernateIdentityObjectCredentialType.hbm.xml</value>
- <value>mappings/HibernateIdentityObjectAttribute.hbm.xml</value>
- <value>mappings/HibernateIdentityObjectType.hbm.xml</value>
- <value>mappings/HibernateIdentityObjectRelationship.hbm.xml</value>
- <value>mappings/HibernateIdentityObjectRelationshipType.hbm.xml</value>
- <value>mappings/HibernateIdentityObjectRelationshipName.hbm.xml</value>
+ <value>picketlink-idm/mappings/HibernateRealm.hbm.xml</value>
+ <value>picketlink-idm/mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml</value>
+ <value>picketlink-idm/mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml</value>
+ <value>picketlink-idm/mappings/HibernateIdentityObject.hbm.xml</value>
+ <value>picketlink-idm/mappings/HibernateIdentityObjectCredential.hbm.xml</value>
+ <value>picketlink-idm/mappings/HibernateIdentityObjectCredentialType.hbm.xml</value>
+ <value>picketlink-idm/mappings/HibernateIdentityObjectAttribute.hbm.xml</value>
+ <value>picketlink-idm/mappings/HibernateIdentityObjectType.hbm.xml</value>
+ <value>picketlink-idm/mappings/HibernateIdentityObjectRelationship.hbm.xml</value>
+ <value>picketlink-idm/mappings/HibernateIdentityObjectRelationshipType.hbm.xml</value>
+ <value>picketlink-idm/mappings/HibernateIdentityObjectRelationshipName.hbm.xml</value>
</values-param>
</init-params>
</component-plugin>
Added: portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/picketlink-idm-config.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/picketlink-idm-config.xml (rev 0)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/picketlink-idm-config.xml 2009-12-07 20:28:02 UTC (rev 965)
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ 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.
+
+-->
+
+<jboss-identity xmlns="urn:picketlink:idm:config:v1_0_0_cr1"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:picketlink:idm:config:v1_0_0_cr1 identity-config.xsd">
+ <realms>
+ <realm>
+ <id>PortalRealm</id>
+ <repository-id-ref>PortalRepository</repository-id-ref>
+ <identity-type-mappings>
+ <user-mapping>USER</user-mapping>
+ </identity-type-mappings>
+ </realm>
+ </realms>
+ <repositories>
+ <repository>
+ <id>PortalRepository</id>
+ <class>org.picketlink.idm.impl.repository.WrapperIdentityStoreRepository</class>
+ <external-config/>
+ <default-identity-store-id>HibernateStore</default-identity-store-id>
+ <default-attribute-store-id>HibernateStore</default-attribute-store-id>
+ </repository>
+ </repositories>
+ <stores>
+ <attribute-stores/>
+ <identity-stores>
+ <identity-store>
+ <id>HibernateStore</id>
+ <class>org.picketlink.idm.impl.store.hibernate.HibernateIdentityStoreImpl</class>
+ <external-config/>
+ <supported-relationship-types>
+ <relationship-type>JBOSS_IDENTITY_MEMBERSHIP</relationship-type>
+ <relationship-type>JBOSS_IDENTITY_ROLE</relationship-type>
+ </supported-relationship-types>
+ <supported-identity-object-types>
+ <identity-object-type>
+ <name>USER</name>
+ <relationships/>
+ <credentials>
+ <credential-type>PASSWORD</credential-type>
+ </credentials>
+ <attributes/>
+ <options/>
+ </identity-object-type>
+ </supported-identity-object-types>
+ <options>
+ <option>
+ <name>hibernateSessionFactoryRegistryName</name>
+ <value>hibernateSessionFactory</value>
+ </option>
+ <option>
+ <name>allowNotDefinedIdentityObjectTypes</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>populateRelationshipTypes</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>populateIdentityObjectTypes</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>allowNotDefinedAttributes</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>isRealmAware</name>
+ <value>true</value>
+ </option>
+ </options>
+ </identity-store>
+ </identity-stores>
+ </stores>
+</jboss-identity>
\ No newline at end of file
15 years
gatein SVN: r964 - in portal/branches/wsrp-integration/component/wsrp/src/main/java/org/gatein/portal/wsrp/state: producer and 2 other directories.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2009-12-07 13:05:05 -0500 (Mon, 07 Dec 2009)
New Revision: 964
Added:
portal/branches/wsrp-integration/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/producer/registrations/
portal/branches/wsrp-integration/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/producer/registrations/JCRRegistrationPersistenceManager.java
portal/branches/wsrp-integration/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/producer/registrations/mapping/
portal/branches/wsrp-integration/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/producer/registrations/mapping/ConsumerCapabilitiesMapping.java
portal/branches/wsrp-integration/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/producer/registrations/mapping/ConsumerGroupMapping.java
portal/branches/wsrp-integration/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/producer/registrations/mapping/ConsumerMapping.java
portal/branches/wsrp-integration/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/producer/registrations/mapping/ConsumersAndGroupsMapping.java
portal/branches/wsrp-integration/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/producer/registrations/mapping/RegistrationMapping.java
portal/branches/wsrp-integration/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/producer/registrations/mapping/RegistrationPropertiesMapping.java
Modified:
portal/branches/wsrp-integration/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/consumer/mapping/RegistrationPropertyMapping.java
Log:
- First pass implementation of consumer registrations on the producer side should be done but not tested.
Modified: portal/branches/wsrp-integration/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/consumer/mapping/RegistrationPropertyMapping.java
===================================================================
--- portal/branches/wsrp-integration/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/consumer/mapping/RegistrationPropertyMapping.java 2009-12-07 15:44:44 UTC (rev 963)
+++ portal/branches/wsrp-integration/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/consumer/mapping/RegistrationPropertyMapping.java 2009-12-07 18:05:05 UTC (rev 964)
@@ -23,6 +23,7 @@
package org.gatein.portal.wsrp.state.consumer.mapping;
+import org.chromattic.api.annotations.MappedBy;
import org.chromattic.api.annotations.NodeMapping;
import org.chromattic.api.annotations.OneToOne;
import org.chromattic.api.annotations.Property;
@@ -51,7 +52,7 @@
public abstract void setValue(String value);
@OneToOne
- @RelatedMappedBy("description")
+ @MappedBy("description")
public abstract RegistrationPropertyDescriptionMapping getDescription();
// todo: this should really be an enum�
Added: portal/branches/wsrp-integration/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/producer/registrations/JCRRegistrationPersistenceManager.java
===================================================================
--- portal/branches/wsrp-integration/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/producer/registrations/JCRRegistrationPersistenceManager.java (rev 0)
+++ portal/branches/wsrp-integration/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/producer/registrations/JCRRegistrationPersistenceManager.java 2009-12-07 18:05:05 UTC (rev 964)
@@ -0,0 +1,163 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2008, 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.gatein.portal.wsrp.state.producer.registrations;
+
+import org.chromattic.api.ChromatticSession;
+import org.exoplatform.container.ExoContainer;
+import org.gatein.portal.wsrp.state.JCRPersister;
+import org.gatein.portal.wsrp.state.producer.registrations.mapping.ConsumerCapabilitiesMapping;
+import org.gatein.portal.wsrp.state.producer.registrations.mapping.ConsumerGroupMapping;
+import org.gatein.portal.wsrp.state.producer.registrations.mapping.ConsumerMapping;
+import org.gatein.portal.wsrp.state.producer.registrations.mapping.ConsumersAndGroupsMapping;
+import org.gatein.portal.wsrp.state.producer.registrations.mapping.RegistrationMapping;
+import org.gatein.registration.ConsumerGroup;
+import org.gatein.registration.Registration;
+import org.gatein.registration.RegistrationException;
+import org.gatein.registration.impl.RegistrationPersistenceManagerImpl;
+import org.gatein.registration.spi.ConsumerGroupSPI;
+import org.gatein.registration.spi.ConsumerSPI;
+import org.gatein.registration.spi.RegistrationSPI;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+public class JCRRegistrationPersistenceManager extends RegistrationPersistenceManagerImpl
+{
+ private JCRPersister persister;
+ private ConsumersAndGroupsMapping mappings;
+
+ public JCRRegistrationPersistenceManager(ExoContainer container, String workspaceName, String repositoryName) throws Exception
+ {
+ persister = new JCRPersister(container, workspaceName, repositoryName);
+
+ List<Class> mappingClasses = new ArrayList<Class>(5);
+ Collections.addAll(mappingClasses, ConsumersAndGroupsMapping.class, ConsumerMapping.class, ConsumerGroupMapping.class,
+ RegistrationMapping.class, ConsumerCapabilitiesMapping.class);
+
+ persister.initializeBuilderFor(mappingClasses);
+
+ ChromatticSession session = persister.getSession();
+ mappings = session.findByPath(ConsumersAndGroupsMapping.class, ConsumersAndGroupsMapping.NODE_NAME);
+ if(mappings == null)
+ {
+ session.insert(ConsumersAndGroupsMapping.class, ConsumersAndGroupsMapping.NODE_NAME);
+ }
+ persister.closeSession(session);
+
+ for (ConsumerGroupMapping cgm : mappings.getConsumerGroups().values())
+ {
+ internalAddConsumerGroup(cgm.toConsumerGroup(this));
+ }
+
+ for (ConsumerMapping cm : mappings.getConsumers().values())
+ {
+ internalAddConsumer(cm.toConsumer(this));
+ }
+ }
+
+ @Override
+ protected RegistrationSPI internalRemoveRegistration(String registrationId)
+ {
+ Registration registration = getRegistration(registrationId);
+ remove(registration.getPersistentKey(), RegistrationMapping.class);
+
+ return super.internalRemoveRegistration(registrationId);
+ }
+
+ @Override
+ protected RegistrationSPI internalCreateRegistration(ConsumerSPI consumer, Map registrationProperties)
+ {
+ ChromatticSession session = persister.getSession();
+ ConsumerMapping cm = session.findById(ConsumerMapping.class, consumer.getPersistentKey());
+ RegistrationMapping rm = cm.createRegistration();
+ RegistrationSPI registration = newRegistrationSPI(consumer, registrationProperties, rm.getPersistentKey());
+ rm.initFrom(registration);
+ persister.closeSession(session);
+
+ return registration;
+ }
+
+ @Override
+ protected ConsumerSPI internalRemoveConsumer(String consumerId)
+ {
+ remove(consumerId, ConsumerMapping.class);
+
+ return super.internalRemoveConsumer(consumerId);
+ }
+
+ private void remove(String id, Class clazz)
+ {
+ ChromatticSession session = persister.getSession();
+ session.remove(session.findById(clazz, id));
+ persister.closeSession(session);
+ }
+
+ @Override
+ protected ConsumerSPI internalCreateConsumer(String consumerId, String consumerName)
+ {
+ ConsumerSPI consumer = super.internalCreateConsumer(consumerId, consumerName);
+
+ ChromatticSession session = persister.getSession();
+ ConsumerMapping cm = mappings.createConsumer(consumerId);
+ cm.initFrom(consumer);
+ persister.closeSession(session);
+
+ return consumer;
+ }
+
+ @Override
+ protected ConsumerGroupSPI internalRemoveConsumerGroup(String name)
+ {
+ try
+ {
+ ConsumerGroup group = getConsumerGroup(name);
+ remove(group.getPersistentKey(), ConsumerGroupMapping.class);
+ }
+ catch (RegistrationException e)
+ {
+ throw new IllegalArgumentException("Couldn't remove ConsumerGroup '" + name + "'", e);
+ }
+
+ return super.internalRemoveConsumerGroup(name);
+ }
+
+ @Override
+ protected ConsumerGroupSPI internalCreateConsumerGroup(String name)
+ {
+ ConsumerGroupSPI group = super.internalCreateConsumerGroup(name);
+
+ ChromatticSession session = persister.getSession();
+ ConsumerGroupMapping cgm = mappings.createConsumerGroup(name);
+ group.setPersistentKey(cgm.getPersistentKey());
+ cgm.initFrom(group);
+ persister.closeSession(session);
+
+ return group;
+ }
+}
Added: portal/branches/wsrp-integration/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/producer/registrations/mapping/ConsumerCapabilitiesMapping.java
===================================================================
--- portal/branches/wsrp-integration/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/producer/registrations/mapping/ConsumerCapabilitiesMapping.java (rev 0)
+++ portal/branches/wsrp-integration/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/producer/registrations/mapping/ConsumerCapabilitiesMapping.java 2009-12-07 18:05:05 UTC (rev 964)
@@ -0,0 +1,46 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2008, 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.gatein.portal.wsrp.state.producer.registrations.mapping;
+
+import org.chromattic.api.annotations.NodeMapping;
+import org.gatein.registration.ConsumerCapabilities;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+@NodeMapping(name = ConsumerCapabilitiesMapping.NODE_NAME)
+public class ConsumerCapabilitiesMapping
+{
+ public static final String NODE_NAME = "wsrp:consumercapabilities";
+
+ public void initFrom(ConsumerCapabilities capabilities)
+ {
+
+ }
+
+ public ConsumerCapabilities toConsumerCapabilities()
+ {
+ return null; // todo: implement
+ }
+}
Added: portal/branches/wsrp-integration/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/producer/registrations/mapping/ConsumerGroupMapping.java
===================================================================
--- portal/branches/wsrp-integration/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/producer/registrations/mapping/ConsumerGroupMapping.java (rev 0)
+++ portal/branches/wsrp-integration/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/producer/registrations/mapping/ConsumerGroupMapping.java 2009-12-07 18:05:05 UTC (rev 964)
@@ -0,0 +1,110 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2008, 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.gatein.portal.wsrp.state.producer.registrations.mapping;
+
+import org.chromattic.api.RelationshipType;
+import org.chromattic.api.annotations.FindById;
+import org.chromattic.api.annotations.Id;
+import org.chromattic.api.annotations.ManyToOne;
+import org.chromattic.api.annotations.MappedBy;
+import org.chromattic.api.annotations.NodeMapping;
+import org.chromattic.api.annotations.OneToMany;
+import org.chromattic.api.annotations.Property;
+import org.chromattic.api.annotations.RelatedMappedBy;
+import org.gatein.common.util.ParameterValidation;
+import org.gatein.portal.wsrp.state.producer.registrations.JCRRegistrationPersistenceManager;
+import org.gatein.registration.Consumer;
+import org.gatein.registration.ConsumerGroup;
+import org.gatein.registration.RegistrationException;
+import org.gatein.registration.RegistrationStatus;
+import org.gatein.registration.spi.ConsumerGroupSPI;
+
+import java.util.Collection;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+@NodeMapping(name = ConsumerGroupMapping.NODE_NAME)
+public abstract class ConsumerGroupMapping
+{
+ public static final String NODE_NAME = "wsrp:consumergroup";
+
+ @OneToMany(type = RelationshipType.PATH)
+ @RelatedMappedBy("group")
+ public abstract Collection<ConsumerMapping> getConsumers();
+
+ @Property(name = "name")
+ public abstract String getName();
+ public abstract void setName(String name);
+
+ @Property(name = "status")
+ public abstract RegistrationStatus getStatus();
+ public abstract void setStatus(RegistrationStatus status);
+
+ @Id
+ public abstract String getPersistentKey();
+
+ @FindById
+ public abstract ConsumerMapping findConsumerById(String id);
+
+ public void initFrom(ConsumerGroup group)
+ {
+ setName(group.getName());
+ setStatus(group.getStatus());
+
+ try
+ {
+ for (Consumer consumer : group.getConsumers())
+ {
+ String id = consumer.getPersistentKey();
+ ConsumerMapping cm = findConsumerById(id);
+ ParameterValidation.throwIllegalArgExceptionIfNull(cm, "ConsumerMapping (no such mapping with id: " + id + ")");
+ cm.initFrom(consumer);
+ getConsumers().add(cm);
+ }
+ }
+ catch (RegistrationException e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+
+ public ConsumerGroupSPI toConsumerGroup(JCRRegistrationPersistenceManager persistenceManager) throws RegistrationException
+ {
+ ConsumerGroupSPI group = persistenceManager.newConsumerGroupSPI(getName());
+ group.setStatus(getStatus());
+
+ for (ConsumerMapping cm : getConsumers())
+ {
+ Consumer consumer = persistenceManager.getConsumerById(cm.getPersistentKey());
+ if(consumer == null)
+ {
+ consumer = cm.toConsumer(persistenceManager);
+ }
+
+ group.addConsumer(consumer);
+ }
+ return group;
+ }
+}
Added: portal/branches/wsrp-integration/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/producer/registrations/mapping/ConsumerMapping.java
===================================================================
--- portal/branches/wsrp-integration/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/producer/registrations/mapping/ConsumerMapping.java (rev 0)
+++ portal/branches/wsrp-integration/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/producer/registrations/mapping/ConsumerMapping.java 2009-12-07 18:05:05 UTC (rev 964)
@@ -0,0 +1,152 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2008, 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.gatein.portal.wsrp.state.producer.registrations.mapping;
+
+import org.chromattic.api.RelationshipType;
+import org.chromattic.api.annotations.Create;
+import org.chromattic.api.annotations.FindById;
+import org.chromattic.api.annotations.Id;
+import org.chromattic.api.annotations.ManyToOne;
+import org.chromattic.api.annotations.MappedBy;
+import org.chromattic.api.annotations.NodeMapping;
+import org.chromattic.api.annotations.OneToMany;
+import org.chromattic.api.annotations.OneToOne;
+import org.chromattic.api.annotations.Property;
+import org.chromattic.api.annotations.RelatedMappedBy;
+import org.gatein.portal.wsrp.state.producer.registrations.JCRRegistrationPersistenceManager;
+import org.gatein.registration.Consumer;
+import org.gatein.registration.ConsumerGroup;
+import org.gatein.registration.Registration;
+import org.gatein.registration.RegistrationException;
+import org.gatein.registration.RegistrationStatus;
+import org.gatein.registration.spi.ConsumerSPI;
+
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+@NodeMapping(name = ConsumerMapping.NODE_NAME)
+public abstract class ConsumerMapping
+{
+ public static final String NODE_NAME = "wsrp:consumer";
+
+ @Id
+ public abstract String getPersistentKey();
+
+ @Property(name = "name")
+ public abstract String getName();
+
+ public abstract void setName(String name);
+
+ @Property(name = "id")
+ public abstract String getId();
+
+ public abstract void setId(String id);
+
+ @Property(name = "consumeragent")
+ public abstract String getConsumerAgent();
+
+ public abstract void setConsumerAgent(String consumerAgent);
+
+ @Property(name = "status")
+ public abstract RegistrationStatus getStatus();
+
+ public abstract void setStatus(RegistrationStatus status);
+
+ @OneToMany(type = RelationshipType.PATH)
+ @RelatedMappedBy("consumer")
+ public abstract Map<String, RegistrationMapping> getRegistrations();
+
+ @Create
+ public abstract RegistrationMapping createRegistration();
+
+ @ManyToOne(type = RelationshipType.PATH)
+ @MappedBy("group")
+ public abstract ConsumerGroupMapping getGroup();
+
+ public abstract void setGroup(ConsumerGroupMapping group);
+
+ @OneToOne
+ @MappedBy("capabilities")
+ public abstract ConsumerCapabilitiesMapping getCapabilities();
+
+ @FindById
+ public abstract ConsumerGroupMapping findGroupById(String id);
+
+ public void initFrom(Consumer consumer)
+ {
+ setName(consumer.getName());
+ setConsumerAgent(consumer.getConsumerAgent());
+ setStatus(consumer.getStatus());
+
+ ConsumerGroup group = consumer.getGroup();
+ if (group != null)
+ {
+ ConsumerGroupMapping cgm = findGroupById(group.getPersistentKey());
+ setGroup(cgm);
+ }
+
+ ConsumerCapabilitiesMapping ccm = getCapabilities();
+ ccm.initFrom(consumer.getCapabilities());
+
+ try
+ {
+ Map<String, RegistrationMapping> rms = getRegistrations();
+ for (Registration reg : consumer.getRegistrations())
+ {
+ RegistrationMapping rm = createRegistration();
+ rm.initFrom(reg);
+ rms.put(reg.getRegistrationHandle(), rm);
+ }
+ }
+ catch (RegistrationException e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+
+ public ConsumerSPI toConsumer(JCRRegistrationPersistenceManager persistenceManager) throws RegistrationException
+ {
+ ConsumerSPI consumer = persistenceManager.newConsumerSPI(getId(), getName());
+ consumer.setConsumerAgent(getConsumerAgent());
+ consumer.setStatus(getStatus());
+ consumer.setPersistentKey(getPersistentKey());
+
+ consumer.setCapabilities(getCapabilities().toConsumerCapabilities());
+
+ ConsumerGroupMapping cgm = getGroup();
+ if (cgm != null)
+ {
+ consumer.setGroup(persistenceManager.getConsumerGroup(cgm.getName()));
+ }
+
+ for (RegistrationMapping rm : getRegistrations().values())
+ {
+ consumer.addRegistration(rm.toRegistration(persistenceManager, consumer));
+ }
+
+ return consumer;
+ }
+}
Added: portal/branches/wsrp-integration/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/producer/registrations/mapping/ConsumersAndGroupsMapping.java
===================================================================
--- portal/branches/wsrp-integration/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/producer/registrations/mapping/ConsumersAndGroupsMapping.java (rev 0)
+++ portal/branches/wsrp-integration/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/producer/registrations/mapping/ConsumersAndGroupsMapping.java 2009-12-07 18:05:05 UTC (rev 964)
@@ -0,0 +1,51 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2008, 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.gatein.portal.wsrp.state.producer.registrations.mapping;
+
+import org.chromattic.api.annotations.Create;
+import org.chromattic.api.annotations.NodeMapping;
+import org.chromattic.api.annotations.OneToMany;
+
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+@NodeMapping(name = ConsumersAndGroupsMapping.NODE_NAME)
+public abstract class ConsumersAndGroupsMapping
+{
+ public static final String NODE_NAME = "wsrp:consumersandgroups";
+
+ @OneToMany
+ public abstract Map<String, ConsumerMapping> getConsumers();
+
+ @OneToMany
+ public abstract Map<String, ConsumerGroupMapping> getConsumerGroups();
+
+ @Create
+ public abstract ConsumerMapping createConsumer(String id);
+
+ @Create
+ public abstract ConsumerGroupMapping createConsumerGroup(String name);
+}
Added: portal/branches/wsrp-integration/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/producer/registrations/mapping/RegistrationMapping.java
===================================================================
--- portal/branches/wsrp-integration/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/producer/registrations/mapping/RegistrationMapping.java (rev 0)
+++ portal/branches/wsrp-integration/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/producer/registrations/mapping/RegistrationMapping.java 2009-12-07 18:05:05 UTC (rev 964)
@@ -0,0 +1,96 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2008, 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.gatein.portal.wsrp.state.producer.registrations.mapping;
+
+import org.chromattic.api.RelationshipType;
+import org.chromattic.api.annotations.FindById;
+import org.chromattic.api.annotations.Id;
+import org.chromattic.api.annotations.ManyToOne;
+import org.chromattic.api.annotations.MappedBy;
+import org.chromattic.api.annotations.NodeMapping;
+import org.chromattic.api.annotations.OneToOne;
+import org.chromattic.api.annotations.Property;
+import org.gatein.portal.wsrp.state.producer.registrations.JCRRegistrationPersistenceManager;
+import org.gatein.registration.Registration;
+import org.gatein.registration.RegistrationException;
+import org.gatein.registration.RegistrationStatus;
+import org.gatein.registration.spi.ConsumerSPI;
+import org.gatein.registration.spi.RegistrationSPI;
+
+import javax.xml.namespace.QName;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+@NodeMapping(name = RegistrationMapping.NODE_NAME)
+public abstract class RegistrationMapping
+{
+ public static final String NODE_NAME = "wsrp:registration";
+
+ @Id
+ public abstract String getPersistentKey();
+
+ @ManyToOne(type = RelationshipType.PATH)
+ @MappedBy("consumer")
+ public abstract ConsumerMapping getConsumer();
+
+ @Property(name = "status")
+ public abstract RegistrationStatus getStatus();
+ public abstract void setStatus(RegistrationStatus status);
+
+ @Property(name = "registrationhandle")
+ public abstract String getRegistrationHandle();
+ public abstract void setRegistrationHandle(String handle);
+
+ @OneToOne
+ @MappedBy("properties")
+ public abstract RegistrationPropertiesMapping getProperties();
+
+ @FindById
+ public abstract ConsumerMapping findConsumerById(String id);
+
+ public void initFrom(Registration registration)
+ {
+ setStatus(registration.getStatus());
+ setRegistrationHandle(registration.getRegistrationHandle());
+
+ getProperties().initFrom(registration.getProperties());
+
+ ConsumerMapping cm = findConsumerById(registration.getConsumer().getId());
+ cm.getRegistrations().put(registration.getPersistentKey(), this);
+ }
+
+ public RegistrationSPI toRegistration(JCRRegistrationPersistenceManager persistenceManager, ConsumerSPI consumer) throws RegistrationException
+ {
+ ConsumerMapping cm = getConsumer();
+
+ RegistrationSPI reg = persistenceManager.newRegistrationSPI(consumer, getProperties().toPropMap(), getPersistentKey());
+ reg.setStatus(getStatus());
+ reg.setRegistrationHandle(getRegistrationHandle());
+ return reg;
+ }
+}
Added: portal/branches/wsrp-integration/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/producer/registrations/mapping/RegistrationPropertiesMapping.java
===================================================================
--- portal/branches/wsrp-integration/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/producer/registrations/mapping/RegistrationPropertiesMapping.java (rev 0)
+++ portal/branches/wsrp-integration/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/producer/registrations/mapping/RegistrationPropertiesMapping.java 2009-12-07 18:05:05 UTC (rev 964)
@@ -0,0 +1,73 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2008, 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.gatein.portal.wsrp.state.producer.registrations.mapping;
+
+import org.chromattic.api.annotations.NodeMapping;
+import org.chromattic.api.annotations.Properties;
+
+import javax.xml.namespace.QName;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+@NodeMapping(name = RegistrationPropertiesMapping.NODE_NAME)
+public abstract class RegistrationPropertiesMapping
+{
+ public static final String NODE_NAME = "wsrp:registrationproperties";
+
+ @Properties
+ public abstract Map<String, String> getProperties();
+
+ public Map<QName, Object> toPropMap()
+ {
+ Map<QName, Object> properties = Collections.emptyMap();
+ Map<String, String> propMap = getProperties();
+ if (!propMap.isEmpty())
+ {
+ properties = new HashMap<QName, Object>(propMap.size());
+ for (Map.Entry<String, String> entry : propMap.entrySet())
+ {
+ properties.put(QName.valueOf(entry.getKey()), entry.getValue());
+ }
+ }
+
+ return properties;
+ }
+
+ public void initFrom(Map<QName, Object> properties)
+ {
+ if(properties != null)
+ {
+ Map<String, String> map = getProperties();
+
+ for (Map.Entry<QName, Object> entry : properties.entrySet())
+ {
+ map.put(entry.getKey().toString(), entry.getValue().toString());
+ }
+ }
+ }
+}
15 years
gatein SVN: r963 - in components/wsrp/trunk/producer/src/main/java/org/gatein/registration: impl and 1 other directory.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2009-12-07 10:44:44 -0500 (Mon, 07 Dec 2009)
New Revision: 963
Modified:
components/wsrp/trunk/producer/src/main/java/org/gatein/registration/ConsumerGroup.java
components/wsrp/trunk/producer/src/main/java/org/gatein/registration/impl/ConsumerGroupImpl.java
Log:
- More generification.
Modified: components/wsrp/trunk/producer/src/main/java/org/gatein/registration/ConsumerGroup.java
===================================================================
--- components/wsrp/trunk/producer/src/main/java/org/gatein/registration/ConsumerGroup.java 2009-12-07 12:30:18 UTC (rev 962)
+++ components/wsrp/trunk/producer/src/main/java/org/gatein/registration/ConsumerGroup.java 2009-12-07 15:44:44 UTC (rev 963)
@@ -55,7 +55,7 @@
* @return the consumer collection
* @throws RegistrationException
*/
- Collection getConsumers() throws RegistrationException;
+ Collection<Consumer> getConsumers() throws RegistrationException;
/**
* Return the member Consumer associated with the given identifier
Modified: components/wsrp/trunk/producer/src/main/java/org/gatein/registration/impl/ConsumerGroupImpl.java
===================================================================
--- components/wsrp/trunk/producer/src/main/java/org/gatein/registration/impl/ConsumerGroupImpl.java 2009-12-07 12:30:18 UTC (rev 962)
+++ components/wsrp/trunk/producer/src/main/java/org/gatein/registration/impl/ConsumerGroupImpl.java 2009-12-07 15:44:44 UTC (rev 963)
@@ -110,7 +110,7 @@
this.status = status;
}
- public Collection getConsumers() throws RegistrationException
+ public Collection<Consumer> getConsumers() throws RegistrationException
{
return Collections.unmodifiableCollection(consumers.values());
}
15 years