JBoss Portal SVN: r10307 - branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet and 12 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-03-18 10:53:32 -0400 (Tue, 18 Mar 2008)
New Revision: 10307
Added:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/portlet/info/TransactionInfoImpl.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/portlet/info/TransactionInfo.java
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/info/SessionInfo.java
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/info/impl/
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/info/impl/CacheInfoImpl.java
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/info/impl/SessionInfoImpl.java
Removed:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/portlet/info/CorePortletInfo.java
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/info/ContainerCacheInfo.java
Modified:
branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/AdminPropertyResolver.java
branches/JBoss_Portal_Branch_2_7/core-samples/src/main/org/jboss/portal/core/samples/users/CurrentUsersPortlet.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/AjaxInterceptor.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/CorePortletInterceptor.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/HeaderInterceptor.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/TransactionInterceptor.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/PortletContextFactory.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/PortletInvocationFactory.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/portlet/info/CoreInfoBuilder.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/portlet/info/PortletIconInfoImpl.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/metadata/portlet/PortletIconMetaData.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portlet/JBossPortlet.java
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/aspects/portlet/PortletSessionSynchronizationInterceptor.java
branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/JBossApplicationMetaDataFactory.java
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/portlet/info/WSRPPortletInfo.java
modules/portlet/trunk/.classpath
Log:
- Removed CorePortletInfo and attached directly the different sub Info
- Session Info configured in jboss-portlet.xml was ignored
- CurrentUsersPortlet doesn't need to be a JBoss Portlet
- Added a warning for former portlet using the JBossPortlet extension to add the filter
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/AjaxInterceptor.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/AjaxInterceptor.java 2008-03-18 14:27:24 UTC (rev 10306)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/AjaxInterceptor.java 2008-03-18 14:53:32 UTC (rev 10307)
@@ -23,7 +23,7 @@
package org.jboss.portal.core.aspects.portlet;
import org.jboss.portal.core.portlet.info.AjaxInfo;
-import org.jboss.portal.core.portlet.info.CorePortletInfo;
+import org.jboss.portal.portlet.info.PortletInfo;
import org.jboss.portal.portlet.invocation.PortletInvocation;
import org.jboss.portal.portlet.invocation.response.FragmentResponse;
import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
@@ -51,10 +51,10 @@
if (response instanceof FragmentResponse)
{
FragmentResponse fragment = (FragmentResponse)response;
- CorePortletInfo corePortletInfo = getCorePortletInfo(invocation);
+ PortletInfo corePortletInfo = getPortletInfo(invocation);
if (corePortletInfo != null)
{
- AjaxInfo ajax = corePortletInfo.getAjax();
+ AjaxInfo ajax = corePortletInfo.getAttachment(AjaxInfo.class);
if (ajax != null)
{
fragment = updateFragmentWithPropertiesIfNeeded(fragment);
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/CorePortletInterceptor.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/CorePortletInterceptor.java 2008-03-18 14:27:24 UTC (rev 10306)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/CorePortletInterceptor.java 2008-03-18 14:53:32 UTC (rev 10307)
@@ -23,9 +23,9 @@
package org.jboss.portal.core.aspects.portlet;
-import org.jboss.portal.core.portlet.info.CorePortletInfo;
import org.jboss.portal.portlet.container.PortletContainer;
import org.jboss.portal.portlet.container.PortletContainerInvoker;
+import org.jboss.portal.portlet.info.PortletInfo;
import org.jboss.portal.portlet.invocation.PortletInterceptor;
import org.jboss.portal.portlet.invocation.PortletInvocation;
import org.jboss.portal.portlet.invocation.response.FragmentResponse;
@@ -44,11 +44,10 @@
* @return the CorePortetInfo associated with the Portlet being invoked or <code>null</code> if no such information
* is present
*/
- protected CorePortletInfo getCorePortletInfo(PortletInvocation invocation)
+ protected PortletInfo getPortletInfo(PortletInvocation invocation)
{
PortletContainer container = (PortletContainer)invocation.getAttribute(PortletInvocation.INVOCATION_SCOPE, PortletContainerInvoker.PORTLET_CONTAINER);
-
- return container.getInfo().getAttachment(CorePortletInfo.class);
+ return container.getInfo();
}
/**
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/HeaderInterceptor.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/HeaderInterceptor.java 2008-03-18 14:27:24 UTC (rev 10306)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/HeaderInterceptor.java 2008-03-18 14:53:32 UTC (rev 10307)
@@ -24,8 +24,8 @@
import org.jboss.portal.common.util.MultiValuedPropertyMap;
import org.jboss.portal.core.metadata.portlet.MarkupElement;
-import org.jboss.portal.core.portlet.info.CorePortletInfo;
import org.jboss.portal.core.portlet.info.MarkupHeaderInfo;
+import org.jboss.portal.portlet.info.PortletInfo;
import org.jboss.portal.portlet.invocation.PortletInvocation;
import org.jboss.portal.portlet.invocation.response.FragmentResponse;
import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
@@ -52,10 +52,10 @@
{
FragmentResponse fragment = (FragmentResponse)response;
- CorePortletInfo corePortletInfo = getCorePortletInfo(invocation);
- if (corePortletInfo != null)
+ PortletInfo portletInfo = getPortletInfo(invocation);
+ if (portletInfo != null)
{
- MarkupHeaderInfo headerContentInfo = corePortletInfo.getMarkupHeader();
+ MarkupHeaderInfo headerContentInfo = portletInfo.getAttachment(MarkupHeaderInfo.class);
if (headerContentInfo != null)
{
fragment = updateFragmentWithPropertiesIfNeeded(fragment);
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/TransactionInterceptor.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/TransactionInterceptor.java 2008-03-18 14:27:24 UTC (rev 10306)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/TransactionInterceptor.java 2008-03-18 14:53:32 UTC (rev 10307)
@@ -24,7 +24,8 @@
import org.jboss.portal.common.invocation.InvocationException;
import org.jboss.portal.common.transaction.Transactions;
-import org.jboss.portal.core.portlet.info.CorePortletInfo;
+import org.jboss.portal.core.portlet.info.TransactionInfo;
+import org.jboss.portal.portlet.info.PortletInfo;
import org.jboss.portal.portlet.invocation.PortletInvocation;
/**
@@ -37,40 +38,44 @@
protected Object invoke(PortletInvocation invocation) throws Exception
{
// Override tx type if found
- CorePortletInfo corePortletInfo = getCorePortletInfo(invocation);
- if (corePortletInfo != null)
+ PortletInfo portletInfo = getPortletInfo(invocation);
+ if (portletInfo != null)
{
- Transactions.Type txType = corePortletInfo.getTxType();
+ TransactionInfo transactionInfo = portletInfo.getAttachment(TransactionInfo.class);
- //
- if (txType == Transactions.TYPE_NOT_SUPPORTED)
+ if (transactionInfo != null)
{
- return invokeNotSupported(invocation);
+ Transactions.Type txType = transactionInfo.getTransactionType();
+ //
+ if (txType == Transactions.TYPE_NOT_SUPPORTED)
+ {
+ return invokeNotSupported(invocation);
+ }
+ else if (txType == Transactions.TYPE_NEVER)
+ {
+ return invokeNever(invocation);
+ }
+ else if (txType == Transactions.TYPE_MANDATORY)
+ {
+ return invokeMandatory(invocation);
+ }
+ else if (txType == Transactions.TYPE_SUPPORTS)
+ {
+ return invokeSupports(invocation);
+ }
+ else if (txType == Transactions.TYPE_REQUIRED)
+ {
+ return invokeRequired(invocation);
+ }
+ else if (txType == Transactions.TYPE_REQUIRES_NEW)
+ {
+ return invokeRequiresNew(invocation);
+ }
+ else
+ {
+ throw new InvocationException("Should not happen");
+ }
}
- else if (txType == Transactions.TYPE_NEVER)
- {
- return invokeNever(invocation);
- }
- else if (txType == Transactions.TYPE_MANDATORY)
- {
- return invokeMandatory(invocation);
- }
- else if (txType == Transactions.TYPE_SUPPORTS)
- {
- return invokeSupports(invocation);
- }
- else if (txType == Transactions.TYPE_REQUIRED)
- {
- return invokeRequired(invocation);
- }
- else if (txType == Transactions.TYPE_REQUIRES_NEW)
- {
- return invokeRequiresNew(invocation);
- }
- else
- {
- throw new InvocationException("Should not happen");
- }
}
return invocation.invokeNext();
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/PortletContextFactory.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/PortletContextFactory.java 2008-03-18 14:27:24 UTC (rev 10306)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/PortletContextFactory.java 2008-03-18 14:53:32 UTC (rev 10307)
@@ -28,9 +28,11 @@
import org.jboss.portal.core.controller.ControllerContext;
import org.jboss.portal.core.model.portal.Portal;
import org.jboss.portal.core.model.portal.Window;
+import org.jboss.portal.portlet.impl.spi.AbstractClientContext;
import org.jboss.portal.portlet.impl.spi.AbstractRequestContext;
import org.jboss.portal.portlet.impl.spi.AbstractSecurityContext;
import org.jboss.portal.portlet.impl.spi.AbstractServerContext;
+import org.jboss.portal.portlet.spi.ClientContext;
import org.jboss.portal.portlet.spi.PortalContext;
import org.jboss.portal.portlet.spi.RequestContext;
import org.jboss.portal.portlet.spi.SecurityContext;
@@ -67,6 +69,9 @@
/**. */
private ServerContext serverContext;
+
+ /** . */
+ private AbstractClientContext clientContext;
public PortletContextFactory(ControllerContext controllerContext, Portal portal, Window window)
@@ -77,7 +82,7 @@
this.portalContext = new org.jboss.portal.core.model.portal.portlet.PortalContextImpl(portal);
this.windowContext = new org.jboss.portal.core.model.portal.portlet.WindowContextImpl(window);
this.serverContext = new AbstractServerContext(controllerContext.getServerInvocation().getServerContext().getClientRequest(), controllerContext.getServerInvocation().getServerContext().getClientResponse());
-
+ this.clientContext = new AbstractClientContext(controllerContext.getServerInvocation().getServerContext().getClientRequest());
}
public PortletContextFactory(ControllerContext controllerContext)
@@ -88,6 +93,7 @@
this.portalContext = portalContextImpl;
this.windowContext = new WindowContextImpl("abc"); // Well ????
this.serverContext = new AbstractServerContext(controllerContext.getServerInvocation().getServerContext().getClientRequest(), controllerContext.getServerInvocation().getServerContext().getClientResponse());
+ this.clientContext = new AbstractClientContext(controllerContext.getServerInvocation().getServerContext().getClientRequest());
}
public PortalContext createPortalContext()
@@ -120,6 +126,10 @@
return serverContext;
}
+ public ClientContext createClientContext()
+ {
+ return clientContext;
+ }
/** . */
private static final PortalContextImpl portalContextImpl = new PortalContextImpl();
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/PortletInvocationFactory.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/PortletInvocationFactory.java 2008-03-18 14:27:24 UTC (rev 10306)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/PortletInvocationFactory.java 2008-03-18 14:53:32 UTC (rev 10307)
@@ -124,6 +124,7 @@
action.setWindowContext(cf.createWindowContext());
action.setUserContext(userContext);
action.setServerContext(cf.createServerContext());
+ action.setClientContext(cf.createClientContext());
//
return action;
@@ -157,6 +158,7 @@
render.setWindowContext(cf.createWindowContext());
render.setUserContext(cf.createUserContext());
render.setServerContext(cf.createServerContext());
+ render.setClientContext(cf.createClientContext());
//
return render;
}
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/portlet/info/CoreInfoBuilder.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/portlet/info/CoreInfoBuilder.java 2008-03-18 14:27:24 UTC (rev 10306)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/portlet/info/CoreInfoBuilder.java 2008-03-18 14:53:32 UTC (rev 10307)
@@ -22,10 +22,19 @@
******************************************************************************/
package org.jboss.portal.core.impl.portlet.info;
+import org.jboss.portal.common.transaction.Transactions;
+import org.jboss.portal.core.metadata.portlet.AjaxMetaData;
+import org.jboss.portal.core.metadata.portlet.HeaderContentMetaData;
import org.jboss.portal.core.metadata.portlet.JBossPortletMetaData;
-import org.jboss.portal.core.portlet.info.CorePortletInfo;
+import org.jboss.portal.core.metadata.portlet.PortletInfoMetaData;
+import org.jboss.portal.core.portlet.info.AjaxInfo;
+import org.jboss.portal.core.portlet.info.MarkupHeaderInfo;
+import org.jboss.portal.core.portlet.info.PortletInfoInfo;
+import org.jboss.portal.core.portlet.info.TransactionInfo;
import org.jboss.portal.portlet.deployment.jboss.InfoBuilder;
import org.jboss.portal.portlet.deployment.jboss.PortletApplicationContextImpl;
+import org.jboss.portal.portlet.deployment.jboss.info.SessionInfo;
+import org.jboss.portal.portlet.deployment.jboss.info.impl.SessionInfoImpl;
import org.jboss.portal.portlet.deployment.jboss.metadata.JBossApplicationMetaData;
import org.jboss.portal.portlet.impl.info.ContainerInfoBuilder;
import org.jboss.portal.portlet.impl.info.ContainerInfoBuilderContext;
@@ -89,8 +98,37 @@
org.jboss.portal.portlet.deployment.jboss.metadata.JBossPortletMetaData jbPortletMD = (org.jboss.portal.portlet.deployment.jboss.metadata.JBossPortletMetaData)jbossApplicationMetaData.getPortlets().get(containerInfo.getName());
if (jbPortletMD instanceof JBossPortletMetaData)
{
- CorePortletInfo cpi = new CorePortletInfo(new PortletApplicationContextImpl(builderContext.getWebApp()), (JBossPortletMetaData)jbPortletMD);
- containerInfo.setAttachment(CorePortletInfo.class, cpi);
+ JBossPortletMetaData jbossPortletMD = (JBossPortletMetaData)jbPortletMD;
+
+ AjaxMetaData ajaxMD = jbossPortletMD.getAjax();
+ if (ajaxMD != null)
+ {
+ containerInfo.setAttachment(AjaxInfo.class, new AjaxInfoImpl(ajaxMD));
+ }
+
+ HeaderContentMetaData headerContentMD = jbossPortletMD.getHeaderContent();
+ if (headerContentMD != null)
+ {
+ containerInfo.setAttachment(MarkupHeaderInfo.class, new MarkupHeaderInfoImpl(headerContentMD));
+ }
+
+ PortletInfoMetaData portletInfoMD = jbossPortletMD.getPortletInfo();
+ if (portletInfoMD != null)
+ {
+ containerInfo.setAttachment(PortletInfoInfo.class, new PortletInfoInfoImpl(new PortletApplicationContextImpl(builderContext.getWebApp()), portletInfoMD));
+ }
+
+ Transactions.Type txType = jbossPortletMD.getTxType();
+ if (txType != null)
+ {
+ containerInfo.setAttachment(TransactionInfo.class, new TransactionInfoImpl(jbossPortletMD.getTxType()));
+ }
+
+ Boolean distributed = jbossPortletMD.getDistributed();
+ if (distributed != null)
+ {
+ containerInfo.setAttachment(SessionInfo.class, new SessionInfoImpl(distributed));
+ }
}
portlets.put(jbPortletMD.getName(), containerInfo);
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/portlet/info/PortletIconInfoImpl.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/portlet/info/PortletIconInfoImpl.java 2008-03-18 14:27:24 UTC (rev 10306)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/portlet/info/PortletIconInfoImpl.java 2008-03-18 14:53:32 UTC (rev 10307)
@@ -35,7 +35,7 @@
public class PortletIconInfoImpl implements PortletIconInfo
{
/** . */
- private Map icons;
+ private Map<String, String> icons;
/** . */
private PortletApplicationContext portletApplicationContext;
Added: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/portlet/info/TransactionInfoImpl.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/portlet/info/TransactionInfoImpl.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/portlet/info/TransactionInfoImpl.java 2008-03-18 14:53:32 UTC (rev 10307)
@@ -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.core.impl.portlet.info;
+
+import org.jboss.portal.common.transaction.Transactions;
+import org.jboss.portal.common.transaction.Transactions.Type;
+import org.jboss.portal.core.portlet.info.TransactionInfo;
+
+/**
+ * @author <a href="mailto:theute@jboss.org">Thomas Heute</a>
+ * @version $Revision$
+ */
+public class TransactionInfoImpl implements TransactionInfo
+{
+
+ private Transactions.Type type;
+
+ public TransactionInfoImpl(Transactions.Type type)
+ {
+ this.type = type;
+ }
+
+ public Type getTransactionType()
+ {
+ return type;
+ }
+
+}
+
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/metadata/portlet/PortletIconMetaData.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/metadata/portlet/PortletIconMetaData.java 2008-03-18 14:27:24 UTC (rev 10306)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/metadata/portlet/PortletIconMetaData.java 2008-03-18 14:53:32 UTC (rev 10307)
@@ -40,11 +40,11 @@
public static final String LARGE = "large";
/** . */
- private Map icons;
+ private Map<String, String> icons;
public PortletIconMetaData()
{
- icons = new HashMap();
+ icons = new HashMap<String, String>();
}
public void setIconLocation(String iconLocation, String size)
@@ -57,7 +57,7 @@
return (String)icons.get(size);
}
- public Map getIcons()
+ public Map<String, String> getIcons()
{
return Collections.unmodifiableMap(icons);
}
Deleted: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/portlet/info/CorePortletInfo.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/portlet/info/CorePortletInfo.java 2008-03-18 14:27:24 UTC (rev 10306)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/portlet/info/CorePortletInfo.java 2008-03-18 14:53:32 UTC (rev 10307)
@@ -1,87 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.core.portlet.info;
-
-import org.jboss.portal.common.transaction.Transactions;
-import org.jboss.portal.core.impl.portlet.info.AjaxInfoImpl;
-import org.jboss.portal.core.impl.portlet.info.MarkupHeaderInfoImpl;
-import org.jboss.portal.core.impl.portlet.info.PortletInfoInfoImpl;
-import org.jboss.portal.core.metadata.portlet.AjaxMetaData;
-import org.jboss.portal.core.metadata.portlet.HeaderContentMetaData;
-import org.jboss.portal.core.metadata.portlet.JBossPortletMetaData;
-import org.jboss.portal.core.metadata.portlet.PortletInfoMetaData;
-import org.jboss.portal.portlet.container.PortletApplicationContext;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
- * @version $Revision: 8786 $
- */
-public class CorePortletInfo
-{
- /** . */
- private final Transactions.Type txType;
-
- /** . */
- private final AjaxInfoImpl ajax;
-
- /** . */
- private final MarkupHeaderInfoImpl markupHeader;
-
- /** . */
- private final PortletInfoInfoImpl portletInfo;
-
- public CorePortletInfo(PortletApplicationContext portletApplicationContext, JBossPortletMetaData jbossPortletMD)
- {
- //
- AjaxMetaData ajaxMD = jbossPortletMD.getAjax();
- HeaderContentMetaData headerContentMD = jbossPortletMD.getHeaderContent();
- PortletInfoMetaData portletInfoMD = jbossPortletMD.getPortletInfo();
-
- //
- this.txType = jbossPortletMD.getTxType();
- this.ajax = ajaxMD != null ? new AjaxInfoImpl(ajaxMD) : null;
- this.markupHeader = headerContentMD != null ? new MarkupHeaderInfoImpl(headerContentMD) : null;
- this.portletInfo = portletInfoMD != null ? new PortletInfoInfoImpl(portletApplicationContext, portletInfoMD) : null;
- }
-
- public Transactions.Type getTxType()
- {
- return txType;
- }
-
- public AjaxInfo getAjax()
- {
- return ajax;
- }
-
- public MarkupHeaderInfo getMarkupHeader()
- {
- return markupHeader;
- }
-
- public PortletInfoInfo getPortletInfo()
- {
- return portletInfo;
- }
-}
Added: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/portlet/info/TransactionInfo.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/portlet/info/TransactionInfo.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/portlet/info/TransactionInfo.java 2008-03-18 14:53:32 UTC (rev 10307)
@@ -0,0 +1,35 @@
+/******************************************************************************
+ * 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.core.portlet.info;
+
+import org.jboss.portal.common.transaction.Transactions;
+
+/**
+ * @author <a href="mailto:theute@jboss.org">Thomas Heute</a>
+ * @version $Revision$
+ */
+public interface TransactionInfo
+{
+ Transactions.Type getTransactionType();
+}
+
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portlet/JBossPortlet.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portlet/JBossPortlet.java 2008-03-18 14:27:24 UTC (rev 10306)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portlet/JBossPortlet.java 2008-03-18 14:53:32 UTC (rev 10307)
@@ -22,6 +22,7 @@
******************************************************************************/
package org.jboss.portlet;
+import org.jboss.logging.Logger;
import org.jboss.portal.format.util.EntityTable;
import javax.portlet.ActionRequest;
@@ -56,7 +57,6 @@
*/
public class JBossPortlet implements Portlet
{
-
/** . */
private static final Class[] ACTION_LOOKUP = new Class[]{JBossActionRequest.class, JBossActionResponse.class};
@@ -387,7 +387,14 @@
public void render(RenderRequest req, RenderResponse resp) throws PortletException, PortletSecurityException, IOException
{
- render((JBossRenderRequest)req, (JBossRenderResponse)resp);
+ try
+ {
+ render((JBossRenderRequest)req, (JBossRenderResponse)resp);
+ }
+ catch (ClassCastException e)
+ {
+ throw new PortletException("The request isn't a JBossRenderRequest, you probably need to activate the JBoss Portlet Filter: org.jboss.portlet.filter.JBossPortletFilter on " + getPortletName());
+ }
}
public void destroy()
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/AdminPropertyResolver.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/AdminPropertyResolver.java 2008-03-18 14:27:24 UTC (rev 10306)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/AdminPropertyResolver.java 2008-03-18 14:53:32 UTC (rev 10307)
@@ -32,7 +32,6 @@
import org.jboss.portal.core.model.portal.PortalObject;
import org.jboss.portal.core.model.portal.PortalObjectId;
import org.jboss.portal.core.model.portal.PortalObjectPath;
-import org.jboss.portal.core.portlet.info.CorePortletInfo;
import org.jboss.portal.core.portlet.info.PortletIconInfo;
import org.jboss.portal.core.portlet.info.PortletInfoInfo;
import org.jboss.portal.core.ui.content.portlet.PortletContentEditorPortlet;
@@ -465,10 +464,9 @@
Portlet portlet = (Portlet)bean;
PortletInfo info = portlet.getInfo();
- CorePortletInfo cInfo = info.getAttachment(CorePortletInfo.class);
- if (cInfo != null)
+ PortletInfoInfo portletInfo = info.getAttachment(PortletInfoInfo.class);
+ if (portletInfo != null)
{
- PortletInfoInfo portletInfo = cInfo.getPortletInfo();
if (portletInfo != null && portletInfo.getPortletIconInfo() != null && portletInfo.getPortletIconInfo().getIconLocation(iconType) != null)
{
return portletInfo.getPortletIconInfo().getIconLocation(iconType);
Modified: branches/JBoss_Portal_Branch_2_7/core-samples/src/main/org/jboss/portal/core/samples/users/CurrentUsersPortlet.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-samples/src/main/org/jboss/portal/core/samples/users/CurrentUsersPortlet.java 2008-03-18 14:27:24 UTC (rev 10306)
+++ branches/JBoss_Portal_Branch_2_7/core-samples/src/main/org/jboss/portal/core/samples/users/CurrentUsersPortlet.java 2008-03-18 14:53:32 UTC (rev 10307)
@@ -26,12 +26,12 @@
import org.jboss.portal.core.identity.UsersActivityStatsService;
import org.jboss.portal.core.servlet.jsp.PortalJsp;
import org.jboss.portal.core.servlet.jsp.taglib.context.DelegateContext;
-import org.jboss.portlet.JBossPortlet;
-import org.jboss.portlet.JBossRenderRequest;
-import org.jboss.portlet.JBossRenderResponse;
+import javax.portlet.GenericPortlet;
import javax.portlet.PortletException;
import javax.portlet.PortletRequestDispatcher;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
import javax.portlet.UnavailableException;
import java.io.IOException;
import java.io.PrintWriter;
@@ -42,13 +42,13 @@
*
* @author <a href="mailto:jedim@vige.it">Luca Stancapiano</a>
*/
-public class CurrentUsersPortlet extends JBossPortlet
+public class CurrentUsersPortlet extends GenericPortlet
{
/** Logger */
public static Logger log = Logger.getLogger(CurrentUsersPortlet.class);
- protected void doView(JBossRenderRequest rRequest, JBossRenderResponse rResponse)
+ protected void doView(RenderRequest rRequest, RenderResponse rResponse)
throws PortletException, IOException, UnavailableException
{
UsersActivityStatsService uass = (UsersActivityStatsService)this
Modified: branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/aspects/portlet/PortletSessionSynchronizationInterceptor.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/aspects/portlet/PortletSessionSynchronizationInterceptor.java 2008-03-18 14:27:24 UTC (rev 10306)
+++ branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/aspects/portlet/PortletSessionSynchronizationInterceptor.java 2008-03-18 14:53:32 UTC (rev 10307)
@@ -25,8 +25,8 @@
import org.jboss.portal.common.invocation.InvocationException;
import org.jboss.portal.portlet.container.PortletContainer;
import org.jboss.portal.portlet.container.PortletContainerInvoker;
+import org.jboss.portal.portlet.deployment.jboss.info.SessionInfo;
import org.jboss.portal.portlet.info.PortletInfo;
-import org.jboss.portal.portlet.info.SessionInfo;
import org.jboss.portal.portlet.invocation.PortletInterceptor;
import org.jboss.portal.portlet.invocation.PortletInvocation;
import org.jboss.portal.portlet.session.SessionListener;
@@ -44,7 +44,7 @@
{
PortletContainer container = (PortletContainer)invocation.getAttribute(PortletInvocation.INVOCATION_SCOPE, PortletContainerInvoker.PORTLET_CONTAINER);
PortletInfo portletInfo = container.getInfo();
- SessionInfo sessionInfo = portletInfo.getSession();
+ SessionInfo sessionInfo = portletInfo.getAttachment(SessionInfo.class);
if (sessionInfo != null && Boolean.TRUE.equals(sessionInfo.getDistributed()))
{
Modified: branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/JBossApplicationMetaDataFactory.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/JBossApplicationMetaDataFactory.java 2008-03-18 14:27:24 UTC (rev 10306)
+++ branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/JBossApplicationMetaDataFactory.java 2008-03-18 14:53:32 UTC (rev 10307)
@@ -23,7 +23,7 @@
package org.jboss.portal.portlet.deployment.jboss;
import org.jboss.portal.common.transaction.Transactions;
-import org.jboss.portal.portlet.deployment.jboss.info.ContainerCacheInfo;
+import org.jboss.portal.portlet.deployment.jboss.info.impl.CacheInfoImpl;
import org.jboss.portal.portlet.deployment.jboss.metadata.JBossApplicationMetaData;
import org.jboss.portal.portlet.deployment.jboss.metadata.JBossPortletMetaData;
import org.jboss.portal.portlet.deployment.jboss.metadata.PolicyPermissionMetaData;
@@ -198,11 +198,11 @@
{
if ("strong".equals(localName))
{
- portlet.setCacheRefType(new Integer(ContainerCacheInfo.REF_STRONG));
+ portlet.setCacheRefType(new Integer(CacheInfoImpl.REF_STRONG));
}
else if ("soft".equals(localName))
{
- portlet.setCacheRefType(new Integer(ContainerCacheInfo.REF_SOFT));
+ portlet.setCacheRefType(new Integer(CacheInfoImpl.REF_SOFT));
}
else
{
Deleted: branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/info/ContainerCacheInfo.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/info/ContainerCacheInfo.java 2008-03-18 14:27:24 UTC (rev 10306)
+++ branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/info/ContainerCacheInfo.java 2008-03-18 14:53:32 UTC (rev 10307)
@@ -1,77 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.portlet.deployment.jboss.info;
-
-import org.apache.log4j.Logger;
-import org.jboss.portal.portlet.deployment.jboss.metadata.JBossPortletMetaData;
-import org.jboss.portal.portlet.impl.metadata.portlet.PortletMetaData;
-import org.jboss.portal.portlet.info.CacheInfo;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 6697 $
- */
-public class ContainerCacheInfo implements CacheInfo
-{
-
- /** Cache uses strong references. */
- public static int REF_STRONG = 0;
-
- /** Cache uses soft references. */
- public static int REF_SOFT = 1;
-
- /** . */
- private static Logger log = Logger.getLogger(ContainerCacheInfo.class);
-
- /** . */
- private int expirationTimeSecs;
-
- /** . */
- private int referenceType;
-
- public ContainerCacheInfo(PortletMetaData portletMD, JBossPortletMetaData jbossPortletMD)
- {
- expirationTimeSecs = portletMD.getExpirationCache();
- if (expirationTimeSecs < 0 && expirationTimeSecs != -1)
- {
- log.warn("Seen bad caching expiration value " + expirationTimeSecs + " disable caching instead");
- expirationTimeSecs = 0;
- }
-
- referenceType = REF_STRONG;
- if (jbossPortletMD != null)
- {
- referenceType = jbossPortletMD.getCacheRefType() == null ? REF_STRONG : jbossPortletMD.getCacheRefType().intValue();
- }
- }
-
- public int getExpirationSecs()
- {
- return expirationTimeSecs;
- }
-
- public int getReferenceType()
- {
- return referenceType;
- }
-}
Added: branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/info/SessionInfo.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/info/SessionInfo.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/info/SessionInfo.java 2008-03-18 14:53:32 UTC (rev 10307)
@@ -0,0 +1,35 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.portlet.deployment.jboss.info;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 5448 $
+ */
+public interface SessionInfo
+{
+ /**
+ * @return true if the session should be distributed
+ */
+ Boolean getDistributed();
+}
Property changes on: branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/info/SessionInfo.java
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/info/impl/CacheInfoImpl.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/info/impl/CacheInfoImpl.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/info/impl/CacheInfoImpl.java 2008-03-18 14:53:32 UTC (rev 10307)
@@ -0,0 +1,77 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.portlet.deployment.jboss.info.impl;
+
+import org.apache.log4j.Logger;
+import org.jboss.portal.portlet.deployment.jboss.metadata.JBossPortletMetaData;
+import org.jboss.portal.portlet.impl.metadata.portlet.PortletMetaData;
+import org.jboss.portal.portlet.info.CacheInfo;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 6697 $
+ */
+public class CacheInfoImpl implements CacheInfo
+{
+
+ /** Cache uses strong references. */
+ public static int REF_STRONG = 0;
+
+ /** Cache uses soft references. */
+ public static int REF_SOFT = 1;
+
+ /** . */
+ private static Logger log = Logger.getLogger(CacheInfoImpl.class);
+
+ /** . */
+ private int expirationTimeSecs;
+
+ /** . */
+ private int referenceType;
+
+ public CacheInfoImpl(PortletMetaData portletMD, JBossPortletMetaData jbossPortletMD)
+ {
+ expirationTimeSecs = portletMD.getExpirationCache();
+ if (expirationTimeSecs < 0 && expirationTimeSecs != -1)
+ {
+ log.warn("Seen bad caching expiration value " + expirationTimeSecs + " disable caching instead");
+ expirationTimeSecs = 0;
+ }
+
+ referenceType = REF_STRONG;
+ if (jbossPortletMD != null)
+ {
+ referenceType = jbossPortletMD.getCacheRefType() == null ? REF_STRONG : jbossPortletMD.getCacheRefType().intValue();
+ }
+ }
+
+ public int getExpirationSecs()
+ {
+ return expirationTimeSecs;
+ }
+
+ public int getReferenceType()
+ {
+ return referenceType;
+ }
+}
Added: branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/info/impl/SessionInfoImpl.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/info/impl/SessionInfoImpl.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/portlet-server/src/main/org/jboss/portal/portlet/deployment/jboss/info/impl/SessionInfoImpl.java 2008-03-18 14:53:32 UTC (rev 10307)
@@ -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.portlet.deployment.jboss.info.impl;
+
+import org.jboss.portal.portlet.deployment.jboss.info.SessionInfo;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 7226 $
+ */
+public class SessionInfoImpl implements SessionInfo
+{
+
+ /** . */
+ private boolean distributed;
+
+ public SessionInfoImpl(Boolean distributed)
+ {
+ if (distributed == null)
+ {
+ distributed = false;
+ }
+
+ //
+ this.distributed = distributed;
+ }
+
+ public Boolean getDistributed()
+ {
+ return distributed;
+ }
+}
\ No newline at end of file
Modified: branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/portlet/info/WSRPPortletInfo.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/portlet/info/WSRPPortletInfo.java 2008-03-18 14:27:24 UTC (rev 10306)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/consumer/portlet/info/WSRPPortletInfo.java 2008-03-18 14:53:32 UTC (rev 10307)
@@ -35,7 +35,6 @@
import org.jboss.portal.portlet.info.PreferenceInfo;
import org.jboss.portal.portlet.info.PreferencesInfo;
import org.jboss.portal.portlet.info.SecurityInfo;
-import org.jboss.portal.portlet.info.SessionInfo;
import org.jboss.portal.portlet.info.WindowStateInfo;
import org.jboss.portal.wsrp.WSRPUtils;
import org.jboss.portal.wsrp.consumer.ProducerInfo;
@@ -193,11 +192,6 @@
throw new UnsupportedOperationException("getCache currently not supported!");
}
- public SessionInfo getSession()
- {
- return null;
- }
-
public Boolean isRemotable()
{
return Boolean.FALSE;
Modified: modules/portlet/trunk/.classpath
===================================================================
--- modules/portlet/trunk/.classpath 2008-03-18 14:27:24 UTC (rev 10306)
+++ modules/portlet/trunk/.classpath 2008-03-18 14:53:32 UTC (rev 10307)
@@ -8,6 +8,8 @@
<classpathentry kind="src" path="management/src/main/java"/>
<classpathentry kind="src" path="test/src/main/java"/>
<classpathentry kind="src" path="samples/src/main/java"/>
+ <classpathentry kind="src" path="portlet/src/test/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="lib" path="/home/theute/Java/jdk1.5.0_08/lib/tools.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
16 years, 3 months
JBoss Portal SVN: r10306 - in modules/common/trunk/common/src: main/java/org/jboss/portal/common/net/media and 2 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-03-18 10:27:24 -0400 (Tue, 18 Mar 2008)
New Revision: 10306
Added:
modules/common/trunk/common/src/main/java/org/jboss/portal/common/net/media/
modules/common/trunk/common/src/main/java/org/jboss/portal/common/net/media/ContentType.java
modules/common/trunk/common/src/main/java/org/jboss/portal/common/net/media/MediaType.java
modules/common/trunk/common/src/main/java/org/jboss/portal/common/net/media/Parameter.java
modules/common/trunk/common/src/main/java/org/jboss/portal/common/net/media/SubtypeDef.java
modules/common/trunk/common/src/main/java/org/jboss/portal/common/net/media/TypeDef.java
modules/common/trunk/common/src/test/java/org/jboss/portal/test/common/net/media/
modules/common/trunk/common/src/test/java/org/jboss/portal/test/common/net/media/ContentTypeTestCase.java
modules/common/trunk/common/src/test/java/org/jboss/portal/test/common/net/media/MediaTypeTestCase.java
modules/common/trunk/common/src/test/java/org/jboss/portal/test/common/net/media/SubtypeDefTestCase.java
modules/common/trunk/common/src/test/java/org/jboss/portal/test/common/net/media/TypeDefTestCase.java
Log:
started to add classes for handling media type and content type properly
Added: modules/common/trunk/common/src/main/java/org/jboss/portal/common/net/media/ContentType.java
===================================================================
--- modules/common/trunk/common/src/main/java/org/jboss/portal/common/net/media/ContentType.java (rev 0)
+++ modules/common/trunk/common/src/main/java/org/jboss/portal/common/net/media/ContentType.java 2008-03-18 14:27:24 UTC (rev 10306)
@@ -0,0 +1,178 @@
+/******************************************************************************
+ * 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.common.net.media;
+
+import java.util.List;
+import java.util.Collections;
+import java.util.ArrayList;
+import java.util.Iterator;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class ContentType
+{
+
+ public static ContentType create(String contentTypeValue)
+ {
+ int slashIndex = contentTypeValue.indexOf('/');
+
+ if (slashIndex == -1)
+ {
+
+ }
+
+ String typeName = contentTypeValue.substring(0, slashIndex);
+
+ int semiColonIndex = contentTypeValue.indexOf(';', slashIndex + 1);
+
+ if (semiColonIndex == -1)
+ {
+ return new ContentType(MediaType.create(typeName, contentTypeValue.substring(slashIndex + 1)));
+
+ }
+
+ //
+ String subtypeName = contentTypeValue.substring(slashIndex + 1, semiColonIndex);
+
+ //
+ MediaType mediaType = MediaType.create(typeName, subtypeName);
+
+ //
+ List<Parameter> parameters = null;
+
+ for (int i = semiColonIndex + 1;semiColonIndex != -1;i = semiColonIndex + 1)
+ {
+ semiColonIndex = contentTypeValue.indexOf(';', i);
+
+ //
+ if (semiColonIndex == 0)
+ {
+ // We have 2 following semi colons
+ throw new IllegalArgumentException();
+ }
+
+ // Compute the to
+ int to = semiColonIndex == -1 ? contentTypeValue.length() : semiColonIndex;
+
+ // Get the equals char position
+ int equalsIndex = contentTypeValue.indexOf('=', i);
+
+ //
+ if (equalsIndex != -1 && equalsIndex < to)
+ {
+ if (parameters == null)
+ {
+ parameters = new ArrayList<Parameter>();
+ }
+
+ //
+ String name = contentTypeValue.substring(i, equalsIndex);
+ String value = contentTypeValue.substring(equalsIndex + 1, to);
+ parameters.add(new Parameter(name, value));
+ }
+ else
+ {
+ throw new IllegalArgumentException("No equals char found in the string " + contentTypeValue.substring(i, to));
+ }
+ }
+
+ //
+ if (parameters == null)
+ {
+ parameters = Collections.emptyList();
+ }
+
+ //
+ return new ContentType(mediaType, parameters);
+ }
+
+ /** . */
+ private MediaType mediaType;
+
+ /** . */
+ private List<Parameter> parameters;
+
+ public ContentType(MediaType mediaType, List<Parameter> parameters)
+ {
+ if (mediaType == null)
+ {
+ throw new IllegalArgumentException("No null media type accepted");
+ }
+ if (parameters == null)
+ {
+ throw new IllegalArgumentException("No null parameter list accepted");
+ }
+
+ //
+ this.mediaType = mediaType;
+ this.parameters = parameters;
+ }
+
+ public ContentType(MediaType mediaType)
+ {
+ if (mediaType == null)
+ {
+ throw new IllegalArgumentException("No null media type accepted");
+ }
+
+ //
+ this.mediaType = mediaType;
+ this.parameters = Collections.emptyList();
+ }
+
+ public MediaType getMediaType()
+ {
+ return mediaType;
+ }
+
+ public List<Parameter> getParameters()
+ {
+ return parameters;
+ }
+
+ public String getValue()
+ {
+ StringBuilder builder = new StringBuilder();
+ builder.append(mediaType.getType().getName()).append('/').append(mediaType.getSubtype().getName());
+ for (Iterator<Parameter> i = parameters.iterator();;)
+ {
+ Parameter parameter = i.next();
+
+ //
+ builder.append(parameter.getName()).append('=').append(parameter.getValue());
+
+ //
+ if (i.hasNext())
+ {
+ builder.append(';');
+ }
+ else
+ {
+ break;
+ }
+ }
+ return builder.toString();
+ }
+}
Added: modules/common/trunk/common/src/main/java/org/jboss/portal/common/net/media/MediaType.java
===================================================================
--- modules/common/trunk/common/src/main/java/org/jboss/portal/common/net/media/MediaType.java (rev 0)
+++ modules/common/trunk/common/src/main/java/org/jboss/portal/common/net/media/MediaType.java 2008-03-18 14:27:24 UTC (rev 10306)
@@ -0,0 +1,145 @@
+/******************************************************************************
+ * 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.common.net.media;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public final class MediaType
+{
+
+ /** . */
+ public static final MediaType TEXT_HTML = new MediaType(TypeDef.TEXT, SubtypeDef.HTML);
+
+ /** . */
+ public static final MediaType TEXT_JAVASCRIPT = new MediaType(TypeDef.TEXT, SubtypeDef.JAVASCRIPT);
+
+ /** . */
+ public static final MediaType TEXT_CSS = new MediaType(TypeDef.TEXT, SubtypeDef.CSS);
+
+ /** . */
+ public static final MediaType APPLICATION_X_WWW_FORM_URLENCODED = new MediaType(TypeDef.APPLICATION, SubtypeDef.X_WWW_FORM_URLENCODED);
+
+ /** The type identifier. */
+ private final TypeDef type;
+
+ /** The sub type identifier. */
+ private final SubtypeDef subtype;
+
+ /** . */
+ private volatile Integer hashCode;
+
+ /** . */
+ private volatile String toString;
+
+ /** . */
+ private volatile String value;
+
+ public static MediaType create(String typeName, String subtypeName)
+ {
+ TypeDef type = TypeDef.create(typeName);
+
+ //
+ if (type == null)
+ {
+ return null;
+ }
+
+ //
+ SubtypeDef subtype = SubtypeDef.create(subtypeName);
+
+ //
+ return new MediaType(type, subtype);
+ }
+
+ public static MediaType create(TypeDef type, SubtypeDef subtype)
+ {
+ if (type == null)
+ {
+ throw new IllegalArgumentException("No null type accepted");
+ }
+ if (subtype == null)
+ {
+ throw new IllegalArgumentException("No null subtype accepted");
+ }
+ return new MediaType(type, subtype);
+ }
+
+ MediaType(TypeDef type, SubtypeDef subtype)
+ {
+ this.type = type;
+ this.subtype = subtype;
+ }
+
+ public TypeDef getType()
+ {
+ return type;
+ }
+
+ public SubtypeDef getSubtype()
+ {
+ return subtype;
+ }
+
+ public String getValue()
+ {
+ if (value == null)
+ {
+ value = type.getName() + "/" + subtype.getName();
+ }
+ return value;
+ }
+
+ public int hashCode()
+ {
+ if (hashCode == null)
+ {
+ hashCode = type.hashCode() + subtype.hashCode();
+ }
+ return hashCode;
+ }
+
+ public boolean equals(Object obj)
+ {
+ if (obj == this)
+ {
+ return true;
+ }
+ if (obj instanceof MediaType)
+ {
+ MediaType that = (MediaType)obj;
+ return type.equals(that.type) && subtype.equals(that.subtype);
+ }
+ return false;
+ }
+
+ public String toString()
+ {
+ if (toString == null)
+ {
+ toString = "MediaType[name=" + type + ",subtype=" + subtype + "]";
+ }
+ return toString;
+ }
+}
Added: modules/common/trunk/common/src/main/java/org/jboss/portal/common/net/media/Parameter.java
===================================================================
--- modules/common/trunk/common/src/main/java/org/jboss/portal/common/net/media/Parameter.java (rev 0)
+++ modules/common/trunk/common/src/main/java/org/jboss/portal/common/net/media/Parameter.java 2008-03-18 14:27:24 UTC (rev 10306)
@@ -0,0 +1,53 @@
+/******************************************************************************
+ * 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.common.net.media;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class Parameter
+{
+
+ /** . */
+ private final String name;
+
+ /** . */
+ private final String value;
+
+ public Parameter(String name, String value)
+ {
+ this.name = name;
+ this.value = value;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public String getValue()
+ {
+ return value;
+ }
+}
Added: modules/common/trunk/common/src/main/java/org/jboss/portal/common/net/media/SubtypeDef.java
===================================================================
--- modules/common/trunk/common/src/main/java/org/jboss/portal/common/net/media/SubtypeDef.java (rev 0)
+++ modules/common/trunk/common/src/main/java/org/jboss/portal/common/net/media/SubtypeDef.java 2008-03-18 14:27:24 UTC (rev 10306)
@@ -0,0 +1,121 @@
+/******************************************************************************
+ * 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.common.net.media;
+
+import java.util.Locale;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public final class SubtypeDef
+{
+
+ /** . */
+ public static final SubtypeDef HTML = new SubtypeDef("html");
+
+ /** . */
+ public static final SubtypeDef XML = new SubtypeDef("xml");
+
+ /** . */
+ public static final SubtypeDef CSS = new SubtypeDef("css");
+
+ /** . */
+ public static final SubtypeDef PLAIN = new SubtypeDef("plain");
+
+ /** . */
+ public static final SubtypeDef JAVASCRIPT = new SubtypeDef("javascript");
+
+ /** . */
+ public static final SubtypeDef X_WWW_FORM_URLENCODED = new SubtypeDef("x-www-form-urlencoded");
+
+ /**
+ * Returns a corresponding subtype definition for the specified subtype name.
+ *
+ * @param subtypeName the subtype name
+ * @return a subtype definition
+ * @throws IllegalArgumentException if the subtype name is null or is empty
+ */
+ public static SubtypeDef create(String subtypeName) throws IllegalArgumentException
+ {
+ if (subtypeName == null)
+ {
+ throw new IllegalArgumentException("No null subtype name accepted");
+ }
+ if (subtypeName.length() == 0)
+ {
+ throw new IllegalArgumentException("No empty subtype name accepted");
+ }
+ return new SubtypeDef(subtypeName);
+ }
+
+ /** . */
+ private final String name;
+
+ /** . */
+ private volatile String toString;
+
+ SubtypeDef(String name)
+ {
+ if (name == null)
+ {
+ throw new IllegalArgumentException("No null name allowed");
+ }
+
+ //
+ this.name = name.toLowerCase(Locale.ENGLISH);
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public int hashCode()
+ {
+ return name.hashCode();
+ }
+
+ public boolean equals(Object obj)
+ {
+ if (obj == this)
+ {
+ return true;
+ }
+ if (obj instanceof SubtypeDef)
+ {
+ SubtypeDef that = (SubtypeDef)obj;
+ return name.equals(that.name);
+ }
+ return false;
+ }
+
+ public String toString()
+ {
+ if (toString == null)
+ {
+ toString = "SubtypeDef[" + name + "]";
+ }
+ return toString;
+ }
+}
Added: modules/common/trunk/common/src/main/java/org/jboss/portal/common/net/media/TypeDef.java
===================================================================
--- modules/common/trunk/common/src/main/java/org/jboss/portal/common/net/media/TypeDef.java (rev 0)
+++ modules/common/trunk/common/src/main/java/org/jboss/portal/common/net/media/TypeDef.java 2008-03-18 14:27:24 UTC (rev 10306)
@@ -0,0 +1,148 @@
+/******************************************************************************
+ * 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.common.net.media;
+
+/**
+ * A top level media type definition defined by <a href="http://tools.ietf.org/html/rfc2046#section-2">RFC2046 section 2</a>).
+ *
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public final class TypeDef
+{
+
+ // The five discrete top-level media types
+
+ /** . */
+ public static final TypeDef TEXT = new TypeDef("text", "", false);
+
+ /** . */
+ public static final TypeDef IMAGE = new TypeDef("image", "", false);
+
+ /** . */
+ public static final TypeDef AUDIO = new TypeDef("audio", "", false);
+
+ /** . */
+ public static final TypeDef VIDEO = new TypeDef("video", "", false);
+
+ /** . */
+ public static final TypeDef APPLICATION = new TypeDef("application", "", false);
+
+ // The two composite top-level media types
+
+ /** . */
+ public static final TypeDef MULTIPART = new TypeDef("multipart", "", true);
+
+ /** . */
+ public static final TypeDef MESSAGE = new TypeDef("message", "", true);
+
+ /**
+ * Returns the corresponding type definition for the given top level type name.
+ * If the type name does not correspond to a top level name, then null is returned.
+ *
+ * @param typeName the name of the type def
+ * @return the corresponding type def
+ * @throws IllegalArgumentException if the type name is null
+ */
+ public static TypeDef create(String typeName) throws IllegalArgumentException
+ {
+ if (typeName == null)
+ {
+ throw new IllegalArgumentException("no null type name accepted");
+ }
+ if (TEXT.name.equalsIgnoreCase(typeName))
+ {
+ return TEXT;
+ }
+ if (APPLICATION.name.equalsIgnoreCase(typeName))
+ {
+ return APPLICATION;
+ }
+ if (MULTIPART.name.equalsIgnoreCase(typeName))
+ {
+ return MULTIPART;
+ }
+ if (IMAGE.name.equalsIgnoreCase(typeName))
+ {
+ return IMAGE;
+ }
+ if (AUDIO.name.equalsIgnoreCase(typeName))
+ {
+ return AUDIO;
+ }
+ if (VIDEO.name.equalsIgnoreCase(typeName))
+ {
+ return VIDEO;
+ }
+ if (MESSAGE.name.equalsIgnoreCase(typeName))
+ {
+ return MESSAGE;
+ }
+ return null;
+ }
+
+ /** . */
+ private final String name;
+
+ /** . */
+ private final String description;
+
+ /** . */
+ private final boolean composite;
+
+ /** . */
+ private final String toString;
+
+ private TypeDef(String name, String description, boolean composite)
+ {
+ this.name = name;
+ this.description = description;
+ this.composite = composite;
+ this.toString = "TypeDef[" + name + "]";
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public boolean isComposite()
+ {
+ return composite;
+ }
+
+ public boolean isDiscrete()
+ {
+ return !composite;
+ }
+
+ public String toString()
+ {
+ return toString;
+ }
+}
Added: modules/common/trunk/common/src/test/java/org/jboss/portal/test/common/net/media/ContentTypeTestCase.java
===================================================================
--- modules/common/trunk/common/src/test/java/org/jboss/portal/test/common/net/media/ContentTypeTestCase.java (rev 0)
+++ modules/common/trunk/common/src/test/java/org/jboss/portal/test/common/net/media/ContentTypeTestCase.java 2008-03-18 14:27:24 UTC (rev 10306)
@@ -0,0 +1,97 @@
+/******************************************************************************
+ * 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.test.common.net.media;
+
+import junit.framework.TestCase;
+import org.jboss.portal.common.net.media.ContentType;
+import org.jboss.portal.common.net.media.Parameter;
+import org.jboss.portal.common.net.media.MediaType;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class ContentTypeTestCase extends TestCase
+{
+
+ public void testBlah()
+ {
+ assertEquals("text/html", MediaType.TEXT_HTML);
+ assertEquals("text/html;a=b", MediaType.TEXT_HTML, new Parameter("a", "b"));
+ assertEquals("text/html;a=b;c=d", MediaType.TEXT_HTML, new Parameter("a", "b"), new Parameter("c", "d"));
+ }
+
+ public void testBlih()
+ {
+ assertCannotBuild("foo/html");
+ assertCannotBuild("text/");
+ assertCannotBuild("texthtml");
+ assertCannotBuild("text/html;");
+ assertCannotBuild("text/html;;");
+ assertCannotBuild("text/html;ab");
+ assertCannotBuild("text/html;ab;");
+ assertCannotBuild("text/html;a=b;");
+ assertCannotBuild("text/html;a=;");
+ assertCannotBuild("text/html;=b;");
+ assertCannotBuild("text/html;=;");
+ }
+
+ private void assertCannotBuild(String contentTypeValue)
+ {
+ try
+ {
+ ContentType.create(contentTypeValue);
+ fail("Was able to build content type with value " + contentTypeValue);
+ }
+ catch (Exception ignore)
+ {
+ }
+ }
+
+ private void assertEquals(String contentTypeValue, MediaType mediaType)
+ {
+ assertEquals(contentTypeValue, mediaType, new Parameter[0]);
+ }
+
+ private void assertEquals(String contentTypeValue, MediaType mediaType, Parameter parameter)
+ {
+ assertEquals(contentTypeValue, mediaType, new Parameter[]{parameter});
+ }
+
+ private void assertEquals(String contentTypeValue, MediaType mediaType, Parameter... parameters)
+ {
+ ContentType ct = ContentType.create(contentTypeValue);
+ assertNotNull(ct);
+ assertEquals(ct.getMediaType(), mediaType);
+ assertNotNull(ct.getParameters());
+ assertEquals(parameters.length, ct.getParameters().size());
+ for (int i = 0;i < ct.getParameters().size();i++)
+ {
+ Parameter parameter = ct.getParameters().get(i);
+ assertNotNull(parameter);
+ assertEquals(parameters[i].getName(), parameter.getName());
+ assertEquals(parameters[i].getValue(), parameter.getValue());
+ }
+ }
+
+}
Added: modules/common/trunk/common/src/test/java/org/jboss/portal/test/common/net/media/MediaTypeTestCase.java
===================================================================
--- modules/common/trunk/common/src/test/java/org/jboss/portal/test/common/net/media/MediaTypeTestCase.java (rev 0)
+++ modules/common/trunk/common/src/test/java/org/jboss/portal/test/common/net/media/MediaTypeTestCase.java 2008-03-18 14:27:24 UTC (rev 10306)
@@ -0,0 +1,97 @@
+/******************************************************************************
+ * 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.test.common.net.media;
+
+import junit.framework.TestCase;
+import org.jboss.portal.common.net.media.MediaType;
+import org.jboss.portal.common.net.media.TypeDef;
+import org.jboss.portal.common.net.media.SubtypeDef;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class MediaTypeTestCase extends TestCase
+{
+ public void testBasic()
+ {
+ MediaType textHTML = MediaType.create(TypeDef.TEXT, SubtypeDef.HTML);
+ assertEquals(TypeDef.TEXT, textHTML.getType());
+ assertEquals(SubtypeDef.HTML, textHTML.getSubtype());
+
+ //
+ MediaType textHTML2 = MediaType.create("text", "html");
+ assertEquals(TypeDef.TEXT, textHTML2.getType());
+ assertEquals(SubtypeDef.HTML, textHTML2.getSubtype());
+
+ //
+ assertEquals(MediaType.TEXT_HTML, textHTML);
+ assertEquals(MediaType.TEXT_HTML, textHTML2);
+ }
+
+ public void testIAE()
+ {
+ try
+ {
+ MediaType.create(null, SubtypeDef.HTML);
+ }
+ catch (IllegalArgumentException e)
+ {
+ }
+ try
+ {
+ MediaType.create(TypeDef.TEXT, null);
+ }
+ catch (Exception e)
+ {
+ }
+ try
+ {
+ MediaType.create((TypeDef)null, null);
+ }
+ catch (Exception e)
+ {
+ }
+ try
+ {
+ MediaType.create((String)null, null);
+ }
+ catch (Exception e)
+ {
+ }
+ try
+ {
+ MediaType.create(null, "html");
+ }
+ catch (Exception e)
+ {
+ }
+ try
+ {
+ MediaType.create("test", null);
+ }
+ catch (Exception e)
+ {
+ }
+ }
+}
Added: modules/common/trunk/common/src/test/java/org/jboss/portal/test/common/net/media/SubtypeDefTestCase.java
===================================================================
--- modules/common/trunk/common/src/test/java/org/jboss/portal/test/common/net/media/SubtypeDefTestCase.java (rev 0)
+++ modules/common/trunk/common/src/test/java/org/jboss/portal/test/common/net/media/SubtypeDefTestCase.java 2008-03-18 14:27:24 UTC (rev 10306)
@@ -0,0 +1,67 @@
+/******************************************************************************
+ * 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.test.common.net.media;
+
+import junit.framework.TestCase;
+import org.jboss.portal.common.net.media.SubtypeDef;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class SubtypeDefTestCase extends TestCase
+{
+
+ public void testCaseSensitivity()
+ {
+ assertEquals(SubtypeDef.HTML, SubtypeDef.create("html"));
+ assertEquals(SubtypeDef.HTML, SubtypeDef.create("hTml"));
+ assertEquals(SubtypeDef.HTML, SubtypeDef.create("HTML"));
+
+ //
+ SubtypeDef foo = SubtypeDef.create("foo");
+ assertEquals(foo, SubtypeDef.create("foo"));
+ assertEquals(foo, SubtypeDef.create("fOo"));
+ assertEquals(foo, SubtypeDef.create("FOO"));
+ }
+
+ public void testIAE()
+ {
+ try
+ {
+ SubtypeDef.create(null);
+ fail();
+ }
+ catch (IllegalArgumentException ignore)
+ {
+ }
+ try
+ {
+ SubtypeDef.create("");
+ fail();
+ }
+ catch (IllegalArgumentException ignore)
+ {
+ }
+ }
+}
Added: modules/common/trunk/common/src/test/java/org/jboss/portal/test/common/net/media/TypeDefTestCase.java
===================================================================
--- modules/common/trunk/common/src/test/java/org/jboss/portal/test/common/net/media/TypeDefTestCase.java (rev 0)
+++ modules/common/trunk/common/src/test/java/org/jboss/portal/test/common/net/media/TypeDefTestCase.java 2008-03-18 14:27:24 UTC (rev 10306)
@@ -0,0 +1,80 @@
+/******************************************************************************
+ * 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.test.common.net.media;
+
+import junit.framework.TestCase;
+import org.jboss.portal.common.net.media.TypeDef;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class TypeDefTestCase extends TestCase
+{
+
+ public void testIAE()
+ {
+ try
+ {
+ TypeDef.create(null);
+ }
+ catch (IllegalArgumentException ignore)
+ {
+ }
+ }
+
+ public void testNotRecognized()
+ {
+ assertNull(TypeDef.create(""));
+ assertNull(TypeDef.create("foo"));
+ }
+
+ public void testRecognized()
+ {
+ assertEquals(TypeDef.TEXT, TypeDef.create("text"));
+ assertEquals(TypeDef.AUDIO, TypeDef.create("audio"));
+ assertEquals(TypeDef.VIDEO, TypeDef.create("video"));
+ assertEquals(TypeDef.IMAGE, TypeDef.create("image"));
+ assertEquals(TypeDef.APPLICATION, TypeDef.create("application"));
+ assertEquals(TypeDef.MESSAGE, TypeDef.create("message"));
+ assertEquals(TypeDef.MULTIPART, TypeDef.create("multipart"));
+
+ //
+ assertEquals(TypeDef.TEXT, TypeDef.create("TEXT"));
+ assertEquals(TypeDef.AUDIO, TypeDef.create("AUDIO"));
+ assertEquals(TypeDef.VIDEO, TypeDef.create("VIDEO"));
+ assertEquals(TypeDef.IMAGE, TypeDef.create("IMAGE"));
+ assertEquals(TypeDef.APPLICATION, TypeDef.create("APPLICATION"));
+ assertEquals(TypeDef.MESSAGE, TypeDef.create("MESSAGE"));
+ assertEquals(TypeDef.MULTIPART, TypeDef.create("MULTIPART"));
+
+ //
+ assertEquals(TypeDef.TEXT, TypeDef.create("tExt"));
+ assertEquals(TypeDef.AUDIO, TypeDef.create("aUdio"));
+ assertEquals(TypeDef.VIDEO, TypeDef.create("vIdeo"));
+ assertEquals(TypeDef.IMAGE, TypeDef.create("iMage"));
+ assertEquals(TypeDef.APPLICATION, TypeDef.create("aPplication"));
+ assertEquals(TypeDef.MESSAGE, TypeDef.create("mEssage"));
+ assertEquals(TypeDef.MULTIPART, TypeDef.create("mUltipart"));
+ }
+}
16 years, 3 months
JBoss Portal SVN: r10305 - in modules/portlet/trunk/portal/src/main: resources/simple-portal-war/css and 1 other directories.
by portal-commits@lists.jboss.org
Author: wesleyhales
Date: 2008-03-18 10:11:56 -0400 (Tue, 18 Mar 2008)
New Revision: 10305
Modified:
modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/admin/ui/AdminPortlet.java
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/css/admin.css
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/js/admin.js
Log:
admin portlet final cleanup
Modified: modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/admin/ui/AdminPortlet.java
===================================================================
--- modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/admin/ui/AdminPortlet.java 2008-03-18 12:43:53 UTC (rev 10304)
+++ modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/admin/ui/AdminPortlet.java 2008-03-18 14:11:56 UTC (rev 10305)
@@ -168,11 +168,27 @@
" </div>\n" +
"\n" +
" <div class=\"par-header-right\">\n" +
- " <span class=\"par-status\"><img src=\"/simple-portal/images/admin/started-icon.gif\" alt=\"\"/>" + application.getStatus() + "</span>\n" +
+ " <span class=\"par-status\">");
+
+ if (application.getStatus().toString().equals("STARTED")){
+ writer.print("<img src=\"/simple-portal/images/admin/started-icon.gif\" alt=\"\"/>");
+ }else{
+ writer.print("<img src=\"/simple-portal/images/admin/stopped-icon.gif\" alt=\"\"/>");
+ }
+ writer.print("" +
+ "" + application.getStatus() + "</span>\n" +
"\n" +
" <div class=\"par-control\">\n" +
- " <img src=\"/simple-portal/images/admin/start-stop-edge.gif\" alt=\"\"/>\n" +
- " <a href=\"" + stopURL + "\">Stop</a></td>\n" +
+ " <img src=\"/simple-portal/images/admin/start-stop-edge.gif\" alt=\"\"/>\n");
+ if (application.getStatus().toString().equals("STARTED")){
+ writer.print("<a class=\"stop\" href=\"" + stopURL + "\">Stop</a></td>\n");
+ }else{
+ writer.print("<a class=\"start\" href=\"" + startURL + "\">Start</a></td>\n");
+ }
+
+ writer.print("" +
+ "" +
+ "" +
" </div>\n" +
" </div>\n" +
" \n" +
@@ -210,12 +226,17 @@
" <tr class=\"par-filter-row\">\n" +
" <td class=\"par-row-left\"><img class=\"icon\" src=\"/simple-portal/images/admin/filter-icon.gif\" alt=\"\"/>" + filter.getId() + "</td>\n" +
" <td>" + filter.getStatus() + "</td>\n" +
- " <td></td>\n" +
- " <td class=\"par-row-right\"><a class=\"start\" href=\"" + startURL + "\">Start</a> | <a class=\"stop\" href=\"" + stopURL + "\">Stop</a></td>\n" +
- " </tr>" +
- "");
+ " <td></td>\n");
+ if (filter.getStatus().toString().equals("STARTED")){
+ writer.print(" <td class=\"par-row-right\">Start | <a class=\"stop\" href=\"" + stopURL + "\">Stop</a></td>\n");
+ }else{
+ writer.print(" <td class=\"par-row-right\"><a class=\"start\" href=\"" + startURL + "\">Start</a> | Stop</td>\n");
+ }
+ writer.print(" </tr>");
+
+
}
//
@@ -249,13 +270,16 @@
" <tr class=\"par-container-row\">\n" +
" <td class=\"par-row-left\"><img class=\"icon\" src=\"/simple-portal/images/admin/portlet-icon.gif\" alt=\"\"/>" + container.getId() + "</td>\n" +
" <td>" + container.getStatus() + "</td>\n" +
- " <td>" + descString + "</td>\n" +
- " <td class=\"par-row-right\"><a class=\"start\" href=\"" + startURL + "\">Start</a> | <a class=\"stop\" href=\"" + stopURL + "\">Stop</a></td>\n" +
- " </tr>" +
+ " <td>" + descString + "</td>\n");
+ if (container.getStatus().toString().equals("STARTED")){
+ writer.print(" <td class=\"par-row-right\">Start | <a class=\"stop\" href=\"" + stopURL + "\">Stop</a></td>\n");
+ }else{
+ writer.print(" <td class=\"par-row-right\"><a class=\"start\" href=\"" + startURL + "\">Start</a> | Stop</td>\n");
+ }
-// " <tr class=\"" + (container.getStatus().toString().equals("FAILED") ? "admin-failed" : "" ) + "\">\n" +
- "");
+ writer.print(" </tr>");
+
}
writer.print("</table>" +
" </div>\n" +
Modified: modules/portlet/trunk/portal/src/main/resources/simple-portal-war/css/admin.css
===================================================================
--- modules/portlet/trunk/portal/src/main/resources/simple-portal-war/css/admin.css 2008-03-18 12:43:53 UTC (rev 10304)
+++ modules/portlet/trunk/portal/src/main/resources/simple-portal-war/css/admin.css 2008-03-18 14:11:56 UTC (rev 10305)
@@ -80,7 +80,6 @@
top: 1px;
left: 18px;
position: absolute;
- color: #7a0f0f;
font-weight: bold;
}
@@ -134,11 +133,11 @@
padding: 0 5px 0 0;
}
-table.par-table td a.start {
+a.start {
color: #17600e
}
-table.par-table td a.stop {
+a.stop {
color: #9e0606;
}
Modified: modules/portlet/trunk/portal/src/main/resources/simple-portal-war/js/admin.js
===================================================================
--- modules/portlet/trunk/portal/src/main/resources/simple-portal-war/js/admin.js 2008-03-18 12:43:53 UTC (rev 10304)
+++ modules/portlet/trunk/portal/src/main/resources/simple-portal-war/js/admin.js 2008-03-18 14:11:56 UTC (rev 10305)
@@ -39,21 +39,8 @@
}
}
- window.onload = function(){
- var targets = document.getElementsByClassName('target');
-
- for (var i=0; i < targets.length; i++){
- try{
- //alert(targets[i].id.substring(0,targets[i].id.lastIndexOf('-target')));
- var atarget = targets[i].id.substring(0,targets[i].id.lastIndexOf('-target'));
- var cid = 'contract-'.concat(atarget);
- var eid = 'expand-'.concat(atarget);
- $(cid).style.display = 'none';
- new Effect.BlindUp(targets[i].id);
- $(eid).style.display = 'block';
- }catch(e){
- //alert(e);
- }
- }
+ //collapse all on page load
+ window.onload = function(){
+ collapseAll()
};
\ No newline at end of file
16 years, 3 months
JBoss Portal SVN: r10304 - in modules/portlet/trunk/portal/src/main: resources/simple-portal-war/js and 1 other directory.
by portal-commits@lists.jboss.org
Author: wesleyhales
Date: 2008-03-18 08:43:53 -0400 (Tue, 18 Mar 2008)
New Revision: 10304
Modified:
modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/admin/ui/AdminPortlet.java
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/js/admin.js
Log:
finish js for admin portlet - cleanup todo
Modified: modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/admin/ui/AdminPortlet.java
===================================================================
--- modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/admin/ui/AdminPortlet.java 2008-03-18 10:46:16 UTC (rev 10303)
+++ modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/admin/ui/AdminPortlet.java 2008-03-18 12:43:53 UTC (rev 10304)
@@ -157,11 +157,11 @@
" <div class=\"par-container\">\n" +
" <div class=\"par-header\">\n" +
" <div class=\"par-header-left\">\n" +
- " <a id=\"contract-simple-portal\" href=\"#\" onclick=\"collapse(this,'"+ htmlId +"');\">\n" +
+ " <a id=\"contract-"+ htmlId +"\" href=\"#\" onclick=\"collapse(this,'"+ htmlId +"');\">\n" +
" <img src=\"/simple-portal/images/admin/contract.gif\" alt=\"\" />\n" +
" <h3 class=\"par\">"+ application.getId() +"</h3>\n" +
" </a>\n" +
- " <a id=\"expand-simple-portal\" href=\"#\" onclick=\"expand(this,'"+ htmlId +"');\" style=\"display:none\">\n" +
+ " <a id=\"expand-"+ htmlId +"\" href=\"#\" onclick=\"expand(this,'"+ htmlId +"');\">\n" +
" <img src=\"/simple-portal/images/admin/expand.gif\" alt=\"\" />\n" +
" <h3 class=\"par\">"+ application.getId() +"</h3>\n" +
" </a>\n" +
Modified: modules/portlet/trunk/portal/src/main/resources/simple-portal-war/js/admin.js
===================================================================
--- modules/portlet/trunk/portal/src/main/resources/simple-portal-war/js/admin.js 2008-03-18 10:46:16 UTC (rev 10303)
+++ modules/portlet/trunk/portal/src/main/resources/simple-portal-war/js/admin.js 2008-03-18 12:43:53 UTC (rev 10304)
@@ -41,14 +41,17 @@
window.onload = function(){
var targets = document.getElementsByClassName('target');
+
for (var i=0; i < targets.length; i++){
try{
//alert(targets[i].id.substring(0,targets[i].id.lastIndexOf('-target')));
var atarget = targets[i].id.substring(0,targets[i].id.lastIndexOf('-target'));
- $('contract-' + atarget).hide();
+ var cid = 'contract-'.concat(atarget);
+ var eid = 'expand-'.concat(atarget);
+ $(cid).style.display = 'none';
- new Effect.BlindUp(atarget + '-target');
- Effect.Appear('expand-' + atarget, { duration: 0.0 });
+ new Effect.BlindUp(targets[i].id);
+ $(eid).style.display = 'block';
}catch(e){
//alert(e);
}
16 years, 3 months
JBoss Portal SVN: r10303 - in modules/portlet/trunk: docs/user-guide and 3 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-03-18 06:46:16 -0400 (Tue, 18 Mar 2008)
New Revision: 10303
Modified:
modules/portlet/trunk/.classpath
modules/portlet/trunk/docs/user-guide/
modules/portlet/trunk/mc/
modules/portlet/trunk/portal/
modules/portlet/trunk/samples/
Log:
minor
Modified: modules/portlet/trunk/.classpath
===================================================================
--- modules/portlet/trunk/.classpath 2008-03-18 10:43:07 UTC (rev 10302)
+++ modules/portlet/trunk/.classpath 2008-03-18 10:46:16 UTC (rev 10303)
@@ -7,6 +7,7 @@
<classpathentry kind="src" path="federation/src/main/java"/>
<classpathentry kind="src" path="management/src/main/java"/>
<classpathentry kind="src" path="test/src/main/java"/>
+ <classpathentry kind="src" path="samples/src/main/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Property changes on: modules/portlet/trunk/docs/user-guide
___________________________________________________________________
Name: svn:ignore
+ target
Property changes on: modules/portlet/trunk/mc
___________________________________________________________________
Name: svn:ignore
+ target
Property changes on: modules/portlet/trunk/portal
___________________________________________________________________
Name: svn:ignore
+ target
Property changes on: modules/portlet/trunk/samples
___________________________________________________________________
Name: svn:ignore
+ target
16 years, 3 months
JBoss Portal SVN: r10302 - in modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet: info and 1 other directory.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-03-18 06:43:07 -0400 (Tue, 18 Mar 2008)
New Revision: 10302
Removed:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/info/ContainerSessionInfo.java
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/info/SessionInfo.java
Log:
Removed TransactionInfo, this is specific to JBoss Portal
Deleted: modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/info/ContainerSessionInfo.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/info/ContainerSessionInfo.java 2008-03-18 10:19:53 UTC (rev 10301)
+++ modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/info/ContainerSessionInfo.java 2008-03-18 10:43:07 UTC (rev 10302)
@@ -1,52 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.portlet.impl.info;
-
-import org.jboss.portal.portlet.info.SessionInfo;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 7226 $
- */
-public class ContainerSessionInfo implements SessionInfo
-{
-
- /** . */
- private boolean distributed;
-
- ContainerSessionInfo(Boolean distributed)
- {
- if (distributed == null)
- {
- distributed = false;
- }
-
- //
- this.distributed = distributed;
- }
-
- public Boolean getDistributed()
- {
- return distributed;
- }
-}
\ No newline at end of file
Deleted: modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/info/SessionInfo.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/info/SessionInfo.java 2008-03-18 10:19:53 UTC (rev 10301)
+++ modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/info/SessionInfo.java 2008-03-18 10:43:07 UTC (rev 10302)
@@ -1,35 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.portlet.info;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 5448 $
- */
-public interface SessionInfo
-{
- /**
- * @return true if the session should be distributed
- */
- Boolean getDistributed();
-}
16 years, 3 months
JBoss Portal SVN: r10301 - modules/identity/trunk/build.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2008-03-18 06:19:53 -0400 (Tue, 18 Mar 2008)
New Revision: 10301
Modified:
modules/identity/trunk/build/pom.xml
Log:
update jboss-unit
Modified: modules/identity/trunk/build/pom.xml
===================================================================
--- modules/identity/trunk/build/pom.xml 2008-03-18 09:01:02 UTC (rev 10300)
+++ modules/identity/trunk/build/pom.xml 2008-03-18 10:19:53 UTC (rev 10301)
@@ -29,7 +29,7 @@
<version.cargo>0.9-portal</version.cargo>
<version.ant>1.6.5</version.ant>
<version.jboss.portal.common>1.2.0-SNAPSHOT</version.jboss.portal.common>
- <version.jboss.portal.test>1.2.0-SNAPSHOT</version.jboss.portal.test>
+ <version.jboss.portal.test>1.2.0.Beta2</version.jboss.portal.test>
<version.jboss.microcontainer>2.0.0.Beta9</version.jboss.microcontainer>
<version.sun.opends>1.0.0-BUILD04</version.sun.opends>
<version.jboss.jbossas.core-libs>4.0.4.GA</version.jboss.jbossas.core-libs>
16 years, 3 months
JBoss Portal SVN: r10300 - modules/identity/trunk/identity.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2008-03-18 05:01:02 -0400 (Tue, 18 Mar 2008)
New Revision: 10300
Modified:
modules/identity/trunk/identity/build.xml
Log:
disable cargo logging to have some output in hudson
Modified: modules/identity/trunk/identity/build.xml
===================================================================
--- modules/identity/trunk/identity/build.xml 2008-03-18 04:01:11 UTC (rev 10299)
+++ modules/identity/trunk/identity/build.xml 2008-03-18 09:01:02 UTC (rev 10300)
@@ -104,11 +104,11 @@
<target name="cargo.jboss-4.2.start" depends="cargo.setup">
-
+ <!--output="${cargo.log.dir}/cargo.identity.server.log"-->
+ <!--log="${cargo.log.dir}/cargo.identity.startup.log"-->
<cargo
containerId="jboss42x"
- output="${cargo.log.dir}/cargo.identity.server.log"
- log="${cargo.log.dir}/cargo.identity.shutdown.log"
+
home="${JBOSS_HOME}"
action="start"
wait="false">
@@ -128,7 +128,7 @@
<cargo
containerId="jboss42x"
home="${JBOSS_HOME}"
- log="${cargo.log.dir}/cargo.identity.startup.log"
+ log="${cargo.log.dir}/cargo.identity.shutdown.log"
action="stop">
<configuration>
<property name="cargo.rmi.port" value="1099"/>
16 years, 3 months
JBoss Portal SVN: r10299 - in modules/portlet/trunk/portal/src/main: resources/simple-portal-war/admin and 5 other directories.
by portal-commits@lists.jboss.org
Author: wesleyhales
Date: 2008-03-18 00:01:11 -0400 (Tue, 18 Mar 2008)
New Revision: 10299
Added:
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/css/admin.css
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/container-bg.gif
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/contract.gif
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/expand.gif
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/filter-bg.gif
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/filter-icon.gif
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/main-header-bg.gif
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/par-header.gif
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/portlet-icon.gif
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/start-stop-bg.gif
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/start-stop-edge.gif
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/started-icon.gif
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/stopped-icon.gif
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/sub-header-bg.gif
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/warning-icon.gif
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/js/admin.js
Modified:
modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/admin/ui/AdminPortlet.java
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/admin/index.jsp
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/layouts/header.jsp
Log:
admin portlet ui changes - still more to do
Modified: modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/admin/ui/AdminPortlet.java
===================================================================
--- modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/admin/ui/AdminPortlet.java 2008-03-17 22:53:22 UTC (rev 10298)
+++ modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/admin/ui/AdminPortlet.java 2008-03-18 04:01:11 UTC (rev 10299)
@@ -119,6 +119,18 @@
PortletApplicationRegistry registry = (PortletApplicationRegistry)getPortletContext().getAttribute("PortletApplicationDeployer");
//
+ writer.print("" +
+ "" +
+ "" +
+ "<div class=\"admin-container full-width\">\n" +
+ " <div class=\"admin-header\">\n" +
+ " <div class=\"expand\">\n" +
+ " <img src=\"/simple-portal/images/admin/expand.gif\" alt=\"\"/><a href=\"javascript:expandAll();\">Expand All</a>\n" +
+ " </div>\n" +
+ " <div class=\"collapse\">\n" +
+ " <img src=\"/simple-portal/images/admin/contract.gif\" alt=\"\"/><a href=\"javascript:collapseAll();\">Collapse All</a>\n" +
+ " </div>\n" +
+ " </div>\n");
for (ManagedPortletApplication application : registry.getManagedPortletApplications())
@@ -134,26 +146,48 @@
url.setParameter("lifecycle", "start");
String startURL = url.toString();
+ String htmlId = application.getId().substring(1,application.getId().length());
- writer.print("<table class=\"admin-table\">");
+
+
writer.print("" +
- " <tr>\n" +
- " <td class=\"admin-app-header\" colspan=\"4\"><h3>Application</h3></td>\n" +
- " </tr>\n" +
- " <tr class=\"admin-cat-header\">\n" +
- " <td>ID</td>\n" +
- " <td>Status</td>\n" +
- " <td>Description</td>\n" +
- " <td></td>\n" +
- " </tr>" +
- " <tr>\n" +
- " <td>" + application.getId() + "</td>\n" +
- " <td>" + application.getStatus() + "</td>\n" +
- " <td></td>\n" +
- " <td><a href=\"" + startURL + "\">Start</a> | <a href=\"" + stopURL + "\">Stop</a></td>\n" +
- " </tr>");
+ "\n" +
+ " <div class=\"par-container\">\n" +
+ " <div class=\"par-header\">\n" +
+ " <div class=\"par-header-left\">\n" +
+ " <a id=\"contract-simple-portal\" href=\"#\" onclick=\"collapse(this,'"+ htmlId +"');\">\n" +
+ " <img src=\"/simple-portal/images/admin/contract.gif\" alt=\"\" />\n" +
+ " <h3 class=\"par\">"+ application.getId() +"</h3>\n" +
+ " </a>\n" +
+ " <a id=\"expand-simple-portal\" href=\"#\" onclick=\"expand(this,'"+ htmlId +"');\" style=\"display:none\">\n" +
+ " <img src=\"/simple-portal/images/admin/expand.gif\" alt=\"\" />\n" +
+ " <h3 class=\"par\">"+ application.getId() +"</h3>\n" +
+ " </a>\n" +
+ " </div>\n" +
+ "\n" +
+ " <div class=\"par-header-right\">\n" +
+ " <span class=\"par-status\"><img src=\"/simple-portal/images/admin/started-icon.gif\" alt=\"\"/>" + application.getStatus() + "</span>\n" +
+ "\n" +
+ " <div class=\"par-control\">\n" +
+ " <img src=\"/simple-portal/images/admin/start-stop-edge.gif\" alt=\"\"/>\n" +
+ " <a href=\"" + stopURL + "\">Stop</a></td>\n" +
+ " </div>\n" +
+ " </div>\n" +
+ " \n" +
+ " </div></div>" +
+ "" +
+ " <div class=\"target\" id=\"" + htmlId + "-target\">\n" +
+ " <table class=\"par-table full-width\" >\n" +
+ " <tr class=\"par-subhead\">\n" +
+ " <td class=\"par-header-left\">ID</td>\n" +
+ " <td>Status</td>\n" +
+ " <td>Description</td>\n" +
+ " <td></td>\n" +
+ " </tr>\n" +
+ "\n");
+
//
for (ManagedPortletFilter filter : application.getManagedPortletFilters())
{
@@ -172,21 +206,16 @@
// startURL + "\">Start</a> <a href=\"" + stopURL + "\">Stop</a></li>");
writer.print("" +
- " <tr>\n" +
- " <td class=\"admin-filter-header\" colspan=\"4\"><h3>Filter</h3></td>\n" +
- " </tr>\n" +
- //" <tr class=\"admin-cat-header\">\n" +
- //" <td>ID</td>\n" +
- //" <td>Status</td>\n" +
- //" <td></td>\n" +
- //" </tr>" +
- " <tr>\n" +
- " <td>" + filter.getId() + "</td>\n" +
- " <td>" + filter.getStatus() + "</td>\n" +
- " <td></td>\n" +
- " <td><a href=\"" + startURL + "\">Start</a> | <a href=\"" + stopURL + "\">Stop</a></td>\n" +
- " </tr>");
+ "" +
+ " <tr class=\"par-filter-row\">\n" +
+ " <td class=\"par-row-left\"><img class=\"icon\" src=\"/simple-portal/images/admin/filter-icon.gif\" alt=\"\"/>" + filter.getId() + "</td>\n" +
+ " <td>" + filter.getStatus() + "</td>\n" +
+ " <td></td>\n" +
+ " <td class=\"par-row-right\"><a class=\"start\" href=\"" + startURL + "\">Start</a> | <a class=\"stop\" href=\"" + stopURL + "\">Stop</a></td>\n" +
+ " </tr>" +
+ "");
+
}
//
@@ -216,34 +245,35 @@
}
writer.print("" +
- " <tr>\n" +
- " <td class=\"admin-container-header\" colspan=\"4\"><h3>Container</h3></td>\n" +
- " </tr>\n" +
- //" <tr class=\"admin-cat-header\">\n" +
- //" <td>ID</td>\n" +
- //" <td>Status</td>\n" +
- //" <td></td>\n" +
- //" </tr>" +
- " <tr class=\"" + (container.getStatus().toString().equals("FAILED") ? "admin-failed" : "" ) + "\">\n" +
- " <td>" + container.getId() + "</td>\n" +
- " <td>" + container.getStatus() + "</td>\n" +
- " <td>" + descString + "</td>\n" +
- " <td><a href=\"" + startURL + "\">Start</a> | <a href=\"" + stopURL + "\">Stop</a></td>\n" +
- " </tr>");
+ "" +
+ " <tr class=\"par-container-row\">\n" +
+ " <td class=\"par-row-left\"><img class=\"icon\" src=\"/simple-portal/images/admin/portlet-icon.gif\" alt=\"\"/>" + container.getId() + "</td>\n" +
+ " <td>" + container.getStatus() + "</td>\n" +
+ " <td>" + descString + "</td>\n" +
+ " <td class=\"par-row-right\"><a class=\"start\" href=\"" + startURL + "\">Start</a> | <a class=\"stop\" href=\"" + stopURL + "\">Stop</a></td>\n" +
+ " </tr>" +
+
+
+// " <tr class=\"" + (container.getStatus().toString().equals("FAILED") ? "admin-failed" : "" ) + "\">\n" +
+ "");
}
- writer.print("</table>");
+ writer.print("</table>" +
+ " </div>\n" +
+ "");
}
+ writer.print("</div>" +
+ " </div>\n" +
+ " </div>\n" +
+ " </div>\n" +
+ "\n" +
+ " </div>\n" +
+ " <br class=\"clear\"/>\n" +
+ "</div>");
+
//
writer.close();
}
-}
-
- /*protected void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException
- {
- PortletRequestDispatcher rd = getPortletContext().getRequestDispatcher("admin/admin.jsp");
- rd.include(request, response);
- }*/
-//}
+}
\ No newline at end of file
Modified: modules/portlet/trunk/portal/src/main/resources/simple-portal-war/admin/index.jsp
===================================================================
--- modules/portlet/trunk/portal/src/main/resources/simple-portal-war/admin/index.jsp 2008-03-17 22:53:22 UTC (rev 10298)
+++ modules/portlet/trunk/portal/src/main/resources/simple-portal-war/admin/index.jsp 2008-03-18 04:01:11 UTC (rev 10299)
@@ -4,8 +4,12 @@
<%@ taglib uri="/WEB-INF/portal.tld" prefix="portal" %>
<%@ page isELIgnored="false" %>
+
+
+
<%@ include file="/layouts/admin-header.jsp" %>
-
+ <link rel="stylesheet" href="${pageContext.request.contextPath}/css/admin.css" type="text/css"/>
+ <script type="text/javascript" src="${pageContext.request.contextPath}/js/admin.js"></script>
<portal:page>
<jbp:portlet name="AdminPortlet" applicationName="simple-portal"/>
Added: modules/portlet/trunk/portal/src/main/resources/simple-portal-war/css/admin.css
===================================================================
--- modules/portlet/trunk/portal/src/main/resources/simple-portal-war/css/admin.css (rev 0)
+++ modules/portlet/trunk/portal/src/main/resources/simple-portal-war/css/admin.css 2008-03-18 04:01:11 UTC (rev 10299)
@@ -0,0 +1,159 @@
+
+div.admin-container div.admin-header {
+ background-image: url( /simple-portal/images/admin/main-header-bg.gif );
+ background-repeat: repeat-x;
+ background-position: top left;
+ height: 42px;
+ border-bottom: 1px solid #989898;
+ position: relative;
+}
+
+div.admin-container div.admin-header div.expand {
+ position: absolute;
+ bottom: 5px;
+ left: 10px;
+}
+
+div.admin-container div.admin-header div.collapse {
+ position: absolute;
+ bottom: 5px;
+ left: 100px;
+}
+
+div.admin-container div.admin-header div.expand a,
+ div.admin-container div.admin-header div.collapse a {
+ text-decoration: none
+}
+
+div.admin-container div.admin-header>div img {
+ margin: 0 5px 0 0;
+}
+
+div.admin-container div.par-container {
+
+}
+
+div.admin-container div.par-container div.par-header {
+ background-image: url( /simple-portal/images/admin/par-header.gif);
+ background-repeat: no-repeat;
+ background-position: top left;
+ height: 48px;
+ border-bottom: 2px solid #989898;
+ position: relative;
+}
+
+div.admin-container div.par-container div.par-header-left {
+ position: absolute;
+ bottom: 5px;
+ left: 10px;
+}
+
+div.admin-container div.par-container div.par-header-left a {
+ text-decoration: none;
+}
+
+div.admin-container div.par-container div.par-header-left h3.par {
+ display: inline;
+ color: #4c1010;
+ font-size: 1.2em;
+}
+
+div.admin-container div.par-container div.par-header-right {
+ position: absolute;
+ top: 0;
+ right: 0;
+ width: 140px;
+ height: 19px;
+}
+
+div.admin-container div.par-container div.par-header-right div.par-control {
+ background-image: url( /simple-portal/images/admin/start-stop-bg.gif );
+ background-repeat: repeat-x;
+ background-position: top left;
+ width: 65px;
+ height: 19px;
+ float: right;
+ position: relative; /*border-bottom: 1px solid #c3c3c3;*/
+}
+
+div.admin-container div.par-container div.par-header-right div.par-control a {
+ top: 1px;
+ left: 18px;
+ position: absolute;
+ color: #7a0f0f;
+ font-weight: bold;
+}
+
+div.admin-container div.par-container div.par-header-right>span.par-status {
+ float: left;
+ padding: 2px 0 0 0;
+}
+
+div.admin-container div.par-container div.par-header-right>span.par-status img {
+ margin: 0 5px 0 0;
+}
+
+table.par-table {
+ margin: 0;
+ padding: 0;
+ border-collapse: collapse;
+ border-spacing: 0;
+}
+
+table.par-table td {
+ padding: 0 0 0 3px;
+}
+
+table.par-table tr.par-subhead {
+ background-image: url( /simple-portal/images/admin/sub-header-bg.gif );
+ background-repeat: repeat-x;
+ background-position: top left;
+}
+
+table.par-table tr.par-subhead td {
+ height: 25px;
+ border-bottom: #d2d2d2;
+ color: #fff;
+ font-weight: bold;
+}
+
+table.par-table td img.icon {
+ margin: 0 3px 0 0;
+}
+
+table.par-table td.par-header-left {
+ padding: 0 0 0 15px;
+}
+
+table.par-table td.par-row-left {
+ padding: 0 0 0 15px;
+}
+
+table.par-table td.par-row-right {
+ text-align: right;
+ padding: 0 5px 0 0;
+}
+
+table.par-table td a.start {
+ color: #17600e
+}
+
+table.par-table td a.stop {
+ color: #9e0606;
+}
+
+table.par-table tr.par-container-row {
+ background-image: url( /simple-portal/images/admin/container-bg.gif );
+ background-repeat: repeat-x;
+ background-position: top left;
+ height: 38px;
+ border-bottom: 1px solid #fff;
+}
+
+table.par-table tr.par-filter-row {
+ background-image: url( /simple-portal/images/admin/filter-bg.gif );
+ background-repeat: repeat-x;
+ background-position: top left;
+ height: 38px;
+ border-bottom: 1px solid #fff;
+}
\ No newline at end of file
Added: modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/container-bg.gif
===================================================================
(Binary files differ)
Property changes on: modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/container-bg.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/contract.gif
===================================================================
(Binary files differ)
Property changes on: modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/contract.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/expand.gif
===================================================================
(Binary files differ)
Property changes on: modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/expand.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/filter-bg.gif
===================================================================
(Binary files differ)
Property changes on: modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/filter-bg.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/filter-icon.gif
===================================================================
(Binary files differ)
Property changes on: modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/filter-icon.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/main-header-bg.gif
===================================================================
(Binary files differ)
Property changes on: modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/main-header-bg.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/par-header.gif
===================================================================
(Binary files differ)
Property changes on: modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/par-header.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/portlet-icon.gif
===================================================================
(Binary files differ)
Property changes on: modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/portlet-icon.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/start-stop-bg.gif
===================================================================
(Binary files differ)
Property changes on: modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/start-stop-bg.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/start-stop-edge.gif
===================================================================
(Binary files differ)
Property changes on: modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/start-stop-edge.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/started-icon.gif
===================================================================
(Binary files differ)
Property changes on: modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/started-icon.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/stopped-icon.gif
===================================================================
(Binary files differ)
Property changes on: modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/stopped-icon.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/sub-header-bg.gif
===================================================================
(Binary files differ)
Property changes on: modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/sub-header-bg.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/warning-icon.gif
===================================================================
(Binary files differ)
Property changes on: modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/warning-icon.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: modules/portlet/trunk/portal/src/main/resources/simple-portal-war/js/admin.js
===================================================================
--- modules/portlet/trunk/portal/src/main/resources/simple-portal-war/js/admin.js (rev 0)
+++ modules/portlet/trunk/portal/src/main/resources/simple-portal-war/js/admin.js 2008-03-18 04:01:11 UTC (rev 10299)
@@ -0,0 +1,56 @@
+
+ function collapse(e,target) {
+ e.hide();
+ new Effect.BlindUp(target + '-target', {queue: {position:'front', scope: 'expandscope', limit:1} });
+ Effect.Appear('expand-' + target, { duration: 0.0 });
+ }
+
+ function expand(e,target) {
+ e.hide();
+ Effect.BlindDown(target + '-target', {queue: {position:'end', scope: 'expandscope', limit:1} });
+ Effect.Appear('contract-' + target, { duration: 0.0 });
+ }
+
+ function collapseAll() {
+ var targets = document.getElementsByClassName('target');
+ for (var i=0; i < targets.length; i++){
+ try{
+ var target = targets[i].id.substring(0,targets[i].id.lastIndexOf('-target'));
+ $('contract-' + target).hide();
+ new Effect.BlindUp(target + '-target');
+ Effect.Appear('expand-' + target, { duration: 0.0 });
+ }catch(e){
+// alert(e);
+ }
+ }
+ }
+
+ function expandAll() {
+ var targets = document.getElementsByClassName('target');
+ for (var i=0; i < targets.length; i++){
+ try{
+ var target = targets[i].id.substring(0,targets[i].id.lastIndexOf('-target'));
+ $('expand-' + target).hide();
+ new Effect.BlindDown(target + '-target');
+ Effect.Appear('contract-' + target, { duration: 0.0 });
+ }catch(e){
+// alert(e);
+ }
+ }
+ }
+
+ window.onload = function(){
+ var targets = document.getElementsByClassName('target');
+ for (var i=0; i < targets.length; i++){
+ try{
+ //alert(targets[i].id.substring(0,targets[i].id.lastIndexOf('-target')));
+ var atarget = targets[i].id.substring(0,targets[i].id.lastIndexOf('-target'));
+ $('contract-' + atarget).hide();
+
+ new Effect.BlindUp(atarget + '-target');
+ Effect.Appear('expand-' + atarget, { duration: 0.0 });
+ }catch(e){
+ //alert(e);
+ }
+ }
+ };
\ No newline at end of file
Modified: modules/portlet/trunk/portal/src/main/resources/simple-portal-war/layouts/header.jsp
===================================================================
--- modules/portlet/trunk/portal/src/main/resources/simple-portal-war/layouts/header.jsp 2008-03-17 22:53:22 UTC (rev 10298)
+++ modules/portlet/trunk/portal/src/main/resources/simple-portal-war/layouts/header.jsp 2008-03-18 04:01:11 UTC (rev 10299)
@@ -7,6 +7,7 @@
<head>
<title>Portlet Container 2.0</title>
<link rel="stylesheet" href="${pageContext.request.contextPath}/css/master.css" type="text/css"/>
+
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/shadowbox.css"/>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/prototype.js"></script>
<script type="text/javascript"
16 years, 3 months
JBoss Portal SVN: r10298 - modules/identity/trunk/identity/src/test/resources/org/jboss/portal/test/identity.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2008-03-17 18:53:22 -0400 (Mon, 17 Mar 2008)
New Revision: 10298
Modified:
modules/identity/trunk/identity/src/test/resources/org/jboss/portal/test/identity/db-beans.xml
modules/identity/trunk/identity/src/test/resources/org/jboss/portal/test/identity/ldap-beans.xml
Log:
beans file fix
Modified: modules/identity/trunk/identity/src/test/resources/org/jboss/portal/test/identity/db-beans.xml
===================================================================
--- modules/identity/trunk/identity/src/test/resources/org/jboss/portal/test/identity/db-beans.xml 2008-03-17 18:31:09 UTC (rev 10297)
+++ modules/identity/trunk/identity/src/test/resources/org/jboss/portal/test/identity/db-beans.xml 2008-03-17 22:53:22 UTC (rev 10298)
@@ -23,10 +23,8 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
-<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_1_0.xsd"
- xmlns="urn:jboss:bean-deployer">
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
<bean name="DataSourceConfig" class="org.jboss.portal.test.framework.embedded.DataSourceSupport$Config">
Modified: modules/identity/trunk/identity/src/test/resources/org/jboss/portal/test/identity/ldap-beans.xml
===================================================================
--- modules/identity/trunk/identity/src/test/resources/org/jboss/portal/test/identity/ldap-beans.xml 2008-03-17 18:31:09 UTC (rev 10297)
+++ modules/identity/trunk/identity/src/test/resources/org/jboss/portal/test/identity/ldap-beans.xml 2008-03-17 22:53:22 UTC (rev 10298)
@@ -23,11 +23,8 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
-<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_1_0.xsd"
- xmlns="urn:jboss:bean-deployer">
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
-
<!--<bean name="OpenDSServer" class="org.jboss.portal.test.framework.embedded.opends.OpenDSService">-->
<!--</bean>-->
16 years, 3 months