JBoss Portal SVN: r6294 - trunk/core/src/resources/portal-core-war/WEB-INF/jsp/dashboard.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-02-15 08:00:45 -0500 (Thu, 15 Feb 2007)
New Revision: 6294
Modified:
trunk/core/src/resources/portal-core-war/WEB-INF/jsp/dashboard/editpage.jsp
Log:
fixed an NPE with dashboard editor when a content handler is not deployed
Modified: trunk/core/src/resources/portal-core-war/WEB-INF/jsp/dashboard/editpage.jsp
===================================================================
--- trunk/core/src/resources/portal-core-war/WEB-INF/jsp/dashboard/editpage.jsp 2007-02-15 11:03:27 UTC (rev 6293)
+++ trunk/core/src/resources/portal-core-war/WEB-INF/jsp/dashboard/editpage.jsp 2007-02-15 13:00:45 UTC (rev 6294)
@@ -279,10 +279,13 @@
{
Window window = (Window)j.next();
Content portletContent = window.getContent();
+ if (portletContent != null)
+ {
%>
<option value="<%= window.getName() %>"><%= portletContent.getDisplayName().getDefaultString() %>
</option>
<%
+ }
}
%>
</select>
19 years, 2 months
JBoss Portal SVN: r6293 - trunk/core/src/main/org/jboss/portal/core/portlet/management.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-02-15 06:03:27 -0500 (Thu, 15 Feb 2007)
New Revision: 6293
Modified:
trunk/core/src/main/org/jboss/portal/core/portlet/management/PortalObjectManagerBean.java
Log:
Fix: Rearrangement of Portlets using the Management Portlet may cause an exception [JBPORTAL-1233]
Modified: trunk/core/src/main/org/jboss/portal/core/portlet/management/PortalObjectManagerBean.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/portlet/management/PortalObjectManagerBean.java 2007-02-15 05:58:32 UTC (rev 6292)
+++ trunk/core/src/main/org/jboss/portal/core/portlet/management/PortalObjectManagerBean.java 2007-02-15 11:03:27 UTC (rev 6293)
@@ -213,8 +213,10 @@
int sign = getOrder(w1) - getOrder(w2);
if (sign == 0)
{
- sign = w1.getId().compareTo(w2.getId());
+ sign = 1;
+ // sign = w1.getId().compareTo(w2.getId());
}
+
return sign;
}
};
19 years, 2 months
JBoss Portal SVN: r6292 - trunk/wsrp/src/main/org/jboss/portal/wsrp/producer.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2007-02-15 00:58:32 -0500 (Thu, 15 Feb 2007)
New Revision: 6292
Modified:
trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/PortletManagementHandler.java
Log:
- Fixed typo.
Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/PortletManagementHandler.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/PortletManagementHandler.java 2007-02-15 05:57:26 UTC (rev 6291)
+++ trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/PortletManagementHandler.java 2007-02-15 05:58:32 UTC (rev 6292)
@@ -132,10 +132,10 @@
PropertyDescription[] descs = null;
if (prefsInfo != null)
{
- Set keySey = prefsInfo.getKeys();
- descs = new PropertyDescription[keySey.size()];
+ Set keySet = prefsInfo.getKeys();
+ descs = new PropertyDescription[keySet.size()];
int index = 0;
- for (Iterator keys = keySey.iterator(); keys.hasNext();)
+ for (Iterator keys = keySet.iterator(); keys.hasNext();)
{
PreferenceInfo prefInfo = prefsInfo.getPreference((String)keys.next());
19 years, 2 months
JBoss Portal SVN: r6291 - trunk/wsrp/src/resources/portal-wsrp-sar/META-INF.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2007-02-15 00:57:26 -0500 (Thu, 15 Feb 2007)
New Revision: 6291
Modified:
trunk/wsrp/src/resources/portal-wsrp-sar/META-INF/jboss-service.xml
Log:
- Hooked up db-backed persistence manager for registrations. Will require work on the consumer side to store/load registration info.
Modified: trunk/wsrp/src/resources/portal-wsrp-sar/META-INF/jboss-service.xml
===================================================================
--- trunk/wsrp/src/resources/portal-wsrp-sar/META-INF/jboss-service.xml 2007-02-15 05:55:53 UTC (rev 6290)
+++ trunk/wsrp/src/resources/portal-wsrp-sar/META-INF/jboss-service.xml 2007-02-15 05:57:26 UTC (rev 6291)
@@ -92,10 +92,12 @@
</mbean>
<!-- Persistence manager for registrations -->
- <mbean code="org.jboss.portal.registration.impl.RegistrationPersistenceManagerImpl"
+ <mbean code="org.jboss.portal.core.impl.portlet.state.PersistentPortletStatePersistenceManager"
name="portal.wsrp:service=PersistenceManager" xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
+ <depends>portal:service=Hibernate,type=Portlet</depends>
+ <attribute name="SessionFactoryJNDIName">java:/portal/PortletSessionFactory</attribute>
</mbean>
<!-- Producer configuration service -->
19 years, 2 months
JBoss Portal SVN: r6290 - in trunk/wsrp/src/main/org/jboss/portal: wsrp and 3 other directories.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2007-02-15 00:55:53 -0500 (Thu, 15 Feb 2007)
New Revision: 6290
Modified:
trunk/wsrp/src/main/org/jboss/portal/test/wsrp/framework/PortletManagementBehavior.java
trunk/wsrp/src/main/org/jboss/portal/wsrp/WSRPTypeFactory.java
trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/ProducerInfo.java
trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/portlet/WSRPPortlet.java
trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/portlet/info/WSRPPortletInfo.java
Log:
- Added getPreferences implementation in WSRPPortletInfo that was somehow forgotten...
- Fixed potential infinite loop in ProducerInfo.refresh.
- Added support for delayed retrieval of property description.
- Updated tests.
Modified: trunk/wsrp/src/main/org/jboss/portal/test/wsrp/framework/PortletManagementBehavior.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/test/wsrp/framework/PortletManagementBehavior.java 2007-02-15 05:42:58 UTC (rev 6289)
+++ trunk/wsrp/src/main/org/jboss/portal/test/wsrp/framework/PortletManagementBehavior.java 2007-02-15 05:55:53 UTC (rev 6290)
@@ -23,6 +23,7 @@
package org.jboss.portal.test.wsrp.framework;
+import org.jboss.portal.wsrp.WSRPTypeFactory;
import org.jboss.portal.wsrp.core.AccessDeniedFault;
import org.jboss.portal.wsrp.core.ClonePortlet;
import org.jboss.portal.wsrp.core.DestroyPortlets;
@@ -92,6 +93,6 @@
throws MissingParametersFault, InconsistentParametersFault, InvalidUserCategoryFault, InvalidRegistrationFault,
AccessDeniedFault, InvalidHandleFault, OperationFailedFault, RemoteException
{
- return null;
+ return WSRPTypeFactory.createPortletPropertyDescriptionResponse(null);
}
}
Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/WSRPTypeFactory.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/wsrp/WSRPTypeFactory.java 2007-02-15 05:42:58 UTC (rev 6289)
+++ trunk/wsrp/src/main/org/jboss/portal/wsrp/WSRPTypeFactory.java 2007-02-15 05:55:53 UTC (rev 6290)
@@ -720,8 +720,8 @@
*/
public static PortletPropertyDescriptionResponse createPortletPropertyDescriptionResponse(PropertyDescription[] propertyDescriptions)
{
- ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(propertyDescriptions, "PropertyDescriptions");
- return new PortletPropertyDescriptionResponse(createModelDescription(propertyDescriptions), null, null);
+ ModelDescription modelDescription = propertyDescriptions == null ? null : createModelDescription(propertyDescriptions);
+ return new PortletPropertyDescriptionResponse(modelDescription, null, null);
}
/**
Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/ProducerInfo.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/ProducerInfo.java 2007-02-15 05:42:58 UTC (rev 6289)
+++ trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/ProducerInfo.java 2007-02-15 05:55:53 UTC (rev 6290)
@@ -36,12 +36,15 @@
import org.jboss.portal.wsrp.consumer.portlet.info.WSRPPortletInfo;
import org.jboss.portal.wsrp.core.CookieProtocol;
import org.jboss.portal.wsrp.core.GetPortletDescription;
+import org.jboss.portal.wsrp.core.GetPortletPropertyDescription;
import org.jboss.portal.wsrp.core.GetServiceDescription;
import org.jboss.portal.wsrp.core.InvalidHandleFault;
import org.jboss.portal.wsrp.core.PortletDescription;
import org.jboss.portal.wsrp.core.PortletDescriptionResponse;
+import org.jboss.portal.wsrp.core.PortletPropertyDescriptionResponse;
import org.jboss.portal.wsrp.core.RegistrationContext;
import org.jboss.portal.wsrp.core.ServiceDescription;
+import org.jboss.portal.wsrp.core.WSRP_v1_PortletManagement_PortType;
import java.util.Collections;
import java.util.HashMap;
@@ -175,7 +178,7 @@
}
catch (Exception e)
{
- resetRegistration(false);
+ registrationInfo.resetRegistration();
throw new PortletInvokerException("Couldn't register with producer '" + producerId + "'", e);
}
@@ -279,7 +282,7 @@
ParameterValidation.throwIllegalArgExceptionIfNull(portletDescription, "PortletDescription");
String portletHandle = portletDescription.getPortletHandle();
log.debug("Extracting info for '" + portletHandle + "' portlet");
- WSRPPortletInfo info = new WSRPPortletInfo(portletDescription);
+ WSRPPortletInfo info = new WSRPPortletInfo(portletDescription, this);
WSRPPortlet wsrpPortlet = null;
if (info.isUsesMethodGet())
{
@@ -477,12 +480,45 @@
public void resetRegistration() throws PortletInvokerException
{
- resetRegistration(true);
+ registrationInfo.resetRegistration();
+ refresh(true);
}
- private void resetRegistration(boolean refresh) throws PortletInvokerException
+ // make package only after package reorg
+ public PortletPropertyDescriptionResponse getPropertyDescriptionsFor(String portletHandle)
{
- registrationInfo.resetRegistration();
- refresh(refresh);
+ ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(portletHandle, "portlet handle", null);
+ try
+ {
+ WSRP_v1_PortletManagement_PortType service = getEndpointConfigurationInfo().getPortletManagementService();
+
+ GetPortletPropertyDescription request = WSRPTypeFactory.createSimpleGetPortletPropertyDescription(portletHandle);
+ request.setRegistrationContext(registrationInfo.getRegistrationContext());
+ request.setUserContext(null); // todo: fix me!
+
+ return service.getPortletPropertyDescription(request);
+ }
+ catch (InvalidHandleFault invalidHandleFault)
+ {
+ throw new IllegalArgumentException("Unknown portlet '" + portletHandle + "'");
+ }
+ catch (org.jboss.portal.wsrp.core.InvalidRegistrationFault invalidRegistrationFault)
+ {
+ try
+ {
+ resetRegistration();
+ }
+ catch (PortletInvokerException e)
+ {
+ throw new RuntimeException("Couldn't reset registration", e);
+ }
+ throw new IllegalArgumentException("Couldn't get property descriptions for portlet '" + portletHandle
+ + "' because the provided registration is invalid!");
+ }
+ catch (Exception e)
+ {
+ log.debug("Couldn't get property descriptions for portlet '" + portletHandle + "'", e);
+ throw new RuntimeException(e);
+ }
}
}
Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/portlet/WSRPPortlet.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/portlet/WSRPPortlet.java 2007-02-15 05:42:58 UTC (rev 6289)
+++ trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/portlet/WSRPPortlet.java 2007-02-15 05:55:53 UTC (rev 6290)
@@ -54,7 +54,7 @@
public static WSRPPortlet createClone(PortletContext newContext, WSRPPortletInfo originalInfo)
{
ParameterValidation.throwIllegalArgExceptionIfNull(newContext, "PortletContext");
- return new WSRPPortlet(newContext, new WSRPPortletInfo(originalInfo));
+ return new WSRPPortlet(newContext, new WSRPPortletInfo(originalInfo, newContext.getId()));
}
/** Portlet interface implemented methods */
@@ -94,6 +94,6 @@
public String toString()
{
- return "WSRPPortlet[context=" + portletContext + "]";
+ return "WSRPPortlet[context=" + portletContext + "]";
}
}
Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/portlet/info/WSRPPortletInfo.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/portlet/info/WSRPPortletInfo.java 2007-02-15 05:42:58 UTC (rev 6289)
+++ trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/portlet/info/WSRPPortletInfo.java 2007-02-15 05:55:53 UTC (rev 6290)
@@ -27,18 +27,24 @@
import org.jboss.portal.WindowState;
import org.jboss.portal.common.util.LocaleInfo;
import org.jboss.portal.common.util.ParameterValidation;
+import org.jboss.portal.common.value.Value;
import org.jboss.portal.portlet.info.CacheInfo;
import org.jboss.portal.portlet.info.CapabilitiesInfo;
import org.jboss.portal.portlet.info.MetaInfo;
import org.jboss.portal.portlet.info.ModeInfo;
+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;
import org.jboss.portal.wsrp.core.LocalizedString;
import org.jboss.portal.wsrp.core.MarkupType;
+import org.jboss.portal.wsrp.core.ModelDescription;
import org.jboss.portal.wsrp.core.PortletDescription;
+import org.jboss.portal.wsrp.core.PortletPropertyDescriptionResponse;
+import org.jboss.portal.wsrp.core.PropertyDescription;
import java.util.Collections;
import java.util.HashMap;
@@ -65,22 +71,30 @@
private boolean templatesStoredInSession;
private boolean doesUrlTemplateProcessing;
private String groupId;
+ private PreferencesInfo prefInfo;
+ private ProducerInfo originatingProducer;
+ private String portletHandle;
- public WSRPPortletInfo(final PortletDescription portletDescription)
+ public WSRPPortletInfo(final PortletDescription portletDescription, ProducerInfo originatingProducerInfo)
{
ParameterValidation.throwIllegalArgExceptionIfNull(portletDescription, "PortletDescription");
+ ParameterValidation.throwIllegalArgExceptionIfNull(originatingProducerInfo, "ProducerInfo");
createCapabilitiesInfo(portletDescription);
createMetaInfo(portletDescription);
createWSRPInfo(portletDescription);
+
+ this.originatingProducer = originatingProducerInfo;
+ this.portletHandle = portletDescription.getPortletHandle();
}
- public WSRPPortletInfo(WSRPPortletInfo other)
+ public WSRPPortletInfo(WSRPPortletInfo other, String newHandle)
{
ParameterValidation.throwIllegalArgExceptionIfNull(other, "WSRPPortletInfo");
+ ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(newHandle, "new portlet handle", "WSRPPortletInfo");
usesMethodGet = other.usesMethodGet;
defaultMarkupSecure = other.defaultMarkupSecure;
@@ -98,6 +112,11 @@
WSRPMetaInfo otherMeta = (WSRPMetaInfo)other.getMeta();
metaInfo = new WSRPMetaInfo(new HashMap(otherMeta.metaInfos));
+ WSRPPreferencesInfo otherPref = (WSRPPreferencesInfo)other.getPreferences();
+ prefInfo = new WSRPPreferencesInfo(new HashMap(otherPref.preferences));
+
+ originatingProducer = other.originatingProducer;
+ portletHandle = newHandle;
}
public CapabilitiesInfo getCapabilities()
@@ -105,14 +124,36 @@
return capabilities;
}
- /**
- * Return null for now as the wsrp implementation does not support management.
- *
- * @return null
- */
public PreferencesInfo getPreferences()
{
- return null;
+ // lazy initialization of preference information since it requires an access to PortletManagement which would be
+ // too bandwidth intensive if it was done when the service description is parsed...
+ if (prefInfo == null)
+ {
+ PortletPropertyDescriptionResponse propertyDescs = originatingProducer.getPropertyDescriptionsFor(portletHandle);
+ ModelDescription modelDesc = propertyDescs.getModelDescription();
+ Map prefInfos;
+ if (modelDesc != null)
+ {
+ PropertyDescription[] descs = modelDesc.getPropertyDescriptions();
+ prefInfos = new HashMap(descs.length);
+ for (int i = 0; i < descs.length; i++)
+ {
+ PropertyDescription desc = descs[i];
+ String key = desc.getName();
+ prefInfos.put(key, new WSRPPreferenceInfo(key, createPortalLocalizedStringFrom(desc.getLabel()),
+ createPortalLocalizedStringFrom(desc.getHint())));
+ }
+ }
+ else
+ {
+ prefInfos = Collections.EMPTY_MAP;
+ }
+
+ prefInfo = new WSRPPreferencesInfo(prefInfos);
+ }
+
+ return prefInfo;
}
public MetaInfo getMeta()
@@ -440,4 +481,63 @@
return (org.jboss.portal.common.util.LocalizedString)metaInfos.get(key);
}
}
+
+ static class WSRPPreferencesInfo implements PreferencesInfo
+ {
+ private Map preferences;
+
+ public WSRPPreferencesInfo(Map preferences)
+ {
+ this.preferences = preferences;
+ }
+
+ public Set getKeys()
+ {
+ return Collections.unmodifiableSet(preferences.entrySet());
+ }
+
+ public PreferenceInfo getPreference(String key) throws IllegalArgumentException
+ {
+ return (PreferenceInfo)preferences.get(key);
+ }
+ }
+
+ static class WSRPPreferenceInfo implements PreferenceInfo
+ {
+ private String key;
+ private org.jboss.portal.common.util.LocalizedString displayName;
+ private org.jboss.portal.common.util.LocalizedString description;
+
+ public WSRPPreferenceInfo(String key, org.jboss.portal.common.util.LocalizedString displayName, org.jboss.portal.common.util.LocalizedString description)
+ {
+ this.key = key;
+ this.displayName = displayName;
+ this.description = description;
+ }
+
+ public String getKey()
+ {
+ return key;
+ }
+
+ public org.jboss.portal.common.util.LocalizedString getDisplayName()
+ {
+ return displayName;
+ }
+
+ public org.jboss.portal.common.util.LocalizedString getDescription()
+ {
+ return description;
+ }
+
+ public Boolean isReadOnly()
+ {
+ return null; // cannot be determined, so returning null per javadoc
+ }
+
+ public Value getDefaultValue()
+ {
+ return null; // cannot be determined, so returning null per javadoc
+ }
+ }
}
19 years, 2 months
JBoss Portal SVN: r6289 - in trunk/common/src/main/org/jboss/portal: common and 1 other directories.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2007-02-15 00:42:58 -0500 (Thu, 15 Feb 2007)
New Revision: 6289
Added:
trunk/common/src/main/org/jboss/portal/common/ant/
Removed:
trunk/common/src/main/org/jboss/portal/ant/
Modified:
trunk/common/src/main/org/jboss/portal/test/common/ImplodeTestCase.java
Log:
Once again, at the right spot this time...
Copied: trunk/common/src/main/org/jboss/portal/common/ant (from rev 6288, trunk/common/src/main/org/jboss/portal/ant)
Modified: trunk/common/src/main/org/jboss/portal/test/common/ImplodeTestCase.java
===================================================================
--- trunk/common/src/main/org/jboss/portal/test/common/ImplodeTestCase.java 2007-02-15 05:32:59 UTC (rev 6288)
+++ trunk/common/src/main/org/jboss/portal/test/common/ImplodeTestCase.java 2007-02-15 05:42:58 UTC (rev 6289)
@@ -26,7 +26,6 @@
import org.jboss.portal.common.ant.Implode;
import java.io.File;
-import java.net.URL;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
19 years, 2 months
JBoss Portal SVN: r6288 - in trunk/common/src/main/org/jboss/portal: ant and 1 other directory.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2007-02-15 00:32:59 -0500 (Thu, 15 Feb 2007)
New Revision: 6288
Added:
trunk/common/src/main/org/jboss/portal/ant/
trunk/common/src/main/org/jboss/portal/ant/AbstractDeploymentTask.java
trunk/common/src/main/org/jboss/portal/ant/CannotCreateDirException.java
trunk/common/src/main/org/jboss/portal/ant/Deploy.java
trunk/common/src/main/org/jboss/portal/ant/DirException.java
trunk/common/src/main/org/jboss/portal/ant/Explode.java
trunk/common/src/main/org/jboss/portal/ant/FileIsNotDirException.java
trunk/common/src/main/org/jboss/portal/ant/Implode.java
trunk/common/src/main/org/jboss/portal/ant/Undeploy.java
Log:
Re-added ant directory which seems to have been erased by mistake (please correct me if I'm wrong).
Added: trunk/common/src/main/org/jboss/portal/ant/AbstractDeploymentTask.java
===================================================================
--- trunk/common/src/main/org/jboss/portal/ant/AbstractDeploymentTask.java (rev 0)
+++ trunk/common/src/main/org/jboss/portal/ant/AbstractDeploymentTask.java 2007-02-15 05:32:59 UTC (rev 6288)
@@ -0,0 +1,116 @@
+/******************************************************************************
+ * 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.common.ant;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Task;
+import org.codehaus.cargo.container.ContainerType;
+import org.codehaus.cargo.container.RemoteContainer;
+import org.codehaus.cargo.container.configuration.Configuration;
+import org.codehaus.cargo.container.configuration.ConfigurationType;
+import org.codehaus.cargo.container.jboss.JBossJMXDeployer;
+import org.codehaus.cargo.container.property.GeneralPropertySet;
+import org.codehaus.cargo.container.property.ServletPropertySet;
+import org.codehaus.cargo.generic.ContainerFactory;
+import org.codehaus.cargo.generic.DefaultContainerFactory;
+import org.codehaus.cargo.generic.configuration.ConfigurationFactory;
+import org.codehaus.cargo.generic.configuration.DefaultConfigurationFactory;
+
+import java.io.File;
+
+/**
+ * A deployment task.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 5451 $
+ */
+public abstract class AbstractDeploymentTask extends Task
+{
+
+ /** The file. */
+ private File file;
+
+ /** The JBoss config. */
+ private String config;
+
+ public AbstractDeploymentTask()
+ {
+ file = null;
+ config = "default";
+ }
+
+ public File getFile()
+ {
+ return file;
+ }
+
+ public void setFile(File file)
+ {
+ this.file = file;
+ }
+
+ public String getConfig()
+ {
+ return config;
+ }
+
+ public void setConfig(String config)
+ {
+ this.config = config;
+ }
+
+ public void execute() throws BuildException
+ {
+ //
+ ConfigurationFactory cfgFactory = new DefaultConfigurationFactory();
+ Configuration cfg = cfgFactory.createConfiguration("jboss4x", ConfigurationType.RUNTIME);
+
+ // Configure the container
+ if ("default".equals(config))
+ {
+ cfg.setProperty(GeneralPropertySet.PROTOCOL, "http");
+ cfg.setProperty(GeneralPropertySet.HOSTNAME, "localhost");
+ cfg.setProperty(ServletPropertySet.PORT, "8080");
+ }
+ else
+ {
+ throw new BuildException("Unknown configuration " + config);
+ }
+
+ //
+ if (file == null)
+ {
+ throw new BuildException("No specified file to deploy");
+ }
+
+ //
+ ContainerFactory containerFactory = new DefaultContainerFactory();
+ RemoteContainer container = (RemoteContainer)containerFactory.createContainer("jboss4x", ContainerType.REMOTE, cfg);
+
+ //
+ JBossJMXDeployer deployer = new JBossJMXDeployer(container);
+ execute(deployer);
+ }
+
+ protected abstract void execute(JBossJMXDeployer deployer);
+}
Property changes on: trunk/common/src/main/org/jboss/portal/ant/AbstractDeploymentTask.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Revision"
Name: svn:eol-style
+ native
Added: trunk/common/src/main/org/jboss/portal/ant/CannotCreateDirException.java
===================================================================
--- trunk/common/src/main/org/jboss/portal/ant/CannotCreateDirException.java (rev 0)
+++ trunk/common/src/main/org/jboss/portal/ant/CannotCreateDirException.java 2007-02-15 05:32:59 UTC (rev 6288)
@@ -0,0 +1,40 @@
+/******************************************************************************
+ * 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.common.ant;
+
+import java.io.File;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 5451 $
+ */
+public class CannotCreateDirException extends DirException
+{
+ /** The serialVersionUID */
+ private static final long serialVersionUID = 4911314548182164515L;
+
+ public CannotCreateDirException(File file)
+ {
+ super(file, "Cannot create directory " + file.getName());
+ }
+}
Property changes on: trunk/common/src/main/org/jboss/portal/ant/CannotCreateDirException.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Revision"
Name: svn:eol-style
+ native
Added: trunk/common/src/main/org/jboss/portal/ant/Deploy.java
===================================================================
--- trunk/common/src/main/org/jboss/portal/ant/Deploy.java (rev 0)
+++ trunk/common/src/main/org/jboss/portal/ant/Deploy.java 2007-02-15 05:32:59 UTC (rev 6288)
@@ -0,0 +1,50 @@
+/******************************************************************************
+ * 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.common.ant;
+
+import org.codehaus.cargo.container.deployable.Deployable;
+import org.codehaus.cargo.container.deployable.EAR;
+import org.codehaus.cargo.container.jboss.JBossJMXDeployer;
+
+/**
+ * A blocking deploy task.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 5451 $
+ */
+public class Deploy extends AbstractDeploymentTask
+{
+
+ public Deploy()
+ {
+ }
+
+ protected void execute(JBossJMXDeployer deployer)
+ {
+ //
+ Deployable deployable = new EAR(getFile().getAbsolutePath());
+
+ //
+ deployer.deploy(deployable);
+ }
+}
Property changes on: trunk/common/src/main/org/jboss/portal/ant/Deploy.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Revision"
Name: svn:eol-style
+ native
Added: trunk/common/src/main/org/jboss/portal/ant/DirException.java
===================================================================
--- trunk/common/src/main/org/jboss/portal/ant/DirException.java (rev 0)
+++ trunk/common/src/main/org/jboss/portal/ant/DirException.java 2007-02-15 05:32:59 UTC (rev 6288)
@@ -0,0 +1,48 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.common.ant;
+
+import java.io.File;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 5451 $
+ */
+public class DirException extends Exception
+{
+
+ /** The serialVersionUID */
+ private static final long serialVersionUID = 7944765663293180164L;
+ private File file;
+
+ public DirException(File file, String msg)
+ {
+ super(msg);
+ this.file = file;
+ }
+
+ public File getFile()
+ {
+ return file;
+ }
+}
Property changes on: trunk/common/src/main/org/jboss/portal/ant/DirException.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Revision"
Name: svn:eol-style
+ native
Added: trunk/common/src/main/org/jboss/portal/ant/Explode.java
===================================================================
--- trunk/common/src/main/org/jboss/portal/ant/Explode.java (rev 0)
+++ trunk/common/src/main/org/jboss/portal/ant/Explode.java 2007-02-15 05:32:59 UTC (rev 6288)
@@ -0,0 +1,274 @@
+/******************************************************************************
+ * 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.common.ant;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Task;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipException;
+import java.util.zip.ZipInputStream;
+
+/**
+ * Ant task that explode an archive.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 5451 $
+ */
+public class Explode extends Task
+{
+
+ /** Unzipped extensions. */
+ private static final Set extensions = new HashSet(Arrays.asList(new String[]{"ear", "war", "sar", "har"}));
+
+ /** The exploded file. */
+ private File file;
+
+ /** The target directory. */
+ private File todir;
+
+ /** The target optional name. */
+ private String name;
+
+ /** filename to exclude from decompression * */
+ private String exclude;
+
+ public void setExclude(String exclude)
+ {
+ this.exclude = exclude;
+ }
+
+ public void setFile(File file)
+ {
+ this.file = file;
+ }
+
+ public void setTodir(File todir)
+ {
+ this.todir = todir;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public void execute() throws BuildException
+ {
+ try
+ {
+ explode(file, todir);
+ }
+ catch (DirException e)
+ {
+ throw new BuildException(e.getMessage());
+ }
+ }
+
+ public void explode(File file, File todir) throws BuildException, DirException
+ {
+ if (!file.exists())
+ {
+ throw new BuildException("source file does not exists");
+ }
+ if (!file.isFile())
+ {
+ throw new BuildException("source file is not file");
+ }
+ if (name == null)
+ {
+ name = file.getName();
+ }
+ ZipInputStream zip = null;
+ try
+ {
+ zip = new ZipInputStream(new BufferedInputStream(new FileInputStream(file)));
+ log("Process archive " + name);
+ explode(this, name, zip, todir, this.exclude);
+ }
+ catch (FileNotFoundException e)
+ {
+ throw new BuildException("Unexpected error " + e.getMessage());
+ }
+ finally
+ {
+ if (zip != null)
+ {
+ try
+ {
+ zip.close();
+ }
+ catch (IOException ignored)
+ {
+ }
+ }
+ }
+ }
+
+ /**
+ * Explode a zip stream into a directory.
+ *
+ * @param explode used to log
+ * @param name the name of the created directory
+ * @param zip the zip stream will not be closed
+ * @param todir the parent directory
+ * @throws BuildException
+ * @throws DirException
+ */
+ public static void explode(Explode explode, String name, ZipInputStream zip, File todir, String exclude) throws BuildException, DirException
+ {
+ // First ensure the target directory exists
+ if (!todir.exists())
+ {
+ throw new BuildException("target dir does not exists");
+ }
+ if (!todir.isDirectory())
+ {
+ throw new BuildException("target dir is not a directory");
+ }
+ try
+ {
+ // Buffer
+ byte[] buffer = new byte[512];
+
+ // The real target dir
+ todir = new File(todir, name);
+
+ // Get the directory
+ ensureDirExist(explode, todir);
+
+ // Process each file
+ for (ZipEntry entry = zip.getNextEntry(); entry != null; entry = zip.getNextEntry())
+ {
+ // Next entry
+ File fic = new File(todir, entry.getName());
+ int lastDot = fic.getName().lastIndexOf(".");
+
+ if (entry.isDirectory())
+ {
+ // This is a directory that we must create
+ try
+ {
+ ensureDirExist(explode, fic);
+ }
+ catch (DirException e)
+ {
+ explode.log(e.getMessage());
+ }
+ }
+ else if (lastDot != -1 && extensions.contains(fic.getName().substring(lastDot + 1)))
+ {
+ // This is a nested archive, we explode it
+ try
+ {
+ explode.log("Process nested archive " + fic.getName());
+ if (!fic.getName().equalsIgnoreCase(exclude))
+ {
+ explode(explode, fic.getName(), new ZipInputStream(zip), todir, exclude);
+ }
+ }
+ catch (DirException e)
+ {
+ explode.log(e.getMessage());
+ }
+ }
+ else
+ {
+ // This is a file we write it
+ OutputStream out = null;
+ try
+ {
+ out = new BufferedOutputStream(new FileOutputStream(fic));
+ for (int size = zip.read(buffer); size != -1; size = zip.read(buffer))
+ {
+ out.write(buffer, 0, size);
+ }
+ }
+ catch (IOException e)
+ {
+ explode.log("Problem when writing file " + e.getMessage());
+ }
+ finally
+ {
+ if (out != null)
+ {
+ try
+ {
+ out.close();
+ }
+ catch (IOException ignored)
+ {
+ }
+ }
+ }
+ }
+ }
+ }
+ catch (ZipException e)
+ {
+ throw new BuildException(e);
+ }
+ catch (IOException e)
+ {
+ throw new BuildException(e);
+ }
+ }
+
+ /** When it returns the dir exists otherwise it throws a BuildException */
+ private static void ensureDirExist(Explode explode, File dir) throws FileIsNotDirException, CannotCreateDirException
+ {
+ if (dir.exists())
+ {
+ if (dir.isDirectory())
+ {
+ // explode.log(dir.getName() + " exists and is used");
+ }
+ else
+ {
+ throw new FileIsNotDirException(dir);
+ }
+ }
+ else
+ {
+ if (dir.mkdirs())
+ {
+ // explode.log("Created directory " + dir.getName());
+ }
+ else
+ {
+ throw new CannotCreateDirException(dir);
+ }
+ }
+ }
+}
Property changes on: trunk/common/src/main/org/jboss/portal/ant/Explode.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Revision"
Name: svn:eol-style
+ native
Added: trunk/common/src/main/org/jboss/portal/ant/FileIsNotDirException.java
===================================================================
--- trunk/common/src/main/org/jboss/portal/ant/FileIsNotDirException.java (rev 0)
+++ trunk/common/src/main/org/jboss/portal/ant/FileIsNotDirException.java 2007-02-15 05:32:59 UTC (rev 6288)
@@ -0,0 +1,40 @@
+/******************************************************************************
+ * 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.common.ant;
+
+import java.io.File;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 5451 $
+ */
+public class FileIsNotDirException extends DirException
+{
+ /** The serialVersionUID */
+ private static final long serialVersionUID = 7596495857634457803L;
+
+ public FileIsNotDirException(File file)
+ {
+ super(file, file.getName() + " exists and is not a directory");
+ }
+}
Property changes on: trunk/common/src/main/org/jboss/portal/ant/FileIsNotDirException.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Revision"
Name: svn:eol-style
+ native
Added: trunk/common/src/main/org/jboss/portal/ant/Implode.java
===================================================================
--- trunk/common/src/main/org/jboss/portal/ant/Implode.java (rev 0)
+++ trunk/common/src/main/org/jboss/portal/ant/Implode.java 2007-02-15 05:32:59 UTC (rev 6288)
@@ -0,0 +1,207 @@
+/******************************************************************************
+ * 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.common.ant;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Task;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.jar.JarEntry;
+import java.util.jar.JarOutputStream;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 5451 $
+ */
+public class Implode extends Task
+{
+
+ /** Unzipped extensions. */
+ private static final Set extensions = new HashSet(Arrays.asList(new String[]{"ear", "war", "sar", "har"}));
+
+ /** The exploded dir. */
+ private File dir;
+
+ /** The target file. */
+ private File tofile;
+
+ public void setDir(File dir)
+ {
+ this.dir = dir;
+ }
+
+ public void setTofile(File tofile)
+ {
+ this.tofile = tofile;
+ }
+
+ public void execute() throws BuildException
+ {
+ if (tofile == null)
+ {
+ throw new BuildException("target file should not be null");
+ }
+ if (dir == null)
+ {
+ throw new BuildException("source dir should not be null");
+ }
+ if (!dir.exists())
+ {
+ throw new BuildException("source dir does not exist");
+ }
+ if (dir.isFile())
+ {
+ throw new BuildException("source dir is a file");
+ }
+ if (tofile.exists() && tofile.isDirectory())
+ {
+ throw new BuildException("target file " + tofile + " designates a directory");
+ }
+ //if (tofile == null || tofile.lastModified() < dir.lastModified())
+
+
+ OutputStream out = null;
+ try
+ {
+ byte[] bytes = implode(dir);
+ out = new BufferedOutputStream(new FileOutputStream(tofile));
+ out.write(bytes);
+ }
+ catch (IOException e)
+ {
+ e.printStackTrace();
+ throw new BuildException(e.getMessage());
+ }
+ finally
+ {
+ if (out != null)
+ {
+ try
+ {
+ out.close();
+ }
+ catch (IOException ignore)
+ {
+ }
+ }
+ }
+
+ }
+
+ public byte[] implode(File f) throws IOException
+ {
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ JarOutputStream out = new JarOutputStream(baos);
+ implode(f, "", out);
+ out.close();
+ return baos.toByteArray();
+ }
+
+ public void implode(File f, String path, JarOutputStream out) throws IOException
+ {
+ if (f.isFile())
+ {
+ InputStream in = null;
+ try
+ {
+ in = new BufferedInputStream(new FileInputStream(f));
+ byte[] bytes = new byte[1024];
+
+ //
+ String fileName = path.substring(1);
+ JarEntry fileEntry = new JarEntry(fileName);
+ out.putNextEntry(fileEntry);
+
+ //
+ for (int l = in.read(bytes, 0, bytes.length); l > -0; l = in.read(bytes, 0, bytes.length))
+ {
+ out.write(bytes, 0, l);
+ }
+
+ //
+ out.closeEntry();
+ }
+ finally
+ {
+ if (in != null)
+ {
+ try
+ {
+ in.close();
+ }
+ catch (IOException ignore)
+ {
+ }
+ }
+ }
+ }
+ else
+ {
+ if (path.length() > 1)
+ {
+ String dirName = path.substring(1) + '/';
+ JarEntry dirEntry = new JarEntry(dirName);
+ out.putNextEntry(dirEntry);
+ out.closeEntry();
+ }
+
+ //
+ File[] children = f.listFiles();
+ for (int i = 0; i < children.length; i++)
+ {
+ File child = children[i];
+ int lastDot = child.getName().lastIndexOf(".");
+ if (extensions.contains(child.getName().substring(lastDot + 1)))
+ {
+ byte[] bytes = implode(child);
+
+ //
+ String fileName = (path + '/' + child.getName()).substring(1);
+ JarEntry fileEntry = new JarEntry(fileName);
+ out.putNextEntry(fileEntry);
+
+ //
+ out.write(bytes, 0, bytes.length);
+
+ //
+ out.closeEntry();
+ }
+ else
+ {
+ implode(child, path + '/' + child.getName(), out);
+ }
+ }
+ }
+ }
+}
Property changes on: trunk/common/src/main/org/jboss/portal/ant/Implode.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Revision"
Name: svn:eol-style
+ native
Added: trunk/common/src/main/org/jboss/portal/ant/Undeploy.java
===================================================================
--- trunk/common/src/main/org/jboss/portal/ant/Undeploy.java (rev 0)
+++ trunk/common/src/main/org/jboss/portal/ant/Undeploy.java 2007-02-15 05:32:59 UTC (rev 6288)
@@ -0,0 +1,46 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.common.ant;
+
+import org.codehaus.cargo.container.deployable.Deployable;
+import org.codehaus.cargo.container.deployable.EAR;
+import org.codehaus.cargo.container.jboss.JBossJMXDeployer;
+
+/**
+ * A blocking undeploy task.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 5451 $
+ */
+public class Undeploy extends AbstractDeploymentTask
+{
+
+ protected void execute(JBossJMXDeployer deployer)
+ {
+ //
+ Deployable deployable = new EAR(getFile().getAbsolutePath());
+
+ //
+ deployer.undeploy(deployable);
+ }
+}
Property changes on: trunk/common/src/main/org/jboss/portal/ant/Undeploy.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Date Id Revision"
Name: svn:eol-style
+ native
19 years, 2 months
JBoss Portal SVN: r6287 - in trunk: core/src/resources/portal-core-sar/conf and 5 other directories.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-02-14 21:22:12 -0500 (Wed, 14 Feb 2007)
New Revision: 6287
Modified:
trunk/core/src/main/org/jboss/portal/core/portlet/user/UserPortlet.java
trunk/core/src/resources/portal-core-sar/conf/identity/ldap_identity-config.xml
trunk/core/src/resources/portal-core-sar/conf/login-config.xml
trunk/identity/build.xml
trunk/identity/src/main/org/jboss/portal/identity/db/HibernateUserProfileModuleImpl.java
trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserModuleImpl.java
trunk/identity/src/resources/example/portal-sample-local.ldif
trunk/identity/src/resources/example/portal-sample-qa.ldif
Log:
- stupid bug setting ldap user password to random one...
Modified: trunk/core/src/main/org/jboss/portal/core/portlet/user/UserPortlet.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/portlet/user/UserPortlet.java 2007-02-15 01:13:17 UTC (rev 6286)
+++ trunk/core/src/main/org/jboss/portal/core/portlet/user/UserPortlet.java 2007-02-15 02:22:12 UTC (rev 6287)
@@ -689,7 +689,9 @@
{
try
{
+
user = userModule.createUser(uname, pass1);
+
setProperty(user, P3PConstants.INFO_USER_BUSINESS_INFO_ONLINE_EMAIL, realEmail);
//user.setFakeEmail(fakeEmail);
setProperty(user,User.INFO_USER_EMAIL_FAKE, fakeEmail);
Modified: trunk/core/src/resources/portal-core-sar/conf/identity/ldap_identity-config.xml
===================================================================
--- trunk/core/src/resources/portal-core-sar/conf/identity/ldap_identity-config.xml 2007-02-15 01:13:17 UTC (rev 6286)
+++ trunk/core/src/resources/portal-core-sar/conf/identity/ldap_identity-config.xml 2007-02-15 02:22:12 UTC (rev 6287)
@@ -37,20 +37,20 @@
</option>
<option>
<name>port</name>
- <value>389</value>
+ <value>10389</value>
</option>
<option>
<name>adminDN</name>
- <value>cn=Manager,dc=my-domain,dc=com</value>
+ <value>cn=Directory Manager</value>
</option>
<option>
<name>adminPassword</name>
- <value>secret</value>
+ <value>password</value>
</option>
- <option>
+ <!--<option>
<name>protocol</name>
<value>ssl</value>
- </option>
+ </option>-->
</config>
</datasource>
</datasources>
@@ -103,11 +103,11 @@
<group-name>common</group-name>
<option>
<name>userCtxDN</name>
- <value>ou=People,o=portal,dc=my-domain,dc=com</value>
+ <value>ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
</option>
<option>
<name>roleCtxDN</name>
- <value>ou=Roles,o=portal,dc=my-domain,dc=com</value>
+ <value>ou=Roles,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
</option>
</option-group>
<option-group>
@@ -140,7 +140,7 @@
<!--For safety reasons point to the admin user here-->
<option>
<name>member</name>
- <value>uid=dummynonexistinguser,ou=People,dc=jboss,dc=org</value>
+ <value>uid=admin,ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
</option>
</option-group>
</options>
Modified: trunk/core/src/resources/portal-core-sar/conf/login-config.xml
===================================================================
--- trunk/core/src/resources/portal-core-sar/conf/login-config.xml 2007-02-15 01:13:17 UTC (rev 6286)
+++ trunk/core/src/resources/portal-core-sar/conf/login-config.xml 2007-02-15 02:22:12 UTC (rev 6287)
@@ -48,8 +48,8 @@
<module-option name="hashAlgorithm">MD5</module-option>
<module-option name="hashEncoding">HEX</module-option>
<module-option name="additionalRole">Authenticated</module-option>
- </login-module>-->
-
+ </login-module>
+-->
<login-module code="org.jboss.portal.identity.auth.IdentityLoginModule" flag="required">
<module-option name="unauthenticatedIdentity">guest</module-option>
<module-option name="userModuleJNDIName">java:/portal/UserModule</module-option>
Modified: trunk/identity/build.xml
===================================================================
--- trunk/identity/build.xml 2007-02-15 01:13:17 UTC (rev 6286)
+++ trunk/identity/build.xml 2007-02-15 02:22:12 UTC (rev 6287)
@@ -452,15 +452,15 @@
<x-test>
- <test todir="${test.reports}" name="org.jboss.portal.test.identity.db.DBIdentityTestCase"/>
- <test todir="${test.reports}" name="org.jboss.portal.test.identity.ldap.LDAPIdentityTestCase"/>
+ <!--<test todir="${test.reports}" name="org.jboss.portal.test.identity.db.DBIdentityTestCase"/>
+ <test todir="${test.reports}" name="org.jboss.portal.test.identity.ldap.LDAPIdentityTestCase"/>-->
<test todir="${test.reports}" name="org.jboss.portal.test.identity.ldap.LDAPSimpleUserModuleTestCase"/>
- <test todir="${test.reports}" name="org.jboss.portal.test.identity.ldap.LDAPSimpleRoleModuleTestCase"/>
+ <!--<test todir="${test.reports}" name="org.jboss.portal.test.identity.ldap.LDAPSimpleRoleModuleTestCase"/>
<test todir="${test.reports}" name="org.jboss.portal.test.identity.ldap.LDAPStaticGroupMembershipModuleTestCase"/>
<test todir="${test.reports}" name="org.jboss.portal.test.identity.ldap.LDAPStaticRoleMembershipModuleTestCase"/>
<test todir="${test.reports}" name="org.jboss.portal.test.identity.ldap.LDAPUserProfileModuleTestCase"/>
<test todir="${test.reports}" name="org.jboss.portal.test.identity.ldap.LDAPExtUserModuleTestCase"/>
- <test todir="${test.reports}" name="org.jboss.portal.test.identity.ldap.LDAPExtRoleModuleTestCase"/>
+ <test todir="${test.reports}" name="org.jboss.portal.test.identity.ldap.LDAPExtRoleModuleTestCase"/>-->
</x-test>
<x-classpath>
<pathelement location="${build.lib}/portal-identity-lib.jar"/>
Modified: trunk/identity/src/main/org/jboss/portal/identity/db/HibernateUserProfileModuleImpl.java
===================================================================
--- trunk/identity/src/main/org/jboss/portal/identity/db/HibernateUserProfileModuleImpl.java 2007-02-15 01:13:17 UTC (rev 6286)
+++ trunk/identity/src/main/org/jboss/portal/identity/db/HibernateUserProfileModuleImpl.java 2007-02-15 02:22:12 UTC (rev 6287)
@@ -224,7 +224,7 @@
//user.updatePassword(user.getPassword());
if (defaultSynchronizePassword != null)
{
- user.updatePassword(getDefaultSynchronizePassword());
+ hu.updatePassword(getDefaultSynchronizePassword());
}
//really dummy password generation
//TODO: make something more sophisticated (risk of this part is documented)
@@ -236,7 +236,7 @@
{
password.append(r.nextDouble());
}
- user.updatePassword(password.toString());
+ hu.updatePassword(password.toString());
}
session = getCurrentSession();
session.save(hu);
Modified: trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserModuleImpl.java
===================================================================
--- trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserModuleImpl.java 2007-02-15 01:13:17 UTC (rev 6286)
+++ trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserModuleImpl.java 2007-02-15 02:22:12 UTC (rev 6287)
@@ -184,6 +184,8 @@
throw new IdentityException("Failed to create user", e);
}
User u = findUserByUserName(userName);
+
+
fireUserCreatedEvent(u.getId(), u.getUserName());
return u;
}
Modified: trunk/identity/src/resources/example/portal-sample-local.ldif
===================================================================
--- trunk/identity/src/resources/example/portal-sample-local.ldif 2007-02-15 01:13:17 UTC (rev 6286)
+++ trunk/identity/src/resources/example/portal-sample-local.ldif 2007-02-15 02:22:12 UTC (rev 6287)
@@ -1,15 +1,15 @@
-dn: o=portal,dc=my-domain,dc=com
+dn: o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
objectclass: top
objectclass: organization
-o: portal
+o: test
-dn: ou=People,o=portal,dc=my-domain,dc=com
+dn: ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
objectclass: top
objectclass: organizationalUnit
ou: People
-dn: uid=admin,ou=People,o=portal,dc=my-domain,dc=com
+dn: uid=admin,ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
objectclass: top
objectclass: inetOrgPerson
objectclass: person
@@ -19,7 +19,7 @@
userPassword: admin
mail: email(a)email.com
-dn: uid=user,ou=People,o=portal,dc=my-domain,dc=com
+dn: uid=user,ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
objectclass: top
objectclass: inetOrgPerson
objectclass: person
@@ -29,7 +29,7 @@
userPassword: user
mail: email(a)email.com
-dn: uid=jduke,ou=People,o=portal,dc=my-domain,dc=com
+dn: uid=jduke,ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
objectclass: top
objectclass: inetOrgPerson
objectclass: person
@@ -39,7 +39,7 @@
userPassword: theduke
mail: email(a)email.com
-dn: uid=jduke1,ou=People,o=portal,dc=my-domain,dc=com
+dn: uid=jduke1,ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
objectclass: top
objectclass: inetOrgPerson
objectclass: person
@@ -50,7 +50,7 @@
mail: email(a)email.com
-dn: uid=jduke2,ou=People,o=portal,dc=my-domain,dc=com
+dn: uid=jduke2,ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
objectclass: top
objectclass: inetOrgPerson
objectclass: person
@@ -60,7 +60,7 @@
userPassword: theduke
mail: email(a)email.com
-dn: uid=jduke3,ou=People,o=portal,dc=my-domain,dc=com
+dn: uid=jduke3,ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
objectclass: top
objectclass: inetOrgPerson
objectclass: person
@@ -70,7 +70,7 @@
userPassword: theduke
mail: email(a)email.com
-dn: uid=jduke4,ou=People,o=portal,dc=my-domain,dc=com
+dn: uid=jduke4,ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
objectclass: top
objectclass: inetOrgPerson
objectclass: person
@@ -80,54 +80,54 @@
userPassword: theduke
mail: email(a)email.com
-dn: ou=Roles,o=portal,dc=my-domain,dc=com
+dn: ou=Roles,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
objectclass: top
objectclass: organizationalUnit
ou: Roles
-dn: cn=Admin,ou=Roles,o=portal,dc=my-domain,dc=com
+dn: cn=Admin,ou=Roles,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
objectClass: top
objectClass: groupOfNames
cn: Admin
description: Portal admin role
-member: uid=admin,ou=People,o=portal,dc=my-domain,dc=com
+member: uid=admin,ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
-dn: cn=User,ou=Roles,o=portal,dc=my-domain,dc=com
+dn: cn=User,ou=Roles,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
objectClass: top
objectClass: groupOfNames
cn: User
description: Portal user role
-member: uid=admin,ou=People,o=portal,dc=my-domain,dc=com
-member: uid=user,ou=People,o=portal,dc=my-domain,dc=com
-member: uid=jduke,ou=People,o=portal,dc=my-domain,dc=com
-member: uid=jduke1,ou=People,o=portal,dc=my-domain,dc=com
-member: uid=jduke2,ou=People,o=portal,dc=my-domain,dc=com
-member: uid=jduke3,ou=People,o=portal,dc=my-domain,dc=com
-member: uid=jduke4,ou=People,o=portal,dc=my-domain,dc=com
-member: uid=jduke5,ou=People,o=portal,dc=my-domain,dc=com
+member: uid=admin,ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+member: uid=user,ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+member: uid=jduke,ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+member: uid=jduke1,ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+member: uid=jduke2,ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+member: uid=jduke3,ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+member: uid=jduke4,ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
-dn: cn=Echo,ou=Roles,o=portal,dc=my-domain,dc=com
+
+dn: cn=Echo,ou=Roles,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
objectClass: top
objectClass: groupOfNames
cn: Echo
description: the JBossAdmin group
-member: uid=jduke1,ou=People,o=portal,dc=my-domain,dc=com
-member: uid=jduke3,ou=People,o=portal,dc=my-domain,dc=com
-member: uid=jduke4,ou=People,o=portal,dc=my-domain,dc=com
+member: uid=jduke1,ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+member: uid=jduke3,ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+member: uid=jduke4,ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
-dn: cn=Echo1,ou=Roles,o=portal,dc=my-domain,dc=com
+dn: cn=Echo1,ou=Roles,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
objectClass: top
objectClass: groupOfNames
cn: Echo1
description: the JBossAdmin group 2
-member: uid=jduke2,ou=People,o=portal,dc=my-domain,dc=com
-member: uid=jduke3,ou=People,o=portal,dc=my-domain,dc=com
-member: uid=jduke5,ou=People,o=portal,dc=my-domain,dc=com
+member: uid=jduke2,ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+member: uid=jduke3,ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+member: uid=jduke5,ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
-dn: cn=TheDuke,ou=Roles,o=portal,dc=my-domain,dc=com
+dn: cn=TheDuke,ou=Roles,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
objectClass: groupOfNames
objectClass: top
cn: TheDuke
description: TheDuke role context
-member: uid=jduke,ou=People,o=portal,dc=my-domain,dc=com
\ No newline at end of file
+member: uid=jduke,ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
\ No newline at end of file
Modified: trunk/identity/src/resources/example/portal-sample-qa.ldif
===================================================================
--- trunk/identity/src/resources/example/portal-sample-qa.ldif 2007-02-15 01:13:17 UTC (rev 6286)
+++ trunk/identity/src/resources/example/portal-sample-qa.ldif 2007-02-15 02:22:12 UTC (rev 6287)
@@ -106,7 +106,21 @@
member: uid=jduke4,ou=People,o=qa,dc=portal,dc=my-domain,dc=com
member: uid=jduke5,ou=People,o=qa,dc=portal,dc=my-domain,dc=com
+dn: cn=common,ou=Roles,o=qa,dc=portal,dc=my-domain,dc=com
+objectClass: top
+objectClass: groupOfNames
+cn: User
+description: Portal user role
+member: uid=admin,ou=People,o=qa,dc=portal,dc=my-domain,dc=com
+member: uid=user,ou=People,o=qa,dc=portal,dc=my-domain,dc=com
+member: uid=jduke,ou=People,o=qa,dc=portal,dc=my-domain,dc=com
+member: uid=jduke1,ou=People,o=qa,dc=portal,dc=my-domain,dc=com
+member: uid=jduke2,ou=People,o=qa,dc=portal,dc=my-domain,dc=com
+member: uid=jduke3,ou=People,o=qa,dc=portal,dc=my-domain,dc=com
+member: uid=jduke4,ou=People,o=qa,dc=portal,dc=my-domain,dc=com
+member: uid=jduke5,ou=People,o=qa,dc=portal,dc=my-domain,dc=com
+
dn: cn=Echo,ou=Roles,o=qa,dc=portal,dc=my-domain,dc=com
objectClass: top
objectClass: groupOfNames
19 years, 2 months
JBoss Portal SVN: r6286 - trunk/core/src/main/org/jboss/portal/core/portlet/user.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-02-14 20:13:17 -0500 (Wed, 14 Feb 2007)
New Revision: 6286
Modified:
trunk/core/src/main/org/jboss/portal/core/portlet/user/UserPortlet.java
Log:
- way the locale are set in user portlet
Modified: trunk/core/src/main/org/jboss/portal/core/portlet/user/UserPortlet.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/portlet/user/UserPortlet.java 2007-02-14 23:13:27 UTC (rev 6285)
+++ trunk/core/src/main/org/jboss/portal/core/portlet/user/UserPortlet.java 2007-02-15 01:13:17 UTC (rev 6286)
@@ -933,7 +933,8 @@
LocaleInfo localeInfo = LocaleInfo.decodeLocaleInfo(locale);
if (localeInfo != null)
{
- setProperty(user, User.INFO_USER_LOCALE, localeInfo.getLocale());
+ //setProperty(user, User.INFO_USER_LOCALE, localeInfo.getLocale());
+ setProperty(user, User.INFO_USER_LOCALE, localeInfo.getLocale().toString());
}
putNonEmptyProperty(user, User.INFO_USER_THEME, theme);
19 years, 2 months
JBoss Portal SVN: r6285 - in trunk: identity/src/resources/example and 1 other directory.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-02-14 18:13:27 -0500 (Wed, 14 Feb 2007)
New Revision: 6285
Added:
trunk/identity/src/resources/example/portal-sample-local.ldif
trunk/identity/src/resources/example/portal-sample-qa.ldif
Modified:
trunk/core/src/resources/portal-core-sar/conf/identity/ldap_identity-config.xml
Log:
- change config template
Modified: trunk/core/src/resources/portal-core-sar/conf/identity/ldap_identity-config.xml
===================================================================
--- trunk/core/src/resources/portal-core-sar/conf/identity/ldap_identity-config.xml 2007-02-14 23:00:54 UTC (rev 6284)
+++ trunk/core/src/resources/portal-core-sar/conf/identity/ldap_identity-config.xml 2007-02-14 23:13:27 UTC (rev 6285)
@@ -37,7 +37,7 @@
</option>
<option>
<name>port</name>
- <value>636</value>
+ <value>389</value>
</option>
<option>
<name>adminDN</name>
Added: trunk/identity/src/resources/example/portal-sample-local.ldif
===================================================================
--- trunk/identity/src/resources/example/portal-sample-local.ldif (rev 0)
+++ trunk/identity/src/resources/example/portal-sample-local.ldif 2007-02-14 23:13:27 UTC (rev 6285)
@@ -0,0 +1,133 @@
+dn: o=portal,dc=my-domain,dc=com
+objectclass: top
+objectclass: organization
+o: portal
+
+dn: ou=People,o=portal,dc=my-domain,dc=com
+objectclass: top
+objectclass: organizationalUnit
+ou: People
+
+
+dn: uid=admin,ou=People,o=portal,dc=my-domain,dc=com
+objectclass: top
+objectclass: inetOrgPerson
+objectclass: person
+uid: admin
+cn: Java Duke
+sn: Duke
+userPassword: admin
+mail: email(a)email.com
+
+dn: uid=user,ou=People,o=portal,dc=my-domain,dc=com
+objectclass: top
+objectclass: inetOrgPerson
+objectclass: person
+uid: user
+cn: user
+sn: Portal User
+userPassword: user
+mail: email(a)email.com
+
+dn: uid=jduke,ou=People,o=portal,dc=my-domain,dc=com
+objectclass: top
+objectclass: inetOrgPerson
+objectclass: person
+uid: jduke
+cn: Java Duke
+sn: Duke
+userPassword: theduke
+mail: email(a)email.com
+
+dn: uid=jduke1,ou=People,o=portal,dc=my-domain,dc=com
+objectclass: top
+objectclass: inetOrgPerson
+objectclass: person
+uid: jduke1
+cn: Java Duke1
+sn: Duke1
+userPassword: theduke
+mail: email(a)email.com
+
+
+dn: uid=jduke2,ou=People,o=portal,dc=my-domain,dc=com
+objectclass: top
+objectclass: inetOrgPerson
+objectclass: person
+uid: jduke2
+cn: Java Duke2
+sn: Duke2
+userPassword: theduke
+mail: email(a)email.com
+
+dn: uid=jduke3,ou=People,o=portal,dc=my-domain,dc=com
+objectclass: top
+objectclass: inetOrgPerson
+objectclass: person
+uid: jduke3
+cn: Java Duke3
+sn: Duke3
+userPassword: theduke
+mail: email(a)email.com
+
+dn: uid=jduke4,ou=People,o=portal,dc=my-domain,dc=com
+objectclass: top
+objectclass: inetOrgPerson
+objectclass: person
+uid: jduke4
+cn: Java Duke4
+sn: Duke4
+userPassword: theduke
+mail: email(a)email.com
+
+dn: ou=Roles,o=portal,dc=my-domain,dc=com
+objectclass: top
+objectclass: organizationalUnit
+ou: Roles
+
+dn: cn=Admin,ou=Roles,o=portal,dc=my-domain,dc=com
+objectClass: top
+objectClass: groupOfNames
+cn: Admin
+description: Portal admin role
+member: uid=admin,ou=People,o=portal,dc=my-domain,dc=com
+
+dn: cn=User,ou=Roles,o=portal,dc=my-domain,dc=com
+objectClass: top
+objectClass: groupOfNames
+cn: User
+description: Portal user role
+member: uid=admin,ou=People,o=portal,dc=my-domain,dc=com
+member: uid=user,ou=People,o=portal,dc=my-domain,dc=com
+member: uid=jduke,ou=People,o=portal,dc=my-domain,dc=com
+member: uid=jduke1,ou=People,o=portal,dc=my-domain,dc=com
+member: uid=jduke2,ou=People,o=portal,dc=my-domain,dc=com
+member: uid=jduke3,ou=People,o=portal,dc=my-domain,dc=com
+member: uid=jduke4,ou=People,o=portal,dc=my-domain,dc=com
+member: uid=jduke5,ou=People,o=portal,dc=my-domain,dc=com
+
+
+dn: cn=Echo,ou=Roles,o=portal,dc=my-domain,dc=com
+objectClass: top
+objectClass: groupOfNames
+cn: Echo
+description: the JBossAdmin group
+member: uid=jduke1,ou=People,o=portal,dc=my-domain,dc=com
+member: uid=jduke3,ou=People,o=portal,dc=my-domain,dc=com
+member: uid=jduke4,ou=People,o=portal,dc=my-domain,dc=com
+
+dn: cn=Echo1,ou=Roles,o=portal,dc=my-domain,dc=com
+objectClass: top
+objectClass: groupOfNames
+cn: Echo1
+description: the JBossAdmin group 2
+member: uid=jduke2,ou=People,o=portal,dc=my-domain,dc=com
+member: uid=jduke3,ou=People,o=portal,dc=my-domain,dc=com
+member: uid=jduke5,ou=People,o=portal,dc=my-domain,dc=com
+
+dn: cn=TheDuke,ou=Roles,o=portal,dc=my-domain,dc=com
+objectClass: groupOfNames
+objectClass: top
+cn: TheDuke
+description: TheDuke role context
+member: uid=jduke,ou=People,o=portal,dc=my-domain,dc=com
\ No newline at end of file
Added: trunk/identity/src/resources/example/portal-sample-qa.ldif
===================================================================
--- trunk/identity/src/resources/example/portal-sample-qa.ldif (rev 0)
+++ trunk/identity/src/resources/example/portal-sample-qa.ldif 2007-02-14 23:13:27 UTC (rev 6285)
@@ -0,0 +1,133 @@
+dn: o=qa,dc=portal,dc=my-domain,dc=com
+objectclass: top
+objectclass: organization
+o: qa
+
+dn: ou=People,o=qa,dc=portal,dc=my-domain,dc=com
+objectclass: top
+objectclass: organizationalUnit
+ou: People
+
+
+dn: uid=admin,ou=People,o=qa,dc=portal,dc=my-domain,dc=com
+objectclass: top
+objectclass: inetOrgPerson
+objectclass: person
+uid: admin
+cn: Java Duke
+sn: Duke
+userPassword: admin
+mail: email(a)email.com
+
+dn: uid=user,ou=People,o=qa,dc=portal,dc=my-domain,dc=com
+objectclass: top
+objectclass: inetOrgPerson
+objectclass: person
+uid: user
+cn: user
+sn: Portal User
+userPassword: user
+mail: email(a)email.com
+
+dn: uid=jduke,ou=People,o=qa,dc=portal,dc=my-domain,dc=com
+objectclass: top
+objectclass: inetOrgPerson
+objectclass: person
+uid: jduke
+cn: Java Duke
+sn: Duke
+userPassword: theduke
+mail: email(a)email.com
+
+dn: uid=jduke1,ou=People,o=qa,dc=portal,dc=my-domain,dc=com
+objectclass: top
+objectclass: inetOrgPerson
+objectclass: person
+uid: jduke1
+cn: Java Duke1
+sn: Duke1
+userPassword: theduke
+mail: email(a)email.com
+
+
+dn: uid=jduke2,ou=People,o=qa,dc=portal,dc=my-domain,dc=com
+objectclass: top
+objectclass: inetOrgPerson
+objectclass: person
+uid: jduke2
+cn: Java Duke2
+sn: Duke2
+userPassword: theduke
+mail: email(a)email.com
+
+dn: uid=jduke3,ou=People,o=qa,dc=portal,dc=my-domain,dc=com
+objectclass: top
+objectclass: inetOrgPerson
+objectclass: person
+uid: jduke3
+cn: Java Duke3
+sn: Duke3
+userPassword: theduke
+mail: email(a)email.com
+
+dn: uid=jduke4,ou=People,o=qa,dc=portal,dc=my-domain,dc=com
+objectclass: top
+objectclass: inetOrgPerson
+objectclass: person
+uid: jduke4
+cn: Java Duke4
+sn: Duke4
+userPassword: theduke
+mail: email(a)email.com
+
+dn: ou=Roles,o=qa,dc=portal,dc=my-domain,dc=com
+objectclass: top
+objectclass: organizationalUnit
+ou: Roles
+
+dn: cn=Admin,ou=Roles,o=qa,dc=portal,dc=my-domain,dc=com
+objectClass: top
+objectClass: groupOfNames
+cn: Admin
+description: Portal admin role
+member: uid=admin,ou=People,o=qa,dc=portal,dc=my-domain,dc=com
+
+dn: cn=User,ou=Roles,o=qa,dc=portal,dc=my-domain,dc=com
+objectClass: top
+objectClass: groupOfNames
+cn: User
+description: Portal user role
+member: uid=admin,ou=People,o=qa,dc=portal,dc=my-domain,dc=com
+member: uid=user,ou=People,o=qa,dc=portal,dc=my-domain,dc=com
+member: uid=jduke,ou=People,o=qa,dc=portal,dc=my-domain,dc=com
+member: uid=jduke1,ou=People,o=qa,dc=portal,dc=my-domain,dc=com
+member: uid=jduke2,ou=People,o=qa,dc=portal,dc=my-domain,dc=com
+member: uid=jduke3,ou=People,o=qa,dc=portal,dc=my-domain,dc=com
+member: uid=jduke4,ou=People,o=qa,dc=portal,dc=my-domain,dc=com
+member: uid=jduke5,ou=People,o=qa,dc=portal,dc=my-domain,dc=com
+
+
+dn: cn=Echo,ou=Roles,o=qa,dc=portal,dc=my-domain,dc=com
+objectClass: top
+objectClass: groupOfNames
+cn: Echo
+description: the JBossAdmin group
+member: uid=jduke1,ou=People,o=qa,dc=portal,dc=my-domain,dc=com
+member: uid=jduke3,ou=People,o=qa,dc=portal,dc=my-domain,dc=com
+member: uid=jduke4,ou=People,o=qa,dc=portal,dc=my-domain,dc=com
+
+dn: cn=Echo1,ou=Roles,o=qa,dc=portal,dc=my-domain,dc=com
+objectClass: top
+objectClass: groupOfNames
+cn: Echo1
+description: the JBossAdmin group 2
+member: uid=jduke2,ou=People,o=qa,dc=portal,dc=my-domain,dc=com
+member: uid=jduke3,ou=People,o=qa,dc=portal,dc=my-domain,dc=com
+member: uid=jduke5,ou=People,o=qa,dc=portal,dc=my-domain,dc=com
+
+dn: cn=TheDuke,ou=Roles,o=qa,dc=portal,dc=my-domain,dc=com
+objectClass: groupOfNames
+objectClass: top
+cn: TheDuke
+description: TheDuke role context
+member: uid=jduke,ou=People,o=qa,dc=portal,dc=my-domain,dc=com
\ No newline at end of file
19 years, 2 months