JBoss Portal SVN: r10985 - in branches/JBoss_Portal_Branch_2_7: api/src/main/org/jboss/portal/api and 21 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-06-11 09:36:54 -0400 (Wed, 11 Jun 2008)
New Revision: 10985
Added:
branches/JBoss_Portal_Branch_2_7/api/src/main/org/jboss/portal/api/content/
branches/JBoss_Portal_Branch_2_7/api/src/main/org/jboss/portal/api/content/SelectedContent.java
Modified:
branches/JBoss_Portal_Branch_2_7/api/.classpath
branches/JBoss_Portal_Branch_2_7/api/build.xml
branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/common/PageManagerBean.java
branches/JBoss_Portal_Branch_2_7/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSContentEditorPortlet.java
branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/portlet.xml
branches/JBoss_Portal_Branch_2_7/core-samples/src/main/org/jboss/portal/core/samples/basic/FSContentDrivenPortlet.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/CoreConstants.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/AbstractContent.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/generic/InternalGenericContentProvider.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/content/Content.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/content/spi/handler/ContentState.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/content/WindowRendition.java
branches/JBoss_Portal_Branch_2_7/faces/.classpath
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/UIPortlet.java
branches/JBoss_Portal_Branch_2_7/widget/.classpath
branches/JBoss_Portal_Branch_2_7/widget/src/main/org/jboss/portal/widget/Widget.java
branches/JBoss_Portal_Branch_2_7/widget/src/main/org/jboss/portal/widget/google/GGWidget.java
branches/JBoss_Portal_Branch_2_7/widget/src/main/org/jboss/portal/widget/google/GGWidgetPortlet.java
branches/JBoss_Portal_Branch_2_7/widget/src/main/org/jboss/portal/widget/google/info/GGPreferencesInfo.java
branches/JBoss_Portal_Branch_2_7/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesPreferencesInfo.java
branches/JBoss_Portal_Branch_2_7/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesWidget.java
branches/JBoss_Portal_Branch_2_7/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesWidgetPortlet.java
branches/JBoss_Portal_Branch_2_7/widget/src/main/org/jboss/portal/widget/netvibes/json/JSONObject.java
branches/JBoss_Portal_Branch_2_7/widget/src/resources/portal-widget-netvibes-war/WEB-INF/portlet.xml
branches/JBoss_Portal_Branch_2_7/widget/src/resources/portal-widget-war/WEB-INF/portlet.xml
Log:
Fixing Content Framework
Modified: branches/JBoss_Portal_Branch_2_7/api/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_7/api/.classpath 2008-06-11 12:37:53 UTC (rev 10984)
+++ branches/JBoss_Portal_Branch_2_7/api/.classpath 2008-06-11 13:36:54 UTC (rev 10985)
@@ -3,5 +3,6 @@
<classpathentry kind="src" path="src/main"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/common/lib/portal-common-portal-lib.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/sun-jaxb/lib/jaxb-api.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: branches/JBoss_Portal_Branch_2_7/api/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/api/build.xml 2008-06-11 12:37:53 UTC (rev 10984)
+++ branches/JBoss_Portal_Branch_2_7/api/build.xml 2008-06-11 13:36:54 UTC (rev 10985)
@@ -90,6 +90,7 @@
<path id="library.classpath">
<path refid="jboss.portal/modules/common.classpath"/>
<path refid="junit.junit.classpath"/>
+ <path refid="sun.jaxb.classpath"/>
</path>
<!-- Configure modules -->
Added: branches/JBoss_Portal_Branch_2_7/api/src/main/org/jboss/portal/api/content/SelectedContent.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/api/src/main/org/jboss/portal/api/content/SelectedContent.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/api/src/main/org/jboss/portal/api/content/SelectedContent.java 2008-06-11 13:36:54 UTC (rev 10985)
@@ -0,0 +1,68 @@
+/******************************************************************************
+ * 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.jboss.portal.api.content;
+
+import java.io.Serializable;
+import java.util.Map;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+/**
+ * @author <a href="mailto:theute@jboss.org">Thomas Heute</a>
+ * @version $Revision$
+ */
+@XmlRootElement
+public class SelectedContent implements Serializable
+{
+ private final String uri;
+
+ private final Map<String, String> parameters;
+
+ public SelectedContent(String uri, Map<String, String> parameters)
+ {
+ this.uri = uri;
+ this.parameters = parameters;
+ }
+
+ public String getUri()
+ {
+ return uri;
+ }
+
+ public Map<String, String> getParameters()
+ {
+ return parameters;
+ }
+
+ public static String encode(String key, String value)
+ {
+ return key + "__EQUALS__" + value;
+ }
+
+ public static String[] decode(String encoded)
+ {
+ String[] foo = encoded.split("__EQUALS__");
+ return foo;
+ }
+}
+
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/CoreConstants.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/CoreConstants.java 2008-06-11 12:37:53 UTC (rev 10984)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/CoreConstants.java 2008-06-11 13:36:54 UTC (rev 10985)
@@ -59,4 +59,6 @@
public static final QName JBOSS_PORTAL_CONTENT_URI = new QName(JBOSS_PORTAL_CONTENT_NAMESPACE, "uri");
+ public static final QName JBOSS_PORTAL_CONTENT_PARAMETERS = new QName(JBOSS_PORTAL_CONTENT_NAMESPACE, "parameters");
+
}
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/AbstractContent.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/AbstractContent.java 2008-06-11 12:37:53 UTC (rev 10984)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/AbstractContent.java 2008-06-11 13:36:54 UTC (rev 10985)
@@ -72,7 +72,7 @@
state.setParameter(name, value);
}
- public Iterator getParameterNames()
+ public Iterator<String> getParameterNames()
{
return state.getParameterNames();
}
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/generic/InternalGenericContentProvider.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/generic/InternalGenericContentProvider.java 2008-06-11 12:37:53 UTC (rev 10984)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/generic/InternalGenericContentProvider.java 2008-06-11 13:36:54 UTC (rev 10985)
@@ -24,6 +24,7 @@
import org.apache.log4j.Logger;
import org.jboss.portal.Mode;
+import org.jboss.portal.api.content.SelectedContent;
import org.jboss.portal.common.i18n.LocalizedString;
import org.jboss.portal.common.util.ParameterMap;
import org.jboss.portal.core.CoreConstants;
@@ -49,7 +50,9 @@
import org.jboss.portal.portlet.info.PortletInfo;
import org.jboss.portal.portlet.invocation.RenderInvocation;
-import java.util.Collections;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
import java.util.Map;
/**
@@ -197,7 +200,8 @@
if (invocation.getPublicNavigationalState() == null || invocation.getPublicNavigationalState().size() == 0)
{
- String id = null;
+ String id_uri = null;
+ String id_parameters = null;
try
{
@@ -212,8 +216,12 @@
{
if (parameterInfo.getName().equals(CoreConstants.JBOSS_PORTAL_CONTENT_URI))
{
- id = parameterInfo.getId();
+ id_uri = parameterInfo.getId();
}
+ if (parameterInfo.getName().equals(CoreConstants.JBOSS_PORTAL_CONTENT_PARAMETERS))
+ {
+ id_parameters = parameterInfo.getId();
+ }
}
}
catch (PortletInvokerException e)
@@ -221,12 +229,28 @@
log.error("Cannot read portlet instance public navigational info", e);
}
+
+ ParameterMap parameterMap = new ParameterMap();
+
//
- if (id != null)
+ if (id_uri != null)
{
- ParameterMap tmp = ParameterMap.wrap(Collections.singletonMap(id, new String[]{content.getURI()}));
- invocation.setPublicNavigationalState(tmp);
+ parameterMap.put(id_uri, new String[]{content.getURI()});
}
+ if (id_parameters != null)
+ {
+ List<String> encodedParams = new ArrayList<String>();
+ Iterator<String> params = content.getParameterNames();
+ while (params.hasNext())
+ {
+ String name = params.next();
+ String value = content.getParameter(name);
+ encodedParams.add(SelectedContent.encode(name, value));
+ }
+
+ parameterMap.put(id_parameters, encodedParams.toArray(new String[encodedParams.size()]));
+ }
+ invocation.setPublicNavigationalState(parameterMap);
}
//
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/content/Content.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/content/Content.java 2008-06-11 12:37:53 UTC (rev 10984)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/content/Content.java 2008-06-11 13:36:54 UTC (rev 10985)
@@ -63,7 +63,7 @@
*/
void setURI(String uri) throws IllegalStateException;
- Iterator getParameterNames();
+ Iterator<String> getParameterNames();
void setParameter(String name, String value) throws IllegalArgumentException;
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/content/spi/handler/ContentState.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/content/spi/handler/ContentState.java 2008-06-11 12:37:53 UTC (rev 10984)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/content/spi/handler/ContentState.java 2008-06-11 13:36:54 UTC (rev 10985)
@@ -46,7 +46,7 @@
*/
void setURI(String uri);
- Iterator getParameterNames();
+ Iterator<String> getParameterNames();
void setParameter(String name, String value) throws IllegalArgumentException;
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/content/WindowRendition.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/content/WindowRendition.java 2008-06-11 12:37:53 UTC (rev 10984)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/content/WindowRendition.java 2008-06-11 13:36:54 UTC (rev 10985)
@@ -39,7 +39,7 @@
{
/** The window properties. */
- private final Map properties;
+ private final Map<String, String> properties;
/** The window state. */
private final WindowState windowState;
@@ -72,7 +72,7 @@
this.controllerResponse = controllerResponse;
}
- public Map getProperties()
+ public Map<String, String> getProperties()
{
return properties;
}
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/common/PageManagerBean.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/common/PageManagerBean.java 2008-06-11 12:37:53 UTC (rev 10984)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/common/PageManagerBean.java 2008-06-11 13:36:54 UTC (rev 10985)
@@ -23,6 +23,7 @@
package org.jboss.portal.core.admin.ui.common;
import org.jboss.portal.Mode;
+import org.jboss.portal.api.content.SelectedContent;
import org.jboss.portal.core.admin.ui.actions.WindowComparator;
import org.jboss.portal.core.impl.model.content.ContentProviderRegistryService;
import org.jboss.portal.core.model.content.Content;
@@ -306,12 +307,15 @@
{
Window window = page.createWindow(windowName, selectedContentType, selectedContentURI);
Content content = window.getContent();
- for (Object o : selectedContentParams.entrySet())
+ if (selectedContentParams != null)
{
- Map.Entry<String,String> entry = (Map.Entry<String,String>)o;
- String paramName = entry.getKey();
- String paramValue = entry.getValue();
- content.setParameter(paramName, paramValue);
+ for (Object o : selectedContentParams.entrySet())
+ {
+ Map.Entry<String,String> entry = (Map.Entry<String,String>)o;
+ String paramName = entry.getKey();
+ String paramValue = entry.getValue();
+ content.setParameter(paramName, paramValue);
+ }
}
//
@@ -343,7 +347,7 @@
FacesContext faces = FacesContext.getCurrentInstance();
FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_ERROR, "No content was selected!", null);
faces.addMessage("layoutForm", message);
- throw new AbortProcessingException();
+// throw new AbortProcessingException();
}
}
else if (direction == MOVE_LEFT)
@@ -413,11 +417,18 @@
// only react to content selection events
if(CONTENT_SELECT.equals(name))
{
- String uri = (String)portletEvent.getPayload();
- this.selectedContentURI = uri;
-
- // TODO: Get params from the payload (for widgets)
- this.selectedContentParameters = new HashMap();
+ if (portletEvent.getPayload() instanceof String)
+ {
+ String uri = (String)portletEvent.getPayload();
+ this.selectedContentURI = uri;
+ this.selectedContentParameters = null;
+ }
+ else if (portletEvent.getPayload() instanceof SelectedContent)
+ {
+ SelectedContent selectedContent = (SelectedContent)portletEvent.getPayload();
+ this.selectedContentURI = selectedContent.getUri();
+ this.selectedContentParameters = selectedContent.getParameters();
+ }
}
}
else if (event instanceof PortletActionEvent)
Modified: branches/JBoss_Portal_Branch_2_7/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSContentEditorPortlet.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSContentEditorPortlet.java 2008-06-11 12:37:53 UTC (rev 10984)
+++ branches/JBoss_Portal_Branch_2_7/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSContentEditorPortlet.java 2008-06-11 13:36:54 UTC (rev 10985)
@@ -35,6 +35,8 @@
import javax.portlet.PortletSecurityException;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
+import javax.xml.namespace.QName;
+
import java.io.IOException;
import java.util.HashMap;
import java.util.List;
@@ -53,6 +55,8 @@
/** . */
private static final PortletMode EDIT_CONTENT = new PortletMode("edit_content");
+
+ public static final QName JBOSS_PORTAL_CONTENT_SELECT = new QName("urn:jboss:portal:content", "select");
public void init() throws PortletException
{
@@ -81,6 +85,8 @@
//
resp.setRenderParameters(params);
+
+ resp.setEvent(JBOSS_PORTAL_CONTENT_SELECT, contentURI);
}
}
}
@@ -89,6 +95,9 @@
{
if (EDIT_CONTENT.equals(req.getPortletMode()))
{
+ javax.portlet.PortletURL url = resp.createRenderURL();
+ System.out.println(url);
+
doEditContent(req, resp);
}
else
Modified: branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/portlet.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/portlet.xml 2008-06-11 12:37:53 UTC (rev 10984)
+++ branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/portlet.xml 2008-06-11 13:36:54 UTC (rev 10985)
@@ -54,6 +54,7 @@
</preference>
</portlet-preferences>
<supported-public-render-parameter>uri</supported-public-render-parameter>
+ <supported-publishing-event xmlns:x="urn:jboss:portal:content">x:select</supported-publishing-event>
</portlet>
<portlet>
@@ -106,6 +107,11 @@
<portlet-name>CMSAdminPortlet</portlet-name>
</filter-mapping>
+ <event-definition>
+ <qname xmlns:x="urn:jboss:portal:content">x:select</qname>
+ <value-type>java.lang.String</value-type>
+ </event-definition>
+
<public-render-parameter>
<identifier>uri</identifier>
<qname xmlns:c="urn:jboss:portal:content">c:uri</qname>
Modified: branches/JBoss_Portal_Branch_2_7/core-samples/src/main/org/jboss/portal/core/samples/basic/FSContentDrivenPortlet.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-samples/src/main/org/jboss/portal/core/samples/basic/FSContentDrivenPortlet.java 2008-06-11 12:37:53 UTC (rev 10984)
+++ branches/JBoss_Portal_Branch_2_7/core-samples/src/main/org/jboss/portal/core/samples/basic/FSContentDrivenPortlet.java 2008-06-11 13:36:54 UTC (rev 10985)
@@ -78,8 +78,6 @@
protected void doEditContent(RenderRequest req, RenderResponse resp) throws PortletException, PortletSecurityException, IOException
{
- System.out.println("Render: " + req.getParameter("current_dir"));
-
// Get the uri value optionally provided by the portal
String uri = req.getParameter("content.uri");
@@ -198,9 +196,6 @@
public void processAction(ActionRequest req, ActionResponse resp) throws PortletException, PortletSecurityException, IOException
{
-
- System.out.println("Action: " + req.getParameter("content.uri"));
-
if (EDIT_CONTENT_MODE.equals(req.getPortletMode()))
{
String contentURI = req.getParameter("content.uri");
Modified: branches/JBoss_Portal_Branch_2_7/faces/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_7/faces/.classpath 2008-06-11 12:37:53 UTC (rev 10984)
+++ branches/JBoss_Portal_Branch_2_7/faces/.classpath 2008-06-11 13:36:54 UTC (rev 10985)
@@ -15,7 +15,7 @@
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/common/lib/portal-common-lib.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/common/lib/portal-common-portal-lib.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-bridge-lib.jar"/>
- <classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-lib.jar" sourcepath="/module-portlet"/>
+ <classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-lib.jar" sourcepath="/module-portlet-2.0.0.CR2"/>
<classpathentry kind="lib" path="/thirdparty/portlet/lib/portlet-api.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/UIPortlet.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/UIPortlet.java 2008-06-11 12:37:53 UTC (rev 10984)
+++ branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/UIPortlet.java 2008-06-11 13:36:54 UTC (rev 10985)
@@ -487,36 +487,29 @@
switch (decoder.getType())
{
- case PortletRequestDecoder.RENDER_TYPE:
+ case PortletRequestDecoder.RENDER_TYPE :
- PortletRenderEvent prevent = new PortletRenderEvent(
- this,
- ((ParametersStateString)decoder.getNavigationalState()).getParameters(),
- mode,
- windowState);
- prevent.setPhaseId(PhaseId.INVOKE_APPLICATION);
- queueEvent(prevent);
+ PortletRenderEvent prevent = new PortletRenderEvent(this, ((ParametersStateString) decoder
+ .getNavigationalState()).getParameters(), mode, windowState);
+ prevent.setPhaseId(PhaseId.INVOKE_APPLICATION);
+ queueEvent(prevent);
- break;
- case PortletRequestDecoder.ACTION_TYPE:
+ break;
+ case PortletRequestDecoder.ACTION_TYPE :
-
- if (mode == null)
- {
- mode = getInternalMode();
- }
- if (windowState == null)
- {
- windowState = getInternalWindowState();
- }
- PortletActionEvent paevent = new PortletActionEvent(
- this,
- ((ParametersStateString)decoder.getInteractionState()).getParameters(),
- mode,
- windowState);
- paevent.setPhaseId(PhaseId.INVOKE_APPLICATION);
- queueEvent(paevent);
- break;
+ if (mode == null)
+ {
+ mode = getInternalMode();
+ }
+ if (windowState == null)
+ {
+ windowState = getInternalWindowState();
+ }
+ PortletActionEvent paevent = new PortletActionEvent(this, ((ParametersStateString) decoder
+ .getInteractionState()).getParameters(), mode, windowState);
+ paevent.setPhaseId(PhaseId.INVOKE_APPLICATION);
+ queueEvent(paevent);
+ break;
}
}
}
@@ -654,13 +647,11 @@
@Override
public void encodeChildren(FacesContext facesContext) throws IOException
{
- System.out.println("encodeChildren");
}
@Override
public void encodeEnd(FacesContext facesContext) throws IOException
{
- System.out.println("encodeEnd");
}
@Override
Modified: branches/JBoss_Portal_Branch_2_7/widget/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_7/widget/.classpath 2008-06-11 12:37:53 UTC (rev 10984)
+++ branches/JBoss_Portal_Branch_2_7/widget/.classpath 2008-06-11 13:36:54 UTC (rev 10985)
@@ -7,6 +7,7 @@
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/common/lib/portal-common-lib.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss/jbossxb/lib/jboss-xml-binding.jar"/>
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-common.jar"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/api"/>
<classpathentry kind="lib" path="/thirdparty/portlet/lib/portlet-api.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: branches/JBoss_Portal_Branch_2_7/widget/src/main/org/jboss/portal/widget/Widget.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/widget/src/main/org/jboss/portal/widget/Widget.java 2008-06-11 12:37:53 UTC (rev 10984)
+++ branches/JBoss_Portal_Branch_2_7/widget/src/main/org/jboss/portal/widget/Widget.java 2008-06-11 13:36:54 UTC (rev 10985)
@@ -40,8 +40,8 @@
LocalizedString getDescription();
- String render(Map parameters);
+ String render(Map<String, String> parameters);
- String render(Map parameters, Locale locale);
+ String render(Map<String, String> parameters, Locale locale);
}
Modified: branches/JBoss_Portal_Branch_2_7/widget/src/main/org/jboss/portal/widget/google/GGWidget.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/widget/src/main/org/jboss/portal/widget/google/GGWidget.java 2008-06-11 12:37:53 UTC (rev 10984)
+++ branches/JBoss_Portal_Branch_2_7/widget/src/main/org/jboss/portal/widget/google/GGWidget.java 2008-06-11 13:36:54 UTC (rev 10985)
@@ -90,12 +90,12 @@
return getInfo().getDescription();
}
- public String render(Map parameters)
+ public String render(Map<String, String> parameters)
{
return render(parameters, null);
}
- public String render(Map parameters, Locale locale)
+ public String render(Map<String, String> parameters, Locale locale)
{
String id = generator.generateKey();
StringBuffer tmp = new StringBuffer("http://gmodules.com/ig/ifr?url=").append(url);
@@ -124,13 +124,16 @@
//
GGPreferencesInfo prefsInfo = info.getPreferences();
- for (Iterator i = prefsInfo.getPreferences().iterator(); i.hasNext();)
+ for (Iterator<GGPreferenceInfo> i = prefsInfo.getPreferences().iterator(); i.hasNext();)
{
GGPreferenceInfo prefInfo = (GGPreferenceInfo)i.next();
String prefName = prefInfo.getName();
String defaultValue = prefInfo.getDefaultValue() != null ? prefInfo.getDefaultValue() : "";
- String[] values = (String[])parameters.get(prefName);
- String value = values != null ? values[0] : defaultValue;
+ String value = (String) parameters.get(prefName);
+ if (value == null)
+ {
+ value = defaultValue;
+ }
// if value is present and not a default parameter
if (value != null && !defaultValue.equals(value))
{
Modified: branches/JBoss_Portal_Branch_2_7/widget/src/main/org/jboss/portal/widget/google/GGWidgetPortlet.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/widget/src/main/org/jboss/portal/widget/google/GGWidgetPortlet.java 2008-06-11 12:37:53 UTC (rev 10984)
+++ branches/JBoss_Portal_Branch_2_7/widget/src/main/org/jboss/portal/widget/google/GGWidgetPortlet.java 2008-06-11 13:36:54 UTC (rev 10985)
@@ -22,6 +22,7 @@
******************************************************************************/
package org.jboss.portal.widget.google;
+import org.jboss.portal.api.content.SelectedContent;
import org.jboss.portal.widget.AbstractWidgetPortlet;
import org.jboss.portal.widget.Widget;
import org.jboss.portal.widget.WidgetProvider;
@@ -29,12 +30,13 @@
import javax.portlet.ActionRequest;
import javax.portlet.ActionResponse;
-import javax.portlet.PortletConfig;
import javax.portlet.PortletException;
import javax.portlet.PortletRequestDispatcher;
import javax.portlet.PortletSecurityException;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
+import javax.xml.namespace.QName;
+
import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashMap;
@@ -48,8 +50,7 @@
*/
public class GGWidgetPortlet extends AbstractWidgetPortlet
{
- /** . */
- private static final org.jboss.logging.Logger log = org.jboss.logging.Logger.getLogger(GGWidgetPortlet.class);
+ private static final QName CONTENT_SELECT = new QName("urn:jboss:portal:content", "select");
/** . */
private GGProvider provider = new GGProvider();
@@ -64,26 +65,27 @@
{
if (req.getParameter("content.action.select") != null)
{
- PortletConfig conf = getPortletConfig();
-
String contentURI = req.getParameter("content.uri");
if (contentURI != null)
{
// Will contain the next render params
- Map params = new HashMap();
+ Map<String, String[]> params = new HashMap<String, String[]>();
//
params.put("content.uri", new String[]{contentURI});
+ Map<String, String> widgetParams = new HashMap<String, String>();
+
//
- for (Iterator i = req.getParameterMap().entrySet().iterator(); i.hasNext();)
+ for (Iterator<Map.Entry<String, String[]>> i = req.getParameterMap().entrySet().iterator(); i.hasNext();)
{
- Map.Entry entry = (Map.Entry)i.next();
+ Map.Entry<String, String[]> entry = (Map.Entry<String, String[]>)i.next();
String contentParamName = (String)entry.getKey();
if (contentParamName.startsWith("content.param"))
{
String[] contentParamValue = (String[])entry.getValue();
params.put(contentParamName, contentParamValue);
+ widgetParams.put(contentParamName, contentParamValue[0]);
}
}
@@ -121,10 +123,14 @@
//
resp.setRenderParameters(params);
+
+
+ resp.setEvent(CONTENT_SELECT, new SelectedContent(contentURI, widgetParams));
+
}
}
}
-
+
protected void doView(RenderRequest req, RenderResponse resp) throws PortletException, PortletSecurityException, IOException
{
resp.setContentType("text/html");
@@ -137,7 +143,21 @@
{
resp.setTitle(widget.getTitle().getString(req.getLocale(), true));
}
- writer.print(widget.render(req.getParameterMap(), req.getLocale()));
+
+ Map<String, String> parametersMap = new HashMap<String, String>();
+
+ String[] parameters = req.getParameterValues("parameters");
+ if (parameters != null)
+ {
+ for (String encoded: parameters)
+ {
+ String[] decodedValue = SelectedContent.decode(encoded);
+ String value = (decodedValue.length == 2) ? decodedValue[1] : "";
+ parametersMap.put(decodedValue[0], value);
+ }
+ }
+
+ writer.print(widget.render(parametersMap, req.getLocale()));
}
else
{
@@ -161,7 +181,7 @@
protected void doEditContent(RenderRequest req, RenderResponse resp) throws PortletException, PortletSecurityException, IOException
{
resp.setContentType("text/html");
- Map map = req.getParameterMap();
+
//
req.setAttribute("provider", provider);
Modified: branches/JBoss_Portal_Branch_2_7/widget/src/main/org/jboss/portal/widget/google/info/GGPreferencesInfo.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/widget/src/main/org/jboss/portal/widget/google/info/GGPreferencesInfo.java 2008-06-11 12:37:53 UTC (rev 10984)
+++ branches/JBoss_Portal_Branch_2_7/widget/src/main/org/jboss/portal/widget/google/info/GGPreferencesInfo.java 2008-06-11 13:36:54 UTC (rev 10985)
@@ -39,16 +39,16 @@
public static final GGPreferencesInfo EMPTY_PREFS = new GGPreferencesInfo();
/** . */
- private final Map content;
+ private final Map<String, GGPreferenceInfo> content;
- public GGPreferencesInfo(Collection prefInfos)
+ public GGPreferencesInfo(Collection<GGPreferenceInfo> prefInfos)
{
if (prefInfos == null)
{
throw new IllegalArgumentException();
}
- content = new HashMap(prefInfos.size());
- for (Iterator i = prefInfos.iterator(); i.hasNext();)
+ content = new HashMap<String, GGPreferenceInfo>(prefInfos.size());
+ for (Iterator<GGPreferenceInfo> i = prefInfos.iterator(); i.hasNext();)
{
GGPreferenceInfo prefInfo = (GGPreferenceInfo)i.next();
content.put(prefInfo.getName(), prefInfo);
@@ -60,9 +60,9 @@
content = null;
}
- public Collection getPreferences()
+ public Collection<GGPreferenceInfo> getPreferences()
{
- return content == null ? Collections.EMPTY_SET : content.values();
+ return content == null ? Collections.<GGPreferenceInfo>emptySet() : content.values();
}
public GGPreferenceInfo getPreference(String name)
Modified: branches/JBoss_Portal_Branch_2_7/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesPreferencesInfo.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesPreferencesInfo.java 2008-06-11 12:37:53 UTC (rev 10984)
+++ branches/JBoss_Portal_Branch_2_7/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesPreferencesInfo.java 2008-06-11 13:36:54 UTC (rev 10985)
@@ -53,7 +53,7 @@
public Collection<String> getPreferences()
{
- return this.preferences == null ? Collections.EMPTY_SET : this.preferences.keySet();
+ return this.preferences == null ? Collections.<String>emptySet() : this.preferences.keySet();
}
public NetvibesPreferenceInfo getPreference(String key)
Modified: branches/JBoss_Portal_Branch_2_7/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesWidget.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesWidget.java 2008-06-11 12:37:53 UTC (rev 10984)
+++ branches/JBoss_Portal_Branch_2_7/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesWidget.java 2008-06-11 13:36:54 UTC (rev 10985)
@@ -88,12 +88,12 @@
return widgetInfo;
}
- public String render(Map parameters)
+ public String render(Map<String, String> parameters)
{
return render(parameters, null);
}
- public String render(Map parameters, Locale locale)
+ public String render(Map<String, String> parameters, Locale locale)
{
NetvibesWidgetInfo widgetInfo = getWidgetInfo();
if (widgetInfo != null)
@@ -109,12 +109,15 @@
if ( parameters.size() > 0 )
{
NetvibesPreferencesInfo preferences = widgetInfo.getPreferencesInfo();
- for(Iterator i = preferences.getPreferences().iterator(); i.hasNext();)
+ for(Iterator<String> i = preferences.getPreferences().iterator(); i.hasNext();)
{
NetvibesPreferenceInfo info = preferences.getPreference((String) i.next());
String name = info.getName();
- String[] values = (String[]) parameters.get(name);
- String value = values != null ? values[0] : info.getDefaultValue();
+ String value = (String) parameters.get(name);
+ if (value == null)
+ {
+ value = info.getDefaultValue();
+ }
if (value != null)
{
int index = name.toLowerCase().indexOf("height");
Modified: branches/JBoss_Portal_Branch_2_7/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesWidgetPortlet.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesWidgetPortlet.java 2008-06-11 12:37:53 UTC (rev 10984)
+++ branches/JBoss_Portal_Branch_2_7/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesWidgetPortlet.java 2008-06-11 13:36:54 UTC (rev 10985)
@@ -36,7 +36,9 @@
import javax.portlet.PortletSecurityException;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
+import javax.xml.namespace.QName;
+import org.jboss.portal.api.content.SelectedContent;
import org.jboss.portal.widget.AbstractWidgetPortlet;
import org.jboss.portal.widget.Widget;
import org.jboss.portal.widget.WidgetProvider;
@@ -48,6 +50,9 @@
*/
public class NetvibesWidgetPortlet extends AbstractWidgetPortlet
{
+
+ private static final QName CONTENT_SELECT = new QName("urn:jboss:portal:content", "select");
+
/** . */
private static final org.jboss.logging.Logger log = org.jboss.logging.Logger.getLogger(NetvibesWidgetPortlet.class);
@@ -95,20 +100,23 @@
if (contentURI != null)
{
// Will contain the next render params
- Map params = new HashMap();
+ Map<String, String[]> params = new HashMap<String, String[]>();
//
params.put("content.uri", new String[]{contentURI});
+
+ Map<String, String> widgetParams = new HashMap<String, String>();
//
- for (Iterator i = req.getParameterMap().entrySet().iterator(); i.hasNext();)
+ for (Iterator<Map.Entry<String, String[]>> i = req.getParameterMap().entrySet().iterator(); i.hasNext();)
{
- Map.Entry entry = (Map.Entry)i.next();
+ Map.Entry<String, String[]> entry = (Map.Entry<String, String[]>)i.next();
String contentParamName = (String)entry.getKey();
if (contentParamName.startsWith("content.param"))
{
String[] contentParamValue = (String[])entry.getValue();
params.put(contentParamName, contentParamValue);
+ widgetParams.put(contentParamName.substring("content.param.".length()), contentParamValue[0]);
}
}
@@ -153,6 +161,10 @@
//
resp.setRenderParameters(params);
+ resp.setRenderParameter("foo", "bar");
+
+ resp.setEvent(CONTENT_SELECT, new SelectedContent(contentURI, widgetParams));
+
}
}
}
@@ -173,7 +185,21 @@
{
resp.setTitle(widget.getTitle().getString(req.getLocale(), true));
}
- writer.print(widget.render(req.getParameterMap(), req.getLocale()));
+
+ Map<String, String> parametersMap = new HashMap<String, String>();
+
+ String[] parameters = req.getParameterValues("parameters");
+ if (parameters != null)
+ {
+ for (String encoded: parameters)
+ {
+ String[] decodedValue = SelectedContent.decode(encoded);
+ String value = (decodedValue.length == 2) ? decodedValue[1] : "";
+ parametersMap.put(decodedValue[0], value);
+ }
+ }
+
+ writer.print(widget.render(parametersMap, req.getLocale()));
}
else
{
@@ -182,7 +208,6 @@
writer.close();
}
-
protected void doDispatch(RenderRequest req, RenderResponse resp) throws PortletException, PortletSecurityException, IOException
{
if (EDIT_CONTENT.equals(req.getPortletMode()))
Modified: branches/JBoss_Portal_Branch_2_7/widget/src/main/org/jboss/portal/widget/netvibes/json/JSONObject.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/widget/src/main/org/jboss/portal/widget/netvibes/json/JSONObject.java 2008-06-11 12:37:53 UTC (rev 10984)
+++ branches/JBoss_Portal_Branch_2_7/widget/src/main/org/jboss/portal/widget/netvibes/json/JSONObject.java 2008-06-11 13:36:54 UTC (rev 10985)
@@ -258,7 +258,7 @@
*/
public JSONObject(Object bean) {
this();
- Class klass = bean.getClass();
+ Class<? extends Object> klass = bean.getClass();
Method[] methods = klass.getMethods();
for (int i = 0; i < methods.length; i += 1) {
try {
@@ -279,7 +279,7 @@
key = key.substring(0, 1).toLowerCase() +
key.substring(1);
}
- this.put(key, method.invoke(bean, null));
+ this.put(key, method.invoke(bean, (Object[])null));
}
} catch (Exception e) {
/* forget about it */
Modified: branches/JBoss_Portal_Branch_2_7/widget/src/resources/portal-widget-netvibes-war/WEB-INF/portlet.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/widget/src/resources/portal-widget-netvibes-war/WEB-INF/portlet.xml 2008-06-11 12:37:53 UTC (rev 10984)
+++ branches/JBoss_Portal_Branch_2_7/widget/src/resources/portal-widget-netvibes-war/WEB-INF/portlet.xml 2008-06-11 13:36:54 UTC (rev 10985)
@@ -23,10 +23,10 @@
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<portlet-app
- xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
+ xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
- version="1.0">
+ xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
+ version="2.0">
<portlet>
<description>Netvibes Widget Portlet</description>
<portlet-name>NetvibesWidgetPortlet</portlet-name>
@@ -66,5 +66,23 @@
<title>Netvibes Widget</title>
<keywords>widget,netvibes</keywords>
</portlet-info>
+ <supported-publishing-event xmlns:x="urn:jboss:portal:content">x:select</supported-publishing-event>
+ <supported-public-render-parameter>uri</supported-public-render-parameter>
+ <supported-public-render-parameter>parameters</supported-public-render-parameter>
</portlet>
+
+ <event-definition>
+ <qname xmlns:x="urn:jboss:portal:content">x:select</qname>
+ <value-type>org.jboss.portal.api.content.SelectedContent</value-type>
+ </event-definition>
+
+ <public-render-parameter>
+ <identifier>uri</identifier>
+ <qname xmlns:c="urn:jboss:portal:content">c:uri</qname>
+ </public-render-parameter>
+
+ <public-render-parameter>
+ <identifier>parameters</identifier>
+ <qname xmlns:c="urn:jboss:portal:content">c:parameters</qname>
+ </public-render-parameter>
</portlet-app>
Modified: branches/JBoss_Portal_Branch_2_7/widget/src/resources/portal-widget-war/WEB-INF/portlet.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/widget/src/resources/portal-widget-war/WEB-INF/portlet.xml 2008-06-11 12:37:53 UTC (rev 10984)
+++ branches/JBoss_Portal_Branch_2_7/widget/src/resources/portal-widget-war/WEB-INF/portlet.xml 2008-06-11 13:36:54 UTC (rev 10985)
@@ -23,10 +23,10 @@
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<portlet-app
- xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
+ xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
- version="1.0">
+ xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
+ version="2.0">
<portlet>
<description>Google Widget Portlet</description>
<portlet-name>GoogleWidgetPortlet</portlet-name>
@@ -61,5 +61,18 @@
<title>Google Widget</title>
<keywords>widget,google</keywords>
</portlet-info>
+ <supported-publishing-event xmlns:x="urn:jboss:portal:content">x:select</supported-publishing-event>
+ <supported-public-render-parameter>uri</supported-public-render-parameter>
</portlet>
+
+ <event-definition>
+ <qname xmlns:x="urn:jboss:portal:content">x:select</qname>
+ <value-type>org.jboss.portal.api.content.SelectedContent</value-type>
+ </event-definition>
+
+ <public-render-parameter>
+ <identifier>uri</identifier>
+ <qname xmlns:c="urn:jboss:portal:content">c:uri</qname>
+ </public-render-parameter>
+
</portlet-app>
17 years, 11 months
JBoss Portal SVN: r10984 - in modules/identity/trunk: idm and 12 other directories.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2008-06-11 08:37:53 -0400 (Wed, 11 Jun 2008)
New Revision: 10984
Added:
modules/identity/trunk/idm/
modules/identity/trunk/idm/pom.xml
modules/identity/trunk/idm/src/
modules/identity/trunk/idm/src/main/
modules/identity/trunk/idm/src/main/java/
modules/identity/trunk/idm/src/main/java/org/
modules/identity/trunk/idm/src/main/java/org/jboss/
modules/identity/trunk/idm/src/main/java/org/jboss/idm/
modules/identity/trunk/idm/src/main/java/org/jboss/idm/Identity.java
modules/identity/trunk/idm/src/main/java/org/jboss/idm/IdentityStore.java
modules/identity/trunk/idm/src/main/java/org/jboss/idm/IdentityStoreRepository.java
modules/identity/trunk/idm/src/main/java/org/jboss/idm/IdentityType.java
modules/identity/trunk/idm/src/main/java/org/jboss/idm/IdmException.java
modules/identity/trunk/idm/src/main/java/org/jboss/idm/RelationshipType.java
modules/identity/trunk/idm/src/main/java/org/jboss/idm/generic/
modules/identity/trunk/idm/src/main/java/org/jboss/idm/generic/GenericEntityType.java
modules/identity/trunk/idm/src/main/java/org/jboss/idm/generic/GenericRelationshipType.java
modules/identity/trunk/idm/src/main/java/org/jboss/portal/
modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/
modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/IdentityException.java
modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/api/
modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/api/EntityType.java
modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/api/Group.java
modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/api/GroupRelationshipType.java
modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/api/IdentityModule.java
modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/api/User.java
modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/spi/
modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/spi/GroupEntity.java
modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/spi/GroupIdentityStore.java
modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/spi/Relationship.java
modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/spi/UserEntity.java
modules/identity/trunk/idm/src/main/resources/
modules/identity/trunk/idm/src/test/
modules/identity/trunk/idm/src/test/java/
modules/identity/trunk/idm/src/test/resources/
Log:
another approach to the identity model
Added: modules/identity/trunk/idm/pom.xml
===================================================================
--- modules/identity/trunk/idm/pom.xml (rev 0)
+++ modules/identity/trunk/idm/pom.xml 2008-06-11 12:37:53 UTC (rev 10984)
@@ -0,0 +1,17 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.jboss.portal.identity</groupId>
+ <artifactId>module-parent</artifactId>
+ <relativePath>../build/pom.xml</relativePath>
+ <version>1.1.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>identity-idm</artifactId>
+ <packaging>jar</packaging>
+ <name>JBoss Portal Identity Management</name>
+
+ <build></build>
+
+</project>
+
Added: modules/identity/trunk/idm/src/main/java/org/jboss/idm/Identity.java
===================================================================
--- modules/identity/trunk/idm/src/main/java/org/jboss/idm/Identity.java (rev 0)
+++ modules/identity/trunk/idm/src/main/java/org/jboss/idm/Identity.java 2008-06-11 12:37:53 UTC (rev 10984)
@@ -0,0 +1,58 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+
+package org.jboss.idm;
+
+import org.jboss.idm.IdentityType;
+
+/**
+ * User, role, group, organization, community or any other kind of identity
+ *
+ * @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot com">Boleslaw Dawidowicz</a>
+ * @version : 0.1 $
+ */
+public interface Identity
+{
+
+ /**
+ * @return id of this identity
+ */
+ Object getId();
+
+ /**
+ * FQDN identifies the context of this object - identity store in which it is persisted and object id in this store
+ *
+ * @return full qualified domain name for this identity
+ */
+ String getFQDN();
+
+ /**
+ * @return type of this identity
+ */
+ IdentityType getType();
+
+ /**
+ * @return name of this identity
+ */
+ String getName();
+
+}
Added: modules/identity/trunk/idm/src/main/java/org/jboss/idm/IdentityStore.java
===================================================================
--- modules/identity/trunk/idm/src/main/java/org/jboss/idm/IdentityStore.java (rev 0)
+++ modules/identity/trunk/idm/src/main/java/org/jboss/idm/IdentityStore.java 2008-06-11 12:37:53 UTC (rev 10984)
@@ -0,0 +1,199 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+
+package org.jboss.idm;
+
+import java.util.Collection;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * Represents identity data store. Expose all needed generic methods to manipulate and persist identity data.
+ *
+ * @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot com">Boleslaw Dawidowicz</a>
+ * @version : 0.1 $
+ */
+public interface IdentityStore
+{
+
+ // Informations about identity store and its capabilities
+
+ /**
+ * @return id of this identity store
+ */
+ String getId();
+
+ /**
+ * @return set of identity types that can be persisted in this store
+ */
+ Set<IdentityType> getSupportedIdentities();
+
+ /**
+ * @param identityType
+ * @return boolean describing if given identity type can be persisted or retrieved using this identity store
+ */
+ boolean isIdentitySupported(IdentityType identityType);
+
+ /**
+ * @param fromType
+ * @param toType
+ * @param relationshipType
+ * @return true is given relationship can be persisted or retrieved using this identity store
+ * @throws IdmException
+ */
+ boolean isRelationshipSupported(IdentityType fromType, IdentityType toType, RelationshipType relationshipType) throws IdmException;
+
+
+
+ // Operations
+
+ /**
+ * Create new identity with a given name
+ *
+ * @param name
+ * @return
+ * @throws IdmException
+ */
+ Identity createIdentity(String name) throws IdmException;
+
+ /**
+ * Remove given identity
+ *
+ * @param identity
+ * @throws IdmException
+ */
+ void removeIdentity(Identity identity) throws IdmException;
+
+ /**
+ * Find identity with a given name
+ *
+ * @param name
+ * @return
+ * @throws IdmException
+ */
+ Identity findIdentity(String name) throws IdmException;
+
+ /**
+ * Find identity with a given id
+ *
+ * @param id
+ * @return
+ * @throws IdmException
+ */
+ Identity findIdentity(Object id) throws IdmException;
+
+ /**
+ * Find identities with a given attributes values
+ *
+ * @param attributes
+ * @return
+ * @throws IdmException
+ */
+ Collection findIdentities(Map<String, String[]> attributes) throws IdmException;
+
+
+ /**
+ * Find identites that have relationship with given identity. Relationships are directional (from parent to child).
+ *
+ * @param identity
+ * @param relationshipType
+ * @param parent defines if given identity is parent or child side in the relationship - default is true (parent)
+ * @return
+ * @throws IdmException
+ */
+ Collection findIdentities(Identity identity, RelationshipType relationshipType, boolean parent) throws IdmException;
+
+ /**
+ * Get attributes for the given identity
+ *
+ * @param identity
+ * @return
+ * @throws IdmException
+ */
+ Map<String, String[]> getAttributes(Identity identity) throws IdmException;
+
+ /**
+ * Update attributes with new values - previous values will be overwritten
+ * @param identity
+ * @param attributes
+ * @throws IdmException
+ */
+ void updateAttributes(Identity identity, Map<String, String[]> attributes) throws IdmException;
+
+ /**
+ * Add new attributes - if attribute with given name already exists the values will be appended
+ *
+ * @param identity
+ * @param attributes
+ * @throws IdmException
+ */
+ void addAttributes(Identity identity, Map<String, String[]> attributes) throws IdmException;
+
+ /**
+ * Remove attributes
+ *
+ * @param identity
+ * @param attributes
+ */
+ void removeAttributes(Identity identity, Set<String> attributes);
+
+ /**
+ * Create directional relationship of a given type between identities
+ *
+ * @param fromIdentity
+ * @param toIdentity
+ * @param relationshipType
+ * @throws IdmException
+ */
+ void createRelationship(Identity fromIdentity, Identity toIdentity, RelationshipType relationshipType) throws IdmException;
+
+ /**
+ * Remove relationship between identities. Relationships can be directional so order of parameters matters
+ *
+ * @param fromIdentity
+ * @param toIdentity
+ * @param relationshipType
+ * @throws IdmException
+ */
+ void removeRelationship(Identity fromIdentity, Identity toIdentity, RelationshipType relationshipType) throws IdmException;
+
+ /**
+ * Remove all relationships between identities. Direction of relationships doesn't matter - all active relationships
+ * will be removed
+ *
+ * @param identity1
+ * @param identity2
+ * @throws IdmException
+ */
+ void removeRelationships(Identity identity1, Identity identity2) throws IdmException;
+
+ /**
+ * Resolve relationship types between two identities. Relationships can be directional so order of parameters matters
+ *
+ * @param fromIdentity
+ * @param toIdentity
+ * @return
+ * @throws IdmException
+ */
+ Set<RelationshipType> resolveRelationships(Identity fromIdentity, Identity toIdentity) throws IdmException;
+
+}
Added: modules/identity/trunk/idm/src/main/java/org/jboss/idm/IdentityStoreRepository.java
===================================================================
--- modules/identity/trunk/idm/src/main/java/org/jboss/idm/IdentityStoreRepository.java (rev 0)
+++ modules/identity/trunk/idm/src/main/java/org/jboss/idm/IdentityStoreRepository.java 2008-06-11 12:37:53 UTC (rev 10984)
@@ -0,0 +1,56 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+
+package org.jboss.idm;
+
+import org.jboss.idm.IdentityStore;
+import org.jboss.idm.IdentityType;
+
+import java.util.Set;
+import java.util.Map;
+
+/**
+ * IdentityStoreRepository exposes identity object management operations and act as an entry point to many underlaying data stores.
+ * Its responsibility is to map identity objects, their state and relations between them across different identity stores.
+ *
+ * @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot com">Boleslaw Dawidowicz</a>
+ * @version : 0.1 $
+ */
+public interface IdentityStoreRepository extends IdentityStore
+{
+ /**
+ * @return a set of configured identity stores
+ */
+ Set<IdentityStore> getConfiguredIdentityStores();
+
+ /**
+ * @return mapping of IdentityType to the specific idenity store
+ */
+ Map<IdentityType, IdentityStore> getIdentityStoreMappings();
+
+ /**
+ * @param groupType
+ * @return proper identity store to store given identity type
+ */
+ IdentityStore getIdentityStore(IdentityType groupType);
+
+}
Added: modules/identity/trunk/idm/src/main/java/org/jboss/idm/IdentityType.java
===================================================================
--- modules/identity/trunk/idm/src/main/java/org/jboss/idm/IdentityType.java (rev 0)
+++ modules/identity/trunk/idm/src/main/java/org/jboss/idm/IdentityType.java 2008-06-11 12:37:53 UTC (rev 10984)
@@ -0,0 +1,69 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+
+package org.jboss.idm;
+
+import org.jboss.idm.RelationshipType;
+
+import java.util.Set;
+
+/**
+ * Defines type of the identity and possible relationships it can have. Relationships can be directional - from parent to child -
+ * to map hierarchical structure like trees. Methods in this interface enable to resolve relationships in which this
+ * identity type can be parent side.
+ *
+ * @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot com">Boleslaw Dawidowicz</a>
+ * @version : 0.1 $
+ */
+public interface IdentityType
+{
+
+ /**
+ * @return Name of the IdentityType
+ */
+ String getName();
+
+ /**
+ * @param identityType
+ * @param relationshipType
+ * @return true/false for supported/unsupported relationship with this identity type on the parent side
+ */
+ boolean isRelationshipSupported(IdentityType identityType, RelationshipType relationshipType);
+
+ /**
+ * @param relationshipType
+ * @return set of identity types that can have given relationship with this identity type on the parent side
+ */
+ Set<IdentityType> getSupportedIdentities(RelationshipType relationshipType);
+
+ /**
+ * @return set of identity types that can relationships with this identity type on the parent side
+ */
+ Set<IdentityType> getSupportedIdentities();
+
+ /**
+ * @param identityType
+ * @return set of relationships supported for the given identity type on the parent side
+ */
+ Set<RelationshipType> getSupportedRelationships(IdentityType identityType);
+
+}
Added: modules/identity/trunk/idm/src/main/java/org/jboss/idm/IdmException.java
===================================================================
--- modules/identity/trunk/idm/src/main/java/org/jboss/idm/IdmException.java (rev 0)
+++ modules/identity/trunk/idm/src/main/java/org/jboss/idm/IdmException.java 2008-06-11 12:37:53 UTC (rev 10984)
@@ -0,0 +1,49 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+
+package org.jboss.idm;
+
+/**
+ * @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot com">Boleslaw Dawidowicz</a>
+ * @version : 0.1 $
+ */
+public class IdmException extends Exception
+{
+ public IdmException()
+ {
+ }
+
+ public IdmException(String message)
+ {
+ super(message);
+ }
+
+ public IdmException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+ public IdmException(Throwable cause)
+ {
+ super(cause);
+ }
+}
Added: modules/identity/trunk/idm/src/main/java/org/jboss/idm/RelationshipType.java
===================================================================
--- modules/identity/trunk/idm/src/main/java/org/jboss/idm/RelationshipType.java (rev 0)
+++ modules/identity/trunk/idm/src/main/java/org/jboss/idm/RelationshipType.java 2008-06-11 12:37:53 UTC (rev 10984)
@@ -0,0 +1,37 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+
+package org.jboss.idm;
+
+/**
+ * @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot com">Boleslaw Dawidowicz</a>
+ * @version : 0.1 $
+ */
+public interface RelationshipType
+{
+
+ /**
+ * @return get unique name identifying this relationship type
+ */
+ String getName();
+
+}
Added: modules/identity/trunk/idm/src/main/java/org/jboss/idm/generic/GenericEntityType.java
===================================================================
--- modules/identity/trunk/idm/src/main/java/org/jboss/idm/generic/GenericEntityType.java (rev 0)
+++ modules/identity/trunk/idm/src/main/java/org/jboss/idm/generic/GenericEntityType.java 2008-06-11 12:37:53 UTC (rev 10984)
@@ -0,0 +1,133 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+
+package org.jboss.idm.generic;
+
+import org.jboss.idm.IdentityType;
+import org.jboss.idm.RelationshipType;
+
+import java.util.Set;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Collections;
+
+/**
+ * @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot com">Boleslaw Dawidowicz</a>
+ * @version : 0.1 $
+ */
+public enum GenericEntityType implements IdentityType
+{
+ IDENTITY,
+
+ ROLE,
+
+ ROLE_GROUP;
+
+ private final static Map<IdentityType, Set<RelationshipType>> roleRelationships = new HashMap<IdentityType, Set<RelationshipType>>();
+ private final static Map<IdentityType, Set<RelationshipType>> roleGroupRelationships = new HashMap<IdentityType, Set<RelationshipType>>();
+
+
+ static
+ {
+
+ Set<RelationshipType> nested = new HashSet<RelationshipType>();
+ nested.add(GenericRelationshipType.NESTED);
+
+ // ROLE
+ // can nest other users
+
+ roleRelationships.put(GenericEntityType.IDENTITY, nested);
+
+
+ // ROLE_GROUP
+ // can nest other roles
+
+ roleGroupRelationships.put(GenericEntityType.ROLE, nested);
+
+
+
+
+ }
+
+
+
+ public String getName()
+ {
+ return this.name();
+ }
+
+ public boolean isRelationshipSupported(IdentityType identityType, RelationshipType relationshipType)
+ {
+ Set<RelationshipType> relTypes = getRelationships().get(identityType);
+
+ if (relTypes != null && relTypes.contains(relationshipType))
+ {
+ return true;
+ }
+
+ return false;
+ }
+
+ public Set<IdentityType> getSupportedIdentities(RelationshipType relationshipType)
+ {
+ return getRelationships().keySet();
+ }
+
+ public Set<IdentityType> getSupportedIdentities()
+ {
+ return getRelationships().keySet();
+ }
+
+ public Set<RelationshipType> getSupportedRelationships(IdentityType identityType)
+ {
+
+ Set types = getRelationships().get(identityType);
+
+ if (types != null)
+ {
+ return types;
+ }
+
+ return Collections.emptySet();
+ }
+
+
+ private Map<IdentityType, Set<RelationshipType>> getRelationships()
+ {
+ if (this.getName().equals(ROLE.getName()))
+ {
+ return Collections.unmodifiableMap(roleRelationships);
+ }
+ else if (this.getName().equals(ROLE_GROUP.getName()))
+ {
+ return Collections.unmodifiableMap(roleGroupRelationships);
+ }
+
+ // IDENTITY or anything else
+
+ return Collections.emptyMap();
+
+ }
+
+
+}
Added: modules/identity/trunk/idm/src/main/java/org/jboss/idm/generic/GenericRelationshipType.java
===================================================================
--- modules/identity/trunk/idm/src/main/java/org/jboss/idm/generic/GenericRelationshipType.java (rev 0)
+++ modules/identity/trunk/idm/src/main/java/org/jboss/idm/generic/GenericRelationshipType.java 2008-06-11 12:37:53 UTC (rev 10984)
@@ -0,0 +1,41 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+
+package org.jboss.idm.generic;
+
+import org.jboss.idm.RelationshipType;
+
+/**
+ * @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot com">Boleslaw Dawidowicz</a>
+ * @version : 0.1 $
+ */
+public enum GenericRelationshipType implements RelationshipType
+{
+ NESTED,
+ HIERARCHICAL,
+ CUSTOM;
+
+ public String getName()
+ {
+ return this.name();
+ }
+}
Added: modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/IdentityException.java
===================================================================
--- modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/IdentityException.java (rev 0)
+++ modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/IdentityException.java 2008-06-11 12:37:53 UTC (rev 10984)
@@ -0,0 +1,49 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+
+package org.jboss.portal.identity;
+
+/**
+ * @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot com">Boleslaw Dawidowicz</a>
+ * @version : 0.1 $
+ */
+public class IdentityException extends Exception
+{
+ public IdentityException()
+ {
+ }
+
+ public IdentityException(String message)
+ {
+ super(message);
+ }
+
+ public IdentityException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+ public IdentityException(Throwable cause)
+ {
+ super(cause);
+ }
+}
Added: modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/api/EntityType.java
===================================================================
--- modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/api/EntityType.java (rev 0)
+++ modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/api/EntityType.java 2008-06-11 12:37:53 UTC (rev 10984)
@@ -0,0 +1,215 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+
+package org.jboss.portal.identity.api;
+
+import org.jboss.idm.IdentityType;
+import org.jboss.idm.RelationshipType;
+
+import java.util.Set;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Collections;
+
+/**
+ * @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot com">Boleslaw Dawidowicz</a>
+ * @version : 0.1 $
+ */
+public enum EntityType implements IdentityType
+{
+ // User
+ USER,
+
+ // Administration group - just to group users for common admin tasks
+ ADMINISTRATION,
+
+ // Organization (location, division, department, team...)
+ ORGANIZATION,
+
+ // Business role (manager, director, leader...)
+ BUSINESS,
+
+ // JEE security role
+ JEE,
+
+ // Community of users
+ COMMUNITY;
+
+ private final static Map<IdentityType, Set<RelationshipType>> administrationRelationships = new HashMap<IdentityType, Set<RelationshipType>>();
+ private final static Map<IdentityType, Set<RelationshipType>> organizationRelationships = new HashMap<IdentityType, Set<RelationshipType>>();
+ private final static Map<IdentityType, Set<RelationshipType>> businessRelationships = new HashMap<IdentityType, Set<RelationshipType>>();
+ private final static Map<IdentityType, Set<RelationshipType>> jeeRelationships = new HashMap<IdentityType, Set<RelationshipType>>();
+ private final static Map<IdentityType, Set<RelationshipType>> communityRelationships = new HashMap<IdentityType, Set<RelationshipType>>();
+
+ static
+ {
+
+ Set<RelationshipType> all = new HashSet<RelationshipType>();
+ all.add(GroupRelationshipType.HIERARCHICAL);
+ all.add(GroupRelationshipType.IMPLY);
+
+ Set<RelationshipType> imply = new HashSet<RelationshipType>();
+ imply.add(GroupRelationshipType.IMPLY);
+
+ Set<RelationshipType> hierarchical = new HashSet<RelationshipType>();
+ hierarchical.add(GroupRelationshipType.HIERARCHICAL);
+
+ // USER
+ //
+ // Is always child in the relationship so nothing is defined
+
+ // ADMINISTRATION
+ //
+ // Can contain USER and other ADMINISTRATION entities.
+ // Can imply any other identity type
+
+ administrationRelationships.put(EntityType.USER, hierarchical);
+ administrationRelationships.put(EntityType.ADMINISTRATION, all);
+ administrationRelationships.put(EntityType.ORGANIZATION, imply);
+ administrationRelationships.put(EntityType.BUSINESS, imply);
+ administrationRelationships.put(EntityType.JEE, imply);
+ administrationRelationships.put(EntityType.COMMUNITY, imply);
+
+ // ORGANIZATION
+ //
+ // Can contain USER, ORGANIZATION and BUSINESS entities
+ // Can imply any other identity type
+
+ organizationRelationships.put(EntityType.USER, hierarchical);
+ organizationRelationships.put(EntityType.ADMINISTRATION, imply);
+ organizationRelationships.put(EntityType.ORGANIZATION, all);
+ organizationRelationships.put(EntityType.BUSINESS, all);
+ organizationRelationships.put(EntityType.JEE, imply);
+ organizationRelationships.put(EntityType.COMMUNITY, imply);
+
+ // BUSINESS
+ //
+ // Can contain USER and other BUSINESS entities
+ // Can imply any other identity type
+
+ businessRelationships.put(EntityType.USER, hierarchical);
+ businessRelationships.put(EntityType.ADMINISTRATION, imply);
+ businessRelationships.put(EntityType.ORGANIZATION, imply);
+ businessRelationships.put(EntityType.BUSINESS, all);
+ businessRelationships.put(EntityType.JEE, imply);
+ businessRelationships.put(EntityType.COMMUNITY, imply);
+
+ // JEE
+ //
+ // Can contain USER entities
+ // Can imply any other identity type
+
+ jeeRelationships.put(EntityType.USER, hierarchical);
+ jeeRelationships.put(EntityType.ADMINISTRATION, imply);
+ jeeRelationships.put(EntityType.ORGANIZATION, imply);
+ jeeRelationships.put(EntityType.BUSINESS, imply);
+ jeeRelationships.put(EntityType.JEE, imply);
+ jeeRelationships.put(EntityType.COMMUNITY, imply);
+
+
+ // COMMUNITY
+ //
+ // Can contain USER and and other COMMUNITY entities
+ // Can imply any other identity type
+
+ communityRelationships.put(EntityType.USER, hierarchical);
+ communityRelationships.put(EntityType.ADMINISTRATION, imply);
+ communityRelationships.put(EntityType.ORGANIZATION, imply);
+ communityRelationships.put(EntityType.BUSINESS, imply);
+ communityRelationships.put(EntityType.JEE, imply);
+ communityRelationships.put(EntityType.COMMUNITY, all);
+
+ }
+
+
+
+ public String getName()
+ {
+ return this.name();
+ }
+
+ public boolean isRelationshipSupported(IdentityType identityType, RelationshipType relationshipType)
+ {
+ Set<RelationshipType> relTypes = getRelationships().get(identityType);
+
+ if (relTypes != null && relTypes.contains(relationshipType))
+ {
+ return true;
+ }
+
+ return false;
+ }
+
+ public Set<IdentityType> getSupportedIdentities(RelationshipType relationshipType)
+ {
+ return getRelationships().keySet();
+ }
+
+ public Set<IdentityType> getSupportedIdentities()
+ {
+ return getRelationships().keySet();
+ }
+
+ public Set<RelationshipType> getSupportedRelationships(IdentityType identityType)
+ {
+
+ Set types = getRelationships().get(identityType);
+
+ if (types != null)
+ {
+ return types;
+ }
+
+ return Collections.emptySet();
+ }
+
+
+ private Map<IdentityType, Set<RelationshipType>> getRelationships()
+ {
+ if (this.getName().equals(ADMINISTRATION.getName()))
+ {
+ return Collections.unmodifiableMap(administrationRelationships);
+ }
+ else if (this.getName().equals(ORGANIZATION.getName()))
+ {
+ return Collections.unmodifiableMap(organizationRelationships);
+ }
+ else if (this.getName().equals(BUSINESS.getName()))
+ {
+ return Collections.unmodifiableMap(businessRelationships);
+ }
+ else if (this.getName().equals(JEE.getName()))
+ {
+ return Collections.unmodifiableMap(jeeRelationships);
+ }
+ else if (this.getName().equals(COMMUNITY.getName()))
+ {
+ return Collections.unmodifiableMap(communityRelationships);
+ }
+
+ // USER or anything else
+
+ return Collections.emptyMap();
+
+ }
+}
Added: modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/api/Group.java
===================================================================
--- modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/api/Group.java (rev 0)
+++ modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/api/Group.java 2008-06-11 12:37:53 UTC (rev 10984)
@@ -0,0 +1,98 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+
+package org.jboss.portal.identity.api;
+
+import org.jboss.idm.Identity;
+
+import java.util.Map;
+import java.util.Set;
+
+/**
+ *
+ * @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot com">Boleslaw Dawidowicz</a>
+ * @version : 0.1 $
+ */
+public interface Group extends Identity
+{
+
+ EntityType getType();
+
+ /**
+ * @return map containing group attributes
+ */
+ Map<String, String[]> getAttributes();
+
+ /**
+ * Update user attribute values
+ * @param attrName
+ * @param values
+ * @return
+ */
+ boolean updateAttribute(String attrName, String[] values);
+
+ /**
+ * @return id of parent group for the relations of RelationType.HIERARCHICAL. If the parent id is null, this object
+ * is a child of a root group in the store
+ */
+ Object getParentId();
+
+ /**
+ * @return set of users assigned to this group
+ */
+ Set<User> getUsers();
+
+ /**
+ * @return set of groups that are either children of this group or implied for this group
+ */
+ Set<Group> getGroups();
+
+ /**
+ * @param type of the relation
+ * @return set of groups that have given relation type with this group and the direction of the relation is towords
+ * this group
+ */
+ Set<Group> getGroups(GroupRelationshipType type);
+
+ /**
+ * @param group
+ * @return returns a relationship type between this and given group.
+ */
+ GroupRelationshipType getRelationship(Group group);
+
+ /**
+ * Assign a set of groups to this group. All other group associations (with this relation type) for this group
+ * will be overrwitten
+ * @param toGroups
+ * @param type
+ * @return
+ */
+ boolean assignGroups(Set<Group> toGroups, GroupRelationshipType type);
+
+ /**
+ * Assign a set of users to this group. All other user associations will be overwritten for this group
+ * @param users
+ * @return
+ */
+ boolean assignUsers(Set<User> users);
+
+}
Added: modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/api/GroupRelationshipType.java
===================================================================
--- modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/api/GroupRelationshipType.java (rev 0)
+++ modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/api/GroupRelationshipType.java 2008-06-11 12:37:53 UTC (rev 10984)
@@ -0,0 +1,38 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+
+package org.jboss.portal.identity.api;
+
+/**
+ * @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot com">Boleslaw Dawidowicz</a>
+ * @version : 0.1 $
+ */
+public enum GroupRelationshipType implements org.jboss.idm.RelationshipType
+{
+ HIERARCHICAL,
+ IMPLY;
+
+ public String getName()
+ {
+ return this.name();
+ }
+}
Added: modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/api/IdentityModule.java
===================================================================
--- modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/api/IdentityModule.java (rev 0)
+++ modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/api/IdentityModule.java 2008-06-11 12:37:53 UTC (rev 10984)
@@ -0,0 +1,118 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+
+package org.jboss.portal.identity.api;
+
+import java.util.Set;
+import java.util.Map;
+
+/**
+ * IdentityModule exposes operations to creat/destroy/find users and roles. Methods to manipulate those objects and
+ * their relationships are exposed directly in Group and User classes.
+ *
+ * @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot com">Boleslaw Dawidowicz</a>
+ * @version : 0.1 $
+ */
+public interface IdentityModule
+{
+ // Users
+
+ /**
+ * Create new user in the data store
+ * @param userName
+ * @return
+ */
+ User createUser(String userName);
+
+ /**
+ * Remove user from the the data store
+ * @param user
+ * @return
+ */
+ boolean removeUser(User user);
+
+ /**
+ * Find user with a given user name
+ * @param userName
+ * @return
+ */
+ User findUser(String userName);
+
+ /**
+ * Find user with a given id
+ * @param id
+ * @return
+ */
+ User findUser(Object id);
+
+ /**
+ * Find users with a given properties values
+ * @param properties
+ * @return
+ */
+ Set<Group> findUsers(Map<String, String[]> properties);
+
+
+ // Groups
+
+ /**
+ * Create new group in the data store
+ * @param groupName
+ * @return
+ */
+ Group createGroup(String groupName, EntityType type);
+
+ /**
+ * Remove group from the data store
+ * @param group
+ * @return
+ */
+ boolean removeGroup(Group group);
+
+ /**
+ * Find group with a given name
+ * @param name
+ * @return
+ */
+ Group findGroup(String name);
+
+ /**
+ * Find Group with a given object id
+ * @param id
+ * @return
+ */
+ Group findGroup(Object id);
+
+ /**
+ * Find Group with a given group type
+ * @param entityType
+ * @return
+ */
+ Group findGroup(EntityType entityType);
+
+ /**
+ * Find groups with a given attributes values
+ * @param properties
+ * @return
+ */
+ Set<Group> findGroups(Map<String, String[]> properties);
+}
Added: modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/api/User.java
===================================================================
--- modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/api/User.java (rev 0)
+++ modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/api/User.java 2008-06-11 12:37:53 UTC (rev 10984)
@@ -0,0 +1,68 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+
+package org.jboss.portal.identity.api;
+
+import org.jboss.idm.Identity;
+
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot com">Boleslaw Dawidowicz</a>
+ * @version : 0.1 $
+ */
+public interface User extends Identity
+{
+
+ /**
+ * @return map containing user attributes
+ */
+ Map<String, String[]> getAttributes();
+
+ /**
+ * Update user attribute values
+ * @param attrName
+ * @param values
+ * @return
+ */
+ boolean updateAttribute(String attrName, String[] values);
+
+ /**
+ * @return a set of groups that this user belongs to
+ */
+ Set<Group> getGroups();
+
+ /**
+ * @param entityType
+ * @return a set of groups with a given groupType that this user belongs to
+ */
+ Set<Group> getGroups(EntityType entityType);
+
+ /**
+ * Assign a set of groups to this user. All other group associations will be overwritten
+ * @param groups
+ * @return
+ */
+ boolean assignGroups(Set<Group> groups);
+
+}
Added: modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/spi/GroupEntity.java
===================================================================
--- modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/spi/GroupEntity.java (rev 0)
+++ modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/spi/GroupEntity.java 2008-06-11 12:37:53 UTC (rev 10984)
@@ -0,0 +1,52 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+
+package org.jboss.portal.identity.spi;
+
+import org.jboss.portal.identity.api.EntityType;
+
+import java.util.Map;
+import java.util.Collection;
+
+/**
+ * @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot com">Boleslaw Dawidowicz</a>
+ * @version : 0.1 $
+ */
+public interface GroupEntity
+{
+ Object getId();
+
+ String getName();
+
+ EntityType getType();
+
+ Map<String, String[]> getAttributes();
+
+ Object getParentId();
+
+ Collection<Relationship> getFromRelations();
+
+ Collection<Relationship> getToRelations();
+
+ Collection<UserEntity> getUserEntities();
+
+}
Added: modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/spi/GroupIdentityStore.java
===================================================================
--- modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/spi/GroupIdentityStore.java (rev 0)
+++ modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/spi/GroupIdentityStore.java 2008-06-11 12:37:53 UTC (rev 10984)
@@ -0,0 +1,46 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+
+package org.jboss.portal.identity.spi;
+
+import org.jboss.idm.IdentityStore;
+import org.jboss.idm.IdentityType;
+
+import java.util.Set;
+
+/**
+ * @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot com">Boleslaw Dawidowicz</a>
+ * @version : 0.1 $
+ */
+public interface GroupIdentityStore extends IdentityStore
+{
+
+ boolean isUserStore();
+
+ boolean supportExternalGroupRelationships();
+
+
+ // TODO: Set of needed methods
+
+ // TODO: Mechanism for extensions and dynamic discovery of supported extended operations
+
+}
Added: modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/spi/Relationship.java
===================================================================
--- modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/spi/Relationship.java (rev 0)
+++ modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/spi/Relationship.java 2008-06-11 12:37:53 UTC (rev 10984)
@@ -0,0 +1,39 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+
+package org.jboss.portal.identity.spi;
+
+import org.jboss.idm.RelationshipType;
+
+/**
+ * @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot com">Boleslaw Dawidowicz</a>
+ * @version : 0.1 $
+ */
+public interface Relationship
+{
+ GroupEntity getFrom();
+
+ GroupEntity getTo();
+
+ RelationshipType getType();
+
+}
Added: modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/spi/UserEntity.java
===================================================================
--- modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/spi/UserEntity.java (rev 0)
+++ modules/identity/trunk/idm/src/main/java/org/jboss/portal/identity/spi/UserEntity.java 2008-06-11 12:37:53 UTC (rev 10984)
@@ -0,0 +1,43 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+
+package org.jboss.portal.identity.spi;
+
+import java.util.Map;
+import java.util.Collection;
+
+/**
+ * @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot com">Boleslaw Dawidowicz</a>
+ * @version : 0.1 $
+ */
+public interface UserEntity
+{
+
+ Object getId();
+
+ String getUserName();
+
+ Map<String, String[]> getAttributes();
+
+ Collection<GroupEntity> getGroupEntities();
+
+}
\ No newline at end of file
17 years, 11 months
JBoss Portal SVN: r10983 - modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-06-11 05:28:59 -0400 (Wed, 11 Jun 2008)
New Revision: 10983
Added:
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ClassicActionDecoderContext.java
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ClassicActionEncoderContext.java
Log:
move the protocol codec in the presentation-presentation module
Added: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ClassicActionDecoderContext.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ClassicActionDecoderContext.java (rev 0)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ClassicActionDecoderContext.java 2008-06-11 09:28:59 UTC (rev 10983)
@@ -0,0 +1,78 @@
+/******************************************************************************
+ * 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.jboss.portal.presentation.classic.protocol;
+
+import org.jboss.portal.web.WebRequest;
+import org.jboss.portal.web.Body;
+import org.jboss.portal.presentation.protocol.codec.ActionDecoderContext;
+
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class ClassicActionDecoderContext implements ActionDecoderContext
+{
+
+ /** . */
+ private final WebRequest.Verb verb;
+
+ /** . */
+ private final String path;
+
+ /** . */
+ private final Map<String, String[]> queryParameterMap;
+
+ /** . */
+ private final Body body;
+
+ public ClassicActionDecoderContext(WebRequest.Verb verb, String path, Map<String, String[]> queryParameterMap, Body body)
+ {
+ this.verb = verb;
+ this.path = path;
+ this.queryParameterMap = queryParameterMap;
+ this.body = body;
+ }
+
+ public WebRequest.Verb getVerb()
+ {
+ return verb;
+ }
+
+ public String getPath()
+ {
+ return path;
+ }
+
+ public Map<String, String[]> getQueryParameterMap()
+ {
+ return queryParameterMap;
+ }
+
+ public Body getBody()
+ {
+ return body;
+ }
+
+}
Added: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ClassicActionEncoderContext.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ClassicActionEncoderContext.java (rev 0)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ClassicActionEncoderContext.java 2008-06-11 09:28:59 UTC (rev 10983)
@@ -0,0 +1,58 @@
+/******************************************************************************
+ * 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.jboss.portal.presentation.classic.protocol;
+
+import org.jboss.portal.web.WebResponse;
+import org.jboss.portal.presentation.protocol.codec.ActionEncoderContext;
+
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class ClassicActionEncoderContext implements ActionEncoderContext
+{
+
+ /** . */
+ private final String navigationalState;
+
+ /** . */
+ private final WebResponse webResponse;
+
+ public ClassicActionEncoderContext(String navigationalState, WebResponse webResponse)
+ {
+ this.navigationalState = navigationalState;
+ this.webResponse = webResponse;
+ }
+
+ public String getNavigationalState()
+ {
+ return navigationalState;
+ }
+
+ public String renderURL(String path, Map<String, String[]> parameters) throws IllegalArgumentException
+ {
+ return webResponse.renderURL(path, parameters, null);
+ }
+}
17 years, 11 months
JBoss Portal SVN: r10982 - in modules/presentation/trunk: classic/src/main/java/org/jboss/portal/presentation/classic/protocol and 4 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-06-11 05:25:12 -0400 (Wed, 11 Jun 2008)
New Revision: 10982
Added:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/codec/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/codec/ActionDecoder.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/codec/ActionDecoderChain.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/codec/ActionDecoderContext.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/codec/ActionEncoder.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/codec/ActionEncoderChain.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/codec/ActionEncoderContext.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/codec/DefaultActionDecoder.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/codec/DefaultActionEncoder.java
Removed:
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionDecoder.java
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionDecoderChain.java
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionDecoderContext.java
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionEncoder.java
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionEncoderChain.java
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionEncoderContext.java
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/DefaultActionDecoder.java
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/DefaultActionEncoder.java
Modified:
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationClient.java
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationServlet.java
modules/presentation/trunk/portal/src/main/artifacts/presentation-portal-war/WEB-INF/jboss-beans.xml
modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/content/portlet/protocol/PortletActionDecoder.java
modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/content/portlet/protocol/PortletActionEncoder.java
Log:
move the protocol codec in the presentation-presentation module
Modified: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationClient.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationClient.java 2008-06-11 07:51:45 UTC (rev 10981)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationClient.java 2008-06-11 09:25:12 UTC (rev 10982)
@@ -24,12 +24,14 @@
import org.jboss.portal.presentation.classic.model.ClassicUINode;
import org.jboss.portal.presentation.classic.model.ClassicViewPortContext;
+import org.jboss.portal.presentation.classic.protocol.ClassicActionDecoderContext;
+import org.jboss.portal.presentation.classic.protocol.ClassicActionEncoderContext;
import org.jboss.portal.presentation.view.DefaultPageViewPortScope;
import org.jboss.portal.presentation.view.PageViewPortScope;
-import org.jboss.portal.presentation.classic.protocol.ActionDecoder;
-import org.jboss.portal.presentation.classic.protocol.ActionEncoder;
-import org.jboss.portal.presentation.classic.protocol.ActionEncoderContext;
-import org.jboss.portal.presentation.classic.protocol.ActionDecoderContext;
+import org.jboss.portal.presentation.protocol.codec.ActionDecoder;
+import org.jboss.portal.presentation.protocol.codec.ActionDecoderContext;
+import org.jboss.portal.presentation.protocol.codec.ActionEncoder;
+import org.jboss.portal.presentation.protocol.codec.ActionEncoderContext;
import org.jboss.portal.presentation.client.PresentationClient;
import org.jboss.portal.presentation.impl.model.UIModelImpl;
import org.jboss.portal.presentation.impl.state.navigational.NavigationalStateContextImpl;
@@ -122,7 +124,7 @@
}
//
- ActionDecoderContext decoderContext = new ActionDecoderContext(
+ ActionDecoderContext decoderContext = new ClassicActionDecoderContext(
req.getVerb(),
req.getWebRequestPath(),
req.getQueryParameterMap(),
@@ -241,7 +243,7 @@
{
byte[] bytes = IOTools.serialize(new NavigationalStateContextSerialization(), SerializationFilter.COMPRESSOR, navigationalStateContext);
String ns = Base64.encodeBytes(bytes, true);
- encoderContext = new ActionEncoderContext(ns, resp);
+ encoderContext = new ClassicActionEncoderContext(ns, resp);
//
StructuralStateContext ssc = server.getStructuralStateContext();
Modified: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationServlet.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationServlet.java 2008-06-11 07:51:45 UTC (rev 10981)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationServlet.java 2008-06-11 09:25:12 UTC (rev 10982)
@@ -24,8 +24,8 @@
import org.jboss.portal.presentation.server.PresentationServer;
import org.jboss.portal.presentation.server.PresentationServerException;
-import org.jboss.portal.presentation.classic.protocol.ActionEncoder;
-import org.jboss.portal.presentation.classic.protocol.ActionDecoder;
+import org.jboss.portal.presentation.protocol.codec.ActionEncoder;
+import org.jboss.portal.presentation.protocol.codec.ActionDecoder;
import org.jboss.portal.web.WebRequest;
import org.jboss.portal.web.WebResponse;
import org.jboss.portal.web.endpoint.EndPointServlet;
Deleted: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionDecoder.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionDecoder.java 2008-06-11 07:51:45 UTC (rev 10981)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionDecoder.java 2008-06-11 09:25:12 UTC (rev 10982)
@@ -1,36 +0,0 @@
-/******************************************************************************
- * 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.jboss.portal.presentation.classic.protocol;
-
-import org.jboss.portal.presentation.protocol.ProtocolAction;
-
-/**
- * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public interface ActionDecoder
-{
-
- ProtocolAction decode(ActionDecoderContext context);
-
- }
Deleted: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionDecoderChain.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionDecoderChain.java 2008-06-11 07:51:45 UTC (rev 10981)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionDecoderChain.java 2008-06-11 09:25:12 UTC (rev 10982)
@@ -1,60 +0,0 @@
-/******************************************************************************
- * 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.jboss.portal.presentation.classic.protocol;
-
-import org.jboss.portal.presentation.protocol.ProtocolAction;
-
-import java.util.List;
-
-/**
- * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public class ActionDecoderChain implements ActionDecoder
-{
-
- /** . */
- private final List<ActionDecoder> decoders;
-
- public ActionDecoderChain(List<ActionDecoder> decoders)
- {
- this.decoders = decoders;
- }
-
- public ProtocolAction decode(ActionDecoderContext context)
- {
- for (ActionDecoder decoder : decoders)
- {
- ProtocolAction action = decoder.decode(context);
-
- //
- if (action != null)
- {
- return action;
- }
- }
-
- //
- return null;
- }
-}
Deleted: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionDecoderContext.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionDecoderContext.java 2008-06-11 07:51:45 UTC (rev 10981)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionDecoderContext.java 2008-06-11 09:25:12 UTC (rev 10982)
@@ -1,76 +0,0 @@
-/******************************************************************************
- * 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.jboss.portal.presentation.classic.protocol;
-
-import org.jboss.portal.web.WebRequest;
-import org.jboss.portal.web.Body;
-
-import java.util.Map;
-
-/**
- * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public class ActionDecoderContext
-{
-
- /** . */
- private final WebRequest.Verb verb;
-
- /** . */
- private final String path;
-
- /** . */
- private final Map<String, String[]> queryParameterMap;
-
- /** . */
- private final Body body;
-
- public ActionDecoderContext(WebRequest.Verb verb, String path, Map<String, String[]> queryParameterMap, Body body)
- {
- this.verb = verb;
- this.path = path;
- this.queryParameterMap = queryParameterMap;
- this.body = body;
- }
-
- public WebRequest.Verb getVerb()
- {
- return verb;
- }
-
- public String getPath()
- {
- return path;
- }
-
- public Map<String, String[]> getQueryParameterMap()
- {
- return queryParameterMap;
- }
-
- public Body getBody()
- {
- return body;
- }
-}
Deleted: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionEncoder.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionEncoder.java 2008-06-11 07:51:45 UTC (rev 10981)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionEncoder.java 2008-06-11 09:25:12 UTC (rev 10982)
@@ -1,36 +0,0 @@
-/******************************************************************************
- * 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.jboss.portal.presentation.classic.protocol;
-
-import org.jboss.portal.presentation.protocol.ProtocolAction;
-
-/**
- * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public interface ActionEncoder
-{
-
- String encode(ProtocolAction action, ActionEncoderContext context);
-
-}
Deleted: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionEncoderChain.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionEncoderChain.java 2008-06-11 07:51:45 UTC (rev 10981)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionEncoderChain.java 2008-06-11 09:25:12 UTC (rev 10982)
@@ -1,60 +0,0 @@
-/******************************************************************************
- * 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.jboss.portal.presentation.classic.protocol;
-
-import org.jboss.portal.presentation.protocol.ProtocolAction;
-
-import java.util.List;
-
-/**
- * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public class ActionEncoderChain implements ActionEncoder
-{
-
- /** . */
- private List<ActionEncoder> encoders;
-
- public ActionEncoderChain(List<ActionEncoder> encoders)
- {
- this.encoders = encoders;
- }
-
- public String encode(ProtocolAction action, ActionEncoderContext context)
- {
- for (ActionEncoder encoder : encoders)
- {
- String v = encoder.encode(action, context);
-
- //
- if (v != null)
- {
- return v;
- }
- }
-
- //
- return null;
- }
-}
Deleted: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionEncoderContext.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionEncoderContext.java 2008-06-11 07:51:45 UTC (rev 10981)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionEncoderContext.java 2008-06-11 09:25:12 UTC (rev 10982)
@@ -1,57 +0,0 @@
-/******************************************************************************
- * 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.jboss.portal.presentation.classic.protocol;
-
-import org.jboss.portal.web.WebResponse;
-
-import java.util.Map;
-
-/**
- * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public class ActionEncoderContext
-{
-
- /** . */
- private final String navigationalState;
-
- /** . */
- private final WebResponse webResponse;
-
- public ActionEncoderContext(String navigationalState, WebResponse webResponse)
- {
- this.navigationalState = navigationalState;
- this.webResponse = webResponse;
- }
-
- public String getNavigationalState()
- {
- return navigationalState;
- }
-
- public String renderURL(String path, Map<String, String[]> parameters) throws IllegalArgumentException
- {
- return webResponse.renderURL(path, parameters, null);
- }
-}
Deleted: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/DefaultActionDecoder.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/DefaultActionDecoder.java 2008-06-11 07:51:45 UTC (rev 10981)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/DefaultActionDecoder.java 2008-06-11 09:25:12 UTC (rev 10982)
@@ -1,87 +0,0 @@
-/******************************************************************************
- * 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.jboss.portal.presentation.classic.protocol;
-
-import org.jboss.portal.presentation.protocol.GetActivation;
-import org.jboss.portal.presentation.protocol.PostActivation;
-import org.jboss.portal.presentation.protocol.ProtocolAction;
-import org.jboss.portal.presentation.protocol.ViewUIObjectAction;
-import org.jboss.portal.common.NotYetImplemented;
-
-/**
- * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public class DefaultActionDecoder implements ActionDecoder
-{
-
- public ProtocolAction decode(ActionDecoderContext context)
- {
- ProtocolAction action = null;
-
- //
- String webPath = context.getPath();
-
- //
- if (webPath.startsWith("/view/"))
- {
- String targetId = webPath.substring("/view/".length());
- action = new ViewUIObjectAction(targetId);
- }
- else if (webPath.startsWith("/invoke/"))
- {
- int from = "/invoke/".length();
-
- //
- String path = null;
- int to = webPath.indexOf('/', from + 1);
- if (to == -1)
- {
- to = webPath.length();
- }
- else
- {
- path = webPath.substring(to + 1);
- }
-
- //
- String targetId = webPath.substring(from, to);
-
- //
- switch (context.getVerb())
- {
- case GET:
- action= new GetActivation(targetId, path, context.getQueryParameterMap());
- break;
- case POST:
- action = new PostActivation(targetId, path, context.getQueryParameterMap(), context.getBody());
- break;
- default:
- throw new NotYetImplemented();
- }
- }
-
- //
- return action;
- }
-}
\ No newline at end of file
Deleted: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/DefaultActionEncoder.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/DefaultActionEncoder.java 2008-06-11 07:51:45 UTC (rev 10981)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/DefaultActionEncoder.java 2008-06-11 09:25:12 UTC (rev 10982)
@@ -1,68 +0,0 @@
-/******************************************************************************
- * 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.jboss.portal.presentation.classic.protocol;
-
-import org.jboss.portal.common.text.FastURLEncoder;
-import org.jboss.portal.presentation.protocol.LinkActivation;
-import org.jboss.portal.presentation.protocol.ProtocolAction;
-import org.jboss.portal.presentation.protocol.UIObjectAction;
-import org.jboss.portal.presentation.protocol.ViewUIObjectAction;
-
-/**
- * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public class DefaultActionEncoder implements ActionEncoder
-{
-
- public DefaultActionEncoder()
- {
- }
-
- public String encode(ProtocolAction action, ActionEncoderContext context)
- {
- if (action instanceof UIObjectAction)
- {
- UIObjectAction objectAction = (UIObjectAction)action;
-
- //
- String targetId = FastURLEncoder.getUTF8Instance().encode(objectAction.getTargetId());
-
- //
- if (action instanceof ViewUIObjectAction)
- {
- return context.renderURL("/view/" + targetId, null);
- }
- else if (action instanceof LinkActivation)
- {
- LinkActivation linkActivationAction = (LinkActivation)action;
-
- //
- return context.renderURL("/invoke/" + targetId, linkActivationAction.getQueryParameters());
- }
- }
-
- //
- return null;
- }
-}
\ No newline at end of file
Modified: modules/presentation/trunk/portal/src/main/artifacts/presentation-portal-war/WEB-INF/jboss-beans.xml
===================================================================
--- modules/presentation/trunk/portal/src/main/artifacts/presentation-portal-war/WEB-INF/jboss-beans.xml 2008-06-11 07:51:45 UTC (rev 10981)
+++ modules/presentation/trunk/portal/src/main/artifacts/presentation-portal-war/WEB-INF/jboss-beans.xml 2008-06-11 09:25:12 UTC (rev 10982)
@@ -105,9 +105,9 @@
- <bean name="DefaultActionEncoder" class="org.jboss.portal.presentation.classic.protocol.DefaultActionEncoder"/>
+ <bean name="DefaultActionEncoder" class="org.jboss.portal.presentation.protocol.codec.DefaultActionEncoder"/>
<bean name="PortletActionEncoder" class="org.jboss.portal.presentation.portal.content.portlet.protocol.PortletActionEncoder"/>
- <bean name="ActionEncoder" class="org.jboss.portal.presentation.classic.protocol.ActionEncoderChain">
+ <bean name="ActionEncoder" class="org.jboss.portal.presentation.protocol.codec.ActionEncoderChain">
<constructor>
<parameter>
<list>
@@ -118,9 +118,9 @@
</constructor>
</bean>
- <bean name="DefaultActionDecoder" class="org.jboss.portal.presentation.classic.protocol.DefaultActionDecoder"/>
+ <bean name="DefaultActionDecoder" class="org.jboss.portal.presentation.protocol.codec.DefaultActionDecoder"/>
<bean name="PortletActionDecoder" class="org.jboss.portal.presentation.portal.content.portlet.protocol.PortletActionDecoder"/>
- <bean name="ActionDecoder" class="org.jboss.portal.presentation.classic.protocol.ActionDecoderChain">
+ <bean name="ActionDecoder" class="org.jboss.portal.presentation.protocol.codec.ActionDecoderChain">
<constructor>
<parameter>
<list>
Modified: modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/content/portlet/protocol/PortletActionDecoder.java
===================================================================
--- modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/content/portlet/protocol/PortletActionDecoder.java 2008-06-11 07:51:45 UTC (rev 10981)
+++ modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/content/portlet/protocol/PortletActionDecoder.java 2008-06-11 09:25:12 UTC (rev 10982)
@@ -22,8 +22,8 @@
******************************************************************************/
package org.jboss.portal.presentation.portal.content.portlet.protocol;
-import org.jboss.portal.presentation.classic.protocol.ActionDecoder;
-import org.jboss.portal.presentation.classic.protocol.ActionDecoderContext;
+import org.jboss.portal.presentation.protocol.codec.ActionDecoder;
+import org.jboss.portal.presentation.protocol.codec.ActionDecoderContext;
import org.jboss.portal.presentation.protocol.ProtocolAction;
import org.jboss.portal.portlet.StateString;
import org.jboss.portal.portlet.LifeCyclePhase;
Modified: modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/content/portlet/protocol/PortletActionEncoder.java
===================================================================
--- modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/content/portlet/protocol/PortletActionEncoder.java 2008-06-11 07:51:45 UTC (rev 10981)
+++ modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/content/portlet/protocol/PortletActionEncoder.java 2008-06-11 09:25:12 UTC (rev 10982)
@@ -22,8 +22,8 @@
******************************************************************************/
package org.jboss.portal.presentation.portal.content.portlet.protocol;
-import org.jboss.portal.presentation.classic.protocol.ActionEncoder;
-import org.jboss.portal.presentation.classic.protocol.ActionEncoderContext;
+import org.jboss.portal.presentation.protocol.codec.ActionEncoder;
+import org.jboss.portal.presentation.protocol.codec.ActionEncoderContext;
import org.jboss.portal.presentation.protocol.ProtocolAction;
import java.util.Map;
Added: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/codec/ActionDecoder.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/codec/ActionDecoder.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/codec/ActionDecoder.java 2008-06-11 09:25:12 UTC (rev 10982)
@@ -0,0 +1,36 @@
+/******************************************************************************
+ * 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.jboss.portal.presentation.protocol.codec;
+
+import org.jboss.portal.presentation.protocol.ProtocolAction;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public interface ActionDecoder
+{
+
+ ProtocolAction decode(ActionDecoderContext context);
+
+ }
Added: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/codec/ActionDecoderChain.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/codec/ActionDecoderChain.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/codec/ActionDecoderChain.java 2008-06-11 09:25:12 UTC (rev 10982)
@@ -0,0 +1,60 @@
+/******************************************************************************
+ * 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.jboss.portal.presentation.protocol.codec;
+
+import org.jboss.portal.presentation.protocol.ProtocolAction;
+
+import java.util.List;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class ActionDecoderChain implements ActionDecoder
+{
+
+ /** . */
+ private final List<ActionDecoder> decoders;
+
+ public ActionDecoderChain(List<ActionDecoder> decoders)
+ {
+ this.decoders = decoders;
+ }
+
+ public ProtocolAction decode(ActionDecoderContext context)
+ {
+ for (ActionDecoder decoder : decoders)
+ {
+ ProtocolAction action = decoder.decode(context);
+
+ //
+ if (action != null)
+ {
+ return action;
+ }
+ }
+
+ //
+ return null;
+ }
+}
Added: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/codec/ActionDecoderContext.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/codec/ActionDecoderContext.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/codec/ActionDecoderContext.java 2008-06-11 09:25:12 UTC (rev 10982)
@@ -0,0 +1,44 @@
+/******************************************************************************
+ * 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.jboss.portal.presentation.protocol.codec;
+
+import org.jboss.portal.web.WebRequest;
+import org.jboss.portal.web.Body;
+
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public interface ActionDecoderContext
+{
+
+ WebRequest.Verb getVerb();
+
+ String getPath();
+
+ Map<String, String[]> getQueryParameterMap();
+
+ Body getBody();
+}
Added: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/codec/ActionEncoder.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/codec/ActionEncoder.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/codec/ActionEncoder.java 2008-06-11 09:25:12 UTC (rev 10982)
@@ -0,0 +1,36 @@
+/******************************************************************************
+ * 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.jboss.portal.presentation.protocol.codec;
+
+import org.jboss.portal.presentation.protocol.ProtocolAction;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public interface ActionEncoder
+{
+
+ String encode(ProtocolAction action, ActionEncoderContext context);
+
+}
Added: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/codec/ActionEncoderChain.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/codec/ActionEncoderChain.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/codec/ActionEncoderChain.java 2008-06-11 09:25:12 UTC (rev 10982)
@@ -0,0 +1,60 @@
+/******************************************************************************
+ * 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.jboss.portal.presentation.protocol.codec;
+
+import org.jboss.portal.presentation.protocol.ProtocolAction;
+
+import java.util.List;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class ActionEncoderChain implements ActionEncoder
+{
+
+ /** . */
+ private List<ActionEncoder> encoders;
+
+ public ActionEncoderChain(List<ActionEncoder> encoders)
+ {
+ this.encoders = encoders;
+ }
+
+ public String encode(ProtocolAction action, ActionEncoderContext context)
+ {
+ for (ActionEncoder encoder : encoders)
+ {
+ String v = encoder.encode(action, context);
+
+ //
+ if (v != null)
+ {
+ return v;
+ }
+ }
+
+ //
+ return null;
+ }
+}
Added: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/codec/ActionEncoderContext.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/codec/ActionEncoderContext.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/codec/ActionEncoderContext.java 2008-06-11 09:25:12 UTC (rev 10982)
@@ -0,0 +1,37 @@
+/******************************************************************************
+ * 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.jboss.portal.presentation.protocol.codec;
+
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public interface ActionEncoderContext
+{
+
+ String getNavigationalState();
+
+ String renderURL(String path, Map<String, String[]> parameters) throws IllegalArgumentException;
+}
Added: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/codec/DefaultActionDecoder.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/codec/DefaultActionDecoder.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/codec/DefaultActionDecoder.java 2008-06-11 09:25:12 UTC (rev 10982)
@@ -0,0 +1,87 @@
+/******************************************************************************
+ * 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.jboss.portal.presentation.protocol.codec;
+
+import org.jboss.portal.presentation.protocol.GetActivation;
+import org.jboss.portal.presentation.protocol.PostActivation;
+import org.jboss.portal.presentation.protocol.ProtocolAction;
+import org.jboss.portal.presentation.protocol.ViewUIObjectAction;
+import org.jboss.portal.common.NotYetImplemented;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class DefaultActionDecoder implements ActionDecoder
+{
+
+ public ProtocolAction decode(ActionDecoderContext context)
+ {
+ ProtocolAction action = null;
+
+ //
+ String webPath = context.getPath();
+
+ //
+ if (webPath.startsWith("/view/"))
+ {
+ String targetId = webPath.substring("/view/".length());
+ action = new ViewUIObjectAction(targetId);
+ }
+ else if (webPath.startsWith("/invoke/"))
+ {
+ int from = "/invoke/".length();
+
+ //
+ String path = null;
+ int to = webPath.indexOf('/', from + 1);
+ if (to == -1)
+ {
+ to = webPath.length();
+ }
+ else
+ {
+ path = webPath.substring(to + 1);
+ }
+
+ //
+ String targetId = webPath.substring(from, to);
+
+ //
+ switch (context.getVerb())
+ {
+ case GET:
+ action= new GetActivation(targetId, path, context.getQueryParameterMap());
+ break;
+ case POST:
+ action = new PostActivation(targetId, path, context.getQueryParameterMap(), context.getBody());
+ break;
+ default:
+ throw new NotYetImplemented();
+ }
+ }
+
+ //
+ return action;
+ }
+}
\ No newline at end of file
Added: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/codec/DefaultActionEncoder.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/codec/DefaultActionEncoder.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/codec/DefaultActionEncoder.java 2008-06-11 09:25:12 UTC (rev 10982)
@@ -0,0 +1,68 @@
+/******************************************************************************
+ * 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.jboss.portal.presentation.protocol.codec;
+
+import org.jboss.portal.common.text.FastURLEncoder;
+import org.jboss.portal.presentation.protocol.LinkActivation;
+import org.jboss.portal.presentation.protocol.ProtocolAction;
+import org.jboss.portal.presentation.protocol.UIObjectAction;
+import org.jboss.portal.presentation.protocol.ViewUIObjectAction;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class DefaultActionEncoder implements ActionEncoder
+{
+
+ public DefaultActionEncoder()
+ {
+ }
+
+ public String encode(ProtocolAction action, ActionEncoderContext context)
+ {
+ if (action instanceof UIObjectAction)
+ {
+ UIObjectAction objectAction = (UIObjectAction)action;
+
+ //
+ String targetId = FastURLEncoder.getUTF8Instance().encode(objectAction.getTargetId());
+
+ //
+ if (action instanceof ViewUIObjectAction)
+ {
+ return context.renderURL("/view/" + targetId, null);
+ }
+ else if (action instanceof LinkActivation)
+ {
+ LinkActivation linkActivationAction = (LinkActivation)action;
+
+ //
+ return context.renderURL("/invoke/" + targetId, linkActivationAction.getQueryParameters());
+ }
+ }
+
+ //
+ return null;
+ }
+}
\ No newline at end of file
17 years, 11 months
JBoss Portal SVN: r10981 - branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/common.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-06-11 03:51:45 -0400 (Wed, 11 Jun 2008)
New Revision: 10981
Modified:
branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/common/PageManagerBean.java
Log:
- create a new HashMap for now
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/common/PageManagerBean.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/common/PageManagerBean.java 2008-06-11 05:20:39 UTC (rev 10980)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/common/PageManagerBean.java 2008-06-11 07:51:45 UTC (rev 10981)
@@ -124,7 +124,7 @@
public String selectedContentURI;
/** . */
- public Map selectedContentParameters;
+ private Map<String,String> selectedContentParameters;
/** . */
public Map selectedRenderParameters;
@@ -274,7 +274,7 @@
{
//
String selectedContentURI = this.selectedContentURI;
- Map selectedContentParams = this.selectedContentParameters;
+ Map<String,String> selectedContentParams = this.selectedContentParameters;
// Reset to new state
this.selectedContentURI = null;
@@ -417,7 +417,7 @@
this.selectedContentURI = uri;
// TODO: Get params from the payload (for widgets)
- this.selectedContentParameters = eventEvent.getParameterMap();
+ this.selectedContentParameters = new HashMap();
}
}
else if (event instanceof PortletActionEvent)
17 years, 11 months
JBoss Portal SVN: r10980 - docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: mmcallis
Date: 2008-06-11 01:20:39 -0400 (Wed, 11 Jun 2008)
New Revision: 10980
Modified:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/configuration.xml
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/identity.xml
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/ldap.xml
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/portalapi.xml
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/tutorials.xml
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/wsrp.xml
Log:
fixing "Java" trademark attributions
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/configuration.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/configuration.xml 2008-06-11 05:01:31 UTC (rev 10979)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/configuration.xml 2008-06-11 05:20:39 UTC (rev 10980)
@@ -257,13 +257,13 @@
decided to build JBoss Portal from the sources, to access RSS feeds or weather information in the samples
portlet we provide or for your own needs.</para>
<para>To configure the proxy settings, you need to know the proxy host and the port to use. Then,
- add them when starting Java.</para>
+ add them when starting <trademark class="trade">Java</trademark>.</para>
<para>Usually setting up JAVA_OPTS environment variable to <literal>-Dhttp.proxyHost=YOUR_PROXY_HOST -Dhttp.proxyPort=YOUR_PROXY_PORT</literal>
is enough.</para>
</sect1>
<sect1>
<title>Disabling Dynamic Proxy Un-wrapping</title>
- <para>JBoss Portal uses the JBoss Microkernel for the service infrastructure. The JBoss Microkernel provides injection of services into other services, otherwise known as wiring. Due to the Microkernel being JMX based, it is only possible to inject dynamic proxies that talk to the MBeanServer. The overhead at runtime is minimal since the Microkernel implementation is highly optimized; however, when it is used with Java 5, a noticeable bottleneck occurs due to the fact that the implementation of the JMX API classes, <emphasis>javax.management.*</emphasis>, provided by the Java Platform, perform synchronization. This does not occur under JDK 1.4, since those classes are implemented by JBoss MX.
+ <para>JBoss Portal uses the JBoss Microkernel for the service infrastructure. The JBoss Microkernel provides injection of services into other services, otherwise known as wiring. Due to the Microkernel being JMX based, it is only possible to inject dynamic proxies that talk to the MBeanServer. The overhead at runtime is minimal since the Microkernel implementation is highly optimized; however, when it is used with <trademark class="trade">Java</trademark> 5, a noticeable bottleneck occurs due to the fact that the implementation of the JMX API classes, <emphasis>javax.management.*</emphasis>, provided by the Java Platform, perform synchronization. This does not occur under JDK 1.4, since those classes are implemented by JBoss MX.
</para>
<para>
JBoss Portal services use a special kind of Model MBean called <emphasis>JBossServiceModelMBean</emphasis>, which allows the un-wrapping of injected dynamic proxies, and replaces them with Plain Old Java Object (POJO) services. This removes the bottleneck when using Java 5, and also provides a performance boost on JDK 1.4. By default this feature is enabled, but it is possible to disable. To do this on <trademark class="registered">Linux</trademark> systems, change into the <filename>$JBOSS_HOME/bin/</filename> directory and run the following command:
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/identity.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/identity.xml 2008-06-11 05:01:31 UTC (rev 10979)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/identity.xml 2008-06-11 05:20:39 UTC (rev 10980)
@@ -386,8 +386,8 @@
<sect1>
<title>Identity configuration</title>
<para>In order to understand identity configuration you need to understand its architecture.
- Different identity services like UserModule, RoleModule and etc are just plain java classes that are instantiated and exposed
- by the portal. So an *example* of UserModule service could be a plain java bean object that would be:
+ Different identity services like UserModule, RoleModule and etc are just plain <trademark class="trade">Java</trademark> classes that are instantiated and exposed
+ by the portal. So an *example* of UserModule service could be a plain Java bean object that would be:
<itemizedlist>
<listitem><emphasis role="bold">Instantiated</emphasis> using reflection</listitem>
<listitem><emphasis role="bold">Initialized/Started</emphasis> by invoking some methods</listitem>
@@ -396,7 +396,7 @@
<listitem><emphasis role="bold">Managed</emphasis> in the matter of lifecycle - so it'll be stopped and unregistered during
portal shutdown</listitem>
</itemizedlist>
- As you see from this point of view, configuration just specifies what java class will be used and how it should be used by portal as a service.
+ As you see from this point of view, configuration just specifies what Java class will be used and how it should be used by portal as a service.
<note>We use JBoss Microcontainer internally to manage the sub system made of those components so if you are interested in implementing
custom services - look on the methods that are used by this framework.</note>
</para>
@@ -566,7 +566,7 @@
</listitem>
<listitem>
<para>
- <emphasis role="bold">class</emphasis> - java class that will be use to instantiate the module.
+ <emphasis role="bold">class</emphasis> - <trademark class="trade">Java</trademark> class that will be use to instantiate the module.
</para>
</listitem>
<listitem>
@@ -754,7 +754,7 @@
<emphasis role="bold">name</emphasis> - property name. This value will be used to refer to the property in <emphasis>UserProfileModule</emphasis>
</listitem>
<listitem>
- <emphasis role="bold">type</emphasis> - java type of property. This type will be checked when in <emphasis>UserProfileModule</emphasis>
+ <emphasis role="bold">type</emphasis> - <trademark class="trade">Java</trademark> type of property. This type will be checked when in <emphasis>UserProfileModule</emphasis>
methods invocation.
</listitem>
<listitem>
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/ldap.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/ldap.xml 2008-06-11 05:01:31 UTC (rev 10979)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/ldap.xml 2008-06-11 05:20:39 UTC (rev 10980)
@@ -154,7 +154,7 @@
</config>
</datasource>]]></programlisting>
<para>
- Remember, as it is described in the <ulink url="http://java.sun.com/products/jndi/tutorial/ldap/connect/config.html">JNDI documentation</ulink>, these options are system properties, not environment properties, and as such, they affect all connection pooling requests in the Java runtime environment.
+ Remember, as it is described in the <ulink url="http://java.sun.com/products/jndi/tutorial/ldap/connect/config.html">JNDI documentation</ulink>, these options are system properties, not environment properties, and as such, they affect all connection pooling requests in the <trademark class="trade">Java runtime environment</trademark>.
</para>
</sect2>
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/portalapi.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/portalapi.xml 2008-06-11 05:01:31 UTC (rev 10979)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/portalapi.xml 2008-06-11 05:20:39 UTC (rev 10980)
@@ -416,7 +416,7 @@
On this method we simply filter down to UserAuthenticationEvent then depending on the type of authentication event we update the
counters. <emphasis>counter</emphasis> keeps track of the registered and logged-in users, while counterEver only counts the number of
times people logged-in the portal.</para>
- <para>Now that the Java class has been written we need to register it so that it can be called when the events are triggered. To do
+ <para>Now that the <trademark class="trade">Java</trademark> class has been written we need to register it so that it can be called when the events are triggered. To do
so we need to register it as an MBean. It can be done by editing the sar descriptor file:
<emphasis>YourService.sar/META-INF/jboss-service.xml</emphasis> so that it looks like the following:
<programlisting><![CDATA[
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/tutorials.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/tutorials.xml 2008-06-11 05:01:31 UTC (rev 10979)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/tutorials.xml 2008-06-11 05:20:39 UTC (rev 10980)
@@ -161,7 +161,7 @@
<sect3>
<title>Portlet Classes</title>
<para>
- The following is the <filename>HelloWorldPortlet/src/main/org/jboss/portlet/hello/HelloWorldPortlet.java</filename> java source file, which comes bundled with the <ulink
+ The following is the <filename>HelloWorldPortlet/src/main/org/jboss/portlet/hello/HelloWorldPortlet.java</filename> <trademark class="trade">Java</trademark> source file, which comes bundled with the <ulink
url="http://anonsvn.jboss.org/repos/portletswap/portlets/2_6/bundles/HelloWorl...">HelloWorldPortlet</ulink>:
</para>
<para>
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/wsrp.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/wsrp.xml 2008-06-11 05:01:31 UTC (rev 10979)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/wsrp.xml 2008-06-11 05:20:39 UTC (rev 10980)
@@ -937,7 +937,7 @@
in the default registration policy. This allows users to define their own validation mechanism.
</para>
<para>
- Please refer to the Javadoc for <classname>org.jboss.portal.registration.RegistrationPolicy</classname>
+ Please refer to the <trademark class="trade">Javadoc</trademark> for <classname>org.jboss.portal.registration.RegistrationPolicy</classname>
and <classname>org.jboss.portal.Registration.policies.RegistrationPropertyValidator</classname> for more
details on what is expected of each method.
</para>
17 years, 11 months
JBoss Portal SVN: r10979 - docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: mmcallis
Date: 2008-06-11 01:01:31 -0400 (Wed, 11 Jun 2008)
New Revision: 10979
Modified:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/supported.xml
Log:
Changing MySQL text/versions around a bit:
MySQL 4, MySQL 5 to "MySQL(R) 4 and 5"
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/supported.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/supported.xml 2008-06-11 04:35:45 UTC (rev 10978)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/supported.xml 2008-06-11 05:01:31 UTC (rev 10979)
@@ -47,9 +47,7 @@
<title>Databases</title>
<para>JBoss Portal is database-agnostic. The following list outlines known-to-be-working database vendor and version combinations:</para>
<itemizedlist>
- <listitem><trademark class="registered">MySQL</trademark> 4.<replaceable>x</replaceable>.<replaceable>x</replaceable> (use <ulink url="http://dev.mysql.com/downloads/connector/j/3.1.html">Connector/J 3.1</ulink>)</listitem>
- <listitem>MySQL 5 (<ulink url="http://wiki.jboss.org/wiki/Wiki.jsp?page=AvoidMySQL5DataTruncationErrors">known issue</ulink>)
- </listitem>
+ <listitem><trademark class="registered">MySQL</trademark> 4.<replaceable>x</replaceable>.<replaceable>x</replaceable> (use <ulink url="http://dev.mysql.com/downloads/connector/j/3.1.html">Connector/J 3.1</ulink>) and 5 (<ulink url="http://wiki.jboss.org/wiki/Wiki.jsp?page=AvoidMySQL5DataTruncationErrors">known issue</ulink>)</listitem>
<listitem>PostgreSQL 8.<replaceable>x</replaceable></listitem>
<listitem>Hypersonic SQL</listitem>
<listitem>Apache Derby</listitem>
17 years, 11 months
JBoss Portal SVN: r10978 - docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: mmcallis
Date: 2008-06-11 00:35:45 -0400 (Wed, 11 Jun 2008)
New Revision: 10978
Modified:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/installation.xml
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/migration.xml
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/xmldescriptors.xml
Log:
this should fix all MySQL trademarks
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/installation.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/installation.xml 2008-06-11 04:22:00 UTC (rev 10977)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/installation.xml 2008-06-11 04:35:45 UTC (rev 10978)
@@ -89,7 +89,7 @@
<sect3>
<title>Database Setup</title>
<para>
- A database is required for JBoss Portal to run. JBoss EAP and JBoss AS include an embedded Hypersonic SQL database that JBoss Portal can use; however, this is only recommended for developer use. The following databases are recommended for production use, and have had test suites run against them: <trademark class="registered">MySQL</trademark> 4, MySQL 5, <trademark class="registered">Microsoft</trademark> <trademark class="registered">SQL Server</trademark>, PostgreSQL 8, <trademark class="registered">Oracle</trademark> Database 9, and <trademark class="registered">Oracle</trademark> Database 10. JBoss Portal can use any database that is supported by Hibernate.
+ A database is required for JBoss Portal to run. JBoss EAP and JBoss AS include an embedded Hypersonic SQL database that JBoss Portal can use; however, this is only recommended for developer use. The following databases are recommended for production use, and have had test suites run against them: <trademark class="registered">MySQL</trademark> 4 and 5, <trademark class="registered">Microsoft</trademark> <trademark class="registered">SQL Server</trademark>, PostgreSQL 8, <trademark class="registered">Oracle</trademark> Database 9, and <trademark class="registered">Oracle</trademark> Database 10. JBoss Portal can use any database that is supported by Hibernate.
</para>
<para>
To configure a database to use with JBoss Portal:
@@ -117,7 +117,7 @@
<sect3>
<title>Datasource Descriptors</title>
<para>
- The JBoss Portal binary download that was extracted in <xref linkend="install_binarydownload"/>, contains pre-configured Datasource descriptors for the more popular databases. Datasource descriptors are provided for the <trademark class="registered">MySQL</trademark> 4, MySQL 5, PostgreSQL, <trademark class="registered">Microsoft</trademark> <trademark class="registered">SQL Server</trademark>, and <trademark class="registered">Oracle</trademark> databases, and can be found in the <filename>setup</filename> subdirectory where the JBoss Portal binary was extracted to:
+ The JBoss Portal binary download that was extracted in <xref linkend="install_binarydownload"/>, contains pre-configured Datasource descriptors for the more popular databases. Datasource descriptors are provided for the <trademark class="registered">MySQL</trademark> 4 and 5, PostgreSQL, <trademark class="registered">Microsoft</trademark> <trademark class="registered">SQL Server</trademark>, and <trademark class="registered">Oracle</trademark> databases, and can be found in the <filename>setup</filename> subdirectory where the JBoss Portal binary was extracted to:
</para>
<mediaobject>
<imageobject>
@@ -384,7 +384,7 @@
<sect2>
<title>Database Setup</title>
<para>
- A database is required for JBoss Portal to run. JBoss EAP and JBoss AS include an embedded Hypersonic SQL database that JBoss Portal can use; however, this is only recommended for developer use. The following databases are recommended for production use, and have had test suites run against them: MySQL 4, MySQL 5, <trademark class="registered">Microsoft</trademark> <trademark class="registered">SQL Server</trademark>, PostgreSQL 8, <trademark class="registered">Oracle</trademark> Database 9, and <trademark class="registered">Oracle</trademark> Database 10. JBoss Portal can use any database that is supported by Hibernate.
+ A database is required for JBoss Portal to run. JBoss EAP and JBoss AS include an embedded Hypersonic SQL database that JBoss Portal can use; however, this is only recommended for developer use. The following databases are recommended for production use, and have had test suites run against them: <trademark class="registered">MySQL</trademark> 4 and 5, <trademark class="registered">Microsoft</trademark> <trademark class="registered">SQL Server</trademark>, PostgreSQL 8, <trademark class="registered">Oracle</trademark> Database 9, and <trademark class="registered">Oracle</trademark> Database 10. JBoss Portal can use any database that is supported by Hibernate.
</para>
<para>
To configure a database to use with JBoss Portal:
@@ -412,7 +412,7 @@
<sect2>
<title>Datasource Configuration</title>
<para>
- The JBoss Portal binary download that was extracted in <xref linkend="install_binarydownload"/>, contains pre-configured Datasource descriptors for the more popular databases. Datasource descriptors are provided for the <trademark class="registered">MySQL</trademark> 4, MySQL 5, PostgreSQL, <trademark class="registered">Microsoft</trademark> <trademark class="registered">SQL Server</trademark>, and <trademark class="registered">Oracle</trademark> databases, and can be found in the <filename>setup</filename> subdirectory where the JBoss Portal binary was extracted to:
+ The JBoss Portal binary download that was extracted in <xref linkend="install_binarydownload"/>, contains pre-configured Datasource descriptors for the more popular databases. Datasource descriptors are provided for the <trademark class="registered">MySQL</trademark> 4 and 5, PostgreSQL, <trademark class="registered">Microsoft</trademark> <trademark class="registered">SQL Server</trademark>, and <trademark class="registered">Oracle</trademark> databases, and can be found in the <filename>setup</filename> subdirectory where the JBoss Portal binary was extracted to:
</para>
<mediaobject>
<imageobject>
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/migration.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/migration.xml 2008-06-11 04:22:00 UTC (rev 10977)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/migration.xml 2008-06-11 04:35:45 UTC (rev 10978)
@@ -93,7 +93,7 @@
</itemizedlist>
</para>
<para>
- All procedures described in the following sections can performed using the JBoss Portal 2.4 <guiicon>Admin</guiicon> portlet. Treat these directions as guidelines when migrating a large JBoss Portal deployment. Database data can be updated manually using the correct tools for your RDBMS. For example, if you are using a MySQL database, you can use the <ulink url="http://www.mysql.com/products/tools/query-browser/">MySQL Query Browser</ulink>.
+ All procedures described in the following sections can performed using the JBoss Portal 2.4 <guiicon>Admin</guiicon> portlet. Treat these directions as guidelines when migrating a large JBoss Portal deployment. Database data can be updated manually using the correct tools for your RDBMS. For example, if you are using a <trademark class="registered">MySQL</trademark> database, you can use the <ulink url="http://www.mysql.com/products/tools/query-browser/">MySQL Query Browser</ulink>.
</para>
<para>
During the upgrade process, legacy references have to be cleaned up, to either remove them, or to allow JBoss Portal 2.6 to recreate them correctly. Remove all references (instances and windows) to the portlets listed below, as they are not present in JBoss Portal 2.6. This can be done using the JBoss Portal 2.4 <guiicon>Admin</guiicon> portlet:
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/xmldescriptors.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/xmldescriptors.xml 2008-06-11 04:22:00 UTC (rev 10977)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/xmldescriptors.xml 2008-06-11 04:35:45 UTC (rev 10978)
@@ -1556,7 +1556,7 @@
</mediaobject>
</para>
<para>
- The <filename>jboss-portal-<replaceable>version</replaceable>/setup/</filename> directory contains sample Datasource descriptors for the MySQL, <trademark class="registered">Microsoft</trademark> <trademark class="registered">SQL Server</trademark>, PostgreSQL, and <trademark class="registered">Oracle</trademark> databases, which can be customized for your own database:
+ The <filename>jboss-portal-<replaceable>version</replaceable>/setup/</filename> directory contains sample Datasource descriptors for the <trademark class="registered">MySQL</trademark>, <trademark class="registered">Microsoft</trademark> <trademark class="registered">SQL Server</trademark>, PostgreSQL, and <trademark class="registered">Oracle</trademark> databases, which can be customized for your own database:
</para>
<para>
<mediaobject>
17 years, 11 months
JBoss Portal SVN: r10977 - docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: mmcallis
Date: 2008-06-11 00:22:00 -0400 (Wed, 11 Jun 2008)
New Revision: 10977
Modified:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/installation.xml
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/migration.xml
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/supported.xml
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/trademarks.xml
Log:
startin to fix "Java" and "MySQL" trademark
attributions
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/installation.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/installation.xml 2008-06-10 23:15:35 UTC (rev 10976)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/installation.xml 2008-06-11 04:22:00 UTC (rev 10977)
@@ -89,7 +89,7 @@
<sect3>
<title>Database Setup</title>
<para>
- A database is required for JBoss Portal to run. JBoss EAP and JBoss AS include an embedded Hypersonic SQL database that JBoss Portal can use; however, this is only recommended for developer use. The following databases are recommended for production use, and have had test suites run against them: MySQL 4, MySQL 5, <trademark class="registered">Microsoft</trademark> <trademark class="registered">SQL Server</trademark>, PostgreSQL 8, <trademark class="registered">Oracle</trademark> Database 9, and <trademark class="registered">Oracle</trademark> Database 10. JBoss Portal can use any database that is supported by Hibernate.
+ A database is required for JBoss Portal to run. JBoss EAP and JBoss AS include an embedded Hypersonic SQL database that JBoss Portal can use; however, this is only recommended for developer use. The following databases are recommended for production use, and have had test suites run against them: <trademark class="registered">MySQL</trademark> 4, MySQL 5, <trademark class="registered">Microsoft</trademark> <trademark class="registered">SQL Server</trademark>, PostgreSQL 8, <trademark class="registered">Oracle</trademark> Database 9, and <trademark class="registered">Oracle</trademark> Database 10. JBoss Portal can use any database that is supported by Hibernate.
</para>
<para>
To configure a database to use with JBoss Portal:
@@ -117,7 +117,7 @@
<sect3>
<title>Datasource Descriptors</title>
<para>
- The JBoss Portal binary download that was extracted in <xref linkend="install_binarydownload"/>, contains pre-configured Datasource descriptors for the more popular databases. Datasource descriptors are provided for the MySQL 4, MySQL 5, PostgreSQL, <trademark class="registered">Microsoft</trademark> <trademark class="registered">SQL Server</trademark>, and <trademark class="registered">Oracle</trademark> databases, and can be found in the <filename>setup</filename> subdirectory where the JBoss Portal binary was extracted to:
+ The JBoss Portal binary download that was extracted in <xref linkend="install_binarydownload"/>, contains pre-configured Datasource descriptors for the more popular databases. Datasource descriptors are provided for the <trademark class="registered">MySQL</trademark> 4, MySQL 5, PostgreSQL, <trademark class="registered">Microsoft</trademark> <trademark class="registered">SQL Server</trademark>, and <trademark class="registered">Oracle</trademark> databases, and can be found in the <filename>setup</filename> subdirectory where the JBoss Portal binary was extracted to:
</para>
<mediaobject>
<imageobject>
@@ -412,7 +412,7 @@
<sect2>
<title>Datasource Configuration</title>
<para>
- The JBoss Portal binary download that was extracted in <xref linkend="install_binarydownload"/>, contains pre-configured Datasource descriptors for the more popular databases. Datasource descriptors are provided for the MySQL 4, MySQL 5, PostgreSQL, <trademark class="registered">Microsoft</trademark> <trademark class="registered">SQL Server</trademark>, and <trademark class="registered">Oracle</trademark> databases, and can be found in the <filename>setup</filename> subdirectory where the JBoss Portal binary was extracted to:
+ The JBoss Portal binary download that was extracted in <xref linkend="install_binarydownload"/>, contains pre-configured Datasource descriptors for the more popular databases. Datasource descriptors are provided for the <trademark class="registered">MySQL</trademark> 4, MySQL 5, PostgreSQL, <trademark class="registered">Microsoft</trademark> <trademark class="registered">SQL Server</trademark>, and <trademark class="registered">Oracle</trademark> databases, and can be found in the <filename>setup</filename> subdirectory where the JBoss Portal binary was extracted to:
</para>
<mediaobject>
<imageobject>
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/migration.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/migration.xml 2008-06-10 23:15:35 UTC (rev 10976)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/migration.xml 2008-06-11 04:22:00 UTC (rev 10977)
@@ -22,7 +22,7 @@
<sect1 id="manual_migration">
<title>Manual Upgrade</title>
<para>
- The database schema has not changed since JBoss Portal 2.4; however, there are several differences when using a database created by JBoss Portal 2.4, that prevent simply deploying the latest version of JBoss Portal. For example, some portlets are no longer present in JBoss Portal 2.6, and certain existing portlets are now packaged differently. This chapter describes updating a MySQL database created by JBoss Portal 2.4, for use with JBoss Portal 2.6.
+ The database schema has not changed since JBoss Portal 2.4; however, there are several differences when using a database created by JBoss Portal 2.4, that prevent simply deploying the latest version of JBoss Portal. For example, some portlets are no longer present in JBoss Portal 2.6, and certain existing portlets are now packaged differently. This chapter describes updating a <trademark class="registered">MySQL</trademark> database created by JBoss Portal 2.4, for use with JBoss Portal 2.6.
</para>
<para>
Users, roles, and pages created in JBoss Portal 2.4 should be accessible in JBoss Portal 2.6 deployments.
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/supported.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/supported.xml 2008-06-10 23:15:35 UTC (rev 10976)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/supported.xml 2008-06-11 04:22:00 UTC (rev 10977)
@@ -31,8 +31,8 @@
</sect1>
<sect1>
<title>Supported Operating Systems</title>
- <para>JBoss Portal is 100% pure Java, and therefore it is interoperable with most operating systems
- capable of running a Java Virtual Machine (JVM), including <trademark class="registered">Linux</trademark>, <trademark class="registered">Windows</trademark>, <trademark class="registered">UNIX</trademark> operating systems, and Mac OS X.
+ <para>JBoss Portal is 100% pure <trademark class="trade">Java</trademark>, and therefore it is interoperable with most operating systems
+ capable of running a Java Virtual Machine (<trademark class="trade">JVM</trademark>), including <trademark class="registered">Linux</trademark>, <trademark class="registered">Windows</trademark>, <trademark class="registered">UNIX</trademark> operating systems, and Mac OS X.
</para>
</sect1>
<sect1>
@@ -47,12 +47,12 @@
<title>Databases</title>
<para>JBoss Portal is database-agnostic. The following list outlines known-to-be-working database vendor and version combinations:</para>
<itemizedlist>
- <listitem>MySQL 4.<replaceable>x</replaceable>.<replaceable>x</replaceable> (use <ulink url="http://dev.mysql.com/downloads/connector/j/3.1.html">Connector/J 3.1</ulink>)</listitem>
+ <listitem><trademark class="registered">MySQL</trademark> 4.<replaceable>x</replaceable>.<replaceable>x</replaceable> (use <ulink url="http://dev.mysql.com/downloads/connector/j/3.1.html">Connector/J 3.1</ulink>)</listitem>
<listitem>MySQL 5 (<ulink url="http://wiki.jboss.org/wiki/Wiki.jsp?page=AvoidMySQL5DataTruncationErrors">known issue</ulink>)
</listitem>
<listitem>PostgreSQL 8.<replaceable>x</replaceable></listitem>
<listitem>Hypersonic SQL</listitem>
- <listitem>Derby</listitem>
+ <listitem>Apache Derby</listitem>
<listitem><trademark class="registered">Oracle</trademark> Database 9 and 10g (use the <ulink url="http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html">latest driver from the Oracle 10 branch</ulink> even if you are running Oracle 9)</listitem>
<listitem><trademark class="registered">Microsoft</trademark><trademark class="registered"> SQL Server</trademark></listitem>
<listitem>MaxDB</listitem>
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/trademarks.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/trademarks.xml 2008-06-10 23:15:35 UTC (rev 10976)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/trademarks.xml 2008-06-11 04:22:00 UTC (rev 10977)
@@ -1,7 +1,7 @@
<preface id="trademarks">
<title>Please Read: Important Trademark Information</title>
<para>
- JavaServer, JSP, Java, Java runtime environment, JRE, J2EE, JVM, Javadoc, JavaScript, and J2SE are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries.
+ JavaServer, JSP, Java, JMX, JDK, Java runtime environment, JRE, J2EE, JVM, Javadoc, JavaScript, and J2SE are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries.
</para>
<para>
JBoss is a registered trademark of Red Hat, Inc. in the U.S. and other countries.
17 years, 11 months
JBoss Portal SVN: r10976 - docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: mmcallis
Date: 2008-06-10 19:15:35 -0400 (Tue, 10 Jun 2008)
New Revision: 10976
Modified:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/trademarks.xml
Log:
Spoke with Red Hat legal:
- fixing attribution statements.
- adding attribution statements.
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/trademarks.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/trademarks.xml 2008-06-10 21:19:03 UTC (rev 10975)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/trademarks.xml 2008-06-10 23:15:35 UTC (rev 10976)
@@ -1,13 +1,13 @@
<preface id="trademarks">
<title>Please Read: Important Trademark Information</title>
<para>
- JavaServer, JSP, Java, Java runtime environment, JRE, J2EE, JVM, Javadoc, JavaScript, and J2SE are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. Red Hat, Inc. is independent of Sun Microsystems, Inc.
+ JavaServer, JSP, Java, Java runtime environment, JRE, J2EE, JVM, Javadoc, JavaScript, and J2SE are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries.
</para>
<para>
JBoss is a registered trademark of Red Hat, Inc. in the U.S. and other countries.
</para>
<para>
- Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.
+ Oracle is a registered trademark of Oracle International Corporation.
</para>
<para>
Microsoft, Windows, and SQL Server are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.
@@ -16,8 +16,20 @@
Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.
</para>
<para>
- Other product and company names mentioned herein may be the trademarks of their respective owners.
+ UNIX is a registered trademark of The Open Group.
</para>
+ <para>
+ MySQL is a trademark or registered trademark of MySQL AB in the U.S. and other countries.
+ </para>
+ <para>
+ Apache is a trademark of The Apache Software Foundation.
+ </para>
+ <para>
+ Mac and Mac OS are trademarks of Apple Inc., registered in the U.S. and other countries.
+ </para>
+ <para>
+ All other trademarks referenced herein are the property of their respective owners.
+ </para>
</preface>
17 years, 11 months