JBoss Portal SVN: r11299 - in modules/presentation/trunk/presentation/src: main/java/org/jboss/portal/presentation/impl/state/structural/adapter and 3 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-07-04 11:23:32 -0400 (Fri, 04 Jul 2008)
New Revision: 11299
Modified:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ObjectVisit.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/adapter/StructuralStateContextImpl.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/state/structural/StructuralObject.java
modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/state/AbstractStructuralStateContextTestCase.java
modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/state/mock/impl/MockModelImpl.java
Log:
make the properties change more detailed
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ObjectVisit.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ObjectVisit.java 2008-07-04 14:58:43 UTC (rev 11298)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ObjectVisit.java 2008-07-04 15:23:32 UTC (rev 11299)
@@ -46,7 +46,9 @@
return new Skip(object);
}
- static ObjectVisit createUpdate(UIObjectImpl object, ChildrenVisit children)
+ static ObjectVisit createUpdate(
+ UIObjectImpl object,
+ ChildrenVisit children)
{
return new Update(object, children);
}
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/adapter/StructuralStateContextImpl.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/adapter/StructuralStateContextImpl.java 2008-07-04 14:58:43 UTC (rev 11298)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/adapter/StructuralStateContextImpl.java 2008-07-04 15:23:32 UTC (rev 11299)
@@ -260,7 +260,9 @@
return new StructuralObject.Refresh(
parentNode != null ? takeSnapshot(parentNode) : null,
nodeSnapshot,
+ new HashSet<String>(),
new HashMap<String, Serializable>(),
+ new HashMap<String, Serializable>(),
addedStructuralChildren,
removedChildrenIds,
staleStructuralChildren,
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/state/structural/StructuralObject.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/state/structural/StructuralObject.java 2008-07-04 14:58:43 UTC (rev 11298)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/state/structural/StructuralObject.java 2008-07-04 15:23:32 UTC (rev 11299)
@@ -52,9 +52,15 @@
private final StructuralObject object;
/** . */
- private final Map<String, Serializable> propertiesUpdate;
+ private final Set<String> removedProperties;
/** . */
+ private final Map<String, Serializable> updatedProperties;
+
+ /** . */
+ private final Map<String, Serializable> addedProperties;
+
+ /** . */
private final Set<StructuralObject> addedChildren;
/** . */
@@ -69,7 +75,9 @@
public Refresh(
StructuralObject parent,
StructuralObject object,
- Map<String, Serializable> propertiesUpdate,
+ Set<String> removedProperties,
+ Map<String, Serializable> updatedProperties,
+ Map<String, Serializable> addedProperties,
Set<StructuralObject> addedChildren,
Set<String> removedChildren,
Map<String, StructuralObject> staleChildren,
@@ -79,10 +87,18 @@
{
throw new IllegalArgumentException();
}
- if (propertiesUpdate == null)
+ if (removedProperties == null)
{
throw new IllegalArgumentException();
}
+ if (updatedProperties == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ if (addedProperties == null)
+ {
+ throw new IllegalArgumentException();
+ }
if (addedChildren == null)
{
throw new IllegalArgumentException();
@@ -102,7 +118,9 @@
//
this.parent = parent;
- this.propertiesUpdate = propertiesUpdate;
+ this.removedProperties = removedProperties;
+ this.updatedProperties = updatedProperties;
+ this.addedProperties = addedProperties;
this.object = object;
this.addedChildren = addedChildren;
this.validChildren = validChildren;
@@ -115,11 +133,21 @@
return parent;
}
- public Map<String, Serializable> getPropertiesUpdate()
+ public Set<String> getRemovedProperties()
{
- return propertiesUpdate;
+ return removedProperties;
}
+ public Map<String, Serializable> getUpdatedProperties()
+ {
+ return updatedProperties;
+ }
+
+ public Map<String, Serializable> getAddedProperties()
+ {
+ return addedProperties;
+ }
+
public StructuralObject getObject()
{
return object;
Modified: modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/state/AbstractStructuralStateContextTestCase.java
===================================================================
--- modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/state/AbstractStructuralStateContextTestCase.java 2008-07-04 14:58:43 UTC (rev 11298)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/state/AbstractStructuralStateContextTestCase.java 2008-07-04 15:23:32 UTC (rev 11299)
@@ -406,8 +406,10 @@
setProperty(mockRoot, "bar", "bar_1");
setProperty(mockRoot, "daa", "daa_1");
StructuralObject.Refresh refresh1 = getStructuralStateContext().refresh(rootV0);
- Map<String, Serializable> update1 = MapBuilder.hashMap("foo", (Serializable)"foo_1").put("bar", "bar_1").put("daa", "daa_1").get();
- assertEquals(update1, refresh1.getPropertiesUpdate());
+ Map<String, Serializable> added1 = MapBuilder.hashMap("foo", (Serializable)"foo_1").put("bar", "bar_1").put("daa", "daa_1").get();
+ assertEquals(Collections.emptySet(), refresh1.getRemovedProperties());
+ assertEquals(Collections.emptyMap(), refresh1.getUpdatedProperties());
+ assertEquals(added1, refresh1.getAddedProperties());
//
StructuralObject rootV1 = getStructuralStateContext().load(rootId);
@@ -416,12 +418,17 @@
setProperty(mockRoot, "foo", null);
setProperty(mockRoot, "bar", "bar_2");
setProperty(mockRoot, "juu", "juu_1");
+
StructuralObject.Refresh refresh2_1 = getStructuralStateContext().refresh(rootV1);
- Map<String, Serializable> update2_1 = MapBuilder.hashMap("foo", (Serializable)null).put("bar", "bar_2").put("juu", "juu_1").get();
- assertEquals(update2_1, refresh2_1.getPropertiesUpdate());
+ assertEquals(Collections.singleton("foo"), refresh2_1.getRemovedProperties());
+ assertEquals(Collections.singletonMap("bar", (Serializable)"bar_2"), refresh2_1.getUpdatedProperties());
+ assertEquals(Collections.singletonMap("juu", (Serializable)"juu_1"), refresh2_1.getAddedProperties());
+
StructuralObject.Refresh refresh2_2 = getStructuralStateContext().refresh(rootV0);
Map<String, Serializable> update2_2 = MapBuilder.hashMap("bar", (Serializable)"bar_2").put("daa", "daa_1").put("juu", "juu_1").get();
- assertEquals(update2_2, refresh2_2.getPropertiesUpdate());
+ assertEquals(Collections.emptySet(), refresh2_2.getRemovedProperties());
+ assertEquals(Collections.emptyMap(), refresh2_2.getUpdatedProperties());
+ assertEquals(update2_2, refresh2_2.getAddedProperties());
}
protected final void assertValidity(StructuralObject object, Class<? extends StateException> expected) throws MockException
Modified: modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/state/mock/impl/MockModelImpl.java
===================================================================
--- modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/state/mock/impl/MockModelImpl.java 2008-07-04 14:58:43 UTC (rev 11298)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/state/mock/impl/MockModelImpl.java 2008-07-04 15:23:32 UTC (rev 11299)
@@ -150,18 +150,22 @@
//
Map<String, Serializable> currentProperties = current.getState().getProperties();
Map<String, Serializable> previousProperties = previous.getState().getProperties();
- Map<String, Serializable> propertiesUpdate = Collections.emptyMap();
+ //
+ Set<String> removedProperties = Collections.emptySet();
+ Map<String, Serializable> updatedProperties = Collections.emptyMap();
+ Map<String, Serializable> addedProperties = Collections.emptyMap();
+
// Find all removed properties
for (String key : previousProperties.keySet())
{
if (!currentProperties.containsKey(key))
{
- if (propertiesUpdate.isEmpty())
+ if (removedProperties.isEmpty())
{
- propertiesUpdate = new HashMap<String, Serializable>();
+ removedProperties = new HashSet<String>();
}
- propertiesUpdate.put(key, null);
+ removedProperties.add(key);
}
}
@@ -171,14 +175,22 @@
String currentKey = entry.getKey();
Serializable currentValue = entry.getValue();
Serializable previousValue = previousProperties.get(currentKey);
- if (previousValue == null || !previousValue.equals(currentValue))
+ if (previousValue == null)
{
- if (propertiesUpdate.isEmpty())
+ if (addedProperties.isEmpty())
{
- propertiesUpdate = new HashMap<String, Serializable>();
+ addedProperties = new HashMap<String, Serializable>();
}
- propertiesUpdate.put(currentKey, currentValue);
+ addedProperties.put(currentKey, currentValue);
}
+ else if (!previousValue.equals(currentValue))
+ {
+ if (updatedProperties.isEmpty())
+ {
+ updatedProperties = new HashMap<String, Serializable>();
+ }
+ updatedProperties.put(currentKey, currentValue);
+ }
}
//
@@ -249,7 +261,9 @@
return new StructuralObject.Refresh(
parent,
current,
- propertiesUpdate,
+ removedProperties,
+ updatedProperties,
+ addedProperties,
addedChildren,
removedChildren,
staleChildrenHandleMap,
16 years
JBoss Portal SVN: r11298 - tags/JBoss_Portal_2_7_0_ALPHA1/build.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-07-04 10:58:43 -0400 (Fri, 04 Jul 2008)
New Revision: 11298
Modified:
tags/JBoss_Portal_2_7_0_ALPHA1/build/build-thirdparty.xml
tags/JBoss_Portal_2_7_0_ALPHA1/build/build.xml
tags/JBoss_Portal_2_7_0_ALPHA1/build/distrib.xml
Log:
Change version number in the tag
Modified: tags/JBoss_Portal_2_7_0_ALPHA1/build/build-thirdparty.xml
===================================================================
--- tags/JBoss_Portal_2_7_0_ALPHA1/build/build-thirdparty.xml 2008-07-04 14:52:00 UTC (rev 11297)
+++ tags/JBoss_Portal_2_7_0_ALPHA1/build/build-thirdparty.xml 2008-07-04 14:58:43 UTC (rev 11298)
@@ -43,9 +43,9 @@
<componentref name="jboss-portal/modules/common" version="1.2.0"/>
<componentref name="jboss-portal/modules/web" version="1.2.0"/>
- <componentref name="jboss-portal/modules/test" version="1.0-SNAPSHOT"/>
- <componentref name="jboss-portal/modules/portlet" version="trunk-SNAPSHOT"/>
- <componentref name="jboss-portal/modules/identity" version="1.0-SNAPSHOT"/>
+ <componentref name="jboss-portal/modules/test" version="1.0.2"/>
+ <componentref name="jboss-portal/modules/portlet" version="2.0.1"/>
+ <componentref name="jboss-portal/modules/identity" version="1.0.4"/>
<componentref name="antlr" version="2.7.6.ga"/>
<componentref name="apache-ant" version="1.6.5"/>
<componentref name="jackrabbit" version="1.1.1"/>
Modified: tags/JBoss_Portal_2_7_0_ALPHA1/build/build.xml
===================================================================
--- tags/JBoss_Portal_2_7_0_ALPHA1/build/build.xml 2008-07-04 14:52:00 UTC (rev 11297)
+++ tags/JBoss_Portal_2_7_0_ALPHA1/build/build.xml 2008-07-04 14:58:43 UTC (rev 11298)
@@ -60,10 +60,10 @@
<!--+==============================+-->
<property name="version.major" value="2"/>
- <property name="version.minor" value="6"/>
- <property name="version.revision" value="3"/>
- <property name="version.tag" value="SNAPSHOT"/>
- <property name="version.name" value="Ninja"/>
+ <property name="version.minor" value="7"/>
+ <property name="version.revision" value="0"/>
+ <property name="version.tag" value="ALPHA1"/>
+ <property name="version.name" value="Community"/>
<!-- This must be set to the CVS tag for any release -->
<property name="version.cvstag" value="HEAD"/>
Modified: tags/JBoss_Portal_2_7_0_ALPHA1/build/distrib.xml
===================================================================
--- tags/JBoss_Portal_2_7_0_ALPHA1/build/distrib.xml 2008-07-04 14:52:00 UTC (rev 11297)
+++ tags/JBoss_Portal_2_7_0_ALPHA1/build/distrib.xml 2008-07-04 14:58:43 UTC (rev 11298)
@@ -1,8 +1,8 @@
<project default="main" name="JBoss Portal">
- <property name="source.dir" value="../../jboss-portal-2.6"/>
+ <property name="source.dir" value="../../jboss-portal-2.7"/>
<property name="docs.dir" value="${source.dir}-docs"/>
- <property name="release.version" value="2.6.SNAPSHOT"/>
+ <property name="release.version" value="2.7.0.ALPHA1"/>
<!-- -->
<property name="portal.release.normal.name" value="jboss-portal-${release.version}"/>
16 years
JBoss Portal SVN: r11297 - tags.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-07-04 10:52:00 -0400 (Fri, 04 Jul 2008)
New Revision: 11297
Added:
tags/JBoss_Portal_2_7_0_ALPHA1/
Log:
Tagging 2.7.0.ALPHA1 !!!
Copied: tags/JBoss_Portal_2_7_0_ALPHA1 (from rev 11296, branches/JBoss_Portal_Branch_2_7)
16 years
JBoss Portal SVN: r11296 - modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-07-04 10:45:35 -0400 (Fri, 04 Jul 2008)
New Revision: 11296
Modified:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ObjectVisit.java
Log:
refactor object visits for cleaner semantic
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ObjectVisit.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ObjectVisit.java 2008-07-04 14:44:10 UTC (rev 11295)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ObjectVisit.java 2008-07-04 14:45:35 UTC (rev 11296)
@@ -28,7 +28,7 @@
* @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
* @version $Revision: 630 $
*/
-public class ObjectVisit
+public abstract class ObjectVisit
{
static ObjectVisit createEvict(UIObjectImpl object)
@@ -51,9 +51,33 @@
return new Update(object, children);
}
+ /** . */
+ private final UIObjectImpl object;
+
+ private ObjectVisit(UIObjectImpl object)
+ {
+ if (object == null)
+ {
+ throw new IllegalArgumentException();
+ }
+
+ //
+ this.object = object;
+ }
+
+ public String getObjectId()
+ {
+ return object.getId();
+ }
+
+ public UIObjectImpl getObject()
+ {
+ return object;
+ }
+
public static class Skip extends ObjectVisit
{
- public Skip(UIObjectImpl object)
+ private Skip(UIObjectImpl object)
{
super(object);
}
@@ -65,7 +89,7 @@
/** . */
private final ChildrenVisit children;
- public Load(UIObjectImpl object, ChildrenVisit children)
+ private Load(UIObjectImpl object, ChildrenVisit children)
{
super(object);
@@ -85,7 +109,7 @@
/** . */
private final ChildrenVisit children;
- public Update(UIObjectImpl object, ChildrenVisit children)
+ private Update(UIObjectImpl object, ChildrenVisit children)
{
super(object);
@@ -101,33 +125,9 @@
public static class Evict extends ObjectVisit
{
- public Evict(UIObjectImpl object)
+ private Evict(UIObjectImpl object)
{
super(object);
}
}
-
- /** . */
- private final UIObjectImpl object;
-
- public ObjectVisit(UIObjectImpl object)
- {
- if (object == null)
- {
- throw new IllegalArgumentException();
- }
-
- //
- this.object = object;
- }
-
- public String getObjectId()
- {
- return object.getId();
- }
-
- public UIObjectImpl getObject()
- {
- return object;
- }
}
16 years
JBoss Portal SVN: r11295 - modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-07-04 10:44:10 -0400 (Fri, 04 Jul 2008)
New Revision: 11295
Modified:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/CreateDiffPhase.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/CreateUpdatePhase.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ObjectVisit.java
Log:
refactor object visits for cleaner semantic
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/CreateDiffPhase.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/CreateDiffPhase.java 2008-07-04 13:38:12 UTC (rev 11294)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/CreateDiffPhase.java 2008-07-04 14:44:10 UTC (rev 11295)
@@ -107,7 +107,7 @@
{
if (traversalType == ObjectTraversalType.SKIP)
{
- return new ObjectVisit(object, false);
+ return ObjectVisit.createEvict(object);
}
else
{
@@ -145,7 +145,7 @@
}
//
- return new ObjectVisit(object, childrenVisit);
+ return ObjectVisit.createUpdate(object, childrenVisit);
}
}
finally
@@ -166,7 +166,7 @@
{
if (traversalType == ObjectTraversalType.SKIP)
{
- return new ObjectVisit(object, false);
+ return ObjectVisit.createSkip(object);
}
else
{
@@ -184,7 +184,7 @@
}
//
- return new ObjectVisit(object, childrenVisit);
+ return ObjectVisit.createLoad(object, childrenVisit);
}
}
finally
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/CreateUpdatePhase.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/CreateUpdatePhase.java 2008-07-04 13:38:12 UTC (rev 11294)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/CreateUpdatePhase.java 2008-07-04 14:44:10 UTC (rev 11295)
@@ -80,18 +80,18 @@
}
}
- private ObjectUpdate createUpdate(ObjectVisit objectVisit)
+ private ObjectUpdate createUpdate(ObjectVisit visit)
{
- UIObjectImpl object = (UIObjectImpl)context.getObject(objectVisit.getObjectId());
+ UIObjectImpl object = (UIObjectImpl)context.getObject(visit.getObjectId());
- if (objectVisit.getLoaded())
+ if (visit instanceof ObjectVisit.Load || visit instanceof ObjectVisit.Update)
{
- ChildrenVisit childrenVisit = objectVisit.getChildrenVisit();
+ ChildrenVisit childrenVisit = visit instanceof ObjectVisit.Load ? ((ObjectVisit.Load)visit).getChildrenVisit() : ((ObjectVisit.Update)visit).getChildrenVisit();
//
if (object != null)
{
- if (object != objectVisit.getObject())
+ if (object != visit.getObject())
{
// The object is stale, we need to update the state maybe
}
@@ -113,7 +113,7 @@
//
if (childUpdate instanceof ObjectUpdate.AddObject)
{
- addedChildrenUpdates.add(new ObjectUpdate.AddChild(objectVisit.getObjectId(), (ObjectUpdate.AddObject)childUpdate));
+ addedChildrenUpdates.add(new ObjectUpdate.AddChild(visit.getObjectId(), (ObjectUpdate.AddObject)childUpdate));
childrenStatus.put(addedObjectVisit.getObjectId(), true);
}
else if (childUpdate == null)
@@ -135,7 +135,7 @@
updateChildUpdate.updateChildrenUpdates);
//
- ObjectUpdate.AddChild addChildUpdate = new ObjectUpdate.AddChild(objectVisit.getObjectId(), addObjectUpdate);
+ ObjectUpdate.AddChild addChildUpdate = new ObjectUpdate.AddChild(visit.getObjectId(), addObjectUpdate);
//
if (removedChildren.contains(addedObjectVisit.getObjectId()))
@@ -160,7 +160,7 @@
for (String removeObjectId : childrenVisit.getRemovedObjects())
{
UIObjectImpl child = (UIObjectImpl)context.getObject(removeObjectId);
- removedChildrenUpdates.add(new ObjectUpdate.RemoveChild(objectVisit.getObjectId(), createRemove(child)));
+ removedChildrenUpdates.add(new ObjectUpdate.RemoveChild(visit.getObjectId(), createRemove(child)));
}
List<ObjectVisit> existingObjectVisits = new ArrayList<ObjectVisit>();
@@ -184,12 +184,12 @@
}
else if (childUpdate instanceof ObjectUpdate.RemoveObject)
{
- removedChildrenUpdates.add(new ObjectUpdate.RemoveChild(objectVisit.getObjectId(), (ObjectUpdate.RemoveObject)childUpdate));
+ removedChildrenUpdates.add(new ObjectUpdate.RemoveChild(visit.getObjectId(), (ObjectUpdate.RemoveObject)childUpdate));
childrenStatus.put(validObjectVisit.getObjectId(), false);
}
else if (childUpdate instanceof ObjectUpdate.AddObject)
{
- addedChildrenUpdates.add(new ObjectUpdate.AddChild(objectVisit.getObjectId(), (ObjectUpdate.AddObject)childUpdate));
+ addedChildrenUpdates.add(new ObjectUpdate.AddChild(visit.getObjectId(), (ObjectUpdate.AddObject)childUpdate));
childrenStatus.put(validObjectVisit.getObjectId(), true);
}
else
@@ -217,7 +217,7 @@
else
{
return new ObjectUpdate.AddObject(
- objectVisit.getObject(),
+ visit.getObject(),
childrenStatus,
addedChildrenUpdates,
removedChildrenUpdates,
@@ -243,7 +243,7 @@
UIObjectImpl child = (UIObjectImpl)context.getObject(removedChildRef.getId());
//
- removedChildrenUpdates.add(new ObjectUpdate.RemoveChild(objectVisit.getObjectId(), createRemove(child)));
+ removedChildrenUpdates.add(new ObjectUpdate.RemoveChild(visit.getObjectId(), createRemove(child)));
}
}
}
@@ -259,21 +259,34 @@
}
else
{
- return new ObjectUpdate.AddObject(objectVisit.getObject());
+ return new ObjectUpdate.AddObject(visit.getObject());
}
}
}
- else
+ else if (visit instanceof ObjectVisit.Skip)
{
if (object != null)
{
- return createRemove(object);
+ throw new AssertionError();
}
- else
+
+ //
+ return null;
+ }
+ else if (visit instanceof ObjectVisit.Evict)
+ {
+ if (object == null)
{
- return null;
+ throw new AssertionError();
}
+
+ //
+ return createRemove(object);
}
+ else
+ {
+ throw new AssertionError();
+ }
}
private ObjectUpdate.RemoveObject createRemove(UIObjectImpl object)
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ObjectVisit.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ObjectVisit.java 2008-07-04 13:38:12 UTC (rev 11294)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ObjectVisit.java 2008-07-04 14:44:10 UTC (rev 11295)
@@ -31,50 +31,94 @@
public class ObjectVisit
{
+ static ObjectVisit createEvict(UIObjectImpl object)
+ {
+ return new Evict(object);
+ }
- /*
- public static class Skip extends ObjectVisit
+ static ObjectVisit createLoad(UIObjectImpl object, ChildrenVisit children)
{
+ return new Load(object, children);
+ }
+ static ObjectVisit createSkip(UIObjectImpl object)
+ {
+ return new Skip(object);
}
+ static ObjectVisit createUpdate(UIObjectImpl object, ChildrenVisit children)
+ {
+ return new Update(object, children);
+ }
+
+ public static class Skip extends ObjectVisit
+ {
+ public Skip(UIObjectImpl object)
+ {
+ super(object);
+ }
+ }
+
public static class Load extends ObjectVisit
{
+ /** . */
+ private final ChildrenVisit children;
+
+ public Load(UIObjectImpl object, ChildrenVisit children)
+ {
+ super(object);
+
+ //
+ this.children = children;
+ }
+
+ public ChildrenVisit getChildrenVisit()
+ {
+ return children;
+ }
}
public static class Update extends ObjectVisit
{
+ /** . */
+ private final ChildrenVisit children;
+
+ public Update(UIObjectImpl object, ChildrenVisit children)
+ {
+ super(object);
+
+ //
+ this.children = children;
+ }
+
+ public ChildrenVisit getChildrenVisit()
+ {
+ return children;
+ }
}
public static class Evict extends ObjectVisit
{
-
+ public Evict(UIObjectImpl object)
+ {
+ super(object);
+ }
}
-*/
/** . */
private final UIObjectImpl object;
- /** . */
- private final boolean loaded;
-
- /** . */
- private final ChildrenVisit children;
-
- ObjectVisit(UIObjectImpl object, ChildrenVisit children)
+ public ObjectVisit(UIObjectImpl object)
{
- this.object = object;
- this.loaded = true;
- this.children = children;
- }
+ if (object == null)
+ {
+ throw new IllegalArgumentException();
+ }
- ObjectVisit(UIObjectImpl object, boolean loaded)
- {
+ //
this.object = object;
- this.loaded = loaded;
- this.children = null;
}
public String getObjectId()
@@ -86,14 +130,4 @@
{
return object;
}
-
- public boolean getLoaded()
- {
- return loaded;
- }
-
- public ChildrenVisit getChildrenVisit()
- {
- return children;
- }
}
16 years
JBoss Portal SVN: r11294 - modules/identity/tags/JBP_IDENTITY_1_0_4/build.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-07-04 09:38:12 -0400 (Fri, 04 Jul 2008)
New Revision: 11294
Modified:
modules/identity/tags/JBP_IDENTITY_1_0_4/build/build-thirdparty.xml
modules/identity/tags/JBP_IDENTITY_1_0_4/build/build.xml
Log:
Tagging and using test 1.0.2
Modified: modules/identity/tags/JBP_IDENTITY_1_0_4/build/build-thirdparty.xml
===================================================================
--- modules/identity/tags/JBP_IDENTITY_1_0_4/build/build-thirdparty.xml 2008-07-04 12:30:56 UTC (rev 11293)
+++ modules/identity/tags/JBP_IDENTITY_1_0_4/build/build-thirdparty.xml 2008-07-04 13:38:12 UTC (rev 11294)
@@ -48,7 +48,7 @@
-->
<componentref name="jboss-portal/modules/common" version="1.1.0"/>
- <componentref name="jboss-portal/modules/test" version="1.0.1"/>
+ <componentref name="jboss-portal/modules/test" version="1.0.2"/>
<componentref name="apache-log4j" version="1.2.8"/>
<componentref name="apache-logging" version="1.0.5.SP1-jboss"/>
<componentref name="apache-xerces" version="2.7.1"/>
Modified: modules/identity/tags/JBP_IDENTITY_1_0_4/build/build.xml
===================================================================
--- modules/identity/tags/JBP_IDENTITY_1_0_4/build/build.xml 2008-07-04 12:30:56 UTC (rev 11293)
+++ modules/identity/tags/JBP_IDENTITY_1_0_4/build/build.xml 2008-07-04 13:38:12 UTC (rev 11294)
@@ -61,8 +61,8 @@
<property name="version.major" value="1"/>
<property name="version.minor" value="0"/>
- <property name="version.revision" value="3"/>
- <property name="version.tag" value="SNAPSHOT"/>
+ <property name="version.revision" value="4"/>
+ <property name="version.tag" value="GA"/>
<property name="version.name" value=""/>
<!-- This must be set to the CVS tag for any release -->
16 years
JBoss Portal SVN: r11293 - modules/identity/tags.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-07-04 08:30:56 -0400 (Fri, 04 Jul 2008)
New Revision: 11293
Added:
modules/identity/tags/JBP_IDENTITY_1_0_4/
Log:
Tagging identity 1.0.4
Copied: modules/identity/tags/JBP_IDENTITY_1_0_4 (from rev 11292, modules/identity/branches/JBP_IDENTITY_BRANCH_1_0)
16 years
JBoss Portal SVN: r11292 - modules/portlet/tags.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-07-04 08:30:15 -0400 (Fri, 04 Jul 2008)
New Revision: 11292
Added:
modules/portlet/tags/JBP_PORTLET_2_0_1/
Log:
Tagging Portlet 2.0.1
Copied: modules/portlet/tags/JBP_PORTLET_2_0_1 (from rev 11291, modules/portlet/trunk)
16 years
JBoss Portal SVN: r11291 - modules/test/tags.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-07-04 08:29:30 -0400 (Fri, 04 Jul 2008)
New Revision: 11291
Added:
modules/test/tags/JBP_TEST_1_0_2/
Log:
Tagging test module
Copied: modules/test/tags/JBP_TEST_1_0_2 (from rev 11290, modules/test/branches/JBP_TEST_BRANCH_1_0)
16 years
JBoss Portal SVN: r11290 - docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: mmcallis
Date: 2008-07-04 00:37:54 -0400 (Fri, 04 Jul 2008)
New Revision: 11290
Modified:
docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/installation.xml
Log:
2.2.1.3. Operating System Environment Settings
This section was further down the page, but should be near
the start as well, for those who use one/the other install
method
Modified: docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/installation.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/installation.xml 2008-07-03 22:34:30 UTC (rev 11289)
+++ docs/branches/JBoss_Portal_Branch_2_7/referenceGuide/en/modules/installation.xml 2008-07-04 04:37:54 UTC (rev 11290)
@@ -86,6 +86,56 @@
</para>
</warning>
</sect3>
+ <sect3 id="install_source_env_0">
+ <title>Operating System Environment Settings</title>
+ <para>For JBoss EAP, JBoss AS, and build targets to work, you must configure a <filename>JBOSS_HOME</filename> environment variable. This environment variable must point to the root directory of the JBoss EAP or JBoss AS installation directory, which is the directory where the JBoss EAP or JBoss AS files were extracted to.
+ </para>
+ <para>On Windows, this is accomplished by going to
+ <emphasis>Start > Settings > Control Panel > System > Advanced > Environment Variables</emphasis>. Under the
+ <emphasis>System Variables</emphasis>
+ section, click
+ <emphasis>New</emphasis>. Set the <filename>JBOSS_HOME</filename>
+ environment variable to the location of your JBoss EAP or JBoss AS installation directory:
+ <mediaobject>
+ <imageobject>
+ <imagedata align="center" valign="middle" fileref="images/setup/win_envsetup.gif"/>
+ </imageobject>
+ </mediaobject>
+ </para>
+ <para>
+ To configure the <filename>JBOSS_HOME</filename> environment variable on Linux:
+ </para>
+ <para>
+ <orderedlist>
+ <listitem>
+ <para>
+ Add the following line to the <filename>~/.bashrc</filename> file. Note: this must be configured while logged in as the user who runs JBoss EAP or JBoss AS:
+ </para>
+ <para>
+<screen>
+export JBOSS_HOME=/path/to/jboss/installation/
+</screen>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Run the following command to enable the <filename>JBOSS_HOME</filename> environment variable:
+ </para>
+ <para>
+<screen>
+source ~/.bashrc
+</screen>
+ </para>
+ </listitem>
+ </orderedlist>
+ </para>
+ <note>
+ <title>JBoss EAP <filename>JBOSS_HOME</filename> Environment Variable</title>
+ <para>
+ If you are running JBoss EAP, configure the <filename>JBOSS_HOME</filename> environment variable to point to the <filename>/path/to/jboss-eap-<replaceable>version</replaceable>/jboss-as/</filename> directory.
+ </para>
+ </note>
+ </sect3>
<sect3>
<title>Database Setup</title>
<para>
@@ -263,7 +313,7 @@
</sect3>
<sect3 id="install_source_env">
<title>Operating System Environment Settings</title>
- <para>For build targets to work, you must configure a <filename>JBOSS_HOME</filename> environment variable. This environment variable must point to the root directory of the JBoss EAP or JBoss AS installation directory, which is the directory where the JBoss EAP or JBoss AS files were extracted to.
+ <para>For JBoss EAP, JBoss AS, and build targets to work, you must configure a <filename>JBOSS_HOME</filename> environment variable. This environment variable must point to the root directory of the JBoss EAP or JBoss AS installation directory, which is the directory where the JBoss EAP or JBoss AS files were extracted to.
</para>
<para>On Windows, this is accomplished by going to
<emphasis>Start > Settings > Control Panel > System > Advanced > Environment Variables</emphasis>. Under the
16 years