JBoss Portal SVN: r6605 - in trunk: core/src/main/org/jboss/portal/core/impl/model/content and 16 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-03-08 16:55:40 -0500 (Thu, 08 Mar 2007)
New Revision: 6605
Added:
trunk/core/src/main/org/jboss/portal/core/impl/model/content/AbstractContent.java
Modified:
trunk/common/src/main/org/jboss/portal/common/util/ParameterMap.java
trunk/common/src/main/org/jboss/portal/common/util/TypedMap.java
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/AssignWindowsAction.java
trunk/core-cms/src/main/org/jboss/portal/core/cms/content/CMSContent.java
trunk/core/src/main/org/jboss/portal/core/impl/model/content/generic/GenericContent.java
trunk/core/src/main/org/jboss/portal/core/impl/model/content/generic/GenericContentHandler.java
trunk/core/src/main/org/jboss/portal/core/impl/model/content/portlet/PortletContent.java
trunk/core/src/main/org/jboss/portal/core/impl/model/portal/WindowImpl.java
trunk/core/src/main/org/jboss/portal/core/impl/model/portal/content/GenericPortletContentRenderer.java
trunk/core/src/main/org/jboss/portal/core/impl/portlet/state/PersistentRegistration.java
trunk/core/src/main/org/jboss/portal/core/model/content/Content.java
trunk/core/src/main/org/jboss/portal/core/model/content/spi/ContentState.java
trunk/core/src/main/org/jboss/portal/test/core/model/content/NullContent.java
trunk/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectContainerTestCase.java
trunk/portlet/src/main/org/jboss/portal/portlet/PortletParameters.java
trunk/portlet/src/main/org/jboss/portal/portlet/state/AbstractPropertyMap.java
trunk/widget/src/main/org/jboss/portal/widget/Widget.java
trunk/widget/src/main/org/jboss/portal/widget/WidgetPortlet.java
trunk/widget/src/main/org/jboss/portal/widget/google/GGWidget.java
Log:
better support for widget configuration
Modified: trunk/common/src/main/org/jboss/portal/common/util/ParameterMap.java
===================================================================
--- trunk/common/src/main/org/jboss/portal/common/util/ParameterMap.java 2007-03-08 20:14:20 UTC (rev 6604)
+++ trunk/common/src/main/org/jboss/portal/common/util/ParameterMap.java 2007-03-08 21:55:40 UTC (rev 6605)
@@ -36,15 +36,10 @@
/**
* Only accept non null string objects.
*
- * @throws NullPointerException if the value is null
* @throws ClassCastException if the value is not an instance of string
*/
- protected void assertKeyValidity(Object value) throws NullPointerException, ClassCastException
+ protected void assertKeyValidity(Object value) throws ClassCastException
{
- if (value == null)
- {
- throw new NullPointerException("Key must not be null");
- }
if (value instanceof String == false)
{
throw new ClassCastException("Key should be a String");
@@ -62,10 +57,6 @@
*/
protected Object getInternalValue(Object value) throws NullPointerException, ClassCastException, IllegalArgumentException
{
- if (value == null)
- {
- throw new NullPointerException("Value must not be null");
- }
if (value instanceof String[] == false)
{
throw new ClassCastException("Value should be a String[]");
@@ -85,11 +76,6 @@
return strings;
}
- protected Object getExternalValue(Object value)
- {
- return value;
- }
-
protected boolean internalValueEquals(Object left, Object right)
{
String[] valuesL = (String[])left;
Modified: trunk/common/src/main/org/jboss/portal/common/util/TypedMap.java
===================================================================
--- trunk/common/src/main/org/jboss/portal/common/util/TypedMap.java 2007-03-08 20:14:20 UTC (rev 6604)
+++ trunk/common/src/main/org/jboss/portal/common/util/TypedMap.java 2007-03-08 21:55:40 UTC (rev 6605)
@@ -43,68 +43,143 @@
protected abstract Map getDelegate();
/**
- * @throws ClassCastException if the key is of an inappropriate type for this map
+ * Override to check the validity of the key, the default implementation is an empty method.
+ *
+ * @throws ClassCastException if the class of the specified key prevents it from being stored in this map
+ * @throws IllegalArgumentException if some aspect of this key prevents it from being stored in this map
*/
- protected abstract void assertKeyValidity(Object key) throws ClassCastException;
+ protected void assertKeyValidity(Object key) throws IllegalArgumentException, ClassCastException
+ {
+ }
/**
+ * Unwraps the key to the the internal key that will be stored in the map.
+ * This method calls the <code>assertKeyValidity(Object key)</code> and returns
+ * the same key. It can be overriden to provide a customized key that will be used
+ * instead of the external key.
+ *
+ * @param key the key to unwrap
+ * @return the unwrapped key
+ * @throws ClassCastException if the class of the specified key prevents it from being stored in this map
+ * @throws IllegalArgumentException if some aspect of this key prevents it from being stored in this map
+ */
+ protected Object getInternalKey(Object key) throws IllegalArgumentException, ClassCastException
+ {
+ assertKeyValidity(key);
+
+ //
+ return key;
+ }
+
+ /**
+ * Wrap the internal key into its external representation, by default returns the same key.
+ * It can be overriden to provide a customized key that will be used instead of the internal
+ * key.
+ */
+ protected Object getExternalKey(Object key)
+ {
+ return key;
+ }
+
+ private Object unwrapKey(Object externalKey) throws IllegalArgumentException, ClassCastException, NullPointerException
+ {
+ if (externalKey == null)
+ {
+ throw new NullPointerException("No null key accepted");
+ }
+
+ //
+ Object internalKey = getInternalKey(externalKey);
+
+ //
+ if (internalKey == null)
+ {
+ throw new IllegalArgumentException("The provided key " + externalKey + " was converted to a null key");
+ }
+
+ //
+ return internalKey;
+ }
+
+ private Object wrapKey(Object internalKey) throws IllegalStateException
+ {
+ if (internalKey == null)
+ {
+ throw new IllegalStateException("Got an internal null key");
+ }
+
+ //
+ Object externalKey = getExternalKey(internalKey);
+
+ //
+ if (externalKey == null)
+ {
+ throw new IllegalStateException("Converted an internal key to a null key " + internalKey);
+ }
+
+ //
+ return externalKey;
+ }
+
+ /**
* Unwrap the value to the the internal value that will be stored in the map.
*
* @param value the value to unwrap
* @return the unwrapped value
* @throws ClassCastException if the class of the specified value prevents it from being stored in this map
- * @throws IllegalArgumentException if some aspect of this key prevents it from being stored in this map
+ * @throws IllegalArgumentException if some aspect of this value prevents it from being stored in this map
*/
- protected abstract Object getInternalValue(Object value) throws IllegalArgumentException, ClassCastException;
+ protected Object getInternalValue(Object value) throws IllegalArgumentException, ClassCastException
+ {
+ return value;
+ }
/**
* Wrap the internal value into its external representation.
*/
- protected abstract Object getExternalValue(Object value);
-
- private void validateKey(Object key)
+ protected Object getExternalValue(Object value)
{
- if (key == null)
- {
- throw new NullPointerException("No null value accepted");
- }
- assertKeyValidity(key);
+ return value;
}
- private Object unwrapValue(Object value) throws IllegalArgumentException, ClassCastException, NullPointerException
+ private Object unwrapValue(Object externalValue) throws IllegalArgumentException, ClassCastException, NullPointerException
{
- if (value == null)
+ if (externalValue == null)
{
throw new NullPointerException("No null value accepted");
}
//
- value = getInternalValue(value);
- if (value == null)
+ Object internalValue = getInternalValue(externalValue);
+
+ //
+ if (internalValue == null)
{
- throw new IllegalArgumentException("The provided value " + value + " was converted to a null value");
+ throw new IllegalArgumentException("The provided value " + externalValue + " was converted to a null value");
}
//
- return value;
+ return internalValue;
}
- private Object wrapValue(Object value) throws IllegalStateException
+ private Object wrapValue(Object internalValue) throws IllegalStateException
{
- if (value == null)
+ if (internalValue == null)
{
- return null;
+ throw new IllegalStateException("Received an internal null value");
}
//
- Object wrappedValue = getExternalValue(value);
- if (wrappedValue == null)
+ Object externalValue = getExternalValue(internalValue);
+
+ //
+ if (externalValue == null)
{
- throw new IllegalStateException("Converted an internal value to a null value " + value);
+ throw new IllegalStateException("Converted an internal value to a null value " + internalValue);
}
//
- return wrappedValue;
+ return externalValue;
}
/**
@@ -137,7 +212,7 @@
public boolean containsKey(Object key)
{
- validateKey(key);
+ key = unwrapKey(key);
return getDelegate().containsKey(key);
}
@@ -149,49 +224,45 @@
public Collection values()
{
- throw new NotYetImplemented("TypedMap.values()");
+ return new ValueCollection();
}
public void putAll(Map t)
{
- Map tmp = new HashMap(t);
- validate(tmp, true);
+ t = convert(t);
getDelegate().putAll(t);
}
public Set entrySet()
{
- return new TypedMap.TypedEntrySet(getDelegate().entrySet());
+ return new TypedMap.TypedEntrySet();
}
public Set keySet()
{
- return getDelegate().keySet();
+ return new KeySet();
}
public Object get(Object key)
{
- validateKey(key);
+ key = unwrapKey(key);
Object value = getDelegate().get(key);
- value = wrapValue(value);
- return value;
+ return value == null ? null : wrapValue(value);
}
public Object remove(Object key)
{
- validateKey(key);
+ key = unwrapKey(key);
Object value = getDelegate().remove(key);
- value = wrapValue(value);
- return value;
+ return value == null ? null : wrapValue(value);
}
public Object put(Object key, Object value)
{
- validateKey(key);
+ key = unwrapKey(key);
value = unwrapValue(value);
value = getDelegate().put(key, value);
- value = wrapValue(value);
- return value;
+ return value == null ? null : wrapValue(value);
}
// Overriden methods
@@ -224,29 +295,23 @@
//
try
{
- // We don't support null values
- if (thatValue == null)
- {
- return false;
- }
+ // Unwrap key
+ thatKey = unwrapKey(thatKey);
- // Check key validity
- validateKey(thatKey);
+ // Unwrap value
+ thatValue = unwrapValue(thatValue);
- // Unwrap
- Object thatInternalValue = unwrapValue(thatValue);
-
// Get the internal value
Object internalValue = delegate.get(thatKey);
- // Check the internal value
+ // Check the internal value, it should not be null
if (internalValue == null)
{
return false;
}
// Perform value comparison
- if (internalValueEquals(internalValue, thatInternalValue) == false)
+ if (internalValueEquals(internalValue, thatValue) == false)
{
return false;
}
@@ -285,7 +350,7 @@
*/
public void replace(Map t) throws ClassCastException, NullPointerException, IllegalArgumentException
{
- validate(t, false);
+ t = convert(t);
//
Map delegate = getDelegate();
@@ -302,39 +367,48 @@
*/
public void validate() throws ClassCastException, NullPointerException, IllegalArgumentException
{
- validate(this, false);
+ validate(this);
}
+ public void validate(Map m) throws ClassCastException, NullPointerException, IllegalArgumentException
+ {
+ for (Iterator i = m.entrySet().iterator(); i.hasNext();)
+ {
+ Entry entry = (Entry)i.next();
+ wrapKey(entry.getKey());
+ wrapValue(entry.getValue());
+ }
+ }
+
/**
* Validate the map and unwrap it if necessary.
*/
- protected final void validate(Map t, boolean unwrap) throws IllegalArgumentException, NullPointerException, ClassCastException
+ protected final Map convert(Map t) throws IllegalArgumentException, NullPointerException, ClassCastException
{
if (t == null)
{
throw new NullPointerException("No null map can be accepted");
}
+ Map u = new HashMap(t.size());
for (Iterator i = t.entrySet().iterator(); i.hasNext();)
{
Entry entry = (Entry)i.next();
- validateKey(entry.getKey());
+ Object key = unwrapKey(entry.getKey());
Object value = unwrapValue(entry.getValue());
- if (unwrap)
- {
- entry.setValue(value);
- }
+ u.put(key, value);
}
+ return u;
}
- public class TypedEntrySet implements Set
+ public class ValueCollection implements Collection
{
-
+
/** . */
- private final Set delegate;
+ private final Collection delegate;
- public TypedEntrySet(Set delegate)
+ public ValueCollection()
{
- this.delegate = delegate;
+ this.delegate = getDelegate().values();
}
public int size()
@@ -394,85 +468,315 @@
public Iterator iterator()
{
- return new TypedMap.TypedEntryIterator(delegate.iterator());
+ return new ValueIterator();
}
public Object[] toArray(Object a[])
{
throw new NotYetImplemented("TypedEntrySet.toArray(Object a[])");
}
+
+ public class ValueIterator implements Iterator
+ {
+
+ /** . */
+ private final Iterator delegate;
+
+ public ValueIterator()
+ {
+ this.delegate = ValueCollection.this.delegate.iterator();
+ }
+
+ public void remove()
+ {
+ delegate.remove();
+ }
+
+ public boolean hasNext()
+ {
+ return delegate.hasNext();
+ }
+
+ public Object next()
+ {
+ Object value = delegate.next();
+ value = wrapValue(value);
+ return value;
+ }
+ }
}
- public class TypedEntryIterator implements Iterator
+ public class KeySet implements Set
{
/** . */
- private final Iterator delegate;
+ private final Set delegate;
- public TypedEntryIterator(Iterator delegate)
+ public KeySet()
{
- this.delegate = delegate;
+ this.delegate = getDelegate().keySet();
}
- public void remove()
+ public int size()
{
- delegate.remove();
+ return delegate.size();
}
- public boolean hasNext()
+ public void clear()
{
- return delegate.hasNext();
+ delegate.clear();
}
- public Object next()
+ public boolean isEmpty()
{
- Entry entry = (Entry)delegate.next();
- return new TypedMap.TypedEntry(entry);
+ return delegate.isEmpty();
}
+
+ public boolean contains(Object o)
+ {
+ try
+ {
+ Object key = unwrapKey(o);
+ return getDelegate().containsKey(key);
+ }
+ catch (IllegalArgumentException e)
+ {
+ return false;
+ }
+ catch (ClassCastException e)
+ {
+ return false;
+ }
+ catch (NullPointerException e)
+ {
+ return false;
+ }
+ }
+
+ public Object[] toArray()
+ {
+ throw new NotYetImplemented("TypedEntrySet.toArray()");
+ }
+
+ public boolean add(Object o)
+ {
+ throw new NotYetImplemented("TypedEntrySet.add(Object o)");
+ }
+
+ public boolean remove(Object o)
+ {
+ throw new NotYetImplemented("TypedEntrySet.remove(Object o)");
+ }
+
+ public boolean addAll(Collection c)
+ {
+ throw new NotYetImplemented("TypedEntrySet.addAll(Collection c)");
+ }
+
+ public boolean containsAll(Collection c)
+ {
+ throw new NotYetImplemented("TypedEntrySet.containsAll(Collection c)");
+ }
+
+ public boolean removeAll(Collection c)
+ {
+ throw new NotYetImplemented("TypedEntrySet.removeAll(Collection c)");
+ }
+
+ public boolean retainAll(Collection c)
+ {
+ throw new NotYetImplemented("TypedEntrySet.retainAll(Collection c)");
+ }
+
+ public Iterator iterator()
+ {
+ return new KeyIterator();
+ }
+
+ public Object[] toArray(Object a[])
+ {
+ throw new NotYetImplemented("TypedEntrySet.toArray(Object a[])");
+ }
+
+ public class KeyIterator implements Iterator
+ {
+
+ /** . */
+ private final Iterator delegate;
+
+ public KeyIterator()
+ {
+ this.delegate = KeySet.this.delegate.iterator();
+ }
+
+ public void remove()
+ {
+ delegate.remove();
+ }
+
+ public boolean hasNext()
+ {
+ return delegate.hasNext();
+ }
+
+ public Object next()
+ {
+ Object key = delegate.next();
+ key = wrapKey(key);
+ return key;
+ }
+ }
}
- public class TypedEntry implements Entry
+ public class TypedEntrySet implements Set
{
/** . */
- private final Entry delegate;
+ private final Set delegate;
- public TypedEntry(Entry delegate)
+ public TypedEntrySet()
{
- this.delegate = delegate;
+ this.delegate = getDelegate().entrySet();
}
- public int hashCode()
+ public int size()
{
- return delegate.hashCode();
+ return delegate.size();
}
- public boolean equals(Object obj)
+ public void clear()
{
- return delegate.equals(obj);
+ delegate.clear();
}
- public String toString()
+ public boolean isEmpty()
{
- return delegate.toString();
+ return delegate.isEmpty();
}
- public Object getKey()
+ public Object[] toArray()
{
- return delegate.getKey();
+ throw new NotYetImplemented("TypedEntrySet.toArray()");
}
- public Object getValue()
+ public boolean add(Object o)
{
- Object value = delegate.getValue();
- value = wrapValue(value);
- return value;
+ throw new NotYetImplemented("TypedEntrySet.add(Object o)");
}
- public Object setValue(Object value)
+ public boolean contains(Object o)
{
- value = unwrapValue(value);
- return delegate.setValue(value);
+ throw new NotYetImplemented("TypedEntrySet.contains(Object o)");
}
+
+ public boolean remove(Object o)
+ {
+ throw new NotYetImplemented("TypedEntrySet.remove(Object o)");
+ }
+
+ public boolean addAll(Collection c)
+ {
+ throw new NotYetImplemented("TypedEntrySet.addAll(Collection c)");
+ }
+
+ public boolean containsAll(Collection c)
+ {
+ throw new NotYetImplemented("TypedEntrySet.containsAll(Collection c)");
+ }
+
+ public boolean removeAll(Collection c)
+ {
+ throw new NotYetImplemented("TypedEntrySet.removeAll(Collection c)");
+ }
+
+ public boolean retainAll(Collection c)
+ {
+ throw new NotYetImplemented("TypedEntrySet.retainAll(Collection c)");
+ }
+
+ public Iterator iterator()
+ {
+ return new TypedEntryIterator();
+ }
+
+ public Object[] toArray(Object a[])
+ {
+ throw new NotYetImplemented("TypedEntrySet.toArray(Object a[])");
+ }
+
+ public class TypedEntryIterator implements Iterator
+ {
+
+ /** . */
+ private final Iterator delegate;
+
+ public TypedEntryIterator()
+ {
+ this.delegate = TypedEntrySet.this.delegate.iterator();
+ }
+
+ public void remove()
+ {
+ delegate.remove();
+ }
+
+ public boolean hasNext()
+ {
+ return delegate.hasNext();
+ }
+
+ public Object next()
+ {
+ Entry entry = (Entry)delegate.next();
+ return new TypedEntry(entry);
+ }
+ }
+
+ public class TypedEntry implements Entry
+ {
+
+ /** . */
+ private final Entry delegate;
+
+ public TypedEntry(Entry delegate)
+ {
+ this.delegate = delegate;
+ }
+
+ public int hashCode()
+ {
+ return delegate.hashCode();
+ }
+
+ public boolean equals(Object obj)
+ {
+ return delegate.equals(obj);
+ }
+
+ public String toString()
+ {
+ return delegate.toString();
+ }
+
+ public Object getKey()
+ {
+ Object key = delegate.getKey();
+ key = wrapKey(key);
+ return key;
+ }
+
+ public Object getValue()
+ {
+ Object value = delegate.getValue();
+ value = wrapValue(value);
+ return value;
+ }
+
+ public Object setValue(Object value)
+ {
+ value = unwrapValue(value);
+ return delegate.setValue(value);
+ }
+ }
}
}
Added: trunk/core/src/main/org/jboss/portal/core/impl/model/content/AbstractContent.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/impl/model/content/AbstractContent.java (rev 0)
+++ trunk/core/src/main/org/jboss/portal/core/impl/model/content/AbstractContent.java 2007-03-08 21:55:40 UTC (rev 6605)
@@ -0,0 +1,79 @@
+/******************************************************************************
+ * 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.model.content;
+
+import org.jboss.portal.core.model.content.Content;
+import org.jboss.portal.core.model.content.spi.ContentState;
+
+import java.util.Iterator;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public abstract class AbstractContent implements Content
+{
+
+ /** . */
+ protected final ContentState state;
+
+ public AbstractContent(ContentState state)
+ {
+ this.state = state;
+ }
+
+ public boolean isMutable()
+ {
+ return true;
+ }
+
+ public String getURI()
+ {
+ return state.getURI();
+ }
+
+ public void setURI(String uri)
+ {
+ state.setURI(uri);
+ }
+
+ public void clearParameters()
+ {
+ state.clearParameters();
+ }
+
+ public String getParameter(String name) throws IllegalArgumentException
+ {
+ return state.getParameter(name);
+ }
+
+ public void setParameter(String name, String value) throws IllegalArgumentException
+ {
+ state.setParameter(name, value);
+ }
+
+ public Iterator getParameterNames()
+ {
+ return state.getParameterNames();
+ }
+}
Modified: trunk/core/src/main/org/jboss/portal/core/impl/model/content/generic/GenericContent.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/impl/model/content/generic/GenericContent.java 2007-03-08 20:14:20 UTC (rev 6604)
+++ trunk/core/src/main/org/jboss/portal/core/impl/model/content/generic/GenericContent.java 2007-03-08 21:55:40 UTC (rev 6605)
@@ -22,9 +22,8 @@
******************************************************************************/
package org.jboss.portal.core.impl.model.content.generic;
-import org.jboss.portal.core.model.content.Content;
import org.jboss.portal.core.model.content.spi.ContentState;
-import org.jboss.portal.core.impl.model.content.portlet.PortletContentHandler;
+import org.jboss.portal.core.impl.model.content.AbstractContent;
import org.jboss.portal.common.util.LocalizedString;
import java.util.Locale;
@@ -33,42 +32,16 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-public class GenericContent implements Content
+public class GenericContent extends AbstractContent
{
- /** . */
- private final ContentState state;
-
- /** . */
- private final GenericContentHandler handler;
-
- /** . */
- private final String contextId;
-
- public GenericContent(GenericContentHandler handler, String contextId, ContentState state)
+ public GenericContent(ContentState state)
{
- this.handler = handler;
- this.contextId = contextId;
- this.state = state;
+ super(state);
}
public LocalizedString getDisplayName()
{
return new LocalizedString(state.getURI() + " portlet", Locale.ENGLISH);
}
-
- public boolean isMutable()
- {
- return true;
- }
-
- public String getURI()
- {
- return state.getURI();
- }
-
- public void setURI(String uri)
- {
- state.setURI(uri);
- }
}
Modified: trunk/core/src/main/org/jboss/portal/core/impl/model/content/generic/GenericContentHandler.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/impl/model/content/generic/GenericContentHandler.java 2007-03-08 20:14:20 UTC (rev 6604)
+++ trunk/core/src/main/org/jboss/portal/core/impl/model/content/generic/GenericContentHandler.java 2007-03-08 21:55:40 UTC (rev 6605)
@@ -35,6 +35,6 @@
{
public Content newContent(String contextId, ContentState state)
{
- return new GenericContent(this, contextId, state);
+ return new GenericContent(state);
}
}
Modified: trunk/core/src/main/org/jboss/portal/core/impl/model/content/portlet/PortletContent.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/impl/model/content/portlet/PortletContent.java 2007-03-08 20:14:20 UTC (rev 6604)
+++ trunk/core/src/main/org/jboss/portal/core/impl/model/content/portlet/PortletContent.java 2007-03-08 21:55:40 UTC (rev 6605)
@@ -22,8 +22,8 @@
******************************************************************************/
package org.jboss.portal.core.impl.model.content.portlet;
-import org.jboss.portal.core.model.content.Content;
import org.jboss.portal.core.model.content.spi.ContentState;
+import org.jboss.portal.core.impl.model.content.AbstractContent;
import org.jboss.portal.common.util.LocalizedString;
import java.util.Locale;
@@ -32,23 +32,20 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-public class PortletContent implements Content
+public class PortletContent extends AbstractContent
{
/** . */
- private final ContentState state;
+ private final String contextId;
/** . */
private final PortletContentHandler handler;
- /** . */
- private final String contextId;
-
public PortletContent(PortletContentHandler handler, String contextId, ContentState state)
{
- this.handler = handler;
+ super(state);
this.contextId = contextId;
- this.state = state;
+ this.handler = handler;
}
public LocalizedString getDisplayName()
@@ -56,50 +53,27 @@
return new LocalizedString(state.getURI() + " portlet", Locale.ENGLISH);
}
- public ContentState getState()
+ public void setURI(String uri)
{
- return state;
- }
+ String currentInstanceRef = state.getURI();
- public boolean isMutable()
- {
- return true;
- }
+ //
+ if (currentInstanceRef != null && currentInstanceRef.equals(uri) == false)
+ {
+ handler.contentDestroyed(contextId, state);
+ }
- public String getURI()
- {
- return getInstanceRef();
+ //
+ state.setURI(uri);
}
- public void setURI(String uri)
- {
- setInstanceRef(uri);
- }
-
- /**
- *
- * @return
- */
public String getInstanceRef()
{
- return state.getURI();
+ return getURI();
}
- /**
- *
- * @param instanceRef
- */
public void setInstanceRef(String instanceRef)
{
- String currentInstanceRef = state.getURI();
-
- //
- if (currentInstanceRef != null && currentInstanceRef.equals(instanceRef) == false)
- {
- handler.contentDestroyed(contextId, state);
- }
-
- //
- state.setURI(instanceRef);
+ setURI(instanceRef);
}
}
Modified: trunk/core/src/main/org/jboss/portal/core/impl/model/portal/WindowImpl.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/impl/model/portal/WindowImpl.java 2007-03-08 20:14:20 UTC (rev 6604)
+++ trunk/core/src/main/org/jboss/portal/core/impl/model/portal/WindowImpl.java 2007-03-08 21:55:40 UTC (rev 6605)
@@ -31,6 +31,10 @@
import org.jboss.portal.jems.hibernate.ContextObject;
import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+import java.util.Iterator;
+import java.util.HashSet;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -179,28 +183,6 @@
instanceRef = uri;
}
- public void setProperty(String name, String value)
- {
- if (name == null)
- {
- throw new IllegalArgumentException("No null name accepted");
- }
- if (name.startsWith("content.") == false)
- {
- throw new IllegalArgumentException("Property name must be prefixed by 'content.'");
- }
- setDeclaredProperty(name, value);
- }
-
- public String getProperty(String name)
- {
- if (name == null)
- {
- throw new IllegalArgumentException("No null name accepted");
- }
- return getDeclaredProperty(name);
- }
-
private void destroy()
{
ContentHandler handler = getContentHandler();
@@ -241,5 +223,65 @@
//
return handler;
}
+
+ public Iterator getParameterNames()
+ {
+ return new Iterator()
+ {
+ Iterator i = getDeclaredProperties().keySet().iterator();
+ String next;
+ {
+ findNext();
+ }
+ public boolean hasNext()
+ {
+ return next != null;
+ }
+ public Object next()
+ {
+ String tmp = next;
+ findNext();
+ return tmp;
+ }
+ public void remove()
+ {
+ throw new UnsupportedOperationException();
+ }
+ void findNext()
+ {
+ next = null;
+ while (i.hasNext() && next == null)
+ {
+ String propertyName = (String)i.next();
+ if (propertyName.startsWith("content."))
+ {
+ next = propertyName.substring(8);
+ }
+ }
+ }
+ };
+ }
+
+ public void setParameter(String name, String value) throws IllegalArgumentException
+ {
+ setDeclaredProperty("content." + name, value);
+ }
+
+ public String getParameter(String name) throws IllegalArgumentException
+ {
+ return getDeclaredProperty("content." + name);
+ }
+
+ public void clearParameters()
+ {
+ for (Iterator i = getDeclaredProperties().keySet().iterator();i.hasNext();)
+ {
+ String propertyName = (String)i.next();
+ if (propertyName.startsWith("content."))
+ {
+ i.remove();
+ }
+ }
+ }
}
}
Modified: trunk/core/src/main/org/jboss/portal/core/impl/model/portal/content/GenericPortletContentRenderer.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/impl/model/portal/content/GenericPortletContentRenderer.java 2007-03-08 20:14:20 UTC (rev 6604)
+++ trunk/core/src/main/org/jboss/portal/core/impl/model/portal/content/GenericPortletContentRenderer.java 2007-03-08 21:55:40 UTC (rev 6605)
@@ -38,6 +38,7 @@
import java.util.Map;
import java.util.HashMap;
+import java.util.Iterator;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -117,9 +118,21 @@
PortletParametersStateString navigationalState = (PortletParametersStateString)context.getAttribute(RenderWindowCommand.NAVIGATIONAL_STATE_SCOPE, windowId);
if (navigationalState == null)
{
+ navigationalState = new PortletParametersStateString();
+
+ //
+ for (Iterator i = content.getParameterNames();i.hasNext();)
+ {
+ String paramName = (String)i.next();
+ String paramValue = content.getParameter(paramName);
+ navigationalState.setValue(paramName, paramValue);
+ }
+
+ //
String uri = content.getURI();
- navigationalState = new PortletParametersStateString();
navigationalState.setValue("uri", uri);
+
+ //
context.setAttribute(RenderWindowCommand.NAVIGATIONAL_STATE_SCOPE, windowId, navigationalState);
}
Modified: trunk/core/src/main/org/jboss/portal/core/impl/portlet/state/PersistentRegistration.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/impl/portlet/state/PersistentRegistration.java 2007-03-08 20:14:20 UTC (rev 6604)
+++ trunk/core/src/main/org/jboss/portal/core/impl/portlet/state/PersistentRegistration.java 2007-03-08 21:55:40 UTC (rev 6605)
@@ -257,24 +257,16 @@
return persistentProperties;
}
- protected void assertKeyValidity(Object key) throws ClassCastException, NullPointerException
+ protected void assertKeyValidity(Object key) throws ClassCastException
{
- if (key == null)
- {
- throw new NullPointerException();
- }
if (key instanceof QName == false)
{
throw new ClassCastException();
}
}
- protected Object getInternalValue(Object value) throws IllegalArgumentException, ClassCastException, NullPointerException
+ protected Object getInternalValue(Object value) throws ClassCastException
{
- if (value == null)
- {
- throw new NullPointerException();
- }
if (value instanceof String == false)
{
throw new ClassCastException();
@@ -282,11 +274,6 @@
return value;
}
- protected Object getExternalValue(Object value)
- {
- return value;
- }
-
public void setProperty(String propertyName, Object value)
{
if (propertyName == null)
Modified: trunk/core/src/main/org/jboss/portal/core/model/content/Content.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/model/content/Content.java 2007-03-08 20:14:20 UTC (rev 6604)
+++ trunk/core/src/main/org/jboss/portal/core/model/content/Content.java 2007-03-08 21:55:40 UTC (rev 6605)
@@ -24,6 +24,11 @@
import org.jboss.portal.common.util.LocalizedString;
+import java.util.Map;
+import java.util.Set;
+import java.util.Collection;
+import java.util.Iterator;
+
/**
* Defines the base interface for content.
*
@@ -60,4 +65,12 @@
* @throws IllegalStateException if the content cannot be changed for some reason
*/
void setURI(String uri) throws IllegalStateException;
+
+ Iterator getParameterNames();
+
+ void setParameter(String name, String value) throws IllegalArgumentException;
+
+ String getParameter(String name) throws IllegalArgumentException;
+
+ void clearParameters();
}
Modified: trunk/core/src/main/org/jboss/portal/core/model/content/spi/ContentState.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/model/content/spi/ContentState.java 2007-03-08 20:14:20 UTC (rev 6604)
+++ trunk/core/src/main/org/jboss/portal/core/model/content/spi/ContentState.java 2007-03-08 21:55:40 UTC (rev 6605)
@@ -22,6 +22,8 @@
******************************************************************************/
package org.jboss.portal.core.model.content.spi;
+import java.util.Iterator;
+
/**
* Represents the state of the content which consist in an URI and a set of properties.
*
@@ -39,25 +41,16 @@
/**
* Set the URI value.
+ *
+ * @param uri the URI
*/
void setURI(String uri);
- /**
- * Set a content property, the property name must be prefixed by the litteral 'content.'.
- *
- * @param name the property name
- * @param value the property value
- * @throws IllegalArgumentException if the name is null or is not prefixed by the litteral 'content.'.
- */
- void setProperty(String name, String value) throws IllegalArgumentException;
+ Iterator getParameterNames();
- /**
- * Return a property of the content state.
- *
- * @param name the property name
- * @return the property value or null if it does not exist
- * @throws IllegalArgumentException if the name is null or is not prefixed by the litteral 'content.'.
- * @see #setProperty(String, String)
- */
- String getProperty(String name) throws IllegalArgumentException;
+ void setParameter(String name, String value) throws IllegalArgumentException;
+
+ String getParameter(String name) throws IllegalArgumentException;
+
+ void clearParameters();
}
Modified: trunk/core/src/main/org/jboss/portal/test/core/model/content/NullContent.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/test/core/model/content/NullContent.java 2007-03-08 20:14:20 UTC (rev 6604)
+++ trunk/core/src/main/org/jboss/portal/test/core/model/content/NullContent.java 2007-03-08 21:55:40 UTC (rev 6605)
@@ -22,8 +22,8 @@
******************************************************************************/
package org.jboss.portal.test.core.model.content;
-import org.jboss.portal.core.model.content.Content;
import org.jboss.portal.core.model.content.spi.ContentState;
+import org.jboss.portal.core.impl.model.content.AbstractContent;
import org.jboss.portal.common.util.LocalizedString;
import java.util.Locale;
@@ -32,26 +32,18 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-public class NullContent implements Content
+public class NullContent extends AbstractContent
{
/** . */
- private String contextId;
+ private final String contextId;
- /** . */
- private ContentState state;
-
public NullContent(String contextId, ContentState state)
{
+ super(state);
this.contextId = contextId;
- this.state = state;
}
- public boolean isMutable()
- {
- return true;
- }
-
public String getContextId()
{
return contextId;
@@ -66,14 +58,4 @@
{
return new LocalizedString("Null content", Locale.ENGLISH);
}
-
- public String getURI()
- {
- return state.getURI();
- }
-
- public void setURI(String uri)
- {
- state.setURI(uri);
- }
}
Modified: trunk/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectContainerTestCase.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectContainerTestCase.java 2007-03-08 20:14:20 UTC (rev 6604)
+++ trunk/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectContainerTestCase.java 2007-03-08 21:55:40 UTC (rev 6605)
@@ -316,7 +316,7 @@
assertNotNull(content);
ContentState contentState = content.getState();
assertNotNull(contentState);
- contentState.setProperty("content.abc", "def");
+ contentState.setParameter("abc", "def");
TransactionAssert.commitTransaction();
//
@@ -340,7 +340,7 @@
assertNotNull(content);
contentState = content.getState();
assertNotNull(contentState);
- assertEquals("def", contentState.getProperty("content.abc"));
+ assertEquals("def", contentState.getParameter("abc"));
TransactionAssert.commitTransaction();
}
Modified: trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java 2007-03-08 20:14:20 UTC (rev 6604)
+++ trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java 2007-03-08 21:55:40 UTC (rev 6605)
@@ -115,6 +115,9 @@
private String selectedContentURI;
/** . */
+ private Map selectedContentParameters = new HashMap();
+
+ /** . */
private Map renderParameters;
// Runtime state
@@ -287,6 +290,16 @@
this.renderParameters = renderParameters;
}
+ public Map getSelectedContentParameters()
+ {
+ return selectedContentParameters;
+ }
+
+ public void setSelectedContentParameters(Map selectedContentParameters)
+ {
+ this.selectedContentParameters = selectedContentParameters;
+ }
+
// Runtime state
public AbstractAuthorizationBean getAuth()
@@ -641,6 +654,18 @@
break;
case PortalObject.TYPE_PAGE:
selectedContentURI = uri;
+ selectedContentParameters.clear();
+ for (Iterator i = actionParams.entrySet().iterator();i.hasNext();)
+ {
+ Map.Entry entry = (Map.Entry)i.next();
+ String name = (String)entry.getKey();
+ if (name.startsWith("param."))
+ {
+ String paramName = name.substring(6);
+ String paramValue = ((String[])entry.getValue())[0];
+ selectedContentParameters.put(paramName, paramValue);
+ }
+ }
break;
}
Modified: trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/AssignWindowsAction.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/AssignWindowsAction.java 2007-03-08 20:14:20 UTC (rev 6604)
+++ trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/AssignWindowsAction.java 2007-03-08 21:55:40 UTC (rev 6605)
@@ -25,6 +25,7 @@
import org.jboss.portal.faces.el.dynamic.DynamicBean;
import org.jboss.portal.faces.el.PropertyValue;
import org.jboss.portal.core.model.content.ContentType;
+import org.jboss.portal.core.model.content.Content;
import org.jboss.portal.core.model.portal.Window;
import org.jboss.portal.core.model.portal.Page;
import org.jboss.portal.core.model.portal.NoSuchPortalObjectException;
@@ -173,11 +174,26 @@
{
ContentType contentType = pomgr.getSelectedContentType();
String contentURI = pomgr.getSelectedContentURI();
+ Map contentParameters = pomgr.getSelectedContentParameters();
//
Window window = page.createWindow(windowName, contentType, contentURI);
+
+ //
+ Content content = window.getContent();
+ for (Iterator i = contentParameters.entrySet().iterator();i.hasNext();)
+ {
+ Map.Entry entry = (Map.Entry)i.next();
+ String paramName = (String)entry.getKey();
+ String paramValue = (String)entry.getValue();
+ content.setParameter(paramName, paramValue);
+ }
+
+ //
window.setDeclaredProperty(ThemeConstants.PORTAL_PROP_REGION, regionName);
window.setDeclaredProperty(ThemeConstants.PORTAL_PROP_ORDER, "" + Integer.MAX_VALUE);
+
+ //
windows.add(window);
}
catch (DuplicatePortalObjectException unexpected)
Modified: trunk/core-cms/src/main/org/jboss/portal/core/cms/content/CMSContent.java
===================================================================
--- trunk/core-cms/src/main/org/jboss/portal/core/cms/content/CMSContent.java 2007-03-08 20:14:20 UTC (rev 6604)
+++ trunk/core-cms/src/main/org/jboss/portal/core/cms/content/CMSContent.java 2007-03-08 21:55:40 UTC (rev 6605)
@@ -22,8 +22,8 @@
******************************************************************************/
package org.jboss.portal.core.cms.content;
-import org.jboss.portal.core.model.content.Content;
import org.jboss.portal.core.model.content.spi.ContentState;
+import org.jboss.portal.core.impl.model.content.AbstractContent;
import org.jboss.portal.common.util.LocalizedString;
import java.util.Locale;
@@ -32,42 +32,16 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-public class CMSContent implements Content
+public class CMSContent extends AbstractContent
{
- /** . */
- private final ContentState state;
-
public CMSContent(ContentState state)
{
- this.state = state;
+ super(state);
}
public LocalizedString getDisplayName()
{
return new LocalizedString(state.getURI() + " cms", Locale.ENGLISH);
}
-
- public boolean isMutable()
- {
- return true;
- }
-
- /**
- *
- * @return
- */
- public String getURI()
- {
- return state.getURI();
- }
-
- /**
- *
- * @param uri
- */
- public void setURI(String uri)
- {
- state.setURI(uri);
- }
}
Modified: trunk/portlet/src/main/org/jboss/portal/portlet/PortletParameters.java
===================================================================
--- trunk/portlet/src/main/org/jboss/portal/portlet/PortletParameters.java 2007-03-08 20:14:20 UTC (rev 6604)
+++ trunk/portlet/src/main/org/jboss/portal/portlet/PortletParameters.java 2007-03-08 21:55:40 UTC (rev 6605)
@@ -110,7 +110,7 @@
*/
public void append(Map params) throws ClassCastException, NullPointerException, IllegalArgumentException
{
- validate(params, false);
+ validate(params);
//
internalAppend(params);
Modified: trunk/portlet/src/main/org/jboss/portal/portlet/state/AbstractPropertyMap.java
===================================================================
--- trunk/portlet/src/main/org/jboss/portal/portlet/state/AbstractPropertyMap.java 2007-03-08 20:14:20 UTC (rev 6604)
+++ trunk/portlet/src/main/org/jboss/portal/portlet/state/AbstractPropertyMap.java 2007-03-08 21:55:40 UTC (rev 6605)
@@ -38,15 +38,10 @@
/**
* Only accept non null string objects.
*
- * @throws NullPointerException if the value is null
* @throws ClassCastException if the value is not an instance of string
*/
protected void assertKeyValidity(Object value)
{
- if (value == null)
- {
- throw new ClassCastException("Key must not be null");
- }
if (value instanceof String == false)
{
throw new ClassCastException("Key must be a String");
Modified: trunk/widget/src/main/org/jboss/portal/widget/Widget.java
===================================================================
--- trunk/widget/src/main/org/jboss/portal/widget/Widget.java 2007-03-08 20:14:20 UTC (rev 6604)
+++ trunk/widget/src/main/org/jboss/portal/widget/Widget.java 2007-03-08 21:55:40 UTC (rev 6605)
@@ -24,6 +24,8 @@
import org.jboss.portal.common.util.LocalizedString;
+import java.util.Map;
+
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
@@ -37,6 +39,6 @@
LocalizedString getDescription();
- String render();
+ String render(Map parameters);
}
Modified: trunk/widget/src/main/org/jboss/portal/widget/WidgetPortlet.java
===================================================================
--- trunk/widget/src/main/org/jboss/portal/widget/WidgetPortlet.java 2007-03-08 20:14:20 UTC (rev 6604)
+++ trunk/widget/src/main/org/jboss/portal/widget/WidgetPortlet.java 2007-03-08 21:55:40 UTC (rev 6605)
@@ -77,7 +77,7 @@
Widget widget = provider.getWidget(uri);
if (widget != null)
{
- writer.print(widget.render());
+ writer.print(widget.render(req.getParameterMap()));
}
else
{
@@ -105,7 +105,7 @@
writer.println("<p><a href=\"" + selectURL + "\">Select</a> widget</p>");
// Prefs
- writer.println("<from>");
+ writer.println("<form action=\"" + selectURL + "\" method=\"post\">");
for (Iterator i = widget.getPreferencesInfo().getPreferencesInfo().iterator();i.hasNext();)
{
GGPreferenceInfo prefInfo = (GGPreferenceInfo)i.next();
@@ -115,9 +115,11 @@
// Todo
break;
default:
- writer.println("<div>" + prefInfo.getName() + ": <input type=\"text\" name=\"" + prefInfo.getName() + "\"/></div>");
+ writer.println("<div>" + prefInfo.getName() + ": <input type=\"text\" name=\"param." + prefInfo.getName() + "\"" +
+ (prefInfo.getDefaultValue() != null ? (" value=\"" + prefInfo.getDefaultValue() + "\"") : "") + "/></div>");
}
}
+ writer.println("<input type=\"submit\"/>");
writer.println("</form>");
}
}
Modified: trunk/widget/src/main/org/jboss/portal/widget/google/GGWidget.java
===================================================================
--- trunk/widget/src/main/org/jboss/portal/widget/google/GGWidget.java 2007-03-08 20:14:20 UTC (rev 6604)
+++ trunk/widget/src/main/org/jboss/portal/widget/google/GGWidget.java 2007-03-08 21:55:40 UTC (rev 6605)
@@ -27,6 +27,7 @@
import org.jboss.portal.widget.Widget;
import java.util.Iterator;
+import java.util.Map;
/**
* Getting list :
@@ -134,7 +135,7 @@
return description;
}
- public String render()
+ public String render(Map parameters)
{
String id = generator.generateKey();
StringBuffer tmp = new StringBuffer("http://gmodules.com/ig/ifr?url=").append(url);
@@ -151,7 +152,9 @@
for (Iterator i = prefsInfo.getPreferencesInfo().iterator();i.hasNext();)
{
GGPreferenceInfo prefInfo = (GGPreferenceInfo)i.next();
- if (prefInfo.getDefaultValue() != null)
+ String[] values = (String[])parameters.get(prefInfo.getName());
+ String value = values != null ? values[0] : prefInfo.getDefaultValue();
+ if (value != null)
{
tmp.append("&_up").append(prefInfo.getName()).append("=").append(prefInfo.getDefaultValue());
}
17 years, 4 months
JBoss Portal SVN: r6604 - trunk/identity/src/resources/example.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-03-08 15:14:20 -0500 (Thu, 08 Mar 2007)
New Revision: 6604
Modified:
trunk/identity/src/resources/example/portal-sample-local.ldif
Log:
- correct to example ldif
Modified: trunk/identity/src/resources/example/portal-sample-local.ldif
===================================================================
--- trunk/identity/src/resources/example/portal-sample-local.ldif 2007-03-08 20:04:02 UTC (rev 6603)
+++ trunk/identity/src/resources/example/portal-sample-local.ldif 2007-03-08 20:14:20 UTC (rev 6604)
@@ -7,8 +7,10 @@
dn: dc=portal,dc=example,dc=com
objectclass: top
+objectclass: dcObject
objectclass: organization
o: portal
+dc: portal
dn: o=test,dc=portal,dc=example,dc=com
objectclass: top
17 years, 4 months
JBoss Portal SVN: r6603 - in trunk: identity/src/resources/test/config and 7 other directories.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-03-08 15:04:02 -0500 (Thu, 08 Mar 2007)
New Revision: 6603
Added:
trunk/test/src/etc/ldap/ldif/initial-tests-notpopulated-opends.ldif
trunk/test/src/etc/ldap/ldif/initial-tests-notpopulated.ldif
trunk/test/src/etc/ldap/ldif/initial-tests-qa-opends.ldif
Removed:
trunk/test/src/etc/ldap/ldif/initial-tests-notpopulated.ldif
Modified:
trunk/identity/src/resources/example/portal-sample-local.ldif
trunk/identity/src/resources/test/config/extrole/opends-config.xml
trunk/identity/src/resources/test/config/extuser/opends-config.xml
trunk/identity/src/resources/test/config/identity/opends-config-staticrole.xml
trunk/identity/src/resources/test/config/identity/opends-config.xml
trunk/identity/src/resources/test/config/opends-config.xml
trunk/identity/src/resources/test/config/staticrole/opends-config.xml
trunk/test/src/etc/directories-extrolemodule.xml
trunk/test/src/etc/directories-extusermodule.xml
trunk/test/src/etc/directories-identity.xml
trunk/test/src/etc/directories-simplerolemodule.xml
trunk/test/src/etc/directories-simpleusermodule.xml
trunk/test/src/etc/directories-staticgroupmembership.xml
trunk/test/src/etc/directories-staticrolemembership.xml
trunk/test/src/etc/directories-userprofilemodule.xml
trunk/test/src/etc/directories.xml
trunk/test/src/etc/opends/config/config.ldif
Log:
- change root suffix for OpenDS
Modified: trunk/identity/src/resources/example/portal-sample-local.ldif
===================================================================
--- trunk/identity/src/resources/example/portal-sample-local.ldif 2007-03-08 14:56:49 UTC (rev 6602)
+++ trunk/identity/src/resources/example/portal-sample-local.ldif 2007-03-08 20:04:02 UTC (rev 6603)
@@ -1,15 +1,27 @@
-dn: o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+dn: dc=example,dc=com
objectclass: top
+objectclass: dcObject
objectclass: organization
+dc: example
+o: example
+
+dn: dc=portal,dc=example,dc=com
+objectclass: top
+objectclass: organization
+o: portal
+
+dn: o=test,dc=portal,dc=example,dc=com
+objectclass: top
+objectclass: organization
o: test
-dn: ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+dn: ou=People,o=test,dc=portal,dc=example,dc=com
objectclass: top
objectclass: organizationalUnit
ou: People
-dn: uid=admin,ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+dn: uid=admin,ou=People,o=test,dc=portal,dc=example,dc=com
objectclass: top
objectclass: inetOrgPerson
objectclass: person
@@ -19,7 +31,7 @@
userPassword: admin
mail: email(a)email.com
-dn: uid=user,ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+dn: uid=user,ou=People,o=test,dc=portal,dc=example,dc=com
objectclass: top
objectclass: inetOrgPerson
objectclass: person
@@ -29,7 +41,7 @@
userPassword: user
mail: email(a)email.com
-dn: uid=jduke,ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+dn: uid=jduke,ou=People,o=test,dc=portal,dc=example,dc=com
objectclass: top
objectclass: inetOrgPerson
objectclass: person
@@ -39,7 +51,7 @@
userPassword: theduke
mail: email(a)email.com
-dn: uid=jduke1,ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+dn: uid=jduke1,ou=People,o=test,dc=portal,dc=example,dc=com
objectclass: top
objectclass: inetOrgPerson
objectclass: person
@@ -50,7 +62,7 @@
mail: email(a)email.com
-dn: uid=jduke2,ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+dn: uid=jduke2,ou=People,o=test,dc=portal,dc=example,dc=com
objectclass: top
objectclass: inetOrgPerson
objectclass: person
@@ -60,7 +72,7 @@
userPassword: theduke
mail: email(a)email.com
-dn: uid=jduke3,ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+dn: uid=jduke3,ou=People,o=test,dc=portal,dc=example,dc=com
objectclass: top
objectclass: inetOrgPerson
objectclass: person
@@ -70,7 +82,7 @@
userPassword: theduke
mail: email(a)email.com
-dn: uid=jduke4,ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+dn: uid=jduke4,ou=People,o=test,dc=portal,dc=example,dc=com
objectclass: top
objectclass: inetOrgPerson
objectclass: person
@@ -80,53 +92,53 @@
userPassword: theduke
mail: email(a)email.com
-dn: ou=Roles,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+dn: ou=Roles,o=test,dc=portal,dc=example,dc=com
objectclass: top
objectclass: organizationalUnit
ou: Roles
-dn: cn=Admin,ou=Roles,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+dn: cn=Admin,ou=Roles,o=test,dc=portal,dc=example,dc=com
objectClass: top
objectClass: groupOfNames
cn: Admin
description: Portal admin role
-member: uid=admin,ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+member: uid=admin,ou=People,o=test,dc=portal,dc=example,dc=com
-dn: cn=User,ou=Roles,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+dn: cn=User,ou=Roles,o=test,dc=portal,dc=example,dc=com
objectClass: top
objectClass: groupOfNames
cn: User
description: Portal user role
-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
+member: uid=admin,ou=People,o=test,dc=portal,dc=example,dc=com
+member: uid=user,ou=People,o=test,dc=portal,dc=example,dc=com
+member: uid=jduke,ou=People,o=test,dc=portal,dc=example,dc=com
+member: uid=jduke1,ou=People,o=test,dc=portal,dc=example,dc=com
+member: uid=jduke2,ou=People,o=test,dc=portal,dc=example,dc=com
+member: uid=jduke3,ou=People,o=test,dc=portal,dc=example,dc=com
+member: uid=jduke4,ou=People,o=test,dc=portal,dc=example,dc=com
-dn: cn=Echo,ou=Roles,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+dn: cn=Echo,ou=Roles,o=test,dc=portal,dc=example,dc=com
objectClass: top
objectClass: groupOfNames
cn: Echo
description: the JBossAdmin group
-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
+member: uid=jduke1,ou=People,o=test,dc=portal,dc=example,dc=com
+member: uid=jduke3,ou=People,o=test,dc=portal,dc=example,dc=com
+member: uid=jduke4,ou=People,o=test,dc=portal,dc=example,dc=com
-dn: cn=Echo1,ou=Roles,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+dn: cn=Echo1,ou=Roles,o=test,dc=portal,dc=example,dc=com
objectClass: top
objectClass: groupOfNames
cn: Echo1
description: the JBossAdmin group 2
-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=jduke2,ou=People,o=test,dc=portal,dc=example,dc=com
+member: uid=jduke3,ou=People,o=test,dc=portal,dc=example,dc=com
-dn: cn=TheDuke,ou=Roles,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+dn: cn=TheDuke,ou=Roles,o=test,dc=portal,dc=example,dc=com
objectClass: groupOfNames
objectClass: top
cn: TheDuke
description: TheDuke role context
-member: uid=jduke,ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
\ No newline at end of file
+member: uid=jduke,ou=People,o=test,dc=portal,dc=example,dc=com
\ No newline at end of file
Modified: trunk/identity/src/resources/test/config/extrole/opends-config.xml
===================================================================
--- trunk/identity/src/resources/test/config/extrole/opends-config.xml 2007-03-08 14:56:49 UTC (rev 6602)
+++ trunk/identity/src/resources/test/config/extrole/opends-config.xml 2007-03-08 20:04:02 UTC (rev 6603)
@@ -101,7 +101,7 @@
<group-name>common</group-name>
<option>
<name>userCtxDN</name>
- <value>ou=People,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
+ <value>ou=People,dc=example,dc=com</value>
</option>
<option>
<name>userSearchFilter</name>
@@ -109,7 +109,7 @@
</option>
<option>
<name>roleCtxDN</name>
- <value>ou=Roles,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
+ <value>ou=Roles,dc=example,dc=com</value>
</option>
<option>
<name>roleSearchFilter</name>
@@ -131,7 +131,7 @@
<!--For safety reasons point to the admin user here-->
<option>
<name>member</name>
- <value>uid=admin,ou=People,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
+ <value>uid=admin,ou=People,dc=example,dc=com</value>
</option>
</option-group>
</options>
Modified: trunk/identity/src/resources/test/config/extuser/opends-config.xml
===================================================================
--- trunk/identity/src/resources/test/config/extuser/opends-config.xml 2007-03-08 14:56:49 UTC (rev 6602)
+++ trunk/identity/src/resources/test/config/extuser/opends-config.xml 2007-03-08 20:04:02 UTC (rev 6603)
@@ -100,7 +100,7 @@
<group-name>common</group-name>
<option>
<name>userCtxDN</name>
- <value>ou=People,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
+ <value>ou=People,dc=example,dc=com</value>
</option>
<option>
<name>userSearchFilter</name>
@@ -108,7 +108,7 @@
</option>
<option>
<name>roleCtxDN</name>
- <value>ou=Roles,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
+ <value>ou=Roles,dc=example,dc=com</value>
</option>
</option-group>
<option-group>
@@ -122,7 +122,7 @@
<!--For safety reasons point to the admin user here-->
<option>
<name>member</name>
- <value>uid=admin,ou=People,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
+ <value>uid=admin,ou=People,dc=example,dc=com</value>
</option>
</option-group>
</options>
Modified: trunk/identity/src/resources/test/config/identity/opends-config-staticrole.xml
===================================================================
--- trunk/identity/src/resources/test/config/identity/opends-config-staticrole.xml 2007-03-08 14:56:49 UTC (rev 6602)
+++ trunk/identity/src/resources/test/config/identity/opends-config-staticrole.xml 2007-03-08 20:04:02 UTC (rev 6603)
@@ -100,11 +100,11 @@
<group-name>common</group-name>
<option>
<name>userCtxDN</name>
- <value>ou=People,o=example2,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
+ <value>ou=People,o=example2,dc=example,dc=com</value>
</option>
<option>
<name>roleCtxDN</name>
- <value>ou=Roles,o=example2,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
+ <value>ou=Roles,o=example2,dc=example,dc=com</value>
</option>
<option>
<name>membershipAttributeID</name>
Modified: trunk/identity/src/resources/test/config/identity/opends-config.xml
===================================================================
--- trunk/identity/src/resources/test/config/identity/opends-config.xml 2007-03-08 14:56:49 UTC (rev 6602)
+++ trunk/identity/src/resources/test/config/identity/opends-config.xml 2007-03-08 20:04:02 UTC (rev 6603)
@@ -99,11 +99,11 @@
<group-name>common</group-name>
<option>
<name>userCtxDN</name>
- <value>ou=People,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
+ <value>ou=People,dc=example,dc=com</value>
</option>
<option>
<name>roleCtxDN</name>
- <value>ou=Roles,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
+ <value>ou=Roles,dc=example,dc=com</value>
</option>
</option-group>
<option-group>
@@ -136,7 +136,7 @@
<!--For safety reasons point to the admin user here-->
<option>
<name>member</name>
- <value>uid=admin,ou=People,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
+ <value>uid=admin,ou=People,dc=example,dc=com</value>
</option>
</option-group>
</options>
Modified: trunk/identity/src/resources/test/config/opends-config.xml
===================================================================
--- trunk/identity/src/resources/test/config/opends-config.xml 2007-03-08 14:56:49 UTC (rev 6602)
+++ trunk/identity/src/resources/test/config/opends-config.xml 2007-03-08 20:04:02 UTC (rev 6603)
@@ -99,11 +99,11 @@
<group-name>common</group-name>
<option>
<name>userCtxDN</name>
- <value>ou=People,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
+ <value>ou=People,dc=example,dc=com</value>
</option>
<option>
<name>roleCtxDN</name>
- <value>ou=Roles,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
+ <value>ou=Roles,dc=example,dc=com</value>
</option>
</option-group>
<option-group>
Modified: trunk/identity/src/resources/test/config/staticrole/opends-config.xml
===================================================================
--- trunk/identity/src/resources/test/config/staticrole/opends-config.xml 2007-03-08 14:56:49 UTC (rev 6602)
+++ trunk/identity/src/resources/test/config/staticrole/opends-config.xml 2007-03-08 20:04:02 UTC (rev 6603)
@@ -100,11 +100,11 @@
<group-name>common</group-name>
<option>
<name>userCtxDN</name>
- <value>ou=People,o=example2,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
+ <value>ou=People,o=example2,dc=example,dc=com</value>
</option>
<option>
<name>roleCtxDN</name>
- <value>ou=Roles,o=example2,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
+ <value>ou=Roles,o=example2,dc=example,dc=com</value>
</option>
<option>
<name>membershipAttributeID</name>
Modified: trunk/test/src/etc/directories-extrolemodule.xml
===================================================================
--- trunk/test/src/etc/directories-extrolemodule.xml 2007-03-08 14:56:49 UTC (rev 6602)
+++ trunk/test/src/etc/directories-extrolemodule.xml 2007-03-08 20:04:02 UTC (rev 6603)
@@ -31,8 +31,8 @@
<context-factory>com.sun.jndi.ldap.LdapCtxFactory</context-factory>
<admin-dn>cn=Directory Manager</admin-dn>
<admin-password>password</admin-password>
- <populate-ldif>ldap/ldif/initial-tests-qa.ldif</populate-ldif>
- <cleanup-dn>dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</cleanup-dn>
+ <populate-ldif>ldap/ldif/initial-tests-qa-opends.ldif</populate-ldif>
+ <cleanup-dn>dc=example,dc=com</cleanup-dn>
</directory>
<!--<directory>
<directory-name>RedHatDS</directory-name>
Modified: trunk/test/src/etc/directories-extusermodule.xml
===================================================================
--- trunk/test/src/etc/directories-extusermodule.xml 2007-03-08 14:56:49 UTC (rev 6602)
+++ trunk/test/src/etc/directories-extusermodule.xml 2007-03-08 20:04:02 UTC (rev 6603)
@@ -31,8 +31,8 @@
<context-factory>com.sun.jndi.ldap.LdapCtxFactory</context-factory>
<admin-dn>cn=Directory Manager</admin-dn>
<admin-password>password</admin-password>
- <populate-ldif>ldap/ldif/initial-tests-qa.ldif</populate-ldif>
- <cleanup-dn>dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</cleanup-dn>
+ <populate-ldif>ldap/ldif/initial-tests-qa-opends.ldif</populate-ldif>
+ <cleanup-dn>dc=example,dc=com</cleanup-dn>
</directory>
<!--<directory>
<directory-name>RedHatDS</directory-name>
Modified: trunk/test/src/etc/directories-identity.xml
===================================================================
--- trunk/test/src/etc/directories-identity.xml 2007-03-08 14:56:49 UTC (rev 6602)
+++ trunk/test/src/etc/directories-identity.xml 2007-03-08 20:04:02 UTC (rev 6603)
@@ -32,8 +32,8 @@
<context-factory>com.sun.jndi.ldap.LdapCtxFactory</context-factory>
<admin-dn>cn=Directory Manager</admin-dn>
<admin-password>password</admin-password>
- <populate-ldif>ldap/ldif/initial-tests-notpopulated.ldif</populate-ldif>
- <cleanup-dn>dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</cleanup-dn>
+ <populate-ldif>ldap/ldif/initial-tests-notpopulated-opends.ldif</populate-ldif>
+ <cleanup-dn>dc=example,dc=com</cleanup-dn>
</directory>
<directory>
<directory-name>OpenDS - StaticRoleMembership</directory-name>
@@ -44,8 +44,8 @@
<context-factory>com.sun.jndi.ldap.LdapCtxFactory</context-factory>
<admin-dn>cn=Directory Manager</admin-dn>
<admin-password>password</admin-password>
- <populate-ldif>ldap/ldif/initial-tests-notpopulated.ldif</populate-ldif>
- <cleanup-dn>dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</cleanup-dn>
+ <populate-ldif>ldap/ldif/initial-tests-notpopulated-opends.ldif</populate-ldif>
+ <cleanup-dn>dc=example,dc=com</cleanup-dn>
</directory>
<directory>
<directory-name>RedHatDS</directory-name>
Modified: trunk/test/src/etc/directories-simplerolemodule.xml
===================================================================
--- trunk/test/src/etc/directories-simplerolemodule.xml 2007-03-08 14:56:49 UTC (rev 6602)
+++ trunk/test/src/etc/directories-simplerolemodule.xml 2007-03-08 20:04:02 UTC (rev 6603)
@@ -33,9 +33,9 @@
<admin-dn>cn=Directory Manager</admin-dn>
<admin-password>password</admin-password>
<!--ldif from which LDAP will be populated before each test-->
- <populate-ldif>ldap/ldif/initial-tests-qa.ldif</populate-ldif>
+ <populate-ldif>ldap/ldif/initial-tests-qa-opends.ldif</populate-ldif>
<!--DN that will be removed to perform cleanup after each test-->
- <cleanup-dn>dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</cleanup-dn>
+ <cleanup-dn>dc=example,dc=com</cleanup-dn>
</directory>
<directory>
<directory-name>RedHatDS</directory-name>
Modified: trunk/test/src/etc/directories-simpleusermodule.xml
===================================================================
--- trunk/test/src/etc/directories-simpleusermodule.xml 2007-03-08 14:56:49 UTC (rev 6602)
+++ trunk/test/src/etc/directories-simpleusermodule.xml 2007-03-08 20:04:02 UTC (rev 6603)
@@ -33,9 +33,9 @@
<admin-dn>cn=Directory Manager</admin-dn>
<admin-password>password</admin-password>
<!--ldif from which LDAP will be populated before each test-->
- <populate-ldif>ldap/ldif/initial-tests-qa.ldif</populate-ldif>
+ <populate-ldif>ldap/ldif/initial-tests-qa-opends.ldif</populate-ldif>
<!--DN that will be removed to perform cleanup after each test-->
- <cleanup-dn>dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</cleanup-dn>
+ <cleanup-dn>dc=example,dc=com</cleanup-dn>
</directory>
<directory>
<directory-name>RedHatDS</directory-name>
Modified: trunk/test/src/etc/directories-staticgroupmembership.xml
===================================================================
--- trunk/test/src/etc/directories-staticgroupmembership.xml 2007-03-08 14:56:49 UTC (rev 6602)
+++ trunk/test/src/etc/directories-staticgroupmembership.xml 2007-03-08 20:04:02 UTC (rev 6603)
@@ -33,9 +33,9 @@
<admin-dn>cn=Directory Manager</admin-dn>
<admin-password>password</admin-password>
<!--ldif from which LDAP will be populated before each test-->
- <populate-ldif>ldap/ldif/initial-tests-qa.ldif</populate-ldif>
+ <populate-ldif>ldap/ldif/initial-tests-qa-opends.ldif</populate-ldif>
<!--DN that will be removed to perform cleanup after each test-->
- <cleanup-dn>dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</cleanup-dn>
+ <cleanup-dn>dc=example,dc=com</cleanup-dn>
</directory>
<directory>
<directory-name>RedHatDS</directory-name>
Modified: trunk/test/src/etc/directories-staticrolemembership.xml
===================================================================
--- trunk/test/src/etc/directories-staticrolemembership.xml 2007-03-08 14:56:49 UTC (rev 6602)
+++ trunk/test/src/etc/directories-staticrolemembership.xml 2007-03-08 20:04:02 UTC (rev 6603)
@@ -33,9 +33,9 @@
<admin-dn>cn=Directory Manager</admin-dn>
<admin-password>password</admin-password>
<!--ldif from which LDAP will be populated before each test-->
- <populate-ldif>ldap/ldif/initial-tests-qa.ldif</populate-ldif>
+ <populate-ldif>ldap/ldif/initial-tests-qa-opends.ldif</populate-ldif>
<!--DN that will be removed to perform cleanup after each test-->
- <cleanup-dn>dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</cleanup-dn>
+ <cleanup-dn>dc=example,dc=com</cleanup-dn>
</directory>
<directory>
<directory-name>RedHatDS</directory-name>
Modified: trunk/test/src/etc/directories-userprofilemodule.xml
===================================================================
--- trunk/test/src/etc/directories-userprofilemodule.xml 2007-03-08 14:56:49 UTC (rev 6602)
+++ trunk/test/src/etc/directories-userprofilemodule.xml 2007-03-08 20:04:02 UTC (rev 6603)
@@ -33,9 +33,9 @@
<admin-dn>cn=Directory Manager</admin-dn>
<admin-password>password</admin-password>
<!--ldif from which LDAP will be populated before each test-->
- <populate-ldif>ldap/ldif/initial-tests-qa.ldif</populate-ldif>
+ <populate-ldif>ldap/ldif/initial-tests-qa-opends.ldif</populate-ldif>
<!--DN that will be removed to perform cleanup after each test-->
- <cleanup-dn>dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</cleanup-dn>
+ <cleanup-dn>dc=example,dc=com</cleanup-dn>
</directory>
<directory>
<directory-name>RedHatDS</directory-name>
Modified: trunk/test/src/etc/directories.xml
===================================================================
--- trunk/test/src/etc/directories.xml 2007-03-08 14:56:49 UTC (rev 6602)
+++ trunk/test/src/etc/directories.xml 2007-03-08 20:04:02 UTC (rev 6603)
@@ -33,11 +33,11 @@
<admin-dn>cn=Directory Manager</admin-dn>
<admin-password>password</admin-password>
<!--ldif from which LDAP will be populated before each test-->
- <populate-ldif>ldap/ldif/initial-tests-qa.ldif</populate-ldif>
+ <populate-ldif>ldap/ldif/initial-tests-qa-opends.ldif</populate-ldif>
<!--DN that will be removed to perform cleanup after each test-->
- <cleanup-dn>dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</cleanup-dn>
+ <cleanup-dn>dc=example,dc=com</cleanup-dn>
</directory>
- <!--<directory>
+ <directory>
<directory-name>RedHatDS</directory-name>
<description>RedHat Directory in QA Labs (need vpn access)</description>
@@ -81,5 +81,5 @@
<populate-ldif>ldap/ldif/initial-tests-qa-openldap.ldif</populate-ldif>
<cleanup-dn>dc=testsuite,dc=portal,dc=my-domain,dc=com</cleanup-dn>
- </directory>-->
+ </directory>
</directories>
Copied: trunk/test/src/etc/ldap/ldif/initial-tests-notpopulated-opends.ldif (from rev 6601, trunk/test/src/etc/ldap/ldif/initial-tests-notpopulated.ldif)
===================================================================
--- trunk/test/src/etc/ldap/ldif/initial-tests-notpopulated-opends.ldif (rev 0)
+++ trunk/test/src/etc/ldap/ldif/initial-tests-notpopulated-opends.ldif 2007-03-08 20:04:02 UTC (rev 6603)
@@ -0,0 +1,35 @@
+dn: dc=example,dc=com
+objectclass: top
+objectclass: dcObject
+objectclass: organization
+dc: example
+o: example
+
+dn: ou=People,dc=example,dc=com
+objectclass: top
+objectclass: organizationalUnit
+ou: People
+
+dn: ou=Roles,dc=example,dc=com
+objectclass: top
+objectclass: organizationalUnit
+ou: Roles
+
+# tree2
+dn: o=example2,dc=example,dc=com
+objectclass: top
+objectclass: organization
+o: example2
+
+dn: ou=People,o=example2,dc=example,dc=com
+objectclass: top
+objectclass: organizationalUnit
+ou: People
+
+dn: ou=Roles,o=example2,dc=example,dc=com
+objectclass: top
+objectclass: organizationalUnit
+ou: Roles
+
+
+
Deleted: trunk/test/src/etc/ldap/ldif/initial-tests-notpopulated.ldif
===================================================================
--- trunk/test/src/etc/ldap/ldif/initial-tests-notpopulated.ldif 2007-03-08 14:56:49 UTC (rev 6602)
+++ trunk/test/src/etc/ldap/ldif/initial-tests-notpopulated.ldif 2007-03-08 20:04:02 UTC (rev 6603)
@@ -1,35 +0,0 @@
-dn: dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
-objectclass: top
-objectclass: dcObject
-objectclass: organization
-dc: testsuite
-o: testsuite
-
-dn: ou=People,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
-objectclass: top
-objectclass: organizationalUnit
-ou: People
-
-dn: ou=Roles,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
-objectclass: top
-objectclass: organizationalUnit
-ou: Roles
-
-# tree2
-dn: o=example2,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
-objectclass: top
-objectclass: organization
-o: example2
-
-dn: ou=People,o=example2,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
-objectclass: top
-objectclass: organizationalUnit
-ou: People
-
-dn: ou=Roles,o=example2,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
-objectclass: top
-objectclass: organizationalUnit
-ou: Roles
-
-
-
Added: trunk/test/src/etc/ldap/ldif/initial-tests-notpopulated.ldif
===================================================================
--- trunk/test/src/etc/ldap/ldif/initial-tests-notpopulated.ldif (rev 0)
+++ trunk/test/src/etc/ldap/ldif/initial-tests-notpopulated.ldif 2007-03-08 20:04:02 UTC (rev 6603)
@@ -0,0 +1,35 @@
+dn: dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+objectclass: top
+objectclass: dcObject
+objectclass: organization
+dc: testsuite
+o: testsuite
+
+dn: ou=People,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+objectclass: top
+objectclass: organizationalUnit
+ou: People
+
+dn: ou=Roles,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+objectclass: top
+objectclass: organizationalUnit
+ou: Roles
+
+# tree2
+dn: o=example2,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+objectclass: top
+objectclass: organization
+o: example2
+
+dn: ou=People,o=example2,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+objectclass: top
+objectclass: organizationalUnit
+ou: People
+
+dn: ou=Roles,o=example2,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+objectclass: top
+objectclass: organizationalUnit
+ou: Roles
+
+
+
Added: trunk/test/src/etc/ldap/ldif/initial-tests-qa-opends.ldif
===================================================================
--- trunk/test/src/etc/ldap/ldif/initial-tests-qa-opends.ldif (rev 0)
+++ trunk/test/src/etc/ldap/ldif/initial-tests-qa-opends.ldif 2007-03-08 20:04:02 UTC (rev 6603)
@@ -0,0 +1,194 @@
+dn: dc=example,dc=com
+objectclass: top
+objectclass: dcObject
+objectclass: organization
+dc: example
+o: example
+
+dn: ou=People,dc=example,dc=com
+objectclass: top
+objectclass: organizationalUnit
+ou: People
+
+dn: uid=jduke,ou=People,dc=example,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,dc=example,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,dc=example,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,dc=example,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,dc=example,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,dc=example,dc=com
+objectclass: top
+objectclass: organizationalUnit
+ou: Roles
+
+dn: cn=Echo,ou=Roles,dc=example,dc=com
+objectClass: top
+objectClass: groupOfNames
+cn: Echo
+description: the JBossAdmin group
+member: uid=jduke1,ou=People,dc=example,dc=com
+member: uid=jduke3,ou=People,dc=example,dc=com
+member: uid=jduke4,ou=People,dc=example,dc=com
+
+dn: cn=Echo1,ou=Roles,dc=example,dc=com
+objectClass: top
+objectClass: groupOfNames
+cn: Echo1
+description: the JBossAdmin group 2
+member: uid=jduke2,ou=People,dc=example,dc=com
+member: uid=jduke3,ou=People,dc=example,dc=com
+member: uid=jduke5,ou=People,dc=example,dc=com
+
+dn: cn=TheDuke,ou=Roles,dc=example,dc=com
+objectClass: groupOfNames
+objectClass: top
+cn: TheDuke
+description: TheDuke role context
+member: uid=jduke,ou=People,dc=example,dc=com
+
+
+# tree2
+dn: o=example2,dc=example,dc=com
+objectclass: top
+objectclass: organization
+o: example2
+
+dn: ou=People,o=example2,dc=example,dc=com
+objectclass: top
+objectclass: organizationalUnit
+ou: People
+
+dn: uid=jduke,ou=People,o=example2,dc=example,dc=com
+objectclass: top
+objectclass: inetOrgPerson
+objectclass: inetUser
+uid: jduke
+cn: Java Duke
+sn: Duke
+userPassword: theduke
+mail: email(a)email.com
+memberOf: cn=Echo,ou=Roles,o=example2,dc=example,dc=com
+
+dn: uid=jduke1,ou=People,o=example2,dc=example,dc=com
+objectclass: top
+objectclass: inetOrgPerson
+objectclass: inetUser
+uid: jduke1
+cn: Java Duke1
+sn: Duke1
+userPassword: theduke
+mail: email(a)email.com
+memberOf: cn=Echo,ou=Roles,o=example2,dc=example,dc=com
+memberOf: cn=Echo1,ou=Roles,o=example2,dc=example,dc=com
+
+
+dn: uid=jduke2,ou=People,o=example2,dc=example,dc=com
+objectclass: top
+objectclass: inetOrgPerson
+objectclass: inetUser
+uid: jduke2
+cn: Java Duke2
+sn: Duke2
+userPassword: theduke
+mail: email(a)email.com
+memberOf: cn=Echo,ou=Roles,o=example2,dc=example,dc=com
+memberOf: cn=Echo1,ou=Roles,o=example2,dc=example,dc=com
+memberOf: cn=TheDuke,ou=Roles,o=example2,dc=example,dc=com
+
+
+dn: uid=jduke3,ou=People,o=example2,dc=example,dc=com
+objectclass: top
+objectclass: inetOrgPerson
+objectclass: inetUser
+uid: jduke3
+cn: Java Duke3
+sn: Duke3
+userPassword: theduke
+mail: email(a)email.com
+
+dn: uid=jduke4,ou=People,o=example2,dc=example,dc=com
+objectclass: top
+objectclass: inetOrgPerson
+objectclass: inetUser
+uid: jduke4
+cn: Java Duke4
+sn: Duke4
+userPassword: theduke
+mail: email(a)email.com
+
+dn: ou=Roles,o=example2,dc=example,dc=com
+objectclass: top
+objectclass: organizationalUnit
+ou: Roles
+
+dn: cn=Echo,ou=Roles,o=example2,dc=example,dc=com
+objectClass: top
+objectClass: organizationalRole
+cn: Echo
+description: the JBossAdmin group
+
+dn: cn=Echo1,ou=Roles,o=example2,dc=example,dc=com
+objectClass: top
+objectClass: organizationalRole
+cn: Echo1
+description: the JBossAdmin group 2
+
+
+dn: cn=TheDuke,ou=Roles,o=example2,dc=example,dc=com
+objectClass: top
+objectClass: organizationalRole
+cn: TheDuke
+description: TheDuke role context
+
+dn: cn=EmptyRole,ou=Roles,o=example2,dc=example,dc=com
+objectClass: top
+objectClass: organizationalRole
+cn: EmptyRole
+description: EmptyRole role context
+
+
Modified: trunk/test/src/etc/opends/config/config.ldif
===================================================================
--- trunk/test/src/etc/opends/config/config.ldif 2007-03-08 14:56:49 UTC (rev 6602)
+++ trunk/test/src/etc/opends/config/config.ldif 2007-03-08 20:04:02 UTC (rev 6603)
@@ -132,7 +132,7 @@
ds-cfg-backend-index-entry-limit: 4000
ds-cfg-backend-writability-mode: enabled
ds-cfg-backend-preload-time-limit: 0 seconds
-ds-cfg-backend-base-dn: dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+ds-cfg-backend-base-dn: dc=example,dc=com
ds-cfg-backend-entries-compressed: false
ds-cfg-backend-import-temp-directory: importTmp
ds-cfg-backend-id: userRoot
17 years, 4 months
JBoss Portal SVN: r6602 - docs/tags.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-03-08 09:56:49 -0500 (Thu, 08 Mar 2007)
New Revision: 6602
Added:
docs/tags/JBoss_Portal_2_6_0_BETA1/
Log:
tagging docs
Copied: docs/tags/JBoss_Portal_2_6_0_BETA1 (from rev 6601, docs/trunk)
17 years, 4 months
JBoss Portal SVN: r6601 - tags/JBoss_Portal_2_6_0_BETA1/identity.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-03-08 07:42:18 -0500 (Thu, 08 Mar 2007)
New Revision: 6601
Modified:
tags/JBoss_Portal_2_6_0_BETA1/identity/build.xml
Log:
- correct target dependency
Modified: tags/JBoss_Portal_2_6_0_BETA1/identity/build.xml
===================================================================
--- tags/JBoss_Portal_2_6_0_BETA1/identity/build.xml 2007-03-08 12:41:02 UTC (rev 6600)
+++ tags/JBoss_Portal_2_6_0_BETA1/identity/build.xml 2007-03-08 12:42:18 UTC (rev 6601)
@@ -313,7 +313,7 @@
</target>
<!-- Undeployment of agent -->
- <target name="undeploy-ldap" depends="init" if="HAVE_JDK_1.5">
+ <target name="undeploy-ldap" depends="init, package-tests" if="HAVE_JDK_1.5">
<delete file="${jboss.home}/server/${portal.deploy.dir}/test-identity.sar" failonerror="false" deleteonexit="true" quiet="true"/>
<sleep seconds="30"/>
<!--<delete dir="${jboss.home}/server/default/conf/opends" failonerror="false" deleteonexit="true" quiet="true"/>-->
17 years, 4 months
JBoss Portal SVN: r6600 - trunk/identity.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-03-08 07:41:02 -0500 (Thu, 08 Mar 2007)
New Revision: 6600
Modified:
trunk/identity/build.xml
Log:
- correct target dependency
Modified: trunk/identity/build.xml
===================================================================
--- trunk/identity/build.xml 2007-03-08 12:35:12 UTC (rev 6599)
+++ trunk/identity/build.xml 2007-03-08 12:41:02 UTC (rev 6600)
@@ -303,7 +303,7 @@
<target name="help" depends="_default:help"/>
- <target name="deploy-ldap" depends="init" if="HAVE_JDK_1.5" >
+ <target name="deploy-ldap" depends="init, package-tests" if="HAVE_JDK_1.5" >
<mkdir dir="${jboss.home}/server/default/conf/opends"/>
<copy todir="${jboss.home}/server/default/conf/opends" overwrite="true" failonerror="false">
<fileset dir="../test/output/etc/opends"/>
17 years, 4 months
JBoss Portal SVN: r6599 - trunk/identity/src/resources/example.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-03-08 07:35:12 -0500 (Thu, 08 Mar 2007)
New Revision: 6599
Modified:
trunk/identity/src/resources/example/portal-sample-local.ldif
trunk/identity/src/resources/example/portal-sample-qa.ldif
trunk/identity/src/resources/example/portal-sample-rhds.ldif
trunk/identity/src/resources/example/portal-sample.ldif
Log:
- corrected bug in identity 'db' testsuite
Modified: trunk/identity/src/resources/example/portal-sample-local.ldif
===================================================================
--- trunk/identity/src/resources/example/portal-sample-local.ldif 2007-03-08 12:34:18 UTC (rev 6598)
+++ trunk/identity/src/resources/example/portal-sample-local.ldif 2007-03-08 12:35:12 UTC (rev 6599)
@@ -123,7 +123,6 @@
description: the JBossAdmin group 2
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=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
objectClass: groupOfNames
Modified: trunk/identity/src/resources/example/portal-sample-qa.ldif
===================================================================
--- trunk/identity/src/resources/example/portal-sample-qa.ldif 2007-03-08 12:34:18 UTC (rev 6598)
+++ trunk/identity/src/resources/example/portal-sample-qa.ldif 2007-03-08 12:35:12 UTC (rev 6599)
@@ -135,7 +135,6 @@
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
Modified: trunk/identity/src/resources/example/portal-sample-rhds.ldif
===================================================================
--- trunk/identity/src/resources/example/portal-sample-rhds.ldif 2007-03-08 12:34:18 UTC (rev 6598)
+++ trunk/identity/src/resources/example/portal-sample-rhds.ldif 2007-03-08 12:35:12 UTC (rev 6599)
@@ -123,7 +123,6 @@
description: the JBossAdmin group 2
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=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
objectClass: groupOfNames
Modified: trunk/identity/src/resources/example/portal-sample.ldif
===================================================================
--- trunk/identity/src/resources/example/portal-sample.ldif 2007-03-08 12:34:18 UTC (rev 6598)
+++ trunk/identity/src/resources/example/portal-sample.ldif 2007-03-08 12:35:12 UTC (rev 6599)
@@ -122,7 +122,6 @@
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
17 years, 4 months
JBoss Portal SVN: r6598 - tags/JBoss_Portal_2_6_0_BETA1/identity/src/resources/example.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-03-08 07:34:18 -0500 (Thu, 08 Mar 2007)
New Revision: 6598
Modified:
tags/JBoss_Portal_2_6_0_BETA1/identity/src/resources/example/portal-sample-local.ldif
tags/JBoss_Portal_2_6_0_BETA1/identity/src/resources/example/portal-sample-qa.ldif
tags/JBoss_Portal_2_6_0_BETA1/identity/src/resources/example/portal-sample-rhds.ldif
tags/JBoss_Portal_2_6_0_BETA1/identity/src/resources/example/portal-sample.ldif
Log:
- correct example ldifs
Modified: tags/JBoss_Portal_2_6_0_BETA1/identity/src/resources/example/portal-sample-local.ldif
===================================================================
--- tags/JBoss_Portal_2_6_0_BETA1/identity/src/resources/example/portal-sample-local.ldif 2007-03-08 11:50:21 UTC (rev 6597)
+++ tags/JBoss_Portal_2_6_0_BETA1/identity/src/resources/example/portal-sample-local.ldif 2007-03-08 12:34:18 UTC (rev 6598)
@@ -123,7 +123,6 @@
description: the JBossAdmin group 2
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=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
objectClass: groupOfNames
Modified: tags/JBoss_Portal_2_6_0_BETA1/identity/src/resources/example/portal-sample-qa.ldif
===================================================================
--- tags/JBoss_Portal_2_6_0_BETA1/identity/src/resources/example/portal-sample-qa.ldif 2007-03-08 11:50:21 UTC (rev 6597)
+++ tags/JBoss_Portal_2_6_0_BETA1/identity/src/resources/example/portal-sample-qa.ldif 2007-03-08 12:34:18 UTC (rev 6598)
@@ -135,7 +135,6 @@
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
Modified: tags/JBoss_Portal_2_6_0_BETA1/identity/src/resources/example/portal-sample-rhds.ldif
===================================================================
--- tags/JBoss_Portal_2_6_0_BETA1/identity/src/resources/example/portal-sample-rhds.ldif 2007-03-08 11:50:21 UTC (rev 6597)
+++ tags/JBoss_Portal_2_6_0_BETA1/identity/src/resources/example/portal-sample-rhds.ldif 2007-03-08 12:34:18 UTC (rev 6598)
@@ -123,7 +123,6 @@
description: the JBossAdmin group 2
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=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
objectClass: groupOfNames
Modified: tags/JBoss_Portal_2_6_0_BETA1/identity/src/resources/example/portal-sample.ldif
===================================================================
--- tags/JBoss_Portal_2_6_0_BETA1/identity/src/resources/example/portal-sample.ldif 2007-03-08 11:50:21 UTC (rev 6597)
+++ tags/JBoss_Portal_2_6_0_BETA1/identity/src/resources/example/portal-sample.ldif 2007-03-08 12:34:18 UTC (rev 6598)
@@ -122,7 +122,6 @@
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
17 years, 4 months
JBoss Portal SVN: r6597 - trunk/core/src/main/org/jboss/portal/core/model/portal.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-03-08 06:50:21 -0500 (Thu, 08 Mar 2007)
New Revision: 6597
Modified:
trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObject.java
Log:
getChildren take a mask as parameter, not the type.
Modified: trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObject.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObject.java 2007-03-08 02:13:02 UTC (rev 6596)
+++ trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObject.java 2007-03-08 11:50:21 UTC (rev 6597)
@@ -107,11 +107,11 @@
Collection getChildren();
/**
- * Return all the children of this object filtered with a particular type.
+ * Return all the children of this object filtered with a particular mask.
*
* @return the children
*/
- Collection getChildren(int type);
+ Collection getChildren(int mask);
/**
* Return the parent object.
17 years, 4 months
JBoss Portal SVN: r6596 - in trunk/wsrp/src: main/org/jboss/portal/wsrp/deployment and 2 other directories.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2007-03-07 21:13:02 -0500 (Wed, 07 Mar 2007)
New Revision: 6596
Modified:
trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/ConsumerRegistryService.java
trunk/wsrp/src/main/org/jboss/portal/wsrp/deployment/WSRPDeployer.java
trunk/wsrp/src/resources/portal-wsrp-sar/META-INF/jboss-service.xml
trunk/wsrp/src/resources/portal-wsrp-sar/wsrp-aop.xml
Log:
- JBPORTAL-1310: Attempting (without success) to force transactional context when deployer tries to deploy external -wsrp.xml files. (synchronization commit).
Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/ConsumerRegistryService.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/ConsumerRegistryService.java 2007-03-08 00:00:42 UTC (rev 6595)
+++ trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/ConsumerRegistryService.java 2007-03-08 02:13:02 UTC (rev 6596)
@@ -80,6 +80,8 @@
try
{
Session session = sessionFactory.getCurrentSession();
+
+ // make sure we re-attach nullRegistration
session.refresh(nullRegistration);
session.persist(info);
}
@@ -95,9 +97,9 @@
{
ParameterValidation.throwIllegalArgExceptionIfNull(consumer, "Consumer");
- Session session = sessionFactory.getCurrentSession();
ProducerInfo info = consumer.getProducerInfo();
+ Session session = sessionFactory.getCurrentSession();
session.persist(info);
createConsumerFrom(info);
@@ -120,14 +122,16 @@
protected void startService() throws Exception
{
- sessionFactory = (SessionFactory)new InitialContext().lookup(sessionFactoryJNDIName);
+ super.startService();
+ InitialContext initialContext = new InitialContext();
+ sessionFactory = (SessionFactory)initialContext.lookup(sessionFactoryJNDIName);
+
// load the configured consumers
consumers = new TreeMap();
Session session = sessionFactory.getCurrentSession();
- session.beginTransaction();
Iterator producerInfos = session.createQuery("from ProducerInfo pi order by pi.id").iterate();
// load the configured producers
@@ -147,18 +151,13 @@
activateConsumerWith(producerInfo.getId());
}
}
- session.getTransaction().commit();
- session.beginTransaction();
nullRegistration = (RegistrationInfo)session.createQuery("from RegistrationInfo where key = (select min(key) from RegistrationInfo)").uniqueResult();
if (nullRegistration == null)
{
nullRegistration = new RegistrationInfo();
session.persist(nullRegistration);
}
- session.getTransaction().commit();
-
- session.close();
}
private WSRPConsumer createConsumerFrom(ProducerInfo producerInfo)
Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/deployment/WSRPDeployer.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/wsrp/deployment/WSRPDeployer.java 2007-03-08 00:00:42 UTC (rev 6595)
+++ trunk/wsrp/src/main/org/jboss/portal/wsrp/deployment/WSRPDeployer.java 2007-03-08 02:13:02 UTC (rev 6596)
@@ -25,7 +25,6 @@
import org.jboss.deployment.DeploymentException;
import org.jboss.deployment.DeploymentInfo;
import org.jboss.deployment.SubDeployerSupport;
-import org.jboss.portal.common.util.URLTools;
import org.jboss.portal.common.xml.NullEntityResolver;
import org.jboss.portal.wsrp.consumer.ConsumerRegistry;
import org.jboss.xb.binding.ObjectModelFactory;
@@ -100,7 +99,7 @@
ObjectModelFactory factory = new WSRPDeploymentFactory(consumerRegistry);
if (entityResolver == null)
{
- log.debug("Coult not obtain entity resolver for WSRPDeployer");
+ log.debug("Could not obtain entity resolver for WSRPDeployer");
entityResolver = new NullEntityResolver();
}
unmarshaller.setEntityResolver(entityResolver);
@@ -112,11 +111,6 @@
}
}
- protected void createService() throws Exception
- {
- super.createService();
- }
-
public void start(DeploymentInfo di) throws DeploymentException
{
super.start(di);
@@ -146,23 +140,17 @@
super.stop(di);
}
- protected void destroyService() throws Exception
- {
- super.destroyService();
- }
-
-
protected void startService() throws Exception
{
- super.startService();
if (defaultWSRPLocation != null)
{
URL defaultWSRPURL = Thread.currentThread().getContextClassLoader().getResource(defaultWSRPLocation);
- if (URLTools.exists(defaultWSRPURL))
+ if (defaultWSRPURL != null)
{
try
{
deployedDefaultWSRPURL = defaultWSRPURL;
+
mainDeployer.deploy(defaultWSRPURL);
}
catch (DeploymentException e)
@@ -171,6 +159,8 @@
}
}
}
+
+ super.startService();
}
protected void stopService() throws Exception
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-03-08 00:00:42 UTC (rev 6595)
+++ trunk/wsrp/src/resources/portal-wsrp-sar/META-INF/jboss-service.xml 2007-03-08 02:13:02 UTC (rev 6596)
@@ -127,6 +127,7 @@
<!-- Deployer for *-wsrp.xml files. Deploys default-wsrp.xml which contains the 'self' consumer -->
<mbean code="org.jboss.portal.wsrp.deployment.WSRPDeployer" name="portal.wsrp:service=WSRPDeployer">
<attribute name="DefaultWSRPLocation">default-wsrp.xml</attribute>
+ <depends>portal:service=Hibernate,type=WSRPConsumer</depends>
<depends optional-attribute-name="ConsumerRegistry"
proxy-type="attribute">portal.wsrp:service=ConsumersRegistry</depends>
<depends optional-attribute-name="EntityResolver"
Modified: trunk/wsrp/src/resources/portal-wsrp-sar/wsrp-aop.xml
===================================================================
--- trunk/wsrp/src/resources/portal-wsrp-sar/wsrp-aop.xml 2007-03-08 00:00:42 UTC (rev 6595)
+++ trunk/wsrp/src/resources/portal-wsrp-sar/wsrp-aop.xml 2007-03-08 02:13:02 UTC (rev 6596)
@@ -30,7 +30,7 @@
<trans-attribute>Required</trans-attribute>
</method>
<method name="activateConsumerWith">
- <trans-attribute>Required</trans-attribute>
+ <trans-attribute>RequiresNew</trans-attribute>
</method>
<method name="updateProducerInfo">
<trans-attribute>Required</trans-attribute>
17 years, 4 months