JBoss Portal SVN: r10628 - in modules/presentation/trunk: classic/src/main/java/org/jboss/portal/presentation/classic and 14 other directories.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2008-04-17 20:31:55 -0400 (Thu, 17 Apr 2008)
New Revision: 10628
Added:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ObjectTraversalType.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIModel.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIObject.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ViewPort.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ViewPortContext.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ViewPortScope.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ui/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ui/UIObject.java
Removed:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIObject.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/
Modified:
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/AjaxPresentationClient.java
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationClient.java
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/model/ClassicUINode.java
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/model/ClassicViewPortContext.java
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/model/DefaultPageViewPortScope.java
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/model/PageViewPortScope.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/CreateDiffPhase.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/CreateUpdatePhase.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/ObjectUpdate.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/UIModelImpl.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/UIObjectImpl.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/ViewPortImpl.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/ui/UIContextImpl.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/ui/UIPageImpl.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/ui/UIWindowImpl.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/ContextNode.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/PageNode.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/StructuralNode.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/StructuralStateImpl.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/WindowNode.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ui/UIAction.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ui/UIContainer.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ui/UIContext.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ui/UIPage.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ui/UIWindow.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/MoveUIObjectAction.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/state/structural/StructuralState.java
modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/AbstractModelTestCase.java
modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/state/structural/MockModelImpl.java
modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/state/structural/MockObject.java
modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/state/structural/MockObjectImpl.java
modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/state/structural/StructuralStateImpl.java
modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/AbstractModelTestCase.java
modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/AddChildTestCase.java
modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/CustomScope.java
modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/ModelTestCase.java
modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/MoveChildTestCase.java
modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/NodeDef.java
modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/RemoveChildTestCase.java
modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/TraversalModelTestCase.java
modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/TypeTestCase.java
modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/UIObjectNode.java
modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/UIObjectTree.java
modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/UpdateObjectTestCase.java
modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/state/structural/StructuralStateContextTestCase.java
Log:
refactoring model2 package to model
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/AjaxPresentationClient.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/AjaxPresentationClient.java 2008-04-17 21:52:02 UTC (rev 10627)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/AjaxPresentationClient.java 2008-04-18 00:31:55 UTC (rev 10628)
@@ -26,14 +26,14 @@
import java.util.Collection;
import org.jboss.portal.presentation.impl.model2.UIModelImpl;
+import org.jboss.portal.presentation.model.UIModel;
+import org.jboss.portal.presentation.model.UIObject;
+import org.jboss.portal.presentation.model.ViewPort;
+import org.jboss.portal.presentation.model.ViewPortScope;
import org.jboss.portal.presentation.model.content.WindowContent;
-import org.jboss.portal.presentation.model2.UIModel;
-import org.jboss.portal.presentation.model2.UIObject;
-import org.jboss.portal.presentation.model2.ViewPort;
-import org.jboss.portal.presentation.model2.ViewPortScope;
-import org.jboss.portal.presentation.model2.ui.UIContext;
-import org.jboss.portal.presentation.model2.ui.UIPage;
-import org.jboss.portal.presentation.model2.ui.UIWindow;
+import org.jboss.portal.presentation.model.ui.UIContext;
+import org.jboss.portal.presentation.model.ui.UIPage;
+import org.jboss.portal.presentation.model.ui.UIWindow;
import org.jboss.portal.presentation.protocol.ProtocolAction;
import org.jboss.portal.presentation.protocol.ProtocolResponse;
import org.jboss.portal.presentation.protocol.ShowUIObjectResponse;
Modified: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationClient.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationClient.java 2008-04-17 21:52:02 UTC (rev 10627)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationClient.java 2008-04-18 00:31:55 UTC (rev 10628)
@@ -35,15 +35,15 @@
import org.jboss.portal.presentation.server2.PresentationServerException;
import org.jboss.portal.presentation.server2.PresentationRequest;
import org.jboss.portal.presentation.server2.PresentationResponse;
-import org.jboss.portal.presentation.model2.UIModel;
-import org.jboss.portal.presentation.model2.ViewPort;
-import org.jboss.portal.presentation.model2.UIObject;
-import org.jboss.portal.presentation.model2.ViewPortScope;
-import org.jboss.portal.presentation.model2.ui.UIContext;
-import org.jboss.portal.presentation.model2.ui.UIPage;
-import org.jboss.portal.presentation.model2.ui.UIWindow;
import org.jboss.portal.presentation.impl.model2.UIModelImpl;
+import org.jboss.portal.presentation.model.UIModel;
+import org.jboss.portal.presentation.model.UIObject;
+import org.jboss.portal.presentation.model.ViewPort;
+import org.jboss.portal.presentation.model.ViewPortScope;
import org.jboss.portal.presentation.model.content.WindowContent;
+import org.jboss.portal.presentation.model.ui.UIContext;
+import org.jboss.portal.presentation.model.ui.UIPage;
+import org.jboss.portal.presentation.model.ui.UIWindow;
import org.jboss.portal.presentation.protocol.ViewUIObjectAction;
import org.jboss.portal.presentation.protocol.ProtocolAction;
import org.jboss.portal.presentation.protocol.ProtocolResponse;
Modified: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/model/ClassicUINode.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/model/ClassicUINode.java 2008-04-17 21:52:02 UTC (rev 10627)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/model/ClassicUINode.java 2008-04-18 00:31:55 UTC (rev 10628)
@@ -22,7 +22,7 @@
******************************************************************************/
package org.jboss.portal.presentation.classic.model;
-import org.jboss.portal.presentation.model2.UIObject;
+import org.jboss.portal.presentation.model.UIObject;
import java.util.Map;
import java.util.HashMap;
Modified: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/model/ClassicViewPortContext.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/model/ClassicViewPortContext.java 2008-04-17 21:52:02 UTC (rev 10627)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/model/ClassicViewPortContext.java 2008-04-18 00:31:55 UTC (rev 10628)
@@ -22,8 +22,8 @@
******************************************************************************/
package org.jboss.portal.presentation.classic.model;
-import org.jboss.portal.presentation.model2.ViewPortContext;
-import org.jboss.portal.presentation.model2.UIObject;
+import org.jboss.portal.presentation.model.UIObject;
+import org.jboss.portal.presentation.model.ViewPortContext;
import java.util.Map;
import java.util.HashMap;
Modified: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/model/DefaultPageViewPortScope.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/model/DefaultPageViewPortScope.java 2008-04-17 21:52:02 UTC (rev 10627)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/model/DefaultPageViewPortScope.java 2008-04-18 00:31:55 UTC (rev 10628)
@@ -22,12 +22,12 @@
******************************************************************************/
package org.jboss.portal.presentation.classic.model;
-import org.jboss.portal.presentation.model2.ViewPortScope;
-import org.jboss.portal.presentation.model2.ObjectTraversalType;
-import org.jboss.portal.presentation.model2.UIObject;
-import org.jboss.portal.presentation.model2.ui.UIPage;
-import org.jboss.portal.presentation.model2.ui.UIWindow;
-import org.jboss.portal.presentation.model2.ui.UIContext;
+import org.jboss.portal.presentation.model.ObjectTraversalType;
+import org.jboss.portal.presentation.model.UIObject;
+import org.jboss.portal.presentation.model.ViewPortScope;
+import org.jboss.portal.presentation.model.ui.UIContext;
+import org.jboss.portal.presentation.model.ui.UIPage;
+import org.jboss.portal.presentation.model.ui.UIWindow;
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
Modified: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/model/PageViewPortScope.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/model/PageViewPortScope.java 2008-04-17 21:52:02 UTC (rev 10627)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/model/PageViewPortScope.java 2008-04-18 00:31:55 UTC (rev 10628)
@@ -22,12 +22,12 @@
******************************************************************************/
package org.jboss.portal.presentation.classic.model;
-import org.jboss.portal.presentation.model2.ViewPortScope;
-import org.jboss.portal.presentation.model2.ObjectTraversalType;
-import org.jboss.portal.presentation.model2.UIObject;
-import org.jboss.portal.presentation.model2.ui.UIPage;
-import org.jboss.portal.presentation.model2.ui.UIWindow;
-import org.jboss.portal.presentation.model2.ui.UIContext;
+import org.jboss.portal.presentation.model.ObjectTraversalType;
+import org.jboss.portal.presentation.model.UIObject;
+import org.jboss.portal.presentation.model.ViewPortScope;
+import org.jboss.portal.presentation.model.ui.UIContext;
+import org.jboss.portal.presentation.model.ui.UIPage;
+import org.jboss.portal.presentation.model.ui.UIWindow;
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/CreateDiffPhase.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/CreateDiffPhase.java 2008-04-17 21:52:02 UTC (rev 10627)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/CreateDiffPhase.java 2008-04-18 00:31:55 UTC (rev 10628)
@@ -22,9 +22,9 @@
******************************************************************************/
package org.jboss.portal.presentation.impl.model2;
-import org.jboss.portal.presentation.model2.ViewPortScope;
-import org.jboss.portal.presentation.model2.ViewPortContext;
-import org.jboss.portal.presentation.model2.ObjectTraversalType;
+import org.jboss.portal.presentation.model.ObjectTraversalType;
+import org.jboss.portal.presentation.model.ViewPortContext;
+import org.jboss.portal.presentation.model.ViewPortScope;
import org.jboss.portal.presentation.state.structural.StructuralStateContext;
import org.jboss.portal.presentation.state.structural.StructuralObject;
import org.jboss.portal.presentation.state.navigational.NavigationalStateContext;
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/CreateUpdatePhase.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/CreateUpdatePhase.java 2008-04-17 21:52:02 UTC (rev 10627)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/CreateUpdatePhase.java 2008-04-18 00:31:55 UTC (rev 10628)
@@ -22,7 +22,7 @@
******************************************************************************/
package org.jboss.portal.presentation.impl.model2;
-import org.jboss.portal.presentation.model2.ViewPortContext;
+import org.jboss.portal.presentation.model.ViewPortContext;
import java.util.List;
import java.util.ArrayList;
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/ObjectUpdate.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/ObjectUpdate.java 2008-04-17 21:52:02 UTC (rev 10627)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/ObjectUpdate.java 2008-04-18 00:31:55 UTC (rev 10628)
@@ -22,7 +22,7 @@
******************************************************************************/
package org.jboss.portal.presentation.impl.model2;
-import org.jboss.portal.presentation.model2.ViewPortContext;
+import org.jboss.portal.presentation.model.ViewPortContext;
import org.jboss.portal.presentation.state.structural.StructuralObject;
import java.util.List;
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/UIModelImpl.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/UIModelImpl.java 2008-04-17 21:52:02 UTC (rev 10627)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/UIModelImpl.java 2008-04-18 00:31:55 UTC (rev 10628)
@@ -24,10 +24,10 @@
import org.jboss.portal.presentation.state.structural.StructuralStateContext;
import org.jboss.portal.presentation.state.navigational.NavigationalStateContext;
-import org.jboss.portal.presentation.model2.UIModel;
-import org.jboss.portal.presentation.model2.ViewPortContext;
-import org.jboss.portal.presentation.model2.ViewPortScope;
-import org.jboss.portal.presentation.model2.ViewPort;
+import org.jboss.portal.presentation.model.UIModel;
+import org.jboss.portal.presentation.model.ViewPort;
+import org.jboss.portal.presentation.model.ViewPortContext;
+import org.jboss.portal.presentation.model.ViewPortScope;
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/UIObjectImpl.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/UIObjectImpl.java 2008-04-17 21:52:02 UTC (rev 10627)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/UIObjectImpl.java 2008-04-18 00:31:55 UTC (rev 10628)
@@ -22,10 +22,10 @@
******************************************************************************/
package org.jboss.portal.presentation.impl.model2;
-import org.jboss.portal.presentation.model2.UIObject;
-import org.jboss.portal.presentation.model2.ui.UIWindow;
-import org.jboss.portal.presentation.model2.ui.UIPage;
-import org.jboss.portal.presentation.model2.ui.UIContext;
+import org.jboss.portal.presentation.model.UIObject;
+import org.jboss.portal.presentation.model.ui.UIContext;
+import org.jboss.portal.presentation.model.ui.UIPage;
+import org.jboss.portal.presentation.model.ui.UIWindow;
import org.jboss.portal.presentation.state.StateException;
import org.jboss.portal.presentation.state.StateType;
import org.jboss.portal.presentation.state.navigational.NavigationalStateContext;
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/ViewPortImpl.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/ViewPortImpl.java 2008-04-17 21:52:02 UTC (rev 10627)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/ViewPortImpl.java 2008-04-18 00:31:55 UTC (rev 10628)
@@ -22,9 +22,9 @@
******************************************************************************/
package org.jboss.portal.presentation.impl.model2;
-import org.jboss.portal.presentation.model2.ViewPort;
-import org.jboss.portal.presentation.model2.ViewPortContext;
-import org.jboss.portal.presentation.model2.ViewPortScope;
+import org.jboss.portal.presentation.model.ViewPort;
+import org.jboss.portal.presentation.model.ViewPortContext;
+import org.jboss.portal.presentation.model.ViewPortScope;
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/ui/UIContextImpl.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/ui/UIContextImpl.java 2008-04-17 21:52:02 UTC (rev 10627)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/ui/UIContextImpl.java 2008-04-18 00:31:55 UTC (rev 10628)
@@ -22,7 +22,7 @@
******************************************************************************/
package org.jboss.portal.presentation.impl.model2.ui;
-import org.jboss.portal.presentation.model2.ui.UIContext;
+import org.jboss.portal.presentation.model.ui.UIContext;
import org.jboss.portal.presentation.state.structural.StructuralObject;
import org.jboss.portal.presentation.state.navigational.NavigationalStateContext;
import org.jboss.portal.presentation.impl.model2.UIObjectImpl;
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/ui/UIPageImpl.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/ui/UIPageImpl.java 2008-04-17 21:52:02 UTC (rev 10627)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/ui/UIPageImpl.java 2008-04-18 00:31:55 UTC (rev 10628)
@@ -22,7 +22,7 @@
******************************************************************************/
package org.jboss.portal.presentation.impl.model2.ui;
-import org.jboss.portal.presentation.model2.ui.UIPage;
+import org.jboss.portal.presentation.model.ui.UIPage;
import org.jboss.portal.presentation.state.structural.StructuralObject;
import org.jboss.portal.presentation.state.navigational.NavigationalStateContext;
import org.jboss.portal.presentation.impl.model2.UIObjectImpl;
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/ui/UIWindowImpl.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/ui/UIWindowImpl.java 2008-04-17 21:52:02 UTC (rev 10627)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/ui/UIWindowImpl.java 2008-04-18 00:31:55 UTC (rev 10628)
@@ -22,7 +22,7 @@
******************************************************************************/
package org.jboss.portal.presentation.impl.model2.ui;
-import org.jboss.portal.presentation.model2.ui.UIWindow;
+import org.jboss.portal.presentation.model.ui.UIWindow;
import org.jboss.portal.presentation.state.structural.StructuralObject;
import org.jboss.portal.presentation.state.StateType;
import org.jboss.portal.presentation.state.navigational.NavigationalStateContext;
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/ContextNode.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/ContextNode.java 2008-04-17 21:52:02 UTC (rev 10627)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/ContextNode.java 2008-04-18 00:31:55 UTC (rev 10628)
@@ -22,8 +22,8 @@
******************************************************************************/
package org.jboss.portal.presentation.impl.state.structural;
-import org.jboss.portal.presentation.model2.UIObject;
-import org.jboss.portal.presentation.model2.ui.UIContext;
+import org.jboss.portal.presentation.model.UIObject;
+import org.jboss.portal.presentation.model.ui.UIContext;
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/PageNode.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/PageNode.java 2008-04-17 21:52:02 UTC (rev 10627)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/PageNode.java 2008-04-18 00:31:55 UTC (rev 10628)
@@ -22,8 +22,8 @@
******************************************************************************/
package org.jboss.portal.presentation.impl.state.structural;
-import org.jboss.portal.presentation.model2.UIObject;
-import org.jboss.portal.presentation.model2.ui.UIPage;
+import org.jboss.portal.presentation.model.UIObject;
+import org.jboss.portal.presentation.model.ui.UIPage;
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/StructuralNode.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/StructuralNode.java 2008-04-17 21:52:02 UTC (rev 10627)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/StructuralNode.java 2008-04-18 00:31:55 UTC (rev 10628)
@@ -24,7 +24,7 @@
import org.jboss.portal.presentation.state.structural.StructuralObject;
import org.jboss.portal.presentation.state.StaleStateException;
-import org.jboss.portal.presentation.model2.UIObject;
+import org.jboss.portal.presentation.model.UIObject;
import java.util.Map;
import java.util.HashMap;
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/StructuralStateImpl.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/StructuralStateImpl.java 2008-04-17 21:52:02 UTC (rev 10627)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/StructuralStateImpl.java 2008-04-18 00:31:55 UTC (rev 10628)
@@ -23,7 +23,7 @@
package org.jboss.portal.presentation.impl.state.structural;
import org.jboss.portal.presentation.state.structural.StructuralState;
-import org.jboss.portal.presentation.model2.UIObject;
+import org.jboss.portal.presentation.model.UIObject;
import java.util.Map;
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/WindowNode.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/WindowNode.java 2008-04-17 21:52:02 UTC (rev 10627)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/WindowNode.java 2008-04-18 00:31:55 UTC (rev 10628)
@@ -22,8 +22,8 @@
******************************************************************************/
package org.jboss.portal.presentation.impl.state.structural;
-import org.jboss.portal.presentation.model2.UIObject;
-import org.jboss.portal.presentation.model2.ui.UIWindow;
+import org.jboss.portal.presentation.model.UIObject;
+import org.jboss.portal.presentation.model.ui.UIWindow;
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ObjectTraversalType.java (from rev 10627, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/ObjectTraversalType.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ObjectTraversalType.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ObjectTraversalType.java 2008-04-18 00:31:55 UTC (rev 10628)
@@ -0,0 +1,49 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.model;
+
+/**
+ * A type that describe the different ways to traverse an object.
+ *
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public enum ObjectTraversalType
+{
+
+ /**
+ * The object should be visited and its children.
+ */
+ RECURSIVE,
+
+ /**
+ * The object should be visited but not its children.
+ */
+ SINGLE,
+
+
+ /**
+ * The object should not be visited.
+ */
+ SKIP
+}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIModel.java (from rev 10627, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/UIModel.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIModel.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIModel.java 2008-04-18 00:31:55 UTC (rev 10628)
@@ -0,0 +1,50 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.model;
+
+/**
+ * The user interface model
+ *
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public interface UIModel
+{
+
+ /**
+ * The root id of the model.
+ *
+ * @return the root id
+ */
+ String getRootId();
+
+ /**
+ * Creates a viewport from the specified context and scope.
+ *
+ * @param context the context
+ * @param scope the scope
+ * @return the viewport
+ */
+ ViewPort createViewPort(ViewPortContext context, ViewPortScope scope);
+
+}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIObject.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIObject.java 2008-04-17 21:52:02 UTC (rev 10627)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIObject.java 2008-04-18 00:31:55 UTC (rev 10628)
@@ -1,208 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model;
-
-import org.jboss.portal.presentation.model.state.StateException;
-import org.jboss.portal.presentation.model.state.ConstraintViolationException;
-
-import java.util.Collection;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public interface UIObject
-{
-
- /**
- * The status of a user interface object.
- */
- public enum Status
- {
- /**
- * It can be used.
- */
- VALID,
-
- /**
- * It cannot be used.
- */
- INVALID,
-
- /**
- * It cannot be used as is but a recovery is possible to either become valid or invalid.
- */
- STALE
- }
-
- public interface Visitor
- {
-
- /**
- * Returns true if the provided object should be visited.
- *
- * @param object the object
- * @return true if it should be visited
- */
- boolean enterObject(UIObject object);
-
- /**
- * Callback to signal that an object visit is terminated
- *
- * @param object the object
- */
- void leaveObject(UIObject object);
-
- /**
- * Returns true if the children should be visited
- *
- * @param object the parent of the children
- * @param loaded if the relationship is already loaded
- * @return true if the children should be visited
- */
- boolean enterChildren(UIObject object, boolean loaded);
-
- }
-
- /**
- * Updates the status of the object by comparing validating it against the structural state context.
- */
- void validate();
-
- void validate(Visitor scope);
-
- /**
- * Attempt a resolution of the current conflict. The behavior of the method will change according to the
- * current status of the object:
- * <ul>
- * <li><code>STALE</code> status leads to resolve the conflict to a new status with <code>INVALID</code> or <code>VALID</code>
- * as possible values</li>
- * <li><code>VALID</code> status leads to a non operation</li>
- * <li><code>INVALID</code> status leads to throw an <code>IllegalStateException</code></li>
- * </ul>
- */
- void refresh();
-
- void refresh(Visitor scope);
-
- /**
- * Return the current status.
- *
- * @return the status
- */
- Status getStatus();
-
- /**
- * Returns the id.
- *
- * @return the id
- */
- String getId();
-
- /**
- * Returns the name.
- *
- * @return the name
- */
- String getName();
-
- /**
- * Returns the parent or null if the object does not have a parent.
- *
- * @return the parent
- */
- UIObject getParent();
-
- /**
- * Returns a named child or null if it does not exist.
- *
- * @param name the name of the child
- * @return the named child
- */
- UIObject getChild(String name);
-
- /**
- * Returns a property value or null if it does not exist.
- *
- * @param stateType the scope where to get the value from
- * @param propertyName the property name
- * @param propertyType the expected property type
- * @return the property value
- * @throws IllegalArgumentException if any argument is null or not valid
- * @throws StateException any state exception
- */
- <T> T getProperty(StateType stateType, String propertyName, Class<T> propertyType) throws IllegalArgumentException, StateException;
-
- /**
- * Equivalent to call <code>getPropertyValue(StateScopeType,String,Class)</code> with the <code>Object.class</code>
- * literal.
- *
- * @param stateType the scope where to get the value from
- * @param propertyName the property name
- * @return the property value
- * @throws IllegalArgumentException if any argument is null or not valid
- * @throws StateException any state exception
- */
- Object getProperty(StateType stateType, String propertyName) throws IllegalArgumentException, StateException;
-
- <T> void setProperty(StateType stateType, String propertyName, T propertyValue) throws IllegalArgumentException, StateException;
-
- /**
- * Create a named child with a specified type.
- *
- * @param name the child name
- * @param type the child type
- * @return the newly created child
- * @throws IllegalArgumentException if the name is null, already exists or this kind of object does not accept children of the specified type
- * @throws StateException any state exception
- */
- <T extends UIObject> T createChild(String name, Class<T> type) throws IllegalArgumentException, StateException;
-
- /**
- * Returns the children of this object.
- *
- * @return the list of children
- */
- Collection<? extends UIObject> getChildren();
-
- /**
- * Destroy a named child.
- *
- * @param name the name of the child to destroy
- * @throws IllegalArgumentException if the name is null or the child does not exist
- * @throws StateException any state exception
- */
- void destroyChild(String name) throws IllegalArgumentException, StateException;
-
- /**
- * Move the specified object to a new parent. A constraint violation will be detected if the destination
- * is a descendant of the current object.
- *
- * @param destination the new parent
- * @throws IllegalArgumentException if the destination is null
- * @throws StateException any state exception
- * @throws ConstraintViolationException if the destination is not valid
- */
- void move(UIObject destination) throws IllegalArgumentException, StateException;
-
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIObject.java (from rev 10627, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/UIObject.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIObject.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIObject.java 2008-04-18 00:31:55 UTC (rev 10628)
@@ -0,0 +1,73 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.model;
+
+import org.jboss.portal.presentation.model.state.StateException;
+import org.jboss.portal.presentation.state.StateType;
+
+import java.util.Set;
+
+/**
+ * A wrapper of a structural object. The main goal of this object is to let the viewport add custom payload
+ * in addition of the structural state.
+ *
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public interface UIObject
+{
+
+ /**
+ * Returns the id.
+ *
+ * @return the id
+ */
+ String getId();
+
+ /**
+ * Returns the name.
+ *
+ * @return the name
+ */
+ String getName();
+
+ /**
+ * Returns a property value or null if it does not exist.
+ *
+ * @param stateType the state type
+ * @param propertyName the property name
+ * @param propertyType the expected property type @return the property value @return the property value
+ * @return the property value
+ * @throws IllegalArgumentException if any argument is null or not valid
+ * @throws StateException any state exception
+ */
+ <T> T getProperty(StateType stateType, String propertyName, Class<T> propertyType) throws IllegalArgumentException, StateException;
+
+ /**
+ * Returns the set of property names of this object
+ *
+ * @param stateType the state type
+ * @return the property names
+ */
+ Set<String> getPropertyNames(StateType stateType);
+}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ViewPort.java (from rev 10627, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/ViewPort.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ViewPort.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ViewPort.java 2008-04-18 00:31:55 UTC (rev 10628)
@@ -0,0 +1,60 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.model;
+
+/**
+ * A viewport is a view of a subset of the structural state presented by the structural state context.
+ * It does not provide access to the information but rather provides a way to populate a viewport context
+ * using a viewport scope because the presentation client implementation is the party responsible for
+ * defining the scope of the view port as well as the storage of the viewport informations.
+ *
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public interface ViewPort
+{
+
+ /**
+ * Performs a refresh operation. The viewport uses the viewport scope object to navigate the structural
+ * state and perform updates to the viewport scope. If the viewport context is not yet populated, the
+ * refresh operation populates the context with the viewport defined the viewport scope. If the viewport
+ * already contains structural information then the viewport proceeds to a merge of the actual state held
+ * by the viewport context and the refreshed state provided by the structural state context.
+ */
+ void refresh();
+
+ /**
+ * Returns the context associated with this viewport.
+ *
+ * @return the context
+ */
+ ViewPortContext getContext();
+
+ /**
+ * Returns the scope associated with this viewport.
+ *
+ * @return the scope
+ */
+ ViewPortScope getScope();
+
+}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ViewPortContext.java (from rev 10627, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/ViewPortContext.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ViewPortContext.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ViewPortContext.java 2008-04-18 00:31:55 UTC (rev 10628)
@@ -0,0 +1,97 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.model;
+
+import org.jboss.portal.presentation.model.UIObject;
+
+/**
+ * This interface defines read-write access to the structural information of a viewport.
+ *
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public interface ViewPortContext
+{
+
+ /**
+ * Returns the specified object or null if it does not exist
+ *
+ * @param objectId the object id
+ * @return the specified object
+ */
+ UIObject getObject(String objectId);
+
+ /**
+ * Populate the context with the specified object.
+ *
+ * @param object the object
+ */
+ void addObject(UIObject object);
+
+ /**
+ * Signals the context that the object state has been updated.
+ *
+ * @param objectId the object id
+ */
+ void updateObject(String objectId);
+
+ /**
+ * Removes the specified object from the context.
+ *
+ * @param objectId the object id
+ */
+ void removeObject(String objectId);
+
+ /**
+ * Initialize the children of a specified object.
+ *
+ * @param parentId the object id
+ */
+ void createChildren(String parentId);
+
+ /**
+ * Destroys the children of a specified object.
+ *
+ * @param parentId the object id
+ */
+ void destroyChildren(String parentId);
+
+ /**
+ * Create a relationship between a parent and one of its children. When this callback occurs the context
+ * should already be populated with the specified parent object and child object.
+ *
+ * @param parentId the parent id
+ * @param childId the child id
+ */
+ void addChild(String parentId, String childId);
+
+ /**
+ * Destroys a relationship between a parent and one of its children. When this callback occurs the context
+ * should be populated with the specified parent object and child object.
+ *
+ * @param parentId the parent id
+ * @param childId the child id
+ */
+ void removeChild(String parentId, String childId);
+
+}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ViewPortScope.java (from rev 10627, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/ViewPortScope.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ViewPortScope.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ViewPortScope.java 2008-04-18 00:31:55 UTC (rev 10628)
@@ -0,0 +1,59 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.model;
+
+import org.jboss.portal.presentation.model.UIObject;
+
+/**
+ * Defines the scope of a viewport. This interface is separated from the viewport context in order to
+ * really affirm the split between the concern between the scope implementation that is used by the viewport
+ * to populate the viewport context during a refresh operation.
+ *
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public interface ViewPortScope
+{
+ /**
+ * Returns the id of the root of the scope.
+ *
+ * @return the root id
+ */
+ String getRootId();
+
+ /**
+ * Returns how the object should be traversed.
+ *
+ * @param object the object
+ * @return true if it should be visited
+ */
+ ObjectTraversalType enterObject(UIObject object);
+
+ /**
+ * Callback to signal that an object visit is terminated. It can be used by the scope to maintain a data
+ * structure of the traversed model.
+ *
+ * @param object the object
+ */
+ void leaveObject(UIObject object);
+}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ui (from rev 10627, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/ui)
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ui/UIAction.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/ui/UIAction.java 2008-04-17 21:52:02 UTC (rev 10627)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ui/UIAction.java 2008-04-18 00:31:55 UTC (rev 10628)
@@ -20,9 +20,8 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
******************************************************************************/
-package org.jboss.portal.presentation.model2.ui;
+package org.jboss.portal.presentation.model.ui;
-import org.jboss.portal.presentation.model.UIObject;
/**
* An action that can be triggered.
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ui/UIContainer.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/ui/UIContainer.java 2008-04-17 21:52:02 UTC (rev 10627)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ui/UIContainer.java 2008-04-18 00:31:55 UTC (rev 10628)
@@ -20,9 +20,9 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
******************************************************************************/
-package org.jboss.portal.presentation.model2.ui;
+package org.jboss.portal.presentation.model.ui;
-import org.jboss.portal.presentation.model2.UIObject;
+import org.jboss.portal.presentation.model.UIObject;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ui/UIContext.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/ui/UIContext.java 2008-04-17 21:52:02 UTC (rev 10627)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ui/UIContext.java 2008-04-18 00:31:55 UTC (rev 10628)
@@ -20,9 +20,9 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
******************************************************************************/
-package org.jboss.portal.presentation.model2.ui;
+package org.jboss.portal.presentation.model.ui;
-import org.jboss.portal.presentation.model2.UIObject;
+import org.jboss.portal.presentation.model.UIObject;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ui/UIObject.java (from rev 10627, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIObject.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ui/UIObject.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ui/UIObject.java 2008-04-18 00:31:55 UTC (rev 10628)
@@ -0,0 +1,209 @@
+/******************************************************************************
+ * 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.presentation.model.ui;
+
+import org.jboss.portal.presentation.model.StateType;
+import org.jboss.portal.presentation.model.state.StateException;
+import org.jboss.portal.presentation.model.state.ConstraintViolationException;
+
+import java.util.Collection;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public interface UIObject
+{
+
+ /**
+ * The status of a user interface object.
+ */
+ public enum Status
+ {
+ /**
+ * It can be used.
+ */
+ VALID,
+
+ /**
+ * It cannot be used.
+ */
+ INVALID,
+
+ /**
+ * It cannot be used as is but a recovery is possible to either become valid or invalid.
+ */
+ STALE
+ }
+
+ public interface Visitor
+ {
+
+ /**
+ * Returns true if the provided object should be visited.
+ *
+ * @param object the object
+ * @return true if it should be visited
+ */
+ boolean enterObject(UIObject object);
+
+ /**
+ * Callback to signal that an object visit is terminated
+ *
+ * @param object the object
+ */
+ void leaveObject(UIObject object);
+
+ /**
+ * Returns true if the children should be visited
+ *
+ * @param object the parent of the children
+ * @param loaded if the relationship is already loaded
+ * @return true if the children should be visited
+ */
+ boolean enterChildren(UIObject object, boolean loaded);
+
+ }
+
+ /**
+ * Updates the status of the object by comparing validating it against the structural state context.
+ */
+ void validate();
+
+ void validate(Visitor scope);
+
+ /**
+ * Attempt a resolution of the current conflict. The behavior of the method will change according to the
+ * current status of the object:
+ * <ul>
+ * <li><code>STALE</code> status leads to resolve the conflict to a new status with <code>INVALID</code> or <code>VALID</code>
+ * as possible values</li>
+ * <li><code>VALID</code> status leads to a non operation</li>
+ * <li><code>INVALID</code> status leads to throw an <code>IllegalStateException</code></li>
+ * </ul>
+ */
+ void refresh();
+
+ void refresh(Visitor scope);
+
+ /**
+ * Return the current status.
+ *
+ * @return the status
+ */
+ Status getStatus();
+
+ /**
+ * Returns the id.
+ *
+ * @return the id
+ */
+ String getId();
+
+ /**
+ * Returns the name.
+ *
+ * @return the name
+ */
+ String getName();
+
+ /**
+ * Returns the parent or null if the object does not have a parent.
+ *
+ * @return the parent
+ */
+ UIObject getParent();
+
+ /**
+ * Returns a named child or null if it does not exist.
+ *
+ * @param name the name of the child
+ * @return the named child
+ */
+ UIObject getChild(String name);
+
+ /**
+ * Returns a property value or null if it does not exist.
+ *
+ * @param stateType the scope where to get the value from
+ * @param propertyName the property name
+ * @param propertyType the expected property type
+ * @return the property value
+ * @throws IllegalArgumentException if any argument is null or not valid
+ * @throws StateException any state exception
+ */
+ <T> T getProperty(StateType stateType, String propertyName, Class<T> propertyType) throws IllegalArgumentException, StateException;
+
+ /**
+ * Equivalent to call <code>getPropertyValue(StateScopeType,String,Class)</code> with the <code>Object.class</code>
+ * literal.
+ *
+ * @param stateType the scope where to get the value from
+ * @param propertyName the property name
+ * @return the property value
+ * @throws IllegalArgumentException if any argument is null or not valid
+ * @throws StateException any state exception
+ */
+ Object getProperty(StateType stateType, String propertyName) throws IllegalArgumentException, StateException;
+
+ <T> void setProperty(StateType stateType, String propertyName, T propertyValue) throws IllegalArgumentException, StateException;
+
+ /**
+ * Create a named child with a specified type.
+ *
+ * @param name the child name
+ * @param type the child type
+ * @return the newly created child
+ * @throws IllegalArgumentException if the name is null, already exists or this kind of object does not accept children of the specified type
+ * @throws StateException any state exception
+ */
+ <T extends UIObject> T createChild(String name, Class<T> type) throws IllegalArgumentException, StateException;
+
+ /**
+ * Returns the children of this object.
+ *
+ * @return the list of children
+ */
+ Collection<? extends UIObject> getChildren();
+
+ /**
+ * Destroy a named child.
+ *
+ * @param name the name of the child to destroy
+ * @throws IllegalArgumentException if the name is null or the child does not exist
+ * @throws StateException any state exception
+ */
+ void destroyChild(String name) throws IllegalArgumentException, StateException;
+
+ /**
+ * Move the specified object to a new parent. A constraint violation will be detected if the destination
+ * is a descendant of the current object.
+ *
+ * @param destination the new parent
+ * @throws IllegalArgumentException if the destination is null
+ * @throws StateException any state exception
+ * @throws ConstraintViolationException if the destination is not valid
+ */
+ void move(UIObject destination) throws IllegalArgumentException, StateException;
+
+}
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ui/UIPage.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/ui/UIPage.java 2008-04-17 21:52:02 UTC (rev 10627)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ui/UIPage.java 2008-04-18 00:31:55 UTC (rev 10628)
@@ -20,9 +20,9 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
******************************************************************************/
-package org.jboss.portal.presentation.model2.ui;
+package org.jboss.portal.presentation.model.ui;
-import org.jboss.portal.presentation.model2.UIObject;
+import org.jboss.portal.presentation.model.UIObject;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ui/UIWindow.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/ui/UIWindow.java 2008-04-17 21:52:02 UTC (rev 10627)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ui/UIWindow.java 2008-04-18 00:31:55 UTC (rev 10628)
@@ -20,11 +20,11 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
******************************************************************************/
-package org.jboss.portal.presentation.model2.ui;
+package org.jboss.portal.presentation.model.ui;
import org.jboss.portal.WindowState;
import org.jboss.portal.Mode;
-import org.jboss.portal.presentation.model2.UIObject;
+import org.jboss.portal.presentation.model.UIObject;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/MoveUIObjectAction.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/MoveUIObjectAction.java 2008-04-17 21:52:02 UTC (rev 10627)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/MoveUIObjectAction.java 2008-04-18 00:31:55 UTC (rev 10628)
@@ -22,7 +22,7 @@
******************************************************************************/
package org.jboss.portal.presentation.protocol;
-import org.jboss.portal.presentation.model.UIObject;
+import org.jboss.portal.presentation.model.ui.UIObject;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/state/structural/StructuralState.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/state/structural/StructuralState.java 2008-04-17 21:52:02 UTC (rev 10627)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/state/structural/StructuralState.java 2008-04-18 00:31:55 UTC (rev 10628)
@@ -22,7 +22,7 @@
******************************************************************************/
package org.jboss.portal.presentation.state.structural;
-import org.jboss.portal.presentation.model2.UIObject;
+import org.jboss.portal.presentation.model.UIObject;
import java.util.Map;
Modified: modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/AbstractModelTestCase.java
===================================================================
--- modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/AbstractModelTestCase.java 2008-04-17 21:52:02 UTC (rev 10627)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/AbstractModelTestCase.java 2008-04-18 00:31:55 UTC (rev 10628)
@@ -23,9 +23,10 @@
package org.jboss.portal.presentation.test.model;
import junit.framework.TestCase;
-import org.jboss.portal.presentation.model2.UIObject;
-import org.jboss.portal.presentation.model2.ui.UIContext;
-import org.jboss.portal.presentation.model2.ui.UIPage;
+
+import org.jboss.portal.presentation.model.UIObject;
+import org.jboss.portal.presentation.model.ui.UIContext;
+import org.jboss.portal.presentation.model.ui.UIPage;
import org.jboss.portal.presentation.state.structural.StructuralObject;
import org.jboss.portal.presentation.state.structural.StructuralState;
import org.jboss.portal.presentation.state.structural.StructuralStateContext;
Modified: modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/state/structural/MockModelImpl.java
===================================================================
--- modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/state/structural/MockModelImpl.java 2008-04-17 21:52:02 UTC (rev 10627)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/state/structural/MockModelImpl.java 2008-04-18 00:31:55 UTC (rev 10628)
@@ -22,8 +22,8 @@
******************************************************************************/
package org.jboss.portal.presentation.test.model.state.structural;
-import org.jboss.portal.presentation.model2.ui.UIContext;
-import org.jboss.portal.presentation.model2.UIObject;
+import org.jboss.portal.presentation.model.UIObject;
+import org.jboss.portal.presentation.model.ui.UIContext;
import org.jboss.portal.presentation.state.NoSuchStateException;
import org.jboss.portal.presentation.state.StaleStateException;
import org.jboss.portal.presentation.state.StateException;
Modified: modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/state/structural/MockObject.java
===================================================================
--- modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/state/structural/MockObject.java 2008-04-17 21:52:02 UTC (rev 10627)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/state/structural/MockObject.java 2008-04-18 00:31:55 UTC (rev 10628)
@@ -22,10 +22,10 @@
******************************************************************************/
package org.jboss.portal.presentation.test.model.state.structural;
-import org.jboss.portal.presentation.model2.ui.UIContext;
-import org.jboss.portal.presentation.model2.UIObject;
-import org.jboss.portal.presentation.model2.ui.UIPage;
-import org.jboss.portal.presentation.model2.ui.UIWindow;
+import org.jboss.portal.presentation.model.UIObject;
+import org.jboss.portal.presentation.model.ui.UIContext;
+import org.jboss.portal.presentation.model.ui.UIPage;
+import org.jboss.portal.presentation.model.ui.UIWindow;
import org.jboss.portal.presentation.state.structural.StructuralObject;
import java.util.List;
Modified: modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/state/structural/MockObjectImpl.java
===================================================================
--- modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/state/structural/MockObjectImpl.java 2008-04-17 21:52:02 UTC (rev 10627)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/state/structural/MockObjectImpl.java 2008-04-18 00:31:55 UTC (rev 10628)
@@ -22,7 +22,7 @@
******************************************************************************/
package org.jboss.portal.presentation.test.model.state.structural;
-import org.jboss.portal.presentation.model2.UIObject;
+import org.jboss.portal.presentation.model.UIObject;
import java.util.ArrayList;
import java.util.Collections;
Modified: modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/state/structural/StructuralStateImpl.java
===================================================================
--- modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/state/structural/StructuralStateImpl.java 2008-04-17 21:52:02 UTC (rev 10627)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/state/structural/StructuralStateImpl.java 2008-04-18 00:31:55 UTC (rev 10628)
@@ -23,7 +23,7 @@
package org.jboss.portal.presentation.test.model.state.structural;
import org.jboss.portal.presentation.state.structural.StructuralState;
-import org.jboss.portal.presentation.model2.UIObject;
+import org.jboss.portal.presentation.model.UIObject;
import java.util.Map;
Modified: modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/AbstractModelTestCase.java
===================================================================
--- modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/AbstractModelTestCase.java 2008-04-17 21:52:02 UTC (rev 10627)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/AbstractModelTestCase.java 2008-04-18 00:31:55 UTC (rev 10628)
@@ -22,7 +22,7 @@
******************************************************************************/
package org.jboss.portal.presentation.test.model3;
-import org.jboss.portal.presentation.model2.UIModel;
+import org.jboss.portal.presentation.model.UIModel;
import org.jboss.portal.presentation.test.model.state.structural.MockModel;
import org.jboss.portal.presentation.test.model.state.structural.MockModelImpl;
import org.jboss.portal.presentation.impl.state.navigational.NavigationalStateContextImpl;
Modified: modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/AddChildTestCase.java
===================================================================
--- modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/AddChildTestCase.java 2008-04-17 21:52:02 UTC (rev 10627)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/AddChildTestCase.java 2008-04-18 00:31:55 UTC (rev 10628)
@@ -22,10 +22,10 @@
******************************************************************************/
package org.jboss.portal.presentation.test.model3;
-import org.jboss.portal.presentation.model2.ViewPortScope;
-import org.jboss.portal.presentation.model2.ViewPort;
-import org.jboss.portal.presentation.model2.ObjectTraversalType;
-import org.jboss.portal.presentation.model2.ui.UIPage;
+import org.jboss.portal.presentation.model.ObjectTraversalType;
+import org.jboss.portal.presentation.model.ViewPort;
+import org.jboss.portal.presentation.model.ViewPortScope;
+import org.jboss.portal.presentation.model.ui.UIPage;
import org.jboss.portal.presentation.test.model.state.structural.MockObject;
/**
Modified: modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/CustomScope.java
===================================================================
--- modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/CustomScope.java 2008-04-17 21:52:02 UTC (rev 10627)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/CustomScope.java 2008-04-18 00:31:55 UTC (rev 10628)
@@ -22,10 +22,10 @@
******************************************************************************/
package org.jboss.portal.presentation.test.model3;
-import org.jboss.portal.presentation.model2.ViewPortScope;
-import org.jboss.portal.presentation.model2.ObjectTraversalType;
-import org.jboss.portal.presentation.model2.UIObject;
-import org.jboss.portal.presentation.model2.UIModel;
+import org.jboss.portal.presentation.model.ObjectTraversalType;
+import org.jboss.portal.presentation.model.UIModel;
+import org.jboss.portal.presentation.model.UIObject;
+import org.jboss.portal.presentation.model.ViewPortScope;
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
Modified: modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/ModelTestCase.java
===================================================================
--- modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/ModelTestCase.java 2008-04-17 21:52:02 UTC (rev 10627)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/ModelTestCase.java 2008-04-18 00:31:55 UTC (rev 10628)
@@ -22,12 +22,12 @@
******************************************************************************/
package org.jboss.portal.presentation.test.model3;
-import org.jboss.portal.presentation.model2.ViewPortScope;
-import org.jboss.portal.presentation.model2.ViewPort;
-import org.jboss.portal.presentation.model2.ObjectTraversalType;
-import org.jboss.portal.presentation.model2.ui.UIPage;
-import org.jboss.portal.presentation.model2.ui.UIWindow;
-import org.jboss.portal.presentation.model2.ui.UIContext;
+import org.jboss.portal.presentation.model.ObjectTraversalType;
+import org.jboss.portal.presentation.model.ViewPort;
+import org.jboss.portal.presentation.model.ViewPortScope;
+import org.jboss.portal.presentation.model.ui.UIContext;
+import org.jboss.portal.presentation.model.ui.UIPage;
+import org.jboss.portal.presentation.model.ui.UIWindow;
import org.jboss.portal.presentation.test.model.state.structural.MockObject;
/**
Modified: modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/MoveChildTestCase.java
===================================================================
--- modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/MoveChildTestCase.java 2008-04-17 21:52:02 UTC (rev 10627)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/MoveChildTestCase.java 2008-04-18 00:31:55 UTC (rev 10628)
@@ -22,9 +22,9 @@
******************************************************************************/
package org.jboss.portal.presentation.test.model3;
-import org.jboss.portal.presentation.model2.ObjectTraversalType;
-import org.jboss.portal.presentation.model2.ViewPortScope;
-import org.jboss.portal.presentation.model2.ViewPort;
+import org.jboss.portal.presentation.model.ObjectTraversalType;
+import org.jboss.portal.presentation.model.ViewPort;
+import org.jboss.portal.presentation.model.ViewPortScope;
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
Modified: modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/NodeDef.java
===================================================================
--- modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/NodeDef.java 2008-04-17 21:52:02 UTC (rev 10627)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/NodeDef.java 2008-04-18 00:31:55 UTC (rev 10628)
@@ -22,10 +22,10 @@
******************************************************************************/
package org.jboss.portal.presentation.test.model3;
-import org.jboss.portal.presentation.model2.ObjectTraversalType;
-import org.jboss.portal.presentation.model2.UIObject;
-import org.jboss.portal.presentation.model2.ui.UIPage;
-import org.jboss.portal.presentation.model2.ui.UIContext;
+import org.jboss.portal.presentation.model.ObjectTraversalType;
+import org.jboss.portal.presentation.model.UIObject;
+import org.jboss.portal.presentation.model.ui.UIContext;
+import org.jboss.portal.presentation.model.ui.UIPage;
import org.jboss.portal.presentation.test.model.state.structural.MockObject;
import org.jboss.portal.presentation.test.model.state.structural.MockModel;
Modified: modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/RemoveChildTestCase.java
===================================================================
--- modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/RemoveChildTestCase.java 2008-04-17 21:52:02 UTC (rev 10627)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/RemoveChildTestCase.java 2008-04-18 00:31:55 UTC (rev 10628)
@@ -22,9 +22,9 @@
******************************************************************************/
package org.jboss.portal.presentation.test.model3;
-import org.jboss.portal.presentation.model2.ViewPortScope;
-import org.jboss.portal.presentation.model2.ViewPort;
-import org.jboss.portal.presentation.model2.ObjectTraversalType;
+import org.jboss.portal.presentation.model.ObjectTraversalType;
+import org.jboss.portal.presentation.model.ViewPort;
+import org.jboss.portal.presentation.model.ViewPortScope;
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
Modified: modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/TraversalModelTestCase.java
===================================================================
--- modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/TraversalModelTestCase.java 2008-04-17 21:52:02 UTC (rev 10627)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/TraversalModelTestCase.java 2008-04-18 00:31:55 UTC (rev 10628)
@@ -22,8 +22,8 @@
******************************************************************************/
package org.jboss.portal.presentation.test.model3;
-import org.jboss.portal.presentation.model2.ObjectTraversalType;
-import org.jboss.portal.presentation.model2.UIModel;
+import org.jboss.portal.presentation.model.ObjectTraversalType;
+import org.jboss.portal.presentation.model.UIModel;
import org.jboss.portal.presentation.test.model.state.structural.MockModel;
import org.jboss.portal.presentation.test.model.state.structural.MockModelImpl;
import org.jboss.portal.presentation.impl.state.navigational.NavigationalStateContextImpl;
Modified: modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/TypeTestCase.java
===================================================================
--- modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/TypeTestCase.java 2008-04-17 21:52:02 UTC (rev 10627)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/TypeTestCase.java 2008-04-18 00:31:55 UTC (rev 10628)
@@ -22,11 +22,11 @@
******************************************************************************/
package org.jboss.portal.presentation.test.model3;
-import org.jboss.portal.presentation.model2.ui.UIPage;
-import org.jboss.portal.presentation.model2.ui.UIWindow;
-import org.jboss.portal.presentation.model2.ui.UIContext;
-import org.jboss.portal.presentation.model2.ViewPortScope;
-import org.jboss.portal.presentation.model2.ViewPort;
+import org.jboss.portal.presentation.model.ViewPort;
+import org.jboss.portal.presentation.model.ViewPortScope;
+import org.jboss.portal.presentation.model.ui.UIContext;
+import org.jboss.portal.presentation.model.ui.UIPage;
+import org.jboss.portal.presentation.model.ui.UIWindow;
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
Modified: modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/UIObjectNode.java
===================================================================
--- modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/UIObjectNode.java 2008-04-17 21:52:02 UTC (rev 10627)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/UIObjectNode.java 2008-04-18 00:31:55 UTC (rev 10628)
@@ -22,7 +22,7 @@
******************************************************************************/
package org.jboss.portal.presentation.test.model3;
-import org.jboss.portal.presentation.model2.UIObject;
+import org.jboss.portal.presentation.model.UIObject;
import org.jboss.portal.presentation.state.StateType;
import java.util.Map;
Modified: modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/UIObjectTree.java
===================================================================
--- modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/UIObjectTree.java 2008-04-17 21:52:02 UTC (rev 10627)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/UIObjectTree.java 2008-04-18 00:31:55 UTC (rev 10628)
@@ -22,8 +22,8 @@
******************************************************************************/
package org.jboss.portal.presentation.test.model3;
-import org.jboss.portal.presentation.model2.ViewPortContext;
-import org.jboss.portal.presentation.model2.UIObject;
+import org.jboss.portal.presentation.model.UIObject;
+import org.jboss.portal.presentation.model.ViewPortContext;
import java.util.Map;
import java.util.HashMap;
Modified: modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/UpdateObjectTestCase.java
===================================================================
--- modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/UpdateObjectTestCase.java 2008-04-17 21:52:02 UTC (rev 10627)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/UpdateObjectTestCase.java 2008-04-18 00:31:55 UTC (rev 10628)
@@ -22,9 +22,9 @@
******************************************************************************/
package org.jboss.portal.presentation.test.model3;
-import org.jboss.portal.presentation.model2.ObjectTraversalType;
-import org.jboss.portal.presentation.model2.ViewPortScope;
-import org.jboss.portal.presentation.model2.ViewPort;
+import org.jboss.portal.presentation.model.ObjectTraversalType;
+import org.jboss.portal.presentation.model.ViewPort;
+import org.jboss.portal.presentation.model.ViewPortScope;
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
Modified: modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/state/structural/StructuralStateContextTestCase.java
===================================================================
--- modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/state/structural/StructuralStateContextTestCase.java 2008-04-17 21:52:02 UTC (rev 10627)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/state/structural/StructuralStateContextTestCase.java 2008-04-18 00:31:55 UTC (rev 10628)
@@ -28,10 +28,10 @@
import org.jboss.portal.presentation.impl.state.structural.PageNode;
import org.jboss.portal.presentation.impl.state.structural.WindowNode;
import org.jboss.portal.presentation.state.structural.StructuralStateContext;
-import org.jboss.portal.presentation.model2.ui.UIContext;
-import org.jboss.portal.presentation.model2.ui.UIPage;
-import org.jboss.portal.presentation.model2.UIObject;
-import org.jboss.portal.presentation.model2.ui.UIWindow;
+import org.jboss.portal.presentation.model.UIObject;
+import org.jboss.portal.presentation.model.ui.UIContext;
+import org.jboss.portal.presentation.model.ui.UIPage;
+import org.jboss.portal.presentation.model.ui.UIWindow;
import org.jboss.portal.presentation.test.model.AbstractModelTestCase;
import java.util.ArrayList;
18 years
JBoss Portal SVN: r10627 - in modules/presentation/trunk: classic/src/main/java/org/jboss/portal/presentation/classic and 4 other directories.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2008-04-17 17:52:02 -0400 (Thu, 17 Apr 2008)
New Revision: 10627
Added:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client/
Removed:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client2/
Modified:
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/PresentationServerImpl.java
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationClient.java
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/portlet/spi/PresentationServerContext.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client/PresentationClient.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server2/PresentationServer.java
Log:
refactored client2 package to client
Modified: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/PresentationServerImpl.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/PresentationServerImpl.java 2008-04-17 21:43:34 UTC (rev 10626)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/PresentationServerImpl.java 2008-04-17 21:52:02 UTC (rev 10627)
@@ -33,7 +33,7 @@
import org.jboss.portal.presentation.protocol.ErrorResponse;
import org.jboss.portal.presentation.protocol.ShowUIObjectResponse;
import org.jboss.portal.presentation.model.content.WindowContent;
-import org.jboss.portal.presentation.client2.PresentationClient;
+import org.jboss.portal.presentation.client.PresentationClient;
import org.jboss.portal.presentation.impl.state.structural.StructuralStateContextImpl;
import org.jboss.portal.presentation.impl.state.structural.StructuralNode;
import org.jboss.portal.presentation.impl.state.structural.WindowNode;
Modified: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationClient.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationClient.java 2008-04-17 21:43:34 UTC (rev 10626)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationClient.java 2008-04-17 21:52:02 UTC (rev 10627)
@@ -22,7 +22,7 @@
******************************************************************************/
package org.jboss.portal.presentation.classic;
-import org.jboss.portal.presentation.client2.PresentationClient;
+import org.jboss.portal.presentation.client.PresentationClient;
import org.jboss.portal.presentation.state.navigational.NavigationalStateContext;
import org.jboss.portal.presentation.state.structural.StructuralStateContext;
import org.jboss.portal.presentation.classic.model.DefaultPageViewPortScope;
Modified: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/portlet/spi/PresentationServerContext.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/portlet/spi/PresentationServerContext.java 2008-04-17 21:43:34 UTC (rev 10626)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/portlet/spi/PresentationServerContext.java 2008-04-17 21:52:02 UTC (rev 10627)
@@ -26,7 +26,7 @@
import org.jboss.portal.web.ServletContainer;
import org.jboss.portal.web.RequestDispatchCallback;
import org.jboss.portal.web.ServletContextDispatcher;
-import org.jboss.portal.presentation.client2.PresentationClient;
+import org.jboss.portal.presentation.client.PresentationClient;
import javax.servlet.ServletContext;
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client (from rev 10626, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client2)
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client/PresentationClient.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client2/PresentationClient.java 2008-04-17 21:43:34 UTC (rev 10626)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client/PresentationClient.java 2008-04-17 21:52:02 UTC (rev 10627)
@@ -20,7 +20,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
******************************************************************************/
-package org.jboss.portal.presentation.client2;
+package org.jboss.portal.presentation.client;
import org.jboss.portal.presentation.state.navigational.NavigationalStateContext;
import org.jboss.portal.presentation.protocol.ProtocolAction;
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server2/PresentationServer.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server2/PresentationServer.java 2008-04-17 21:43:34 UTC (rev 10626)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server2/PresentationServer.java 2008-04-17 21:52:02 UTC (rev 10627)
@@ -24,7 +24,7 @@
import org.jboss.portal.presentation.state.structural.StructuralStateContext;
import org.jboss.portal.presentation.model.content.WindowContent;
-import org.jboss.portal.presentation.client2.PresentationClient;
+import org.jboss.portal.presentation.client.PresentationClient;
import org.jboss.portal.presentation.protocol.ProtocolAction;
/**
18 years
JBoss Portal SVN: r10626 - in modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation: state and 1 other directory.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2008-04-17 17:43:34 -0400 (Thu, 17 Apr 2008)
New Revision: 10626
Removed:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/AbstractStructuralStateContext.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/StructuralObject.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/StructuralState.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/StructuralStateContext.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/state/ConstraintViolationException.java
Log:
code cleanup
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/AbstractStructuralStateContext.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/AbstractStructuralStateContext.java 2008-04-17 21:12:58 UTC (rev 10625)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/AbstractStructuralStateContext.java 2008-04-17 21:43:34 UTC (rev 10626)
@@ -1,57 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model.state.structural;
-
-import org.jboss.portal.presentation.model.state.StateChangeVetoException;
-import org.jboss.portal.presentation.model.state.StateException;
-import org.jboss.portal.presentation.model.UIObject;
-
-import java.util.Map;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public abstract class AbstractStructuralStateContext implements StructuralStateContext
-{
-
- public StructuralObject.Creation create(StructuralObject parent, Class<? extends UIObject> type, String name, Map<String, String> properties) throws StateChangeVetoException, StateException, IllegalArgumentException
- {
- throw new StateChangeVetoException();
- }
-
- public StructuralObject.Destruction destroy(StructuralObject object) throws StateException, IllegalArgumentException
- {
- throw new StateChangeVetoException();
- }
-
- public StructuralObject.Move move(StructuralObject source, StructuralObject destination) throws StateException, IllegalArgumentException
- {
- throw new StateChangeVetoException();
- }
-
- public StructuralObject.Update update(StructuralObject object, Map<String, String> changes) throws StateException, IllegalArgumentException
- {
- throw new StateChangeVetoException();
- }
-}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/StructuralObject.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/StructuralObject.java 2008-04-17 21:12:58 UTC (rev 10625)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/StructuralObject.java 2008-04-17 21:43:34 UTC (rev 10626)
@@ -1,306 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model.state.structural;
-
-import java.util.List;
-import java.util.Set;
-import java.util.Map;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public interface StructuralObject
-{
-
- String getId();
-
- StructuralState getState();
-
- boolean compareTo(StructuralObject other);
-
- /**
- * A comparison between two structural objects.
- */
- public static class Refresh
- {
-
- /** . */
- private final StructuralObject parent;
-
- /** . */
- private final StructuralObject object;
-
- /** . */
- private final Set<StructuralObject> addedChildren;
-
- /** . */
- private final Set<String> removedChildren;
-
- /** . */
-// private final Set<String> destroyedChildren;
-
- /** . */
- private final Map<String, StructuralObject> staleChildren;
-
- /** . */
- private final Set<String> validChildren;
-
- public Refresh(
- StructuralObject parent,
- StructuralObject object,
- Set<StructuralObject> addedChildren,
- Set<String> removedChildren,
- Map<String, StructuralObject> staleChildren,
- Set<String> validChildren/*,
- Set<String> destroyedChildren*/)
- {
- if (addedChildren == null)
- {
- throw new IllegalArgumentException();
- }
- if (validChildren == null)
- {
- throw new IllegalArgumentException();
- }
- if (staleChildren == null)
- {
- throw new IllegalArgumentException();
- }
- if (removedChildren == null)
- {
- throw new IllegalArgumentException();
- }
-// if (destroyedChildren == null)
-// {
-// throw new IllegalArgumentException();
-// }
- this.parent = parent;
- this.object = object;
- this.addedChildren = addedChildren;
- this.validChildren = validChildren;
- this.staleChildren = staleChildren;
- this.removedChildren = removedChildren;
-// this.destroyedChildren = destroyedChildren;
- }
-
- public StructuralObject getParent()
- {
- return parent;
- }
-
- public StructuralObject getObject()
- {
- return object;
- }
-
-// public Set<String> getDestroyedChildren()
-// {
-// return destroyedChildren;
-// }
-
- public Set<StructuralObject> getAddedChildren()
- {
- return addedChildren;
- }
-
- public Map<String, StructuralObject> getStaleChildren()
- {
- return staleChildren;
- }
-
- public Set<String> getValidChildren()
- {
- return validChildren;
- }
-
- public Set<String> getRemovedChildren()
- {
- return removedChildren;
- }
- }
-
- public static class Change
- {
- }
-
- public static class Update extends Change
- {
-
- /** . */
- private final StructuralObject object;
-
- /** . */
- private final Map<String, String> changes;
-
- public Update(StructuralObject object, Map<String, String> changes)
- {
- if (object == null)
- {
- throw new IllegalArgumentException();
- }
- if (changes == null)
- {
- throw new IllegalArgumentException();
- }
-
- //
- this.object = object;
- this.changes = changes;
- }
-
- public StructuralObject getObject()
- {
- return object;
- }
-
- public Map<String, String> getChanges()
- {
- return changes;
- }
- }
-
- public static class Move extends Change
- {
-
- /** . */
- private final StructuralObject parent;
-
- /** . */
- private final StructuralObject source;
-
- /** . */
- private final StructuralObject destination;
-
- public Move(
- StructuralObject parent,
- StructuralObject source,
- StructuralObject destination)
- {
- if (parent == null)
- {
- throw new IllegalArgumentException();
- }
- if (source == null)
- {
- throw new IllegalArgumentException();
- }
- if (destination == null)
- {
- throw new IllegalArgumentException();
- }
-
- //
- this.parent = parent;
- this.source = source;
- this.destination = destination;
- }
-
- public StructuralObject getParent()
- {
- return parent;
- }
-
- public StructuralObject getSource()
- {
- return source;
- }
-
- public StructuralObject getDestination()
- {
- return destination;
- }
- }
-
- public static class Creation extends Change
- {
-
- /** . */
- private final StructuralObject child;
-
- /** . */
- private final StructuralObject parent;
-
- public Creation(StructuralObject parent, StructuralObject child)
- {
- if (parent == null)
- {
- throw new IllegalArgumentException();
- }
- if (child == null)
- {
- throw new IllegalArgumentException();
- }
-
- //
- this.parent = parent;
- this.child = child;
- }
-
- public StructuralObject getParent()
- {
- return parent;
- }
-
- public StructuralObject getChild()
- {
- return child;
- }
- }
-
- public static class Destruction extends Change
- {
-
- /** . */
- private final StructuralObject parent;
-
- /** . */
- private final List<String> ids;
-
- public Destruction(StructuralObject parent, List<String> ids)
- {
- if (parent == null)
- {
- throw new IllegalArgumentException();
- }
- if (ids == null)
- {
- throw new IllegalArgumentException();
- }
-
- //
- this.parent = parent;
- this.ids = ids;
- }
-
- public StructuralObject getParent()
- {
- return parent;
- }
-
- public List<String> getIds()
- {
- return ids;
- }
- }
-}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/StructuralState.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/StructuralState.java 2008-04-17 21:12:58 UTC (rev 10625)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/StructuralState.java 2008-04-17 21:43:34 UTC (rev 10626)
@@ -1,43 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model.state.structural;
-
-import org.jboss.portal.presentation.model.UIObject;
-
-import java.util.Map;
-
-/**
- * The structural state.
- *
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public interface StructuralState
-{
-
- Class<? extends UIObject> getType();
-
- String getName();
-
- Map<String, String> getProperties();
-}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/StructuralStateContext.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/StructuralStateContext.java 2008-04-17 21:12:58 UTC (rev 10625)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/StructuralStateContext.java 2008-04-17 21:43:34 UTC (rev 10626)
@@ -1,144 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model.state.structural;
-
-import org.jboss.portal.presentation.model.UIObject;
-import org.jboss.portal.presentation.model.state.StateChangeVetoException;
-import org.jboss.portal.presentation.model.state.StateException;
-
-import java.util.Map;
-import java.util.Collection;
-
-/**
- * The structural state context.
- *
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public interface StructuralStateContext
-{
-
- /**
- * Load the state of the specified object.
- *
- * @param objectId the object id
- * @return the state of the object or null if such state does not exist
- * @throws IllegalArgumentException if the object id argument is null
- */
- StructuralObject load(String objectId) throws IllegalArgumentException;
-
- /**
- * Load the children of the provided object.
- *
- * @param parent the parent
- * @return the list of children as structural objects
- * @throws IllegalArgumentException if the provided object is null
- * @throws StateException any useful exception that would make the object non valid
- */
- Collection<StructuralObject> loadChildren(StructuralObject parent) throws IllegalArgumentException, StateException;
-
- /**
- * Load the parent of the specified object.
- *
- * @param child the child
- * @return the parent or null if it does not exist
- * @throws IllegalArgumentException if the provided object is null
- * @throws StateException any useful exception that would make the object non valid
- */
- StructuralObject loadParent(StructuralObject child) throws IllegalArgumentException, StateException;
-
- /**
- * Returns the id of the root object.
- *
- * @return the id of the root object.
- */
- String getRootId();
-
- /**
- * Validate the state of the provided object. The operation is idempotent and does not modify any state.
- * If validation is succesfull the method returns otherwise it throws an exception that indicates
- * the nature of the non validation failure.
- *
- * @param object the object to check
- * @throws IllegalArgumentException if the provided object is null
- * @throws StateException any useful exception that would make the object non valid
- */
- void validate(StructuralObject object) throws IllegalArgumentException, StateException;
-
- /**
- * Attempt to return an object that contains the difference between the provided object
- * and the up to date object.
- *
- * @param object the object to refresh
- * @return the refresh
- * @throws IllegalArgumentException if the object argument is null
- * @throws StateException if the object cannot be refreshed
- */
- StructuralObject.Refresh refresh(StructuralObject object) throws IllegalArgumentException, StateException;
-
- /**
- * Create an object.
- *
- * @param parent the parent
- * @param type the type of the child
- * @param name the name of the child
- * @param properties the initial properties of the child @return the id of the newly created structural state
- * @return the creation object
- * @throws IllegalArgumentException if an argument is null or not valid
- * @throws StateException if the provided state prevents the operation to be done
- */
- StructuralObject.Creation create(StructuralObject parent, Class<? extends UIObject> type, String name, Map<String, String> properties) throws StateException, IllegalArgumentException;
-
- /**
- * Destroy a specified object.
- *
- * @param object the object to destroy
- * @return the destruction object
- * @throws IllegalArgumentException if an argument is null or not valid
- * @throws StateException if the provided state prevents the operation to be done
- */
- StructuralObject.Destruction destroy(StructuralObject object) throws IllegalArgumentException, StateException;
-
- /**
- * Move an object to a new parent.
- *
- * @param source the source object
- * @param destination the destination object
- * @return the move object
- * @throws IllegalArgumentException if an argument is null or not valid
- * @throws StateException if the provided state prevents the operation to be done
- */
- StructuralObject.Move move(StructuralObject source, StructuralObject destination) throws IllegalArgumentException, StateException;
-
- /**
- * Update the state of a specified object.
- *
- * @param object the object to udpate
- * @param changes the changes
- * @throws StateChangeVetoException if the creation is vetoed
- * @return the update object
- * @throws IllegalArgumentException if an argument is null or not valid
- * @throws StateException if the provided state prevents the operation to be done
- */
- StructuralObject.Update update(StructuralObject object, Map<String, String> changes) throws IllegalArgumentException, StateException;
-}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/state/ConstraintViolationException.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/state/ConstraintViolationException.java 2008-04-17 21:12:58 UTC (rev 10625)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/state/ConstraintViolationException.java 2008-04-17 21:43:34 UTC (rev 10626)
@@ -1,49 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.state;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public class ConstraintViolationException extends StateException
-{
- public ConstraintViolationException()
- {
- }
-
- public ConstraintViolationException(String s)
- {
- super(s);
- }
-
- public ConstraintViolationException(String s, Throwable throwable)
- {
- super(s, throwable);
- }
-
- public ConstraintViolationException(Throwable throwable)
- {
- super(throwable);
- }
-}
\ No newline at end of file
18 years
JBoss Portal SVN: r10625 - in modules/presentation/trunk: presentation/src/main/java/org/jboss/portal/presentation/model and 1 other directories.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2008-04-17 17:12:58 -0400 (Thu, 17 Apr 2008)
New Revision: 10625
Removed:
modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/plugin/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ModelEvent.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ModelListener.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIAction.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIContainer.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIContext.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIPage.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIPortal.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIWindow.java
modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/MockModelTestCase.java
Log:
code cleanup
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ModelEvent.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ModelEvent.java 2008-04-17 20:57:03 UTC (rev 10624)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ModelEvent.java 2008-04-17 21:12:58 UTC (rev 10625)
@@ -1,31 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public abstract class ModelEvent
-{
-}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ModelListener.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ModelListener.java 2008-04-17 20:57:03 UTC (rev 10624)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ModelListener.java 2008-04-17 21:12:58 UTC (rev 10625)
@@ -1,32 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public interface ModelListener
-{
- void onEvent(ModelEvent event);
-}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIAction.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIAction.java 2008-04-17 20:57:03 UTC (rev 10624)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIAction.java 2008-04-17 21:12:58 UTC (rev 10625)
@@ -1,55 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model;
-
-/**
- * An action that can be triggered.
- *
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public interface UIAction extends UIObject
-{
-
- /**
- * Returns the action display name.
- *
- * @return the display name
- */
- String getDisplayName();
-
- /**
- * Returns the action icon URL.
- *
- * @return the icon URL
- */
- String getIconURL();
-
- /**
- * Returns the action URL.
- *
- * @return the url
- */
- String getURL();
-
-}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIContainer.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIContainer.java 2008-04-17 20:57:03 UTC (rev 10624)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIContainer.java 2008-04-17 21:12:58 UTC (rev 10625)
@@ -1,31 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public interface UIContainer extends UIObject
-{
-}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIContext.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIContext.java 2008-04-17 20:57:03 UTC (rev 10624)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIContext.java 2008-04-17 21:12:58 UTC (rev 10625)
@@ -1,43 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public interface UIContext extends UIObject
-{
- /**
- *
- * @param id the object id
- * @return the object for the specified id or null if it cannot be found
- */
- UIObject getObject(String id);
-
- /**
- *
- * @param listener the listener
- */
- void addModelListener(ModelListener listener);
-}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIPage.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIPage.java 2008-04-17 20:57:03 UTC (rev 10624)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIPage.java 2008-04-17 21:12:58 UTC (rev 10625)
@@ -1,31 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public interface UIPage extends UIObject
-{
-}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIPortal.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIPortal.java 2008-04-17 20:57:03 UTC (rev 10624)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIPortal.java 2008-04-17 21:12:58 UTC (rev 10625)
@@ -1,31 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public interface UIPortal extends UIObject
-{
-}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIWindow.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIWindow.java 2008-04-17 20:57:03 UTC (rev 10624)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIWindow.java 2008-04-17 21:12:58 UTC (rev 10625)
@@ -1,61 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model;
-
-import org.jboss.portal.WindowState;
-import org.jboss.portal.Mode;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public interface UIWindow extends UIObject
-{
- /**
- * Returns the window state of the window or null if it does not exist.
- *
- * @return the window state
- */
- WindowState getWindowState();
-
- /**
- * Update the window state of the window.
- *
- * @param windowState the new window state
- */
- void setWindowState(WindowState windowState);
-
- /**
- * Returns the mode of the window or null if it does not exist.
- *
- * @return the mode
- */
- Mode getMode();
-
- /**
- * Update the mode of the window.
- *
- * @param mode the new mode
- */
- void setMode(Mode mode);
-}
Deleted: modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/MockModelTestCase.java
===================================================================
--- modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/MockModelTestCase.java 2008-04-17 20:57:03 UTC (rev 10624)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/MockModelTestCase.java 2008-04-17 21:12:58 UTC (rev 10625)
@@ -1,253 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.test.model;
-
-import org.jboss.portal.presentation.model2.ui.UIPage;
-import org.jboss.portal.presentation.model2.UIObject;
-import org.jboss.portal.presentation.state.StaleStateException;
-import org.jboss.portal.presentation.state.structural.StructuralObject;
-import org.jboss.portal.presentation.state.structural.StructuralStateContext;
-import org.jboss.portal.presentation.test.model.state.structural.MockModel;
-import org.jboss.portal.presentation.test.model.state.structural.MockObject;
-import org.jboss.portal.presentation.test.model.state.structural.MockException;
-import org.jboss.portal.presentation.test.model.state.structural.MockModelImpl;
-
-import java.util.Collections;
-import java.util.Set;
-import java.util.List;
-
-/**
- * Test that the mock model we are using behaves in an expected manner
- *
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public class MockModelTestCase extends AbstractModelTestCase<MockObject>
-{
-
- /** . */
- private MockModel model;
-
- /** . */
- private StructuralStateContext structuralStateContext;
-
- protected void setUp() throws Exception
- {
- model = new MockModelImpl();
- structuralStateContext = model.getStructuralStateContext();
- }
-
- protected void tearDown() throws Exception
- {
- model = null;
- structuralStateContext = null;
- }
-
- protected MockObject getRoot()
- {
- return model.getRoot();
- }
-
- public StructuralStateContext getStructuralStateContext()
- {
- return structuralStateContext;
- }
-
- protected Set<String> getPropertyNames(MockObject object)
- {
- return object.getPropertyNames();
- }
-
- protected MockObject getParent(MockObject object)
- {
- return object.getParent();
- }
-
- protected List<? extends MockObject> getChildren(MockObject object)
- {
- return object.getChildren();
- }
-
- protected String getName(MockObject object)
- {
- return object.getName();
- }
-
- protected boolean isValid(MockObject object)
- {
- return object.isValid();
- }
-
- protected Class<? extends UIObject> getType(MockObject object)
- {
- return object.getType();
- }
-
- protected String getId(MockObject object)
- {
- return object.getId();
- }
-
- protected void setProperty(MockObject object, String propertyName, String propertyValue)
- {
- object.setPropertyValue(propertyName, propertyValue);
- }
-
- protected String getProperty(MockObject mockRoot, String name)
- {
- return mockRoot.getPropertyValue(name);
- }
-
-
- protected MockObject addChild(MockObject object, String name, Class<? extends UIObject> type)
- {
- return object.addChild(name, type);
- }
-
- protected void destroy(MockObject object)
- {
- model.destroy(object);
- }
-
- public void testDestroyInvalidates() throws MockException
- {
- MockObject mockRoot = getRoot();
- MockObject mockFoo = addChild(mockRoot, "foo", UIPage.class);
-
- //
- destroy(mockFoo);
-
- //
- assertEquals(false, isValid(mockFoo));
- try
- {
- addChild(mockFoo, "juu", UIPage.class);
- }
- catch (MockException e)
- {
- assertEquals(MockException.ErrorCode.INVALID_OBJECT, e.getCode());
- }
- try
- {
- destroy(mockFoo);
- }
- catch (MockException e)
- {
- assertEquals(MockException.ErrorCode.INVALID_OBJECT, e.getCode());
- }
- try
- {
- setProperty(mockFoo, "blah", "bluh");
- }
- catch (MockException e)
- {
- assertEquals(MockException.ErrorCode.INVALID_OBJECT, e.getCode());
- }
- }
-
- public void testMove() throws MockException
- {
- MockObject mockRoot = getRoot();
-
- MockObject mockFoo = addChild(mockRoot, "foo", UIPage.class);
- MockObject mockBar = addChild(mockRoot, "bar", UIPage.class);
-
- mockFoo.move(mockBar);
-
- assertSame(mockBar, getParent(mockFoo));
- assertEquals(Collections.singletonList(mockFoo), getChildren(mockBar));
- assertEquals(Collections.singletonList(mockBar), getChildren(mockRoot));
- }
-
- public void testMoveViolatesConstraint() throws MockException
- {
- MockObject mockRoot = getRoot();
-
- MockObject mockFoo = addChild(mockRoot, "foo", UIPage.class);
- MockObject mockBar = addChild(mockRoot, "bar", UIPage.class);
- MockObject mockJuu = addChild(mockBar, "juu", UIPage.class);
-
- //
- try
- {
- mockRoot.move(mockRoot);
- }
- catch (MockException e)
- {
- assertEquals(MockException.ErrorCode.CONSTRAINT_VIOLATION, e.getCode());
- }
-
- //
- try
- {
- mockRoot.move(mockFoo);
- }
- catch (MockException e)
- {
- assertEquals(MockException.ErrorCode.CONSTRAINT_VIOLATION, e.getCode());
- }
-
- //
- try
- {
- mockBar.move(mockBar);
- }
- catch (MockException e)
- {
- assertEquals(MockException.ErrorCode.CONSTRAINT_VIOLATION, e.getCode());
- }
-
- //
- try
- {
- mockBar.move(mockJuu);
- }
- catch (MockException e)
- {
- assertEquals(MockException.ErrorCode.CONSTRAINT_VIOLATION, e.getCode());
- }
- }
-
- public void testInvalidatedByMove() throws MockException
- {
- MockObject mockRoot = getRoot();
-
- //
- MockObject mockFoo = addChild(mockRoot, "foo", UIPage.class);
- MockObject mockBar = addChild(mockFoo, "bar", UIPage.class);
- MockObject mockJuu = addChild(mockFoo, "juu", UIPage.class);
-
- //
- StructuralObject foo = mockFoo.takeSnapshot();
- StructuralObject bar = mockBar.takeSnapshot();
- StructuralObject juu = mockJuu.takeSnapshot();
-
- //
- mockBar.move(mockJuu);
-
- //
- assertValidity(foo, StaleStateException.class);
- assertValidity(bar, StaleStateException.class);
- assertValidity(juu, StaleStateException.class);
- }
-}
18 years
JBoss Portal SVN: r10624 - in modules/presentation/trunk: ajax and 10 other directories.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2008-04-17 16:57:03 -0400 (Thu, 17 Apr 2008)
New Revision: 10624
Removed:
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/ClientController.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/PresentationInvocation.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/PresentationInvocationContext.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/PresentationInvocationHandler.java
modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/plugin/MainProcessor.java
modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/plugin/PresentationServerImpl.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/SessionConstants.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIContainerImpl.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIContextImpl.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIObjectImpl.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIPageImpl.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIPortalImpl.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIWindowImpl.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/state/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/StateChange.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/StateChangeEvent.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/StateModification.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/navigational/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/structural/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/navigational/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/
Modified:
modules/presentation/trunk/.classpath
modules/presentation/trunk/ajax/
modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/MockPortalEntryPoint.java
modules/presentation/trunk/classic/
Log:
code cleanup
Modified: modules/presentation/trunk/.classpath
===================================================================
--- modules/presentation/trunk/.classpath 2008-04-17 17:12:32 UTC (rev 10623)
+++ modules/presentation/trunk/.classpath 2008-04-17 20:57:03 UTC (rev 10624)
@@ -18,7 +18,7 @@
<classpathentry kind="var" path="M2_REPO/org/codehaus/cargo/cargo-core-uberjar/0.8/cargo-core-uberjar-0.8.jar"/>
<classpathentry kind="var" path="M2_REPO/apache-tomcat/catalina/5.5.12/catalina-5.5.12.jar"/>
<classpathentry kind="var" path="M2_REPO/javax/ccpp/ccpp/1.0/ccpp-1.0.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/portal/common/common-common/1.2.0.Beta3/common-common-1.2.0.Beta3.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/portal/common/common-common/1.2.0-SNAPSHOT/common-common-1.2.0-SNAPSHOT.jar"/>
<classpathentry kind="var" path="M2_REPO/org/jboss/portal/common/common-mc/1.2.0.Beta3/common-mc-1.2.0.Beta3.jar"/>
<classpathentry kind="var" path="M2_REPO/org/jboss/portal/common/common-portal/1.2.0.Beta3/common-portal-1.2.0.Beta3.jar"/>
<classpathentry kind="var" path="M2_REPO/commons-codec/commons-codec/1.2/commons-codec-1.2.jar"/>
@@ -100,7 +100,7 @@
<classpathentry kind="var" path="M2_REPO/javax/servlet/servlet-api/2.4/servlet-api-2.4.jar"/>
<classpathentry kind="var" path="M2_REPO/apache-taglibs/standard/1.1.2/standard-1.1.2.jar"/>
<classpathentry kind="var" path="M2_REPO/trove/trove/2.1.1/trove-2.1.1.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/portal/web/web-web/1.2.0.Beta2/web-web-1.2.0.Beta2.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/portal/web/web-web/1.2.0-SNAPSHOT/web-web-1.2.0-SNAPSHOT.jar"/>
<classpathentry kind="var" path="M2_REPO/apache-slide/webdavlib/2.0/webdavlib-2.0.jar"/>
<classpathentry kind="var" path="M2_REPO/apache-xerces/xercesImpl/2.7.1/xercesImpl-2.7.1.jar"/>
<classpathentry kind="var" path="M2_REPO/apache-xerces/xml-apis/2.7.1/xml-apis-2.7.1.jar"/>
Property changes on: modules/presentation/trunk/ajax
___________________________________________________________________
Name: svn:ignore
+ target
Deleted: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/ClientController.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/ClientController.java 2008-04-17 17:12:32 UTC (rev 10623)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/ClientController.java 2008-04-17 20:57:03 UTC (rev 10624)
@@ -1,39 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.invocation;
-
-import org.jboss.portal.presentation.server.ServerException;
-
-/**
- * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
- *
- */
-public interface ClientController
-{
- /**
- *
- * @param invocation
- * @throws ServerException
- */
- public void handle(PresentationInvocation invocation) throws ServerException;
-}
Deleted: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/PresentationInvocation.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/PresentationInvocation.java 2008-04-17 17:12:32 UTC (rev 10623)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/PresentationInvocation.java 2008-04-17 20:57:03 UTC (rev 10624)
@@ -1,117 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.invocation;
-
-import org.jboss.portal.common.invocation.Invocation;
-import org.jboss.portal.common.invocation.InvocationContext;
-
-import org.jboss.portal.web.WebRequest;
-import org.jboss.portal.web.WebResponse;
-
-
-/**
- * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
- *
- */
-public class PresentationInvocation extends Invocation
-{
- private InvocationContext context = null;
- private WebRequest request = null;
- private WebResponse response = null;
-
- /**
- *
- * @param request
- */
- public PresentationInvocation(WebRequest request, WebResponse response)
- {
- this.request = request;
- this.response = response;
- this.context = new PresentationInvocationContext();
- }
-
- /**
- *
- */
- public InvocationContext getContext() throws IllegalStateException
- {
- return this.context;
- }
-
- /**
- *
- * @return
- */
- public WebRequest getRequest()
- {
- return this.request;
- }
-
- /**
- *
- * @return
- */
- public WebResponse getResponse()
- {
- return this.response;
- }
-
- /**
- *
- * @return
- */
- public String getPortalHost()
- {
- return this.request.getServerName();
- }
-
- /**
- *
- * @return
- */
- public String getPortalRequestPath()
- {
- String portalRequestPath = null;
-
- String requestURI = request.getRequestURI();
- String contextPath = request.getContextPath();
- portalRequestPath = requestURI.substring(contextPath.length());
-
- return portalRequestPath;
- }
-
- /**
- *
- * @return
- */
- public String getPortalContextPath()
- {
- String portalContextPath = null;
-
- String requestURI = request.getRequestURI();
- String contextPath = request.getContextPath();
- portalContextPath = requestURI.substring(0, contextPath.length());
-
- return portalContextPath;
- }
-}
Deleted: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/PresentationInvocationContext.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/PresentationInvocationContext.java 2008-04-17 17:12:32 UTC (rev 10623)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/PresentationInvocationContext.java 2008-04-17 20:57:03 UTC (rev 10624)
@@ -1,34 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.invocation;
-
-import org.jboss.portal.common.invocation.AbstractInvocationContext;
-
-/**
- * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
- *
- */
-public class PresentationInvocationContext extends AbstractInvocationContext
-{
-
-}
Deleted: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/PresentationInvocationHandler.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/PresentationInvocationHandler.java 2008-04-17 17:12:32 UTC (rev 10623)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/PresentationInvocationHandler.java 2008-04-17 20:57:03 UTC (rev 10624)
@@ -1,58 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.invocation;
-
-import org.jboss.portal.common.invocation.Invocation;
-import org.jboss.portal.common.invocation.InvocationException;
-import org.jboss.portal.common.invocation.InvocationHandler;
-
-/**
- * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
- *
- */
-public class PresentationInvocationHandler implements InvocationHandler
-{
- /**
- *
- */
- private ClientController clientController = null;
-
- /**
- *
- * @param clientController
- */
- public PresentationInvocationHandler(ClientController clientController)
- {
- this.clientController = clientController;
- }
-
- /**
- *
- */
- public Object invoke(Invocation invocation) throws Exception, InvocationException
- {
- this.clientController.handle((PresentationInvocation)invocation);
-
- return null;
- }
-}
Modified: modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/MockPortalEntryPoint.java
===================================================================
--- modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/MockPortalEntryPoint.java 2008-04-17 17:12:32 UTC (rev 10623)
+++ modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/MockPortalEntryPoint.java 2008-04-17 20:57:03 UTC (rev 10624)
@@ -16,8 +16,6 @@
import org.apache.log4j.Logger;
import org.jboss.mx.util.MBeanServerLocator;
-import org.jboss.portal.web.WebRequest;
-import org.jboss.portal.web.WebResponse;
import org.jboss.portal.presentation.ajax.client.service.PortalRPC;
import org.jboss.portal.presentation.ajax.client.model.AjaxUIObject;
@@ -25,7 +23,6 @@
import org.jboss.portal.presentation.ajax.client.protocol.AjaxShowUIObjectResponse;
import org.jboss.portal.presentation.protocol.GetActivation;
import org.jboss.portal.presentation.protocol.PostActivation;
-import org.jboss.portal.presentation.invocation.PresentationInvocation;
import org.jboss.portal.presentation.invocation.AjaxRequest;
import org.jboss.portal.presentation.invocation.AjaxResponse;
@@ -266,10 +263,10 @@
// WebRequest webReq = new WebRequest(req);
// WebResponse webResp = new WebResponse(resp);
- PresentationInvocation invocation = new PresentationInvocation(new AjaxRequest(req), new AjaxResponse(resp));
+ //PresentationInvocation invocation = new PresentationInvocation(new AjaxRequest(req), new AjaxResponse(resp));
//TODO: set the proper invocation handler here
- invocation.invokeNext();
+ //invocation.invokeNext();
}
}
Deleted: modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/plugin/MainProcessor.java
===================================================================
--- modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/plugin/MainProcessor.java 2008-04-17 17:12:32 UTC (rev 10623)
+++ modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/plugin/MainProcessor.java 2008-04-17 20:57:03 UTC (rev 10624)
@@ -1,122 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.test.portal.plugin;
-
-import org.apache.log4j.Logger;
-
-import org.jboss.portal.portlet.StateString;
-import org.jboss.portal.portlet.impl.PortletRequestDecoder;
-
-import org.jboss.portal.web.Body;
-
-import org.jboss.portal.presentation.server.ServerException;
-
-import org.jboss.portal.presentation.server.Processor;
-import org.jboss.portal.presentation.server.ProcessorRequest;
-import org.jboss.portal.presentation.server.ProcessorResponse;
-
-import org.jboss.portal.presentation.client.PresentationContext;
-
-import org.jboss.portal.presentation.model.StateType;
-import org.jboss.portal.presentation.model.UIWindow;
-
-import org.jboss.portal.presentation.protocol.LinkActivation;
-import org.jboss.portal.presentation.protocol.PostActivation;
-import org.jboss.portal.presentation.protocol.ProtocolAction;
-import org.jboss.portal.presentation.protocol.ProtocolResponse;
-import org.jboss.portal.presentation.protocol.ShowUIObjectResponse;
-import org.jboss.portal.presentation.protocol.ViewUIObjectAction;
-
-import org.jboss.portal.presentation.test.portal.MockPortalServer;
-
-
-import java.util.Map;
-
-/**
- * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
- *
- */
-public class MainProcessor implements Processor
-{
-
- /** . */
- private static Logger log = Logger.getLogger(MainProcessor.class);
-
- /**
- *
- */
- public ProcessorResponse process(PresentationContext presentationContext, ProcessorRequest request) throws ServerException
- {
- try
- {
-
- ProtocolAction serverAction = request.getAction();
-
- ProtocolResponse response = null;
-
- if(serverAction instanceof ViewUIObjectAction)
- {
- ViewUIObjectAction viewAction = (ViewUIObjectAction)serverAction;
- response = new ShowUIObjectResponse(viewAction.getTargetId());
- }
- else if (serverAction instanceof LinkActivation)
- {
- LinkActivation getActivation = (LinkActivation)serverAction;
- String id = getActivation.getTargetId();
- PortletRequestDecoder decoder = new PortletRequestDecoder();
-
- // Get form parameters if any
- Map formParameters = null;
- if (serverAction instanceof PostActivation)
- {
- PostActivation post = (PostActivation)serverAction;
- Body body = post.getBody();
- if (body instanceof Body.Form)
- {
- formParameters = ((Body.Form)body).getParameters();
- }
- }
-
- decoder.decode(getActivation.getQueryParameters(), formParameters);
- StateString contentState = decoder.getNavigationalState();
-
- //TODO: We assume that for now
- UIWindow uiWindow = (UIWindow)presentationContext.getUIContext().getObject(id);
-
-
- //Make an invocation on the Mock Portal Server
- MockPortalServer.getInstance().invoke(id, getActivation.getQueryParameters());
-
- // It means we went through a successful action or it is a render
- uiWindow.setProperty(StateType.NAVIGATIONAL, "content", contentState);
- response = new ShowUIObjectResponse(uiWindow.getParent().getId());
- }
-
- return new ProcessorResponse(response);
- }
- catch(Exception e)
- {
- throw new ServerException(e);
- }
- }
-}
Deleted: modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/plugin/PresentationServerImpl.java
===================================================================
--- modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/plugin/PresentationServerImpl.java 2008-04-17 17:12:32 UTC (rev 10623)
+++ modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/plugin/PresentationServerImpl.java 2008-04-17 20:57:03 UTC (rev 10624)
@@ -1,122 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.test.portal.plugin;
-
-import org.jboss.portal.presentation.client.PresentationContext;
-import org.jboss.portal.presentation.server.Processor;
-import org.jboss.portal.presentation.server.PresentationServer;
-import org.jboss.portal.presentation.model.UIWindow;
-import org.jboss.portal.presentation.model.content.WindowContent;
-import org.jboss.portal.presentation.model.state.structural.StructuralStateContext;
-
-import org.jboss.portal.presentation.test.portal.MockPortalServer;
-import org.jboss.portal.presentation.test.portal.MockWindow;
-
-/**
- * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
- *
- */
-public class PresentationServerImpl implements PresentationServer
-{
-
- /**
- *
- */
- private Processor processor;
-
- /**
- *
- */
- private StructuralStateContext structuralStateContext;
-
-
- /**
- *
- *
- */
- public PresentationServerImpl()
- {
-
- }
-
- /**
- *
- *
- */
- public void start()
- {
- this.structuralStateContext = new StructuralStateContextImpl();
- }
-
- /**
- *
- *
- */
- public void stop()
- {
-
- }
-
- /**
- *
- */
- public StructuralStateContext getStructuralStateManager()
- {
- return structuralStateContext;
- }
-
- /**
- *
- * @param structuralStateContext
- */
- public void setModelLoader(StructuralStateContext structuralStateContext)
- {
- this.structuralStateContext = structuralStateContext;
- }
-
- /**
- *
- */
- public Processor getProcessor()
- {
- return this.processor;
- }
-
- /**
- *
- * @param processor
- */
- public void setProcessor(Processor processor)
- {
- this.processor = processor;
- }
-
- /**
- *
- */
- public WindowContent render(PresentationContext context, UIWindow uiwindow) throws Exception
- {
- MockWindow window = (MockWindow)MockPortalServer.getInstance().getPortalObject(uiwindow.getId());
- return new WindowContent(-1, "Blah:", window.getMarkup());
- }
-}
Property changes on: modules/presentation/trunk/classic
___________________________________________________________________
Name: svn:ignore
+ target
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/SessionConstants.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/SessionConstants.java 2008-04-17 17:12:32 UTC (rev 10623)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/SessionConstants.java 2008-04-17 20:57:03 UTC (rev 10624)
@@ -1,40 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.impl;
-
-/**
- * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
- *
- */
-public interface SessionConstants
-{
- /**
- * Represents the session key for storing the server side UI model
- */
- public final String serverModel = "serverModel";
-
- /**
- * Represents the session key for storing the client side UI model for the Ajax User Agent
- */
- public final String ajaxModel = "ajaxModel";
-}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIContainerImpl.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIContainerImpl.java 2008-04-17 17:12:32 UTC (rev 10623)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIContainerImpl.java 2008-04-17 20:57:03 UTC (rev 10624)
@@ -1,33 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.impl.model;
-
-import org.jboss.portal.presentation.model.UIContainer;
-
-/**
- * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
- *
- */
-public class UIContainerImpl extends UIObjectImpl implements UIContainer
-{
-}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIContextImpl.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIContextImpl.java 2008-04-17 17:12:32 UTC (rev 10623)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIContextImpl.java 2008-04-17 20:57:03 UTC (rev 10624)
@@ -1,49 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.impl.model;
-
-import org.jboss.portal.presentation.model.UIObject;
-import org.jboss.portal.presentation.model.UIContext;
-import org.jboss.portal.presentation.model.ModelListener;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public class UIContextImpl extends UIObjectImpl implements UIContext
-{
-
- public UIContextImpl()
- {
- }
-
- public UIObject getObject(String id)
- {
- return context.getObject(id);
- }
-
- public void addModelListener(ModelListener listener)
- {
- context.addModelListener(listener);
- }
-}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIObjectImpl.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIObjectImpl.java 2008-04-17 17:12:32 UTC (rev 10623)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIObjectImpl.java 2008-04-17 20:57:03 UTC (rev 10624)
@@ -1,141 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.impl.model;
-
-import org.jboss.portal.presentation.model.UIObject;
-import org.jboss.portal.presentation.model.StateType;
-import org.jboss.portal.presentation.model.state.StateException;
-import org.jboss.portal.presentation.model.state.StateChangeVetoException;
-import org.jboss.portal.presentation.impl.model.container.spi.UIContainerObject;
-import org.jboss.portal.presentation.impl.model.container.spi.UIObjectContext;
-
-import java.util.Collection;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public abstract class UIObjectImpl implements UIContainerObject
-{
-
- /** . */
- protected UIObjectContext context;
-
- //
- public UIObjectContext getContext()
- {
- return context;
- }
-
- public void setContext(UIObjectContext context)
- {
- this.context = context;
- }
-
- //
-
- public String getId()
- {
- return context.getManagedObject().getId();
- }
-
- public Status getStatus()
- {
- return context.getManagedObject().getStatus();
- }
-
- public void validate(Visitor scope)
- {
- context.getManagedObject().validate(scope);
- }
-
- public void validate()
- {
- context.getManagedObject().validate();
- }
-
- public void refresh(Visitor scope)
- {
- context.getManagedObject().refresh(scope);
- }
-
- public void refresh()
- {
- context.getManagedObject().refresh();
- }
-
- public <T> T getProperty(StateType stateType, String propertyName, Class<T> propertyType)
- {
- return context.getManagedObject().getProperty(stateType, propertyName, propertyType);
- }
-
- public Object getProperty(StateType stateType, String propertyName)
- {
- return context.getManagedObject().getProperty(stateType, propertyName);
- }
-
- public <T> void setProperty(StateType stateType, String propertyName, T propertyValue) throws StateChangeVetoException
- {
- context.getManagedObject().setProperty(stateType, propertyName, propertyValue);
- }
-
- public UIObject getChild(String name)
- {
- return context.getManagedObject().getChild(name);
- }
-
- public String getName()
- {
- return context.getManagedObject().getName();
- }
-
- public UIObject getParent()
- {
- return context.getManagedObject().getParent();
- }
-
- public Collection<? extends UIObject> getChildren()
- {
- return context.getManagedObject().getChildren();
- }
-
- public <T extends UIObject> T createChild(String name, Class<T> type) throws IllegalArgumentException
- {
- return context.getManagedObject().createChild(name, type);
- }
-
- public void destroyChild(String name) throws IllegalArgumentException, StateException
- {
- context.getManagedObject().destroyChild(name);
- }
-
- public void move(UIObject destination) throws IllegalArgumentException, StateException
- {
- context.getManagedObject().move(destination);
- }
-
- public String toString()
- {
- return context.getManagedObject().toString();
- }
-}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIPageImpl.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIPageImpl.java 2008-04-17 17:12:32 UTC (rev 10623)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIPageImpl.java 2008-04-17 20:57:03 UTC (rev 10624)
@@ -1,33 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.impl.model;
-
-import org.jboss.portal.presentation.model.UIPage;
-
-/**
- * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
- *
- */
-public class UIPageImpl extends UIObjectImpl implements UIPage
-{
-}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIPortalImpl.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIPortalImpl.java 2008-04-17 17:12:32 UTC (rev 10623)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIPortalImpl.java 2008-04-17 20:57:03 UTC (rev 10624)
@@ -1,33 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.impl.model;
-
-import org.jboss.portal.presentation.model.UIPortal;
-
-/**
- * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
- *
- */
-public class UIPortalImpl extends UIObjectImpl implements UIPortal
-{
-}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIWindowImpl.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIWindowImpl.java 2008-04-17 17:12:32 UTC (rev 10623)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIWindowImpl.java 2008-04-17 20:57:03 UTC (rev 10624)
@@ -1,68 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.impl.model;
-
-import org.jboss.portal.Mode;
-import org.jboss.portal.WindowState;
-import org.jboss.portal.presentation.model.StateType;
-import org.jboss.portal.presentation.model.UIWindow;
-
-/**
- * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
- *
- */
-public class UIWindowImpl extends UIObjectImpl implements UIWindow
-{
-
- /**
- *
- */
- public Mode getMode()
- {
- return getProperty(StateType.NAVIGATIONAL, "mode", Mode.class);
- }
-
- /**
- *
- */
- public WindowState getWindowState()
- {
- return getProperty(StateType.NAVIGATIONAL, "windowstate", WindowState.class);
- }
-
- /**
- *
- */
- public void setMode(Mode mode)
- {
- setProperty(StateType.NAVIGATIONAL, "mode", mode);
- }
-
- /**
- *
- */
- public void setWindowState(WindowState windowState)
- {
- setProperty(StateType.NAVIGATIONAL, "windowstate", windowState);
- }
-}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/StateChange.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/StateChange.java 2008-04-17 17:12:32 UTC (rev 10623)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/StateChange.java 2008-04-17 20:57:03 UTC (rev 10624)
@@ -1,77 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model.event.state;
-
-/**
- * A change in the state of the model. The change is the association of a target id and a modification.
- * The target id refers to an object in the structural state context and the modification is a modification
- * of its state. Note that the modification could also modify the state of other objects.
- *
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public final class StateChange<M extends StateModification>
-{
-
- /** . */
- private final String targetId;
-
- /** . */
- private final M modification;
-
- public StateChange(String targetId, M modification)
- {
- if (targetId == null)
- {
- throw new IllegalArgumentException();
- }
- if (modification == null)
- {
- throw new IllegalArgumentException();
- }
-
- //
- this.targetId = targetId;
- this.modification = modification;
- }
-
- /**
- * Returns the target id of the change.
- *
- * @return the target id
- */
- public String getTargetId()
- {
- return targetId;
- }
-
- /**
- * Returns the modification operated on the target id.
- *
- * @return the modification
- */
- public M getModification()
- {
- return modification;
- }
-}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/StateChangeEvent.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/StateChangeEvent.java 2008-04-17 17:12:32 UTC (rev 10623)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/StateChangeEvent.java 2008-04-17 20:57:03 UTC (rev 10624)
@@ -1,60 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model.event.state;
-
-import org.jboss.portal.presentation.model.ModelEvent;
-import org.jboss.portal.presentation.model.event.state.StateChange;
-
-/**
- * Signals a state change occured.
- *
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public final class StateChangeEvent extends ModelEvent
-{
-
- /** . */
- private final StateChange change;
-
- public StateChangeEvent(StateChange change)
- {
- if (change == null)
- {
- throw new IllegalArgumentException();
- }
-
- //
- this.change = change;
- }
-
- /**
- * Returns the state change that occured.
- *
- * @return the state change
- */
- public StateChange getChange()
- {
- return change;
- }
-}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/StateModification.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/StateModification.java 2008-04-17 17:12:32 UTC (rev 10623)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/StateModification.java 2008-04-17 20:57:03 UTC (rev 10624)
@@ -1,33 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model.event.state;
-
-/**
- * An abstract class for the modification of state.
- *
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public abstract class StateModification
-{
-}
18 years
JBoss Portal SVN: r10623 - branches/JBoss_Portal_Branch_2_6/core-identity/src/main/org/jboss/portal/core/identity/ui/common.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2008-04-17 13:12:32 -0400 (Thu, 17 Apr 2008)
New Revision: 10623
Modified:
branches/JBoss_Portal_Branch_2_6/core-identity/src/main/org/jboss/portal/core/identity/ui/common/IdentityUserBean.java
Log:
- use cached current user instance in IdentityUserPortlet
Modified: branches/JBoss_Portal_Branch_2_6/core-identity/src/main/org/jboss/portal/core/identity/ui/common/IdentityUserBean.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-identity/src/main/org/jboss/portal/core/identity/ui/common/IdentityUserBean.java 2008-04-17 13:51:42 UTC (rev 10622)
+++ branches/JBoss_Portal_Branch_2_6/core-identity/src/main/org/jboss/portal/core/identity/ui/common/IdentityUserBean.java 2008-04-17 17:12:32 UTC (rev 10623)
@@ -37,11 +37,16 @@
import org.jboss.portal.core.identity.services.IdentityConstants;
import org.jboss.portal.core.identity.services.metadata.UIComponentConfiguration;
import org.jboss.portal.core.identity.ui.IdentityUIUser;
+import org.jboss.portal.core.aspects.server.UserInterceptor;
+import org.jboss.portal.core.controller.ControllerContext;
import org.jboss.portal.identity.IdentityException;
import org.jboss.portal.identity.NoSuchUserException;
import org.jboss.portal.identity.User;
import org.jboss.portal.identity.UserModule;
import org.jboss.portal.identity.UserProfileModule;
+import org.jboss.portal.server.ServerInvocation;
+import org.jboss.portlet.JBossRenderRequest;
+import org.jboss.portlet.JBossActionRequest;
/**
* @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
@@ -193,8 +198,86 @@
public Object getUserProperty(String username, String propertyName) throws IllegalArgumentException, NoSuchUserException, IdentityException
{
- User user = this.findUserByUserName(username);
+
UIComponentConfiguration uiComponent = (UIComponentConfiguration) this.metaDataService.getValue(propertyName).getObject();
- return this.userProfileModule.getProperty(user, uiComponent.getPropertyRef());
+
+ Map profile = null;
+
+ // Uncomment this to use the cached profile (for now its not invalidated on write)
+ //profile = getCachedUserProfile();
+
+ if (profile == null)
+ {
+ User user = getCurrentUser();
+ if (user == null)
+ {
+ user = this.findUserByUserName(username);
+ }
+
+ return this.userProfileModule.getProperty(user, uiComponent.getPropertyRef());
+ }
+
+ return profile.get(uiComponent.getPropertyRef());
+
}
+
+ public User getCurrentUser()
+ {
+ Object request = FacesContext.getCurrentInstance().getExternalContext().getRequest();
+
+ ControllerContext context = null;
+
+ if (request instanceof JBossRenderRequest)
+ {
+ JBossRenderRequest renderRequest = (JBossRenderRequest)request;
+ context = renderRequest.getControllerContext();
+ }
+ else if (request instanceof JBossActionRequest)
+ {
+ JBossActionRequest actionRequest = (JBossActionRequest)request;
+ context = actionRequest.getControllerContext();
+ }
+
+ if (context != null)
+ {
+ Object user = context.getAttribute(ServerInvocation.PRINCIPAL_SCOPE, UserInterceptor.USER_KEY);
+ if (user instanceof User)
+ {
+ return (User)user;
+ }
+ }
+
+ return null;
+
+ }
+
+ public Map getCachedUserProfile()
+ {
+ Object request = FacesContext.getCurrentInstance().getExternalContext().getRequest();
+
+ ControllerContext context = null;
+
+ if (request instanceof JBossRenderRequest)
+ {
+ JBossRenderRequest renderRequest = (JBossRenderRequest)request;
+ context = renderRequest.getControllerContext();
+ }
+ else if (request instanceof JBossActionRequest)
+ {
+ JBossActionRequest actionRequest = (JBossActionRequest)request;
+ context = actionRequest.getControllerContext();
+ }
+
+ if (context != null)
+ {
+ Object profile = context.getAttribute(ServerInvocation.PRINCIPAL_SCOPE, UserInterceptor.PROFILE_KEY);
+ if (profile instanceof Map)
+ {
+ return (Map)profile;
+ }
+ }
+
+ return null;
+
+ }
}
18 years
JBoss Portal SVN: r10622 - in modules/presentation/trunk: ajax/src/main/java/org/jboss/portal/presentation and 33 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-04-17 09:51:42 -0400 (Thu, 17 Apr 2008)
New Revision: 10622
Added:
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/impl/ajax/entry/
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/impl/ajax/entry/GWTClientFilter.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/impl/ajax/entry/PortalEntryPoint.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/AjaxRequest.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/AjaxResponse.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/ClientController.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/PresentationInvocation.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/PresentationInvocationContext.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/PresentationInvocationHandler.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client/PresentationContext.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client2/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client2/PresentationClient.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIContainerImpl.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIContextImpl.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIObjectImpl.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIPageImpl.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIPortalImpl.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIWindowImpl.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/ManagedObject.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/ObjectContext.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/RelationshipContext.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/UIObjectContainer.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/spi/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/spi/UIContainerObject.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/spi/UIObjectContext.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/spi/UIObjectFactory.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/state/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/state/navigational/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/state/navigational/NavigationalStateContextImpl.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ModelEvent.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ModelListener.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/StateType.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIAction.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIContainer.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIContext.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIObject.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIPage.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIPortal.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIWindow.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/content/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/content/WindowContent.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/LifeCycleEvent.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/ObjectAddedEvent.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/ObjectLifeCycleEvent.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/ObjectRemovedEvent.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/RelationshipAddedEvent.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/RelationshipLifeCycleEvent.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/RelationshipRemovedEvent.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/StateChange.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/StateChangeEvent.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/StateModification.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/navigational/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/navigational/NavigationalStateModification.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/structural/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/structural/StructuralStateModification.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/ConstraintViolationException.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/NoSuchStateException.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/StaleStateException.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/StateChangeVetoException.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/StateException.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/navigational/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/navigational/NavigationalStateContext.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/AbstractStructuralStateContext.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/StructuralObject.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/StructuralState.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/StructuralStateContext.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/PresentationServer.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/Processor.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/ProcessorRequest.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/ProcessorResponse.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/ServerException.java
Removed:
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/impl/ajax/entry/GWTClientFilter.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/impl/ajax/entry/PortalEntryPoint.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/AjaxRequest.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/AjaxResponse.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/ClientController.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/PresentationInvocation.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/PresentationInvocationContext.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/PresentationInvocationHandler.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client/PresentationContext.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client2/PresentationClient.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/content/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIContainerImpl.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIContextImpl.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIObjectImpl.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIPageImpl.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIPortalImpl.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIWindowImpl.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/ManagedObject.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/ObjectContext.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/RelationshipContext.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/UIObjectContainer.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/spi/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/spi/UIContainerObject.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/spi/UIObjectContext.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/spi/UIObjectFactory.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/state/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/state/navigational/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/state/navigational/NavigationalStateContextImpl.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ModelEvent.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ModelListener.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/StateType.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIAction.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIContainer.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIContext.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIObject.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIPage.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIPortal.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIWindow.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/content/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/content/WindowContent.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/LifeCycleEvent.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/ObjectAddedEvent.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/ObjectLifeCycleEvent.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/ObjectRemovedEvent.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/RelationshipAddedEvent.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/RelationshipLifeCycleEvent.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/RelationshipRemovedEvent.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/StateChange.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/StateChangeEvent.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/StateModification.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/navigational/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/navigational/NavigationalStateModification.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/structural/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/structural/StructuralStateModification.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/ConstraintViolationException.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/NoSuchStateException.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/StaleStateException.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/StateChangeVetoException.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/StateException.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/navigational/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/navigational/NavigationalStateContext.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/AbstractStructuralStateContext.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/StructuralObject.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/StructuralState.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/StructuralStateContext.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/PresentationServer.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/Processor.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/ProcessorRequest.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/ProcessorResponse.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/ServerException.java
Modified:
modules/presentation/trunk/ajax/src/main/config/war/WEB-INF/web.xml
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/AjaxPresentationClient.java
modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/MockPortalEntryPoint.java
modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/plugin/MainProcessor.java
modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/plugin/PresentationServerImpl.java
modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/plugin/StructuralObjectImpl.java
modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/plugin/StructuralStateContextImpl.java
modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/plugin/StructuralStateImpl.java
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/PresentationServerImpl.java
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationClient.java
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/portlet/spi/PresentationServerContext.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/UIObject.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/ui/UIAction.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/MoveUIObjectAction.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server2/PresentationServer.java
Log:
reverting most of my refactorings for now, I'll do that later
Modified: modules/presentation/trunk/ajax/src/main/config/war/WEB-INF/web.xml
===================================================================
--- modules/presentation/trunk/ajax/src/main/config/war/WEB-INF/web.xml 2008-04-17 13:37:34 UTC (rev 10621)
+++ modules/presentation/trunk/ajax/src/main/config/war/WEB-INF/web.xml 2008-04-17 13:51:42 UTC (rev 10622)
@@ -37,7 +37,7 @@
<!-- Add the GWT Client Filter to run the Portal in full Web 2.0 Ajax Mode. In turn, to run in Classic Html Mode, turn this filter off -->
<filter>
<filter-name>GWTClientFilter</filter-name>
- <filter-class>org.jboss.portal.presentation.toremove.impl.ajax.entry.GWTClientFilter</filter-class>
+ <filter-class>org.jboss.portal.presentation.impl.ajax.entry.GWTClientFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>GWTClientFilter</filter-name>
@@ -51,7 +51,7 @@
<!-- Asynchronous service request processor -->
<servlet>
<servlet-name>AjaxPortalEntryPoint</servlet-name>
- <servlet-class>org.jboss.portal.presentation.toremove.impl.ajax.entry.PortalEntryPoint</servlet-class>
+ <servlet-class>org.jboss.portal.presentation.impl.ajax.entry.PortalEntryPoint</servlet-class>
<load-on-startup>0</load-on-startup>
</servlet>
<servlet-mapping>
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/AjaxPresentationClient.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/AjaxPresentationClient.java 2008-04-17 13:37:34 UTC (rev 10621)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/AjaxPresentationClient.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -26,7 +26,7 @@
import java.util.Collection;
import org.jboss.portal.presentation.impl.model2.UIModelImpl;
-import org.jboss.portal.presentation.content.WindowContent;
+import org.jboss.portal.presentation.model.content.WindowContent;
import org.jboss.portal.presentation.model2.UIModel;
import org.jboss.portal.presentation.model2.UIObject;
import org.jboss.portal.presentation.model2.ViewPort;
Copied: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/impl/ajax/entry (from rev 10615, modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/impl/ajax/entry)
Deleted: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/impl/ajax/entry/GWTClientFilter.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/impl/ajax/entry/GWTClientFilter.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/impl/ajax/entry/GWTClientFilter.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,211 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.impl.ajax.entry;
-
-import java.util.Map;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.ByteArrayOutputStream;
-
-import javax.servlet.Filter;
-import javax.servlet.FilterChain;
-import javax.servlet.FilterConfig;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.jboss.portal.presentation.protocol.GetActivation;
-import org.jboss.portal.presentation.protocol.PostActivation;
-
-/**
- * This filter is activated or deactivated depending on whether the Portal needs to runs in Ajax mode or Classic Html mode
- *
- * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
- *
- */
-public class GWTClientFilter implements Filter
-{
- /**
- *
- */
- public void init(FilterConfig arg0) throws ServletException
- {
- }
-
- /**
- *
- */
- public void destroy()
- {
- }
-
- /**
- *
- */
- public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException
- {
- HttpServletRequest request = (HttpServletRequest)servletRequest;
- HttpServletResponse response = (HttpServletResponse)servletResponse;
- String contextPath = request.getContextPath();
-
- //Extract the resource that is being accessed
- String resource = request.getRequestURI().replaceFirst(contextPath, "");
- while(resource.startsWith("/"))
- {
- if(resource.length() > 1)
- {
- resource = resource.substring(1);
- }
- else
- {
- resource = "";
- }
- }
-
- if(resource == null || resource.trim().length() == 0)
- {
- response.sendRedirect("index.html");
- return;
- }
-
- //Now make sure the resource requested is a GWT resource
- if( resource.equals("index.html") ||
- resource.equals("portal.css") ||
- resource.equals("mygwt-all.css") ||
- resource.equals("mygwt-all-gray.css") ||
- resource.equals("gwt.js") ||
- resource.equals("prototype.js") ||
- resource.contains(".cache.") ||
- resource.contains(".nocache.") ||
- resource.contains(".gwt.rpc") ||
- resource.contains("images/default") ||
- resource.contains("images/gray")
- )
- {
- byte[] gwtResource = this.readContent(resource);
- response.getOutputStream().write(gwtResource);
- response.getOutputStream().flush();
- return;
- }
-
-
- String method = request.getMethod();
- String url = request.getRequestURL().toString();
- String targetId = this.parseTargetId(url);
- Map queryParameters = new HashMap();
- Enumeration paramNames = request.getParameterNames();
- if(paramNames != null)
- {
- while(paramNames.hasMoreElements())
- {
- String name = (String)paramNames.nextElement();
- String value = (String)request.getParameter(name);
- queryParameters.put(name, new String[]{value});
- }
- }
- if(method.equalsIgnoreCase("get"))
- {
- GetActivation get = new GetActivation(targetId, null, queryParameters);
- request.getSession().setAttribute("serverAction", get);
- }
- else
- {
- PostActivation post = new PostActivation(targetId, null, queryParameters, null);
- request.getSession().setAttribute("serverAction", post);
- }
-
-
- response.sendRedirect(contextPath+"/"+"index.html");
- }
-
- /**
- *
- * @param path
- * @return
- */
- private byte[] readContent(String path)
- {
- byte[] content = null;
-
- InputStream is = null;
- ByteArrayOutputStream bos = null;
- try
- {
- bos = new ByteArrayOutputStream();
- is = Thread.currentThread().getContextClassLoader().getResourceAsStream(path);
- int bytesRead = 0;
- byte[] data = new byte[1024];
- while((bytesRead=is.read(data)) != -1)
- {
- byte[] cour = new byte[bytesRead];
- System.arraycopy(data, 0, cour, 0, bytesRead);
- bos.write(cour);
- bos.flush();
- }
- }
- catch(Exception e)
- {
- throw new RuntimeException(e);
- }
- finally
- {
- if(is != null)
- {
- try{is.close();}catch(Exception e){}
- }
- if(bos != null)
- {
- content = bos.toByteArray();
- try{bos.close();}catch(Exception e){}
- }
- }
-
- return content;
- }
-
- /**
- *
- * @param url
- * @return
- */
- private String parseTargetId(String url)
- {
- String targetId = null;
-
- int fromIndex = 0; //hard coding the portal deployment context for now
- fromIndex = url.indexOf("presentation") != -1 ? url.indexOf("presentation") + "presentation".length() : 0;
- targetId = url.indexOf('?') != -1 ? url.substring(fromIndex, url.indexOf('?')):url.substring(fromIndex);
-
- //Removes the PATH data if any found
- if(targetId.indexOf(';')!=-1)
- {
- targetId = targetId.substring(0, targetId.indexOf(';'));
- }
-
- return targetId;
- }
-}
Copied: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/impl/ajax/entry/GWTClientFilter.java (from rev 10615, modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/impl/ajax/entry/GWTClientFilter.java)
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/impl/ajax/entry/GWTClientFilter.java (rev 0)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/impl/ajax/entry/GWTClientFilter.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,211 @@
+/******************************************************************************
+ * 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.presentation.impl.ajax.entry;
+
+import java.util.Map;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.ByteArrayOutputStream;
+
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.jboss.portal.presentation.protocol.GetActivation;
+import org.jboss.portal.presentation.protocol.PostActivation;
+
+/**
+ * This filter is activated or deactivated depending on whether the Portal needs to runs in Ajax mode or Classic Html mode
+ *
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class GWTClientFilter implements Filter
+{
+ /**
+ *
+ */
+ public void init(FilterConfig arg0) throws ServletException
+ {
+ }
+
+ /**
+ *
+ */
+ public void destroy()
+ {
+ }
+
+ /**
+ *
+ */
+ public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException
+ {
+ HttpServletRequest request = (HttpServletRequest)servletRequest;
+ HttpServletResponse response = (HttpServletResponse)servletResponse;
+ String contextPath = request.getContextPath();
+
+ //Extract the resource that is being accessed
+ String resource = request.getRequestURI().replaceFirst(contextPath, "");
+ while(resource.startsWith("/"))
+ {
+ if(resource.length() > 1)
+ {
+ resource = resource.substring(1);
+ }
+ else
+ {
+ resource = "";
+ }
+ }
+
+ if(resource == null || resource.trim().length() == 0)
+ {
+ response.sendRedirect("index.html");
+ return;
+ }
+
+ //Now make sure the resource requested is a GWT resource
+ if( resource.equals("index.html") ||
+ resource.equals("portal.css") ||
+ resource.equals("mygwt-all.css") ||
+ resource.equals("mygwt-all-gray.css") ||
+ resource.equals("gwt.js") ||
+ resource.equals("prototype.js") ||
+ resource.contains(".cache.") ||
+ resource.contains(".nocache.") ||
+ resource.contains(".gwt.rpc") ||
+ resource.contains("images/default") ||
+ resource.contains("images/gray")
+ )
+ {
+ byte[] gwtResource = this.readContent(resource);
+ response.getOutputStream().write(gwtResource);
+ response.getOutputStream().flush();
+ return;
+ }
+
+
+ String method = request.getMethod();
+ String url = request.getRequestURL().toString();
+ String targetId = this.parseTargetId(url);
+ Map queryParameters = new HashMap();
+ Enumeration paramNames = request.getParameterNames();
+ if(paramNames != null)
+ {
+ while(paramNames.hasMoreElements())
+ {
+ String name = (String)paramNames.nextElement();
+ String value = (String)request.getParameter(name);
+ queryParameters.put(name, new String[]{value});
+ }
+ }
+ if(method.equalsIgnoreCase("get"))
+ {
+ GetActivation get = new GetActivation(targetId, null, queryParameters);
+ request.getSession().setAttribute("serverAction", get);
+ }
+ else
+ {
+ PostActivation post = new PostActivation(targetId, null, queryParameters, null);
+ request.getSession().setAttribute("serverAction", post);
+ }
+
+
+ response.sendRedirect(contextPath+"/"+"index.html");
+ }
+
+ /**
+ *
+ * @param path
+ * @return
+ */
+ private byte[] readContent(String path)
+ {
+ byte[] content = null;
+
+ InputStream is = null;
+ ByteArrayOutputStream bos = null;
+ try
+ {
+ bos = new ByteArrayOutputStream();
+ is = Thread.currentThread().getContextClassLoader().getResourceAsStream(path);
+ int bytesRead = 0;
+ byte[] data = new byte[1024];
+ while((bytesRead=is.read(data)) != -1)
+ {
+ byte[] cour = new byte[bytesRead];
+ System.arraycopy(data, 0, cour, 0, bytesRead);
+ bos.write(cour);
+ bos.flush();
+ }
+ }
+ catch(Exception e)
+ {
+ throw new RuntimeException(e);
+ }
+ finally
+ {
+ if(is != null)
+ {
+ try{is.close();}catch(Exception e){}
+ }
+ if(bos != null)
+ {
+ content = bos.toByteArray();
+ try{bos.close();}catch(Exception e){}
+ }
+ }
+
+ return content;
+ }
+
+ /**
+ *
+ * @param url
+ * @return
+ */
+ private String parseTargetId(String url)
+ {
+ String targetId = null;
+
+ int fromIndex = 0; //hard coding the portal deployment context for now
+ fromIndex = url.indexOf("presentation") != -1 ? url.indexOf("presentation") + "presentation".length() : 0;
+ targetId = url.indexOf('?') != -1 ? url.substring(fromIndex, url.indexOf('?')):url.substring(fromIndex);
+
+ //Removes the PATH data if any found
+ if(targetId.indexOf(';')!=-1)
+ {
+ targetId = targetId.substring(0, targetId.indexOf(';'));
+ }
+
+ return targetId;
+ }
+}
Deleted: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/impl/ajax/entry/PortalEntryPoint.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/impl/ajax/entry/PortalEntryPoint.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/impl/ajax/entry/PortalEntryPoint.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,292 +0,0 @@
-package org.jboss.portal.presentation.impl.ajax.entry;
-
-
-import java.util.Map;
-import java.util.StringTokenizer;
-import java.util.HashMap;
-import java.io.InputStream;
-import java.net.URLDecoder;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.log4j.Logger;
-
-import org.jboss.portal.web.WebRequest;
-import org.jboss.portal.web.WebResponse;
-
-import org.jboss.portal.common.io.IOTools;
-import org.jboss.portal.presentation.PresentationServerImpl;
-import org.jboss.portal.presentation.invocation.AjaxRequest;
-import org.jboss.portal.presentation.invocation.AjaxResponse;
-import org.jboss.portal.presentation.ajax.client.service.PortalRPC;
-import org.jboss.portal.presentation.ajax.client.model.AjaxUIObject;
-import org.jboss.portal.presentation.ajax.client.protocol.ClientResponse;
-import org.jboss.portal.presentation.ajax.client.protocol.AjaxShowUIObjectResponse;
-import org.jboss.portal.presentation.ajax.AjaxPresentationClient;
-import org.jboss.portal.presentation.protocol.GetActivation;
-import org.jboss.portal.presentation.protocol.PostActivation;
-import org.jboss.portal.presentation.server2.PresentationServer;
-import org.jboss.portal.presentation.impl.state.structural.ContextNode;
-import org.jboss.portal.presentation.impl.state.structural.NodeImporter;
-import org.jboss.portal.presentation.impl.state.structural.StructuralStateContextImpl;
-
-import com.google.gwt.user.client.rpc.SerializationException;
-import com.google.gwt.user.server.rpc.RemoteServiceServlet;
-
-
-/**
- * This serves as the Portal Entry Point for AJAX (Asynchronous) RPC calls being made by the
- * client-side Ajax agent of the Presentation Framework
- *
- * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
- *
- */
-public class PortalEntryPoint extends RemoteServiceServlet implements PortalRPC
-{
- /** The logger. */
- private Logger log = Logger.getLogger(getClass());
-
- /**
- *
- */
- private PresentationServer server;
-
-
- /** Configure the as default servlet. */
- public void init() throws ServletException
- {
- StructuralStateContextImpl structuralStateContext = (StructuralStateContextImpl)this.getServletContext().getAttribute("StructuralStateContext");
-
- //
- InputStream in = getServletContext().getResourceAsStream("/WEB-INF/page-structure.xml");
- try
- {
- ContextNode root = structuralStateContext.getRoot();
- new NodeImporter(root).importDocument(in);
- }
- catch (Exception e)
- {
- throw new ServletException(e);
- }
- finally
- {
- IOTools.safeClose(in);
- }
-
- //
- this.server = (PresentationServer)this.getServletContext().getAttribute("PresentationServer");
- }
- //---------------------------------------------------------------------------------------------------------------------------------------------------------------------
- /**
- *
- */
- public String processCall(String payload) throws SerializationException
- {
- //Perform the remote procedure call
- String returnVal = super.processCall(payload);
-
- //Perform any post-processing after calling the actual remote method that will perform
- //the functionality for this particular remote procedure call
-
- return returnVal;
- }
- // -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- /**
- * Asynchronously loads the specified object from the server
- *
- * @return The Initial Portal Page
- */
- public ClientResponse loadObject(String objectId)
- {
- try
- {
- ClientResponse clientResponse = null;
-
- HttpServletRequest request = this.getThreadLocalRequest();
-
- Object pendingServerAction = request.getSession().getAttribute("serverAction");
- if(pendingServerAction != null)
- {
- request.setAttribute("serverAction", pendingServerAction);
- request.getSession().removeAttribute("serverAction");
- }
-
- //execute the call on the Portal
- this.callPortalServer();
-
- //Setup the initial UIContext for the client session
- AjaxUIObject uiObject = (AjaxUIObject)request.getAttribute("uiObject");
- if(uiObject != null)
- {
- clientResponse = new AjaxShowUIObjectResponse(uiObject);
- }
-
- return clientResponse;
- }
- catch(Exception e)
- {
- throw new RuntimeException(e);
- }
- }
-
- /**
- *
- * @param url
- * @return
- */
- public ClientResponse asyncGet(String url)
- {
- try
- {
- ClientResponse clientResponse = null;
-
- HttpServletRequest request = this.getThreadLocalRequest();
-
- //Parse the query parameters into a Map of name value pairs
- Map queryParams = this.parseQueryParams(url);
-
- //Parse the UIObject target id
- String targetId = this.parseTargetId(url);
-
-
- GetActivation get = new GetActivation(targetId, null, queryParams);
-
- request.setAttribute("serverAction", get);
-
- //execute the call on the Portal
- this.callPortalServer();
-
- //Setup the initial UIContext for the client session
- AjaxUIObject uiObject = (AjaxUIObject)request.getAttribute("uiObject");
- if(uiObject != null)
- {
- clientResponse = new AjaxShowUIObjectResponse(uiObject);
- }
-
- return clientResponse;
- }
- catch(Exception e)
- {
- throw new RuntimeException(e);
- }
- }
-
- /**
- *
- * @param url
- * @param body
- * @return
- */
- public ClientResponse asyncPost(String url, String body)
- {
- try
- {
- ClientResponse clientResponse = null;
-
- HttpServletRequest request = this.getThreadLocalRequest();
-
- //Parse the query parameters into a Map of name value pairs
- Map queryParams = this.parseQueryParams(url);
-
- //Parse the UIObject target id
- String targetId = this.parseTargetId(url);
-
- //Parse the serialized post body into parameters
- StringTokenizer st = new StringTokenizer(body, "&");
- while(st.hasMoreTokens())
- {
- String token = st.nextToken();
- int equalIndex = token.indexOf('=');
- String name = token.substring(0, equalIndex);
- String value = token.substring(equalIndex+1);
-
- queryParams.put(URLDecoder.decode(name, "UTF-8"), new String[]{URLDecoder.decode(value, "UTF-8")});
- }
-
- PostActivation post = new PostActivation(targetId, null, queryParams, null);
-
- request.setAttribute("serverAction", post);
-
- //execute the call on the Portal
- this.callPortalServer();
-
- //Setup the initial UIContext for the client session
- AjaxUIObject uiObject = (AjaxUIObject)request.getAttribute("uiObject");
- if(uiObject != null)
- {
- clientResponse = new AjaxShowUIObjectResponse(uiObject);
- }
-
- return clientResponse;
- }
- catch(Exception e)
- {
- throw new RuntimeException(e);
- }
- }
- //-------------------------------------------------------------------------------------------------------------------------------------------------------------------
- /**
- *
- */
- private Map parseQueryParams(String url) throws Exception
- {
- Map queryParams = new HashMap();
-
- if(url.indexOf('?') != -1)
- {
- String queryString = url.substring(url.indexOf('?')+1);
- StringTokenizer st = new StringTokenizer(queryString, "&");
- while(st.hasMoreTokens())
- {
- String token = st.nextToken();
- int equalIndex = token.indexOf('=');
- String name = token.substring(0, equalIndex);
- String value = token.substring(equalIndex+1);
-
- queryParams.put(name, new String[]{URLDecoder.decode(value, "UTF-8")});
- }
- }
-
- return queryParams;
- }
-
- /**
- *
- * @param url
- * @return
- */
- private String parseTargetId(String url)
- {
- String targetId = null;
-
- int fromIndex = 0; //hard coding the portal deployment context for now
- fromIndex = url.indexOf("presentation") != -1 ? url.indexOf("presentation") + "presentation".length() : 0;
- targetId = url.indexOf('?') != -1 ? url.substring(fromIndex, url.indexOf('?')):url.substring(fromIndex);
-
- //Removes the PATH data if any found
- if(targetId.indexOf(';')!=-1)
- {
- targetId = targetId.substring(0, targetId.indexOf(';'));
- }
-
- return targetId;
- }
-
- /**
- *
- *
- */
- private void callPortalServer() throws Exception
- {
- HttpServletRequest req = this.getThreadLocalRequest();
- HttpServletResponse resp = this.getThreadLocalResponse();
-
-// WebRequest webReq = new WebRequest(req);
-// WebResponse webResp = new WebResponse(resp);
-
- AjaxPresentationClient client = new AjaxPresentationClient(new AjaxRequest(req), new AjaxResponse(resp), this.server);
- client.process();
- }
-}
Copied: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/impl/ajax/entry/PortalEntryPoint.java (from rev 10615, modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/impl/ajax/entry/PortalEntryPoint.java)
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/impl/ajax/entry/PortalEntryPoint.java (rev 0)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/impl/ajax/entry/PortalEntryPoint.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,292 @@
+package org.jboss.portal.presentation.impl.ajax.entry;
+
+
+import java.util.Map;
+import java.util.StringTokenizer;
+import java.util.HashMap;
+import java.io.InputStream;
+import java.net.URLDecoder;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.log4j.Logger;
+
+import org.jboss.portal.web.WebRequest;
+import org.jboss.portal.web.WebResponse;
+
+import org.jboss.portal.common.io.IOTools;
+import org.jboss.portal.presentation.PresentationServerImpl;
+import org.jboss.portal.presentation.invocation.AjaxRequest;
+import org.jboss.portal.presentation.invocation.AjaxResponse;
+import org.jboss.portal.presentation.ajax.client.service.PortalRPC;
+import org.jboss.portal.presentation.ajax.client.model.AjaxUIObject;
+import org.jboss.portal.presentation.ajax.client.protocol.ClientResponse;
+import org.jboss.portal.presentation.ajax.client.protocol.AjaxShowUIObjectResponse;
+import org.jboss.portal.presentation.ajax.AjaxPresentationClient;
+import org.jboss.portal.presentation.protocol.GetActivation;
+import org.jboss.portal.presentation.protocol.PostActivation;
+import org.jboss.portal.presentation.server2.PresentationServer;
+import org.jboss.portal.presentation.impl.state.structural.ContextNode;
+import org.jboss.portal.presentation.impl.state.structural.NodeImporter;
+import org.jboss.portal.presentation.impl.state.structural.StructuralStateContextImpl;
+
+import com.google.gwt.user.client.rpc.SerializationException;
+import com.google.gwt.user.server.rpc.RemoteServiceServlet;
+
+
+/**
+ * This serves as the Portal Entry Point for AJAX (Asynchronous) RPC calls being made by the
+ * client-side Ajax agent of the Presentation Framework
+ *
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class PortalEntryPoint extends RemoteServiceServlet implements PortalRPC
+{
+ /** The logger. */
+ private Logger log = Logger.getLogger(getClass());
+
+ /**
+ *
+ */
+ private PresentationServer server;
+
+
+ /** Configure the as default servlet. */
+ public void init() throws ServletException
+ {
+ StructuralStateContextImpl structuralStateContext = (StructuralStateContextImpl)this.getServletContext().getAttribute("StructuralStateContext");
+
+ //
+ InputStream in = getServletContext().getResourceAsStream("/WEB-INF/page-structure.xml");
+ try
+ {
+ ContextNode root = structuralStateContext.getRoot();
+ new NodeImporter(root).importDocument(in);
+ }
+ catch (Exception e)
+ {
+ throw new ServletException(e);
+ }
+ finally
+ {
+ IOTools.safeClose(in);
+ }
+
+ //
+ this.server = (PresentationServer)this.getServletContext().getAttribute("PresentationServer");
+ }
+ //---------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ /**
+ *
+ */
+ public String processCall(String payload) throws SerializationException
+ {
+ //Perform the remote procedure call
+ String returnVal = super.processCall(payload);
+
+ //Perform any post-processing after calling the actual remote method that will perform
+ //the functionality for this particular remote procedure call
+
+ return returnVal;
+ }
+ // -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ /**
+ * Asynchronously loads the specified object from the server
+ *
+ * @return The Initial Portal Page
+ */
+ public ClientResponse loadObject(String objectId)
+ {
+ try
+ {
+ ClientResponse clientResponse = null;
+
+ HttpServletRequest request = this.getThreadLocalRequest();
+
+ Object pendingServerAction = request.getSession().getAttribute("serverAction");
+ if(pendingServerAction != null)
+ {
+ request.setAttribute("serverAction", pendingServerAction);
+ request.getSession().removeAttribute("serverAction");
+ }
+
+ //execute the call on the Portal
+ this.callPortalServer();
+
+ //Setup the initial UIContext for the client session
+ AjaxUIObject uiObject = (AjaxUIObject)request.getAttribute("uiObject");
+ if(uiObject != null)
+ {
+ clientResponse = new AjaxShowUIObjectResponse(uiObject);
+ }
+
+ return clientResponse;
+ }
+ catch(Exception e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ *
+ * @param url
+ * @return
+ */
+ public ClientResponse asyncGet(String url)
+ {
+ try
+ {
+ ClientResponse clientResponse = null;
+
+ HttpServletRequest request = this.getThreadLocalRequest();
+
+ //Parse the query parameters into a Map of name value pairs
+ Map queryParams = this.parseQueryParams(url);
+
+ //Parse the UIObject target id
+ String targetId = this.parseTargetId(url);
+
+
+ GetActivation get = new GetActivation(targetId, null, queryParams);
+
+ request.setAttribute("serverAction", get);
+
+ //execute the call on the Portal
+ this.callPortalServer();
+
+ //Setup the initial UIContext for the client session
+ AjaxUIObject uiObject = (AjaxUIObject)request.getAttribute("uiObject");
+ if(uiObject != null)
+ {
+ clientResponse = new AjaxShowUIObjectResponse(uiObject);
+ }
+
+ return clientResponse;
+ }
+ catch(Exception e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ *
+ * @param url
+ * @param body
+ * @return
+ */
+ public ClientResponse asyncPost(String url, String body)
+ {
+ try
+ {
+ ClientResponse clientResponse = null;
+
+ HttpServletRequest request = this.getThreadLocalRequest();
+
+ //Parse the query parameters into a Map of name value pairs
+ Map queryParams = this.parseQueryParams(url);
+
+ //Parse the UIObject target id
+ String targetId = this.parseTargetId(url);
+
+ //Parse the serialized post body into parameters
+ StringTokenizer st = new StringTokenizer(body, "&");
+ while(st.hasMoreTokens())
+ {
+ String token = st.nextToken();
+ int equalIndex = token.indexOf('=');
+ String name = token.substring(0, equalIndex);
+ String value = token.substring(equalIndex+1);
+
+ queryParams.put(URLDecoder.decode(name, "UTF-8"), new String[]{URLDecoder.decode(value, "UTF-8")});
+ }
+
+ PostActivation post = new PostActivation(targetId, null, queryParams, null);
+
+ request.setAttribute("serverAction", post);
+
+ //execute the call on the Portal
+ this.callPortalServer();
+
+ //Setup the initial UIContext for the client session
+ AjaxUIObject uiObject = (AjaxUIObject)request.getAttribute("uiObject");
+ if(uiObject != null)
+ {
+ clientResponse = new AjaxShowUIObjectResponse(uiObject);
+ }
+
+ return clientResponse;
+ }
+ catch(Exception e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+ //-------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ /**
+ *
+ */
+ private Map parseQueryParams(String url) throws Exception
+ {
+ Map queryParams = new HashMap();
+
+ if(url.indexOf('?') != -1)
+ {
+ String queryString = url.substring(url.indexOf('?')+1);
+ StringTokenizer st = new StringTokenizer(queryString, "&");
+ while(st.hasMoreTokens())
+ {
+ String token = st.nextToken();
+ int equalIndex = token.indexOf('=');
+ String name = token.substring(0, equalIndex);
+ String value = token.substring(equalIndex+1);
+
+ queryParams.put(name, new String[]{URLDecoder.decode(value, "UTF-8")});
+ }
+ }
+
+ return queryParams;
+ }
+
+ /**
+ *
+ * @param url
+ * @return
+ */
+ private String parseTargetId(String url)
+ {
+ String targetId = null;
+
+ int fromIndex = 0; //hard coding the portal deployment context for now
+ fromIndex = url.indexOf("presentation") != -1 ? url.indexOf("presentation") + "presentation".length() : 0;
+ targetId = url.indexOf('?') != -1 ? url.substring(fromIndex, url.indexOf('?')):url.substring(fromIndex);
+
+ //Removes the PATH data if any found
+ if(targetId.indexOf(';')!=-1)
+ {
+ targetId = targetId.substring(0, targetId.indexOf(';'));
+ }
+
+ return targetId;
+ }
+
+ /**
+ *
+ *
+ */
+ private void callPortalServer() throws Exception
+ {
+ HttpServletRequest req = this.getThreadLocalRequest();
+ HttpServletResponse resp = this.getThreadLocalResponse();
+
+// WebRequest webReq = new WebRequest(req);
+// WebResponse webResp = new WebResponse(resp);
+
+ AjaxPresentationClient client = new AjaxPresentationClient(new AjaxRequest(req), new AjaxResponse(resp), this.server);
+ client.process();
+ }
+}
Copied: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation (from rev 10615, modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation)
Deleted: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/AjaxRequest.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/AjaxRequest.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/AjaxRequest.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,74 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2008, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.invocation;
-
-import org.jboss.portal.web.WebRequest;
-import org.jboss.portal.web.Body;
-import org.jboss.portal.common.net.media.MediaType;
-
-import javax.servlet.http.HttpServletRequestWrapper;
-import javax.servlet.http.HttpServletRequest;
-import java.util.Map;
-
-/**
- * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public class AjaxRequest extends HttpServletRequestWrapper implements WebRequest
-{
-
- public AjaxRequest(HttpServletRequest request)
- {
- super(request);
- }
-
- public Verb getVerb()
- {
- throw new UnsupportedOperationException();
- }
-
- public Map<String, String[]> getQueryParameterMap()
- {
- throw new UnsupportedOperationException();
- }
-
- public Body getBody()
- {
- throw new UnsupportedOperationException();
- }
-
- public MediaType getMediaType()
- {
- throw new UnsupportedOperationException();
- }
-
- public String getWebRequestPath()
- {
- throw new UnsupportedOperationException();
- }
-
- public String getWebContextPath()
- {
- throw new UnsupportedOperationException();
- }
-}
Copied: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/AjaxRequest.java (from rev 10615, modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/AjaxRequest.java)
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/AjaxRequest.java (rev 0)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/AjaxRequest.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,74 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.invocation;
+
+import org.jboss.portal.web.WebRequest;
+import org.jboss.portal.web.Body;
+import org.jboss.portal.common.net.media.MediaType;
+
+import javax.servlet.http.HttpServletRequestWrapper;
+import javax.servlet.http.HttpServletRequest;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class AjaxRequest extends HttpServletRequestWrapper implements WebRequest
+{
+
+ public AjaxRequest(HttpServletRequest request)
+ {
+ super(request);
+ }
+
+ public Verb getVerb()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public Map<String, String[]> getQueryParameterMap()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public Body getBody()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public MediaType getMediaType()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public String getWebRequestPath()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public String getWebContextPath()
+ {
+ throw new UnsupportedOperationException();
+ }
+}
Deleted: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/AjaxResponse.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/AjaxResponse.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/AjaxResponse.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,54 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2008, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.invocation;
-
-import org.jboss.portal.web.WebResponse;
-import org.jboss.portal.common.servlet.URLFormat;
-
-import javax.servlet.http.HttpServletResponseWrapper;
-import javax.servlet.http.HttpServletResponse;
-import java.util.Map;
-import java.io.Writer;
-import java.io.IOException;
-
-/**
- * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public class AjaxResponse extends HttpServletResponseWrapper implements WebResponse
-{
- public AjaxResponse(HttpServletResponse response)
- {
- super(response);
- }
-
- public String renderURL(String path, Map<String, String[]> parameters, URLFormat wantedURLFormat) throws IllegalArgumentException
- {
- throw new UnsupportedOperationException();
- }
-
- public void renderURL(Writer writer, String path, Map<String, String[]> parameters, URLFormat wantedURLFormat) throws IllegalArgumentException, IOException
- {
- throw new UnsupportedOperationException();
- }
-}
Copied: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/AjaxResponse.java (from rev 10615, modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/AjaxResponse.java)
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/AjaxResponse.java (rev 0)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/AjaxResponse.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,54 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.invocation;
+
+import org.jboss.portal.web.WebResponse;
+import org.jboss.portal.common.servlet.URLFormat;
+
+import javax.servlet.http.HttpServletResponseWrapper;
+import javax.servlet.http.HttpServletResponse;
+import java.util.Map;
+import java.io.Writer;
+import java.io.IOException;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class AjaxResponse extends HttpServletResponseWrapper implements WebResponse
+{
+ public AjaxResponse(HttpServletResponse response)
+ {
+ super(response);
+ }
+
+ public String renderURL(String path, Map<String, String[]> parameters, URLFormat wantedURLFormat) throws IllegalArgumentException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void renderURL(Writer writer, String path, Map<String, String[]> parameters, URLFormat wantedURLFormat) throws IllegalArgumentException, IOException
+ {
+ throw new UnsupportedOperationException();
+ }
+}
Deleted: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/ClientController.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/ClientController.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/ClientController.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,39 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.invocation;
-
-import org.jboss.portal.presentation.server.ServerException;
-
-/**
- * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
- *
- */
-public interface ClientController
-{
- /**
- *
- * @param invocation
- * @throws ServerException
- */
- public void handle(PresentationInvocation invocation) throws ServerException;
-}
Copied: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/ClientController.java (from rev 10615, modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/ClientController.java)
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/ClientController.java (rev 0)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/ClientController.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,39 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.invocation;
+
+import org.jboss.portal.presentation.server.ServerException;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public interface ClientController
+{
+ /**
+ *
+ * @param invocation
+ * @throws ServerException
+ */
+ public void handle(PresentationInvocation invocation) throws ServerException;
+}
Deleted: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/PresentationInvocation.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/PresentationInvocation.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/PresentationInvocation.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,117 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.invocation;
-
-import org.jboss.portal.common.invocation.Invocation;
-import org.jboss.portal.common.invocation.InvocationContext;
-
-import org.jboss.portal.web.WebRequest;
-import org.jboss.portal.web.WebResponse;
-
-
-/**
- * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
- *
- */
-public class PresentationInvocation extends Invocation
-{
- private InvocationContext context = null;
- private WebRequest request = null;
- private WebResponse response = null;
-
- /**
- *
- * @param request
- */
- public PresentationInvocation(WebRequest request, WebResponse response)
- {
- this.request = request;
- this.response = response;
- this.context = new PresentationInvocationContext();
- }
-
- /**
- *
- */
- public InvocationContext getContext() throws IllegalStateException
- {
- return this.context;
- }
-
- /**
- *
- * @return
- */
- public WebRequest getRequest()
- {
- return this.request;
- }
-
- /**
- *
- * @return
- */
- public WebResponse getResponse()
- {
- return this.response;
- }
-
- /**
- *
- * @return
- */
- public String getPortalHost()
- {
- return this.request.getServerName();
- }
-
- /**
- *
- * @return
- */
- public String getPortalRequestPath()
- {
- String portalRequestPath = null;
-
- String requestURI = request.getRequestURI();
- String contextPath = request.getContextPath();
- portalRequestPath = requestURI.substring(contextPath.length());
-
- return portalRequestPath;
- }
-
- /**
- *
- * @return
- */
- public String getPortalContextPath()
- {
- String portalContextPath = null;
-
- String requestURI = request.getRequestURI();
- String contextPath = request.getContextPath();
- portalContextPath = requestURI.substring(0, contextPath.length());
-
- return portalContextPath;
- }
-}
Copied: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/PresentationInvocation.java (from rev 10615, modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/PresentationInvocation.java)
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/PresentationInvocation.java (rev 0)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/PresentationInvocation.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,117 @@
+/******************************************************************************
+ * 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.presentation.invocation;
+
+import org.jboss.portal.common.invocation.Invocation;
+import org.jboss.portal.common.invocation.InvocationContext;
+
+import org.jboss.portal.web.WebRequest;
+import org.jboss.portal.web.WebResponse;
+
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class PresentationInvocation extends Invocation
+{
+ private InvocationContext context = null;
+ private WebRequest request = null;
+ private WebResponse response = null;
+
+ /**
+ *
+ * @param request
+ */
+ public PresentationInvocation(WebRequest request, WebResponse response)
+ {
+ this.request = request;
+ this.response = response;
+ this.context = new PresentationInvocationContext();
+ }
+
+ /**
+ *
+ */
+ public InvocationContext getContext() throws IllegalStateException
+ {
+ return this.context;
+ }
+
+ /**
+ *
+ * @return
+ */
+ public WebRequest getRequest()
+ {
+ return this.request;
+ }
+
+ /**
+ *
+ * @return
+ */
+ public WebResponse getResponse()
+ {
+ return this.response;
+ }
+
+ /**
+ *
+ * @return
+ */
+ public String getPortalHost()
+ {
+ return this.request.getServerName();
+ }
+
+ /**
+ *
+ * @return
+ */
+ public String getPortalRequestPath()
+ {
+ String portalRequestPath = null;
+
+ String requestURI = request.getRequestURI();
+ String contextPath = request.getContextPath();
+ portalRequestPath = requestURI.substring(contextPath.length());
+
+ return portalRequestPath;
+ }
+
+ /**
+ *
+ * @return
+ */
+ public String getPortalContextPath()
+ {
+ String portalContextPath = null;
+
+ String requestURI = request.getRequestURI();
+ String contextPath = request.getContextPath();
+ portalContextPath = requestURI.substring(0, contextPath.length());
+
+ return portalContextPath;
+ }
+}
Deleted: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/PresentationInvocationContext.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/PresentationInvocationContext.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/PresentationInvocationContext.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,34 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.invocation;
-
-import org.jboss.portal.common.invocation.AbstractInvocationContext;
-
-/**
- * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
- *
- */
-public class PresentationInvocationContext extends AbstractInvocationContext
-{
-
-}
Copied: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/PresentationInvocationContext.java (from rev 10615, modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/PresentationInvocationContext.java)
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/PresentationInvocationContext.java (rev 0)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/PresentationInvocationContext.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,34 @@
+/******************************************************************************
+ * 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.presentation.invocation;
+
+import org.jboss.portal.common.invocation.AbstractInvocationContext;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class PresentationInvocationContext extends AbstractInvocationContext
+{
+
+}
Deleted: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/PresentationInvocationHandler.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/PresentationInvocationHandler.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/PresentationInvocationHandler.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,58 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.invocation;
-
-import org.jboss.portal.common.invocation.Invocation;
-import org.jboss.portal.common.invocation.InvocationException;
-import org.jboss.portal.common.invocation.InvocationHandler;
-
-/**
- * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
- *
- */
-public class PresentationInvocationHandler implements InvocationHandler
-{
- /**
- *
- */
- private ClientController clientController = null;
-
- /**
- *
- * @param clientController
- */
- public PresentationInvocationHandler(ClientController clientController)
- {
- this.clientController = clientController;
- }
-
- /**
- *
- */
- public Object invoke(Invocation invocation) throws Exception, InvocationException
- {
- this.clientController.handle((PresentationInvocation)invocation);
-
- return null;
- }
-}
Copied: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/PresentationInvocationHandler.java (from rev 10615, modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/PresentationInvocationHandler.java)
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/PresentationInvocationHandler.java (rev 0)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/PresentationInvocationHandler.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,58 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.invocation;
+
+import org.jboss.portal.common.invocation.Invocation;
+import org.jboss.portal.common.invocation.InvocationException;
+import org.jboss.portal.common.invocation.InvocationHandler;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class PresentationInvocationHandler implements InvocationHandler
+{
+ /**
+ *
+ */
+ private ClientController clientController = null;
+
+ /**
+ *
+ * @param clientController
+ */
+ public PresentationInvocationHandler(ClientController clientController)
+ {
+ this.clientController = clientController;
+ }
+
+ /**
+ *
+ */
+ public Object invoke(Invocation invocation) throws Exception, InvocationException
+ {
+ this.clientController.handle((PresentationInvocation)invocation);
+
+ return null;
+ }
+}
Modified: modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/MockPortalEntryPoint.java
===================================================================
--- modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/MockPortalEntryPoint.java 2008-04-17 13:37:34 UTC (rev 10621)
+++ modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/MockPortalEntryPoint.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -16,15 +16,18 @@
import org.apache.log4j.Logger;
import org.jboss.mx.util.MBeanServerLocator;
+import org.jboss.portal.web.WebRequest;
+import org.jboss.portal.web.WebResponse;
+
import org.jboss.portal.presentation.ajax.client.service.PortalRPC;
import org.jboss.portal.presentation.ajax.client.model.AjaxUIObject;
import org.jboss.portal.presentation.ajax.client.protocol.ClientResponse;
import org.jboss.portal.presentation.ajax.client.protocol.AjaxShowUIObjectResponse;
import org.jboss.portal.presentation.protocol.GetActivation;
import org.jboss.portal.presentation.protocol.PostActivation;
-import org.jboss.portal.presentation.toremove.invocation.PresentationInvocation;
-import org.jboss.portal.presentation.toremove.invocation.AjaxRequest;
-import org.jboss.portal.presentation.toremove.invocation.AjaxResponse;
+import org.jboss.portal.presentation.invocation.PresentationInvocation;
+import org.jboss.portal.presentation.invocation.AjaxRequest;
+import org.jboss.portal.presentation.invocation.AjaxResponse;
import com.google.gwt.user.client.rpc.SerializationException;
import com.google.gwt.user.server.rpc.RemoteServiceServlet;
Modified: modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/plugin/MainProcessor.java
===================================================================
--- modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/plugin/MainProcessor.java 2008-04-17 13:37:34 UTC (rev 10621)
+++ modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/plugin/MainProcessor.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -29,16 +29,16 @@
import org.jboss.portal.web.Body;
-import org.jboss.portal.presentation.toremove.server.ServerException;
+import org.jboss.portal.presentation.server.ServerException;
-import org.jboss.portal.presentation.toremove.server.Processor;
-import org.jboss.portal.presentation.toremove.server.ProcessorRequest;
-import org.jboss.portal.presentation.toremove.server.ProcessorResponse;
+import org.jboss.portal.presentation.server.Processor;
+import org.jboss.portal.presentation.server.ProcessorRequest;
+import org.jboss.portal.presentation.server.ProcessorResponse;
-import org.jboss.portal.presentation.toremove.client.PresentationContext;
+import org.jboss.portal.presentation.client.PresentationContext;
-import org.jboss.portal.presentation.toremove.model.StateType;
-import org.jboss.portal.presentation.toremove.model.UIWindow;
+import org.jboss.portal.presentation.model.StateType;
+import org.jboss.portal.presentation.model.UIWindow;
import org.jboss.portal.presentation.protocol.LinkActivation;
import org.jboss.portal.presentation.protocol.PostActivation;
Modified: modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/plugin/PresentationServerImpl.java
===================================================================
--- modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/plugin/PresentationServerImpl.java 2008-04-17 13:37:34 UTC (rev 10621)
+++ modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/plugin/PresentationServerImpl.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -22,12 +22,12 @@
******************************************************************************/
package org.jboss.portal.presentation.test.portal.plugin;
-import org.jboss.portal.presentation.toremove.client.PresentationContext;
-import org.jboss.portal.presentation.toremove.server.Processor;
-import org.jboss.portal.presentation.toremove.server.PresentationServer;
-import org.jboss.portal.presentation.toremove.model.UIWindow;
-import org.jboss.portal.presentation.content.WindowContent;
-import org.jboss.portal.presentation.toremove.model.state.structural.StructuralStateContext;
+import org.jboss.portal.presentation.client.PresentationContext;
+import org.jboss.portal.presentation.server.Processor;
+import org.jboss.portal.presentation.server.PresentationServer;
+import org.jboss.portal.presentation.model.UIWindow;
+import org.jboss.portal.presentation.model.content.WindowContent;
+import org.jboss.portal.presentation.model.state.structural.StructuralStateContext;
import org.jboss.portal.presentation.test.portal.MockPortalServer;
import org.jboss.portal.presentation.test.portal.MockWindow;
Modified: modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/plugin/StructuralObjectImpl.java
===================================================================
--- modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/plugin/StructuralObjectImpl.java 2008-04-17 13:37:34 UTC (rev 10621)
+++ modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/plugin/StructuralObjectImpl.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -22,8 +22,8 @@
******************************************************************************/
package org.jboss.portal.presentation.test.portal.plugin;
-import org.jboss.portal.presentation.toremove.model.state.structural.StructuralObject;
-import org.jboss.portal.presentation.toremove.model.state.structural.StructuralState;
+import org.jboss.portal.presentation.model.state.structural.StructuralObject;
+import org.jboss.portal.presentation.model.state.structural.StructuralState;
import org.jboss.portal.presentation.test.portal.MockPortalObject;
Modified: modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/plugin/StructuralStateContextImpl.java
===================================================================
--- modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/plugin/StructuralStateContextImpl.java 2008-04-17 13:37:34 UTC (rev 10621)
+++ modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/plugin/StructuralStateContextImpl.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -23,9 +23,9 @@
package org.jboss.portal.presentation.test.portal.plugin;
-import org.jboss.portal.presentation.toremove.model.state.StateException;
-import org.jboss.portal.presentation.toremove.model.state.structural.AbstractStructuralStateContext;
-import org.jboss.portal.presentation.toremove.model.state.structural.StructuralObject;
+import org.jboss.portal.presentation.model.state.StateException;
+import org.jboss.portal.presentation.model.state.structural.AbstractStructuralStateContext;
+import org.jboss.portal.presentation.model.state.structural.StructuralObject;
import org.jboss.portal.common.NotYetImplemented;
import org.jboss.portal.presentation.test.portal.MockPortalServer;
Modified: modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/plugin/StructuralStateImpl.java
===================================================================
--- modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/plugin/StructuralStateImpl.java 2008-04-17 13:37:34 UTC (rev 10621)
+++ modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/plugin/StructuralStateImpl.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -22,12 +22,12 @@
******************************************************************************/
package org.jboss.portal.presentation.test.portal.plugin;
-import org.jboss.portal.presentation.toremove.model.state.structural.StructuralState;
-import org.jboss.portal.presentation.toremove.model.UIObject;
-import org.jboss.portal.presentation.toremove.model.UIContext;
-import org.jboss.portal.presentation.toremove.model.UIPortal;
-import org.jboss.portal.presentation.toremove.model.UIPage;
-import org.jboss.portal.presentation.toremove.model.UIWindow;
+import org.jboss.portal.presentation.model.state.structural.StructuralState;
+import org.jboss.portal.presentation.model.UIObject;
+import org.jboss.portal.presentation.model.UIContext;
+import org.jboss.portal.presentation.model.UIPortal;
+import org.jboss.portal.presentation.model.UIPage;
+import org.jboss.portal.presentation.model.UIWindow;
import org.jboss.portal.presentation.test.portal.MockPortalObject;
import org.jboss.portal.presentation.test.portal.MockContext;
Modified: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/PresentationServerImpl.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/PresentationServerImpl.java 2008-04-17 13:37:34 UTC (rev 10621)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/PresentationServerImpl.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -32,8 +32,8 @@
import org.jboss.portal.presentation.protocol.UIObjectAction;
import org.jboss.portal.presentation.protocol.ErrorResponse;
import org.jboss.portal.presentation.protocol.ShowUIObjectResponse;
-import org.jboss.portal.presentation.content.WindowContent;
-import org.jboss.portal.presentation.client.PresentationClient;
+import org.jboss.portal.presentation.model.content.WindowContent;
+import org.jboss.portal.presentation.client2.PresentationClient;
import org.jboss.portal.presentation.impl.state.structural.StructuralStateContextImpl;
import org.jboss.portal.presentation.impl.state.structural.StructuralNode;
import org.jboss.portal.presentation.impl.state.structural.WindowNode;
Modified: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationClient.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationClient.java 2008-04-17 13:37:34 UTC (rev 10621)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationClient.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -22,7 +22,7 @@
******************************************************************************/
package org.jboss.portal.presentation.classic;
-import org.jboss.portal.presentation.client.PresentationClient;
+import org.jboss.portal.presentation.client2.PresentationClient;
import org.jboss.portal.presentation.state.navigational.NavigationalStateContext;
import org.jboss.portal.presentation.state.structural.StructuralStateContext;
import org.jboss.portal.presentation.classic.model.DefaultPageViewPortScope;
@@ -43,7 +43,7 @@
import org.jboss.portal.presentation.model2.ui.UIPage;
import org.jboss.portal.presentation.model2.ui.UIWindow;
import org.jboss.portal.presentation.impl.model2.UIModelImpl;
-import org.jboss.portal.presentation.content.WindowContent;
+import org.jboss.portal.presentation.model.content.WindowContent;
import org.jboss.portal.presentation.protocol.ViewUIObjectAction;
import org.jboss.portal.presentation.protocol.ProtocolAction;
import org.jboss.portal.presentation.protocol.ProtocolResponse;
Modified: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/portlet/spi/PresentationServerContext.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/portlet/spi/PresentationServerContext.java 2008-04-17 13:37:34 UTC (rev 10621)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/portlet/spi/PresentationServerContext.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -26,7 +26,7 @@
import org.jboss.portal.web.ServletContainer;
import org.jboss.portal.web.RequestDispatchCallback;
import org.jboss.portal.web.ServletContextDispatcher;
-import org.jboss.portal.presentation.client.PresentationClient;
+import org.jboss.portal.presentation.client2.PresentationClient;
import javax.servlet.ServletContext;
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client)
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client/PresentationContext.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client/PresentationContext.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client/PresentationContext.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,60 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.client;
-
-import org.jboss.portal.presentation.protocol.ProtocolAction;
-import org.jboss.portal.presentation.model.UIContext;
-import org.jboss.portal.web.ServletContextDispatcher;
-
-/**
- * The contract that defines the services that the client provides to the server during a server invocation.
- *
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public interface PresentationContext
-{
-
- /**
- * Create a string representation of the server action.
- *
- * @param action the server action to render
- * @return the rendition of the server action
- * @throws IllegalArgumentException if the action cannot be rendered
- */
- String render(ProtocolAction action) throws IllegalArgumentException;
-
- /**
- * Returns the root UI context provided by the portal.
- *
- * @return the ui context
- */
- UIContext getUIContext();
-
- /**
- * Returns the servlet context dispatcher.
- *
- * @return the servlet context dispatcher
- */
- ServletContextDispatcher getDispatcher();
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client/PresentationContext.java (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client/PresentationContext.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client/PresentationContext.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client/PresentationContext.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,60 @@
+/******************************************************************************
+ * 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.presentation.client;
+
+import org.jboss.portal.presentation.protocol.ProtocolAction;
+import org.jboss.portal.presentation.model.UIContext;
+import org.jboss.portal.web.ServletContextDispatcher;
+
+/**
+ * The contract that defines the services that the client provides to the server during a server invocation.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public interface PresentationContext
+{
+
+ /**
+ * Create a string representation of the server action.
+ *
+ * @param action the server action to render
+ * @return the rendition of the server action
+ * @throws IllegalArgumentException if the action cannot be rendered
+ */
+ String render(ProtocolAction action) throws IllegalArgumentException;
+
+ /**
+ * Returns the root UI context provided by the portal.
+ *
+ * @return the ui context
+ */
+ UIContext getUIContext();
+
+ /**
+ * Returns the servlet context dispatcher.
+ *
+ * @return the servlet context dispatcher
+ */
+ ServletContextDispatcher getDispatcher();
+}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client2 (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client2)
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client2/PresentationClient.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client2/PresentationClient.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client2/PresentationClient.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,76 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2008, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.client2;
-
-import org.jboss.portal.presentation.state.navigational.NavigationalStateContext;
-import org.jboss.portal.presentation.protocol.ProtocolAction;
-import org.jboss.portal.portlet.URLFormat;
-import org.jboss.portal.web.ServletContextDispatcher;
-
-import java.io.IOException;
-import java.io.Writer;
-
-/**
- * The contract that defines the services that the client provides to the server during a presentation server invocation.
- *
- * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public interface PresentationClient
-{
-
- /**
- * Renders the provided action as an hyperlink.
- *
- * @param action the action to render
- * @param format the url format
- * @return the rendered url
- * @throws IllegalArgumentException if the action is null or cannot be rendered
- */
- String renderURL(ProtocolAction action, URLFormat format) throws IllegalArgumentException;
-
- /**
- * Renders the provided action as an hyperlink.
- *
- * @param writer the writer
- * @param action the action to render
- * @param format the url format
- * @throws IllegalArgumentException if the action is null or cannot be rendered
- * @throws IOException any IOException thrown by the writer
- */
- void renderURL(Writer writer, ProtocolAction action, URLFormat format) throws IOException;
-
- /**
- * Returns the navigational state context provided by the client.
- *
- * @return the navigational state context
- */
- NavigationalStateContext getNavigationalStateContext();
-
- /**
- * Returns the servlet context dispatcher.
- *
- * @return the servlet context dispatcher
- */
- ServletContextDispatcher getDispatcher();
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client2/PresentationClient.java (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client2/PresentationClient.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client2/PresentationClient.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client2/PresentationClient.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,76 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.client2;
+
+import org.jboss.portal.presentation.state.navigational.NavigationalStateContext;
+import org.jboss.portal.presentation.protocol.ProtocolAction;
+import org.jboss.portal.portlet.URLFormat;
+import org.jboss.portal.web.ServletContextDispatcher;
+
+import java.io.IOException;
+import java.io.Writer;
+
+/**
+ * The contract that defines the services that the client provides to the server during a presentation server invocation.
+ *
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public interface PresentationClient
+{
+
+ /**
+ * Renders the provided action as an hyperlink.
+ *
+ * @param action the action to render
+ * @param format the url format
+ * @return the rendered url
+ * @throws IllegalArgumentException if the action is null or cannot be rendered
+ */
+ String renderURL(ProtocolAction action, URLFormat format) throws IllegalArgumentException;
+
+ /**
+ * Renders the provided action as an hyperlink.
+ *
+ * @param writer the writer
+ * @param action the action to render
+ * @param format the url format
+ * @throws IllegalArgumentException if the action is null or cannot be rendered
+ * @throws IOException any IOException thrown by the writer
+ */
+ void renderURL(Writer writer, ProtocolAction action, URLFormat format) throws IOException;
+
+ /**
+ * Returns the navigational state context provided by the client.
+ *
+ * @return the navigational state context
+ */
+ NavigationalStateContext getNavigationalStateContext();
+
+ /**
+ * Returns the servlet context dispatcher.
+ *
+ * @return the servlet context dispatcher
+ */
+ ServletContextDispatcher getDispatcher();
+}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model)
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIContainerImpl.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIContainerImpl.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIContainerImpl.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,33 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.impl.model;
-
-import org.jboss.portal.presentation.model.UIContainer;
-
-/**
- * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
- *
- */
-public class UIContainerImpl extends UIObjectImpl implements UIContainer
-{
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIContainerImpl.java (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIContainerImpl.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIContainerImpl.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIContainerImpl.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,33 @@
+/******************************************************************************
+ * 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.presentation.impl.model;
+
+import org.jboss.portal.presentation.model.UIContainer;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class UIContainerImpl extends UIObjectImpl implements UIContainer
+{
+}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIContextImpl.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIContextImpl.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIContextImpl.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,49 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.impl.model;
-
-import org.jboss.portal.presentation.model.UIObject;
-import org.jboss.portal.presentation.model.UIContext;
-import org.jboss.portal.presentation.model.ModelListener;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public class UIContextImpl extends UIObjectImpl implements UIContext
-{
-
- public UIContextImpl()
- {
- }
-
- public UIObject getObject(String id)
- {
- return context.getObject(id);
- }
-
- public void addModelListener(ModelListener listener)
- {
- context.addModelListener(listener);
- }
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIContextImpl.java (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIContextImpl.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIContextImpl.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIContextImpl.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,49 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.impl.model;
+
+import org.jboss.portal.presentation.model.UIObject;
+import org.jboss.portal.presentation.model.UIContext;
+import org.jboss.portal.presentation.model.ModelListener;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class UIContextImpl extends UIObjectImpl implements UIContext
+{
+
+ public UIContextImpl()
+ {
+ }
+
+ public UIObject getObject(String id)
+ {
+ return context.getObject(id);
+ }
+
+ public void addModelListener(ModelListener listener)
+ {
+ context.addModelListener(listener);
+ }
+}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIObjectImpl.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIObjectImpl.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIObjectImpl.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,141 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.impl.model;
-
-import org.jboss.portal.presentation.model.UIObject;
-import org.jboss.portal.presentation.model.StateType;
-import org.jboss.portal.presentation.model.state.StateException;
-import org.jboss.portal.presentation.model.state.StateChangeVetoException;
-import org.jboss.portal.presentation.impl.model.container.spi.UIContainerObject;
-import org.jboss.portal.presentation.impl.model.container.spi.UIObjectContext;
-
-import java.util.Collection;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public abstract class UIObjectImpl implements UIContainerObject
-{
-
- /** . */
- protected UIObjectContext context;
-
- //
- public UIObjectContext getContext()
- {
- return context;
- }
-
- public void setContext(UIObjectContext context)
- {
- this.context = context;
- }
-
- //
-
- public String getId()
- {
- return context.getManagedObject().getId();
- }
-
- public Status getStatus()
- {
- return context.getManagedObject().getStatus();
- }
-
- public void validate(Visitor scope)
- {
- context.getManagedObject().validate(scope);
- }
-
- public void validate()
- {
- context.getManagedObject().validate();
- }
-
- public void refresh(Visitor scope)
- {
- context.getManagedObject().refresh(scope);
- }
-
- public void refresh()
- {
- context.getManagedObject().refresh();
- }
-
- public <T> T getProperty(StateType stateType, String propertyName, Class<T> propertyType)
- {
- return context.getManagedObject().getProperty(stateType, propertyName, propertyType);
- }
-
- public Object getProperty(StateType stateType, String propertyName)
- {
- return context.getManagedObject().getProperty(stateType, propertyName);
- }
-
- public <T> void setProperty(StateType stateType, String propertyName, T propertyValue) throws StateChangeVetoException
- {
- context.getManagedObject().setProperty(stateType, propertyName, propertyValue);
- }
-
- public UIObject getChild(String name)
- {
- return context.getManagedObject().getChild(name);
- }
-
- public String getName()
- {
- return context.getManagedObject().getName();
- }
-
- public UIObject getParent()
- {
- return context.getManagedObject().getParent();
- }
-
- public Collection<? extends UIObject> getChildren()
- {
- return context.getManagedObject().getChildren();
- }
-
- public <T extends UIObject> T createChild(String name, Class<T> type) throws IllegalArgumentException
- {
- return context.getManagedObject().createChild(name, type);
- }
-
- public void destroyChild(String name) throws IllegalArgumentException, StateException
- {
- context.getManagedObject().destroyChild(name);
- }
-
- public void move(UIObject destination) throws IllegalArgumentException, StateException
- {
- context.getManagedObject().move(destination);
- }
-
- public String toString()
- {
- return context.getManagedObject().toString();
- }
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIObjectImpl.java (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIObjectImpl.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIObjectImpl.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIObjectImpl.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,141 @@
+/******************************************************************************
+ * 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.presentation.impl.model;
+
+import org.jboss.portal.presentation.model.UIObject;
+import org.jboss.portal.presentation.model.StateType;
+import org.jboss.portal.presentation.model.state.StateException;
+import org.jboss.portal.presentation.model.state.StateChangeVetoException;
+import org.jboss.portal.presentation.impl.model.container.spi.UIContainerObject;
+import org.jboss.portal.presentation.impl.model.container.spi.UIObjectContext;
+
+import java.util.Collection;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public abstract class UIObjectImpl implements UIContainerObject
+{
+
+ /** . */
+ protected UIObjectContext context;
+
+ //
+ public UIObjectContext getContext()
+ {
+ return context;
+ }
+
+ public void setContext(UIObjectContext context)
+ {
+ this.context = context;
+ }
+
+ //
+
+ public String getId()
+ {
+ return context.getManagedObject().getId();
+ }
+
+ public Status getStatus()
+ {
+ return context.getManagedObject().getStatus();
+ }
+
+ public void validate(Visitor scope)
+ {
+ context.getManagedObject().validate(scope);
+ }
+
+ public void validate()
+ {
+ context.getManagedObject().validate();
+ }
+
+ public void refresh(Visitor scope)
+ {
+ context.getManagedObject().refresh(scope);
+ }
+
+ public void refresh()
+ {
+ context.getManagedObject().refresh();
+ }
+
+ public <T> T getProperty(StateType stateType, String propertyName, Class<T> propertyType)
+ {
+ return context.getManagedObject().getProperty(stateType, propertyName, propertyType);
+ }
+
+ public Object getProperty(StateType stateType, String propertyName)
+ {
+ return context.getManagedObject().getProperty(stateType, propertyName);
+ }
+
+ public <T> void setProperty(StateType stateType, String propertyName, T propertyValue) throws StateChangeVetoException
+ {
+ context.getManagedObject().setProperty(stateType, propertyName, propertyValue);
+ }
+
+ public UIObject getChild(String name)
+ {
+ return context.getManagedObject().getChild(name);
+ }
+
+ public String getName()
+ {
+ return context.getManagedObject().getName();
+ }
+
+ public UIObject getParent()
+ {
+ return context.getManagedObject().getParent();
+ }
+
+ public Collection<? extends UIObject> getChildren()
+ {
+ return context.getManagedObject().getChildren();
+ }
+
+ public <T extends UIObject> T createChild(String name, Class<T> type) throws IllegalArgumentException
+ {
+ return context.getManagedObject().createChild(name, type);
+ }
+
+ public void destroyChild(String name) throws IllegalArgumentException, StateException
+ {
+ context.getManagedObject().destroyChild(name);
+ }
+
+ public void move(UIObject destination) throws IllegalArgumentException, StateException
+ {
+ context.getManagedObject().move(destination);
+ }
+
+ public String toString()
+ {
+ return context.getManagedObject().toString();
+ }
+}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIPageImpl.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIPageImpl.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIPageImpl.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,33 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.impl.model;
-
-import org.jboss.portal.presentation.model.UIPage;
-
-/**
- * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
- *
- */
-public class UIPageImpl extends UIObjectImpl implements UIPage
-{
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIPageImpl.java (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIPageImpl.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIPageImpl.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIPageImpl.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,33 @@
+/******************************************************************************
+ * 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.presentation.impl.model;
+
+import org.jboss.portal.presentation.model.UIPage;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class UIPageImpl extends UIObjectImpl implements UIPage
+{
+}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIPortalImpl.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIPortalImpl.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIPortalImpl.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,33 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.impl.model;
-
-import org.jboss.portal.presentation.model.UIPortal;
-
-/**
- * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
- *
- */
-public class UIPortalImpl extends UIObjectImpl implements UIPortal
-{
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIPortalImpl.java (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIPortalImpl.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIPortalImpl.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIPortalImpl.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,33 @@
+/******************************************************************************
+ * 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.presentation.impl.model;
+
+import org.jboss.portal.presentation.model.UIPortal;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class UIPortalImpl extends UIObjectImpl implements UIPortal
+{
+}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIWindowImpl.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIWindowImpl.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIWindowImpl.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,68 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.impl.model;
-
-import org.jboss.portal.Mode;
-import org.jboss.portal.WindowState;
-import org.jboss.portal.presentation.model.StateType;
-import org.jboss.portal.presentation.model.UIWindow;
-
-/**
- * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
- *
- */
-public class UIWindowImpl extends UIObjectImpl implements UIWindow
-{
-
- /**
- *
- */
- public Mode getMode()
- {
- return getProperty(StateType.NAVIGATIONAL, "mode", Mode.class);
- }
-
- /**
- *
- */
- public WindowState getWindowState()
- {
- return getProperty(StateType.NAVIGATIONAL, "windowstate", WindowState.class);
- }
-
- /**
- *
- */
- public void setMode(Mode mode)
- {
- setProperty(StateType.NAVIGATIONAL, "mode", mode);
- }
-
- /**
- *
- */
- public void setWindowState(WindowState windowState)
- {
- setProperty(StateType.NAVIGATIONAL, "windowstate", windowState);
- }
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIWindowImpl.java (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIWindowImpl.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIWindowImpl.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIWindowImpl.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,68 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.impl.model;
+
+import org.jboss.portal.Mode;
+import org.jboss.portal.WindowState;
+import org.jboss.portal.presentation.model.StateType;
+import org.jboss.portal.presentation.model.UIWindow;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class UIWindowImpl extends UIObjectImpl implements UIWindow
+{
+
+ /**
+ *
+ */
+ public Mode getMode()
+ {
+ return getProperty(StateType.NAVIGATIONAL, "mode", Mode.class);
+ }
+
+ /**
+ *
+ */
+ public WindowState getWindowState()
+ {
+ return getProperty(StateType.NAVIGATIONAL, "windowstate", WindowState.class);
+ }
+
+ /**
+ *
+ */
+ public void setMode(Mode mode)
+ {
+ setProperty(StateType.NAVIGATIONAL, "mode", mode);
+ }
+
+ /**
+ *
+ */
+ public void setWindowState(WindowState windowState)
+ {
+ setProperty(StateType.NAVIGATIONAL, "windowstate", windowState);
+ }
+}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container)
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/ManagedObject.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/ManagedObject.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/ManagedObject.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,419 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.impl.model.container;
-
-import org.jboss.portal.presentation.model.StateType;
-import org.jboss.portal.presentation.model.UIObject;
-import org.jboss.portal.presentation.model.event.state.StateChange;
-import org.jboss.portal.presentation.model.event.state.StateChangeEvent;
-import org.jboss.portal.presentation.model.event.state.navigational.NavigationalStateModification;
-import org.jboss.portal.presentation.model.state.StateChangeVetoException;
-import org.jboss.portal.presentation.model.state.StateException;
-import org.jboss.portal.presentation.model.state.structural.StructuralObject;
-import org.jboss.portal.presentation.model.state.structural.StructuralState;
-import org.jboss.portal.presentation.impl.model.container.spi.UIContainerObject;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Collection;
-import java.io.StringWriter;
-import java.io.PrintWriter;
-
-/**
- * Implement base fonctionnality of the <code>UIObject</code> interface.
- *
- * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- */
-final class ManagedObject implements UIObject
-{
-
- /** . */
- private static final Map<String, String> EMPTY_STATE = Collections.emptyMap();
-
- /** The context. */
- protected final ObjectContext context;
-
- public ManagedObject(ObjectContext context)
- {
- if (context == null)
- {
- throw new IllegalArgumentException("No null context accepted");
- }
-
- //
- this.context = context;
- }
-
- // UIObject interface implementation --------------------------------------------------------------------------------
-
- public final String getId()
- {
- return context.structuralObject.getId();
- }
-
- /**
- * Attempt to cast the value argument to the provided type argument. If the value argument type is assignable
- * to the provided type, the value is returned, otherwise if it is not or the value is null, null is returned.
- *
- * todo: Move that to common package.
- *
- * @param value the value to cast
- * @param type the type to downcast
- * @return the casted value or null
- */
- private <T> T safeCast(Object value, Class<T> type)
- {
- if (value == null)
- {
- return null;
- }
- else
- {
- if (type.isAssignableFrom(value.getClass()))
- {
- return type.cast(value);
- }
- else
- {
- return null;
- }
- }
- }
-
- public final Status getStatus()
- {
- return context.status;
- }
-
- protected final boolean isModifiable()
- {
- return true;
- }
-
- public void validate(Visitor scope)
- {
- context.container.validate(context.containerObject, scope);
- }
-
- public final void validate()
- {
- refresh(SINGLE_NODE_VISITOR);
- }
-
- public void refresh(Visitor scope)
- {
- context.container.refresh(context.containerObject, scope);
- }
-
- public final void refresh()
- {
- refresh(SINGLE_NODE_VISITOR);
- }
-
- public <T> T getProperty(StateType stateType, String propertyName, Class<T> propertyType)
- {
- context.checkAccess();
-
- //
- if (stateType == null)
- {
- throw new IllegalArgumentException();
- }
- if (propertyName == null)
- {
- throw new IllegalArgumentException();
- }
- if (propertyType == null)
- {
- throw new IllegalArgumentException();
- }
- Object value;
- switch (stateType)
- {
- case NAVIGATIONAL:
- value = context.container.navigationalStateContext.get(getId(), propertyName);
- break;
- case STRUCTURAL:
- value = context.structuralObject.getState().getProperties().get(propertyName);
- break;
- default:
- throw new AssertionError();
- }
- return safeCast(value, propertyType);
- }
-
- public final Object getProperty(StateType stateType, String propertyName)
- {
- return getProperty(stateType, propertyName, Object.class);
- }
-
- public final <T> void setProperty(StateType stateType, String propertyName, T propertyValue) throws StateChangeVetoException
- {
- context.checkAccess();
-
- //
- if (stateType == null)
- {
- throw new IllegalArgumentException();
- }
- if (propertyName == null)
- {
- throw new IllegalArgumentException();
- }
- if (!isModifiable())
- {
- throw new IllegalStateException("Cannot change state");
- }
-
- //
- String id = getId();
-
- //
- switch (stateType)
- {
- case NAVIGATIONAL:
- {
- // Have context process the change
- context.container.navigationalStateContext.set(id, propertyName, propertyValue);
-
- // Broadcast event
- NavigationalStateModification mod = new NavigationalStateModification(propertyName, propertyValue);
- StateChange<NavigationalStateModification> change = new StateChange<NavigationalStateModification>(id, mod);
- StateChangeEvent event = new StateChangeEvent(change);
- context.container.fireEvent(event);
- break;
- }
- case STRUCTURAL:
- {
- if (propertyValue instanceof String)
- {
- Map<String, String> changes = new HashMap<String, String>();
- changes.put(propertyName, (String)propertyValue);
-
- // Have context process change
- try
- {
- StructuralObject.Update update = context.container.structuralStateContext.update(context.structuralObject, changes);
-
- //
- context.container.update(update);
- }
- catch (StateException e)
- {
- validate();
-
- //
- throw e;
- }
- }
- else
- {
- throw new StateChangeVetoException("Structural property value must be string value");
- }
- break;
- }
- default:
- throw new AssertionError();
- }
- }
-
- public final UIContainerObject getChild(String name)
- {
- context.checkAccess();
-
- //
- if (name == null)
- {
- throw new IllegalArgumentException("No null name accepted");
- }
-
- //
- Collection<UIContainerObject> children = getChildren();
- for (UIContainerObject child : children)
- {
- String childName = child.getName();
- if(childName == null)
- {
- String id = child.getId();
- childName = id.substring(id.lastIndexOf('/')+1);
- }
-
- if (childName.equals(name))
- {
- return child;
- }
- }
-
- //
- return null;
- }
-
- public final String getName()
- {
- context.checkAccess();
-
- //
- return context.structuralObject.getState().getName();
- }
-
- public final UIObject getParent()
- {
- context.checkAccess();
-
- //
- return context.relationshipContext.parent.getRelated();
- }
-
- public final Collection<UIContainerObject> getChildren()
- {
- context.checkAccess();
-
- //
- return context.relationshipContext.children.getRelateds();
- }
-
- public final <T extends UIObject> T createChild(String name, Class<T> type) throws IllegalArgumentException
- {
- context.checkAccess();
-
- //
- if (!isModifiable())
- {
- throw new IllegalStateException("Cannot change state");
- }
-
- //
- StructuralObject.Creation creation;
- try
- {
- creation = context.container.structuralStateContext.create(context.structuralObject, type, name, EMPTY_STATE);
- }
- catch (StateException e)
- {
- context.updateStatus(e);
-
- //
- throw e;
- }
-
- //
- context.container.update(creation);
-
- //
- StructuralObject child = creation.getChild();
-
- //
- return type.cast(context.getObject(child.getId()));
- }
-
- public final void destroyChild(String name) throws IllegalArgumentException, StateException
- {
- context.checkAccess();
-
- //
- if (name == null)
- {
- throw new IllegalArgumentException();
- }
- if (!isModifiable())
- {
- throw new IllegalStateException("Cannot change state");
- }
-
- // Get the named child
- UIContainerObject namedChild = getChild(name);
-
- //
- if (namedChild == null)
- {
- throw new IllegalArgumentException("No such child with name " + name);
- }
-
- // Destroy the child
- StructuralObject.Destruction destruction = context.container.structuralStateContext.destroy(((ObjectContext)namedChild.getContext()).structuralObject);
-
- //
- context.container.update(destruction);
- }
-
- public final void move(UIObject destination) throws IllegalArgumentException, StateException
- {
- context.checkAccess();
-
- //
- if (destination == null)
- {
- throw new IllegalArgumentException("No null object accepted");
- }
- if (!isModifiable())
- {
- throw new IllegalStateException("Cannot change state");
- }
-
- //
- if (destination instanceof UIContainerObject)
- {
- //
- UIContainerObject tmp = (UIContainerObject)destination;
-
- // Perform the move operation
- StructuralObject.Move move = context.container.structuralStateContext.move(context.structuralObject, ((ObjectContext)tmp.getContext()).structuralObject);
-
- //
- context.container.update(move);
- }
- else
- {
- throw new IllegalArgumentException("Object not of right type");
- }
- }
-
- /**
- * Visitor that visits a single node only.
- */
- private static final Visitor SINGLE_NODE_VISITOR = new Visitor()
- {
- public boolean enterObject(UIObject object)
- {
- return true;
- }
-
- public void leaveObject(UIObject object)
- {
- }
-
- public boolean enterChildren(UIObject object, boolean loaded)
- {
- return false;
- }
- };
-
- public String toString()
- {
- StructuralObject so = context.structuralObject;
- StructuralState st = so.getState();
- return "UIObject[id=" + so.getId() + ",name=" + st.getName() + ",type=" + st.getType().getSimpleName() + ",id=" + hashCode() + "]";
- }
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/ManagedObject.java (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/ManagedObject.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/ManagedObject.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/ManagedObject.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,419 @@
+/******************************************************************************
+ * 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.presentation.impl.model.container;
+
+import org.jboss.portal.presentation.model.StateType;
+import org.jboss.portal.presentation.model.UIObject;
+import org.jboss.portal.presentation.model.event.state.StateChange;
+import org.jboss.portal.presentation.model.event.state.StateChangeEvent;
+import org.jboss.portal.presentation.model.event.state.navigational.NavigationalStateModification;
+import org.jboss.portal.presentation.model.state.StateChangeVetoException;
+import org.jboss.portal.presentation.model.state.StateException;
+import org.jboss.portal.presentation.model.state.structural.StructuralObject;
+import org.jboss.portal.presentation.model.state.structural.StructuralState;
+import org.jboss.portal.presentation.impl.model.container.spi.UIContainerObject;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Collection;
+import java.io.StringWriter;
+import java.io.PrintWriter;
+
+/**
+ * Implement base fonctionnality of the <code>UIObject</code> interface.
+ *
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ */
+final class ManagedObject implements UIObject
+{
+
+ /** . */
+ private static final Map<String, String> EMPTY_STATE = Collections.emptyMap();
+
+ /** The context. */
+ protected final ObjectContext context;
+
+ public ManagedObject(ObjectContext context)
+ {
+ if (context == null)
+ {
+ throw new IllegalArgumentException("No null context accepted");
+ }
+
+ //
+ this.context = context;
+ }
+
+ // UIObject interface implementation --------------------------------------------------------------------------------
+
+ public final String getId()
+ {
+ return context.structuralObject.getId();
+ }
+
+ /**
+ * Attempt to cast the value argument to the provided type argument. If the value argument type is assignable
+ * to the provided type, the value is returned, otherwise if it is not or the value is null, null is returned.
+ *
+ * todo: Move that to common package.
+ *
+ * @param value the value to cast
+ * @param type the type to downcast
+ * @return the casted value or null
+ */
+ private <T> T safeCast(Object value, Class<T> type)
+ {
+ if (value == null)
+ {
+ return null;
+ }
+ else
+ {
+ if (type.isAssignableFrom(value.getClass()))
+ {
+ return type.cast(value);
+ }
+ else
+ {
+ return null;
+ }
+ }
+ }
+
+ public final Status getStatus()
+ {
+ return context.status;
+ }
+
+ protected final boolean isModifiable()
+ {
+ return true;
+ }
+
+ public void validate(Visitor scope)
+ {
+ context.container.validate(context.containerObject, scope);
+ }
+
+ public final void validate()
+ {
+ refresh(SINGLE_NODE_VISITOR);
+ }
+
+ public void refresh(Visitor scope)
+ {
+ context.container.refresh(context.containerObject, scope);
+ }
+
+ public final void refresh()
+ {
+ refresh(SINGLE_NODE_VISITOR);
+ }
+
+ public <T> T getProperty(StateType stateType, String propertyName, Class<T> propertyType)
+ {
+ context.checkAccess();
+
+ //
+ if (stateType == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ if (propertyName == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ if (propertyType == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ Object value;
+ switch (stateType)
+ {
+ case NAVIGATIONAL:
+ value = context.container.navigationalStateContext.get(getId(), propertyName);
+ break;
+ case STRUCTURAL:
+ value = context.structuralObject.getState().getProperties().get(propertyName);
+ break;
+ default:
+ throw new AssertionError();
+ }
+ return safeCast(value, propertyType);
+ }
+
+ public final Object getProperty(StateType stateType, String propertyName)
+ {
+ return getProperty(stateType, propertyName, Object.class);
+ }
+
+ public final <T> void setProperty(StateType stateType, String propertyName, T propertyValue) throws StateChangeVetoException
+ {
+ context.checkAccess();
+
+ //
+ if (stateType == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ if (propertyName == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ if (!isModifiable())
+ {
+ throw new IllegalStateException("Cannot change state");
+ }
+
+ //
+ String id = getId();
+
+ //
+ switch (stateType)
+ {
+ case NAVIGATIONAL:
+ {
+ // Have context process the change
+ context.container.navigationalStateContext.set(id, propertyName, propertyValue);
+
+ // Broadcast event
+ NavigationalStateModification mod = new NavigationalStateModification(propertyName, propertyValue);
+ StateChange<NavigationalStateModification> change = new StateChange<NavigationalStateModification>(id, mod);
+ StateChangeEvent event = new StateChangeEvent(change);
+ context.container.fireEvent(event);
+ break;
+ }
+ case STRUCTURAL:
+ {
+ if (propertyValue instanceof String)
+ {
+ Map<String, String> changes = new HashMap<String, String>();
+ changes.put(propertyName, (String)propertyValue);
+
+ // Have context process change
+ try
+ {
+ StructuralObject.Update update = context.container.structuralStateContext.update(context.structuralObject, changes);
+
+ //
+ context.container.update(update);
+ }
+ catch (StateException e)
+ {
+ validate();
+
+ //
+ throw e;
+ }
+ }
+ else
+ {
+ throw new StateChangeVetoException("Structural property value must be string value");
+ }
+ break;
+ }
+ default:
+ throw new AssertionError();
+ }
+ }
+
+ public final UIContainerObject getChild(String name)
+ {
+ context.checkAccess();
+
+ //
+ if (name == null)
+ {
+ throw new IllegalArgumentException("No null name accepted");
+ }
+
+ //
+ Collection<UIContainerObject> children = getChildren();
+ for (UIContainerObject child : children)
+ {
+ String childName = child.getName();
+ if(childName == null)
+ {
+ String id = child.getId();
+ childName = id.substring(id.lastIndexOf('/')+1);
+ }
+
+ if (childName.equals(name))
+ {
+ return child;
+ }
+ }
+
+ //
+ return null;
+ }
+
+ public final String getName()
+ {
+ context.checkAccess();
+
+ //
+ return context.structuralObject.getState().getName();
+ }
+
+ public final UIObject getParent()
+ {
+ context.checkAccess();
+
+ //
+ return context.relationshipContext.parent.getRelated();
+ }
+
+ public final Collection<UIContainerObject> getChildren()
+ {
+ context.checkAccess();
+
+ //
+ return context.relationshipContext.children.getRelateds();
+ }
+
+ public final <T extends UIObject> T createChild(String name, Class<T> type) throws IllegalArgumentException
+ {
+ context.checkAccess();
+
+ //
+ if (!isModifiable())
+ {
+ throw new IllegalStateException("Cannot change state");
+ }
+
+ //
+ StructuralObject.Creation creation;
+ try
+ {
+ creation = context.container.structuralStateContext.create(context.structuralObject, type, name, EMPTY_STATE);
+ }
+ catch (StateException e)
+ {
+ context.updateStatus(e);
+
+ //
+ throw e;
+ }
+
+ //
+ context.container.update(creation);
+
+ //
+ StructuralObject child = creation.getChild();
+
+ //
+ return type.cast(context.getObject(child.getId()));
+ }
+
+ public final void destroyChild(String name) throws IllegalArgumentException, StateException
+ {
+ context.checkAccess();
+
+ //
+ if (name == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ if (!isModifiable())
+ {
+ throw new IllegalStateException("Cannot change state");
+ }
+
+ // Get the named child
+ UIContainerObject namedChild = getChild(name);
+
+ //
+ if (namedChild == null)
+ {
+ throw new IllegalArgumentException("No such child with name " + name);
+ }
+
+ // Destroy the child
+ StructuralObject.Destruction destruction = context.container.structuralStateContext.destroy(((ObjectContext)namedChild.getContext()).structuralObject);
+
+ //
+ context.container.update(destruction);
+ }
+
+ public final void move(UIObject destination) throws IllegalArgumentException, StateException
+ {
+ context.checkAccess();
+
+ //
+ if (destination == null)
+ {
+ throw new IllegalArgumentException("No null object accepted");
+ }
+ if (!isModifiable())
+ {
+ throw new IllegalStateException("Cannot change state");
+ }
+
+ //
+ if (destination instanceof UIContainerObject)
+ {
+ //
+ UIContainerObject tmp = (UIContainerObject)destination;
+
+ // Perform the move operation
+ StructuralObject.Move move = context.container.structuralStateContext.move(context.structuralObject, ((ObjectContext)tmp.getContext()).structuralObject);
+
+ //
+ context.container.update(move);
+ }
+ else
+ {
+ throw new IllegalArgumentException("Object not of right type");
+ }
+ }
+
+ /**
+ * Visitor that visits a single node only.
+ */
+ private static final Visitor SINGLE_NODE_VISITOR = new Visitor()
+ {
+ public boolean enterObject(UIObject object)
+ {
+ return true;
+ }
+
+ public void leaveObject(UIObject object)
+ {
+ }
+
+ public boolean enterChildren(UIObject object, boolean loaded)
+ {
+ return false;
+ }
+ };
+
+ public String toString()
+ {
+ StructuralObject so = context.structuralObject;
+ StructuralState st = so.getState();
+ return "UIObject[id=" + so.getId() + ",name=" + st.getName() + ",type=" + st.getType().getSimpleName() + ",id=" + hashCode() + "]";
+ }
+}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/ObjectContext.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/ObjectContext.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/ObjectContext.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,159 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.impl.model.container;
-
-import org.jboss.portal.presentation.model.state.structural.StructuralObject;
-import org.jboss.portal.presentation.model.state.structural.StructuralState;
-import org.jboss.portal.presentation.model.state.StateException;
-import org.jboss.portal.presentation.model.state.NoSuchStateException;
-import org.jboss.portal.presentation.model.state.StaleStateException;
-import org.jboss.portal.presentation.model.UIObject;
-import org.jboss.portal.presentation.model.UIContext;
-import org.jboss.portal.presentation.model.ModelListener;
-import org.jboss.portal.presentation.impl.model.container.spi.UIObjectContext;
-import org.jboss.portal.presentation.impl.model.container.spi.UIContainerObject;
-
-/**
- * The internal state of an object.
- *
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-final class ObjectContext implements UIObjectContext
-{
-
- /** We keep a ref to the container. */
- final UIObjectContainer container;
-
- /** The managed object. */
- final UIContainerObject containerObject;
-
- /** . */
- final ManagedObject managedObject;
-
- /** The associations. */
- RelationshipContext relationshipContext;
-
- /** What we know from the structural context. */
- StructuralObject structuralObject;
-
- /** The status related to the structural object value. */
- UIObject.Status status;
-
- ObjectContext(
- UIObjectContainer container,
- UIContainerObject containerObject,
- StructuralObject structuralObject)
- {
- if (container == null)
- {
- throw new IllegalArgumentException();
- }
- if (structuralObject == null)
- {
- throw new IllegalArgumentException();
- }
-
- //
- this.container = container;
- this.containerObject = containerObject;
- this.structuralObject = structuralObject;
- this.status = UIObject.Status.VALID;
- this.managedObject = new ManagedObject(this);
- }
-
- // Public ***********************************************************************************************************
-
- public UIObject getManagedObject()
- {
- return managedObject;
- }
-
- public UIObject getObject(String id)
- {
- return container.getObject(id);
- }
-
- public void addModelListener(ModelListener listener)
- {
- container.addModelListener(listener);
- }
-
- //
-
- void checkAccess() throws NoSuchStateException, StaleStateException
- {
- switch (status)
- {
- case VALID:
- break;
- case INVALID:
- throw new NoSuchStateException();
- case STALE:
- throw new StaleStateException();
- }
- }
-
- StructuralState getState()
- {
- return structuralObject.getState();
- }
-
- UIContext getRoot()
- {
- return container.root;
- }
-
- UIObject.Status getStatus()
- {
- return status;
- }
-
- boolean isValid()
- {
- return status == UIObject.Status.VALID;
- }
-
- // Package protected ************************************************************************************************
-
- void updateStatus(StateException e)
- {
- if (e instanceof NoSuchStateException)
- {
- status = UIObject.Status.INVALID;
- }
- else if (e instanceof StaleStateException)
- {
- status = UIObject.Status.STALE;
- }
- else
- {
- throw new AssertionError(e);
- }
- }
-
- public String toString()
- {
- return "UIObjectContext[" + structuralObject.getId() + "]";
- }
-}
\ No newline at end of file
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/ObjectContext.java (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/ObjectContext.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/ObjectContext.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/ObjectContext.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,159 @@
+/******************************************************************************
+ * 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.presentation.impl.model.container;
+
+import org.jboss.portal.presentation.model.state.structural.StructuralObject;
+import org.jboss.portal.presentation.model.state.structural.StructuralState;
+import org.jboss.portal.presentation.model.state.StateException;
+import org.jboss.portal.presentation.model.state.NoSuchStateException;
+import org.jboss.portal.presentation.model.state.StaleStateException;
+import org.jboss.portal.presentation.model.UIObject;
+import org.jboss.portal.presentation.model.UIContext;
+import org.jboss.portal.presentation.model.ModelListener;
+import org.jboss.portal.presentation.impl.model.container.spi.UIObjectContext;
+import org.jboss.portal.presentation.impl.model.container.spi.UIContainerObject;
+
+/**
+ * The internal state of an object.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+final class ObjectContext implements UIObjectContext
+{
+
+ /** We keep a ref to the container. */
+ final UIObjectContainer container;
+
+ /** The managed object. */
+ final UIContainerObject containerObject;
+
+ /** . */
+ final ManagedObject managedObject;
+
+ /** The associations. */
+ RelationshipContext relationshipContext;
+
+ /** What we know from the structural context. */
+ StructuralObject structuralObject;
+
+ /** The status related to the structural object value. */
+ UIObject.Status status;
+
+ ObjectContext(
+ UIObjectContainer container,
+ UIContainerObject containerObject,
+ StructuralObject structuralObject)
+ {
+ if (container == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ if (structuralObject == null)
+ {
+ throw new IllegalArgumentException();
+ }
+
+ //
+ this.container = container;
+ this.containerObject = containerObject;
+ this.structuralObject = structuralObject;
+ this.status = UIObject.Status.VALID;
+ this.managedObject = new ManagedObject(this);
+ }
+
+ // Public ***********************************************************************************************************
+
+ public UIObject getManagedObject()
+ {
+ return managedObject;
+ }
+
+ public UIObject getObject(String id)
+ {
+ return container.getObject(id);
+ }
+
+ public void addModelListener(ModelListener listener)
+ {
+ container.addModelListener(listener);
+ }
+
+ //
+
+ void checkAccess() throws NoSuchStateException, StaleStateException
+ {
+ switch (status)
+ {
+ case VALID:
+ break;
+ case INVALID:
+ throw new NoSuchStateException();
+ case STALE:
+ throw new StaleStateException();
+ }
+ }
+
+ StructuralState getState()
+ {
+ return structuralObject.getState();
+ }
+
+ UIContext getRoot()
+ {
+ return container.root;
+ }
+
+ UIObject.Status getStatus()
+ {
+ return status;
+ }
+
+ boolean isValid()
+ {
+ return status == UIObject.Status.VALID;
+ }
+
+ // Package protected ************************************************************************************************
+
+ void updateStatus(StateException e)
+ {
+ if (e instanceof NoSuchStateException)
+ {
+ status = UIObject.Status.INVALID;
+ }
+ else if (e instanceof StaleStateException)
+ {
+ status = UIObject.Status.STALE;
+ }
+ else
+ {
+ throw new AssertionError(e);
+ }
+ }
+
+ public String toString()
+ {
+ return "UIObjectContext[" + structuralObject.getId() + "]";
+ }
+}
\ No newline at end of file
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/RelationshipContext.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/RelationshipContext.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/RelationshipContext.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,638 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.impl.model.container;
-
-import org.jboss.portal.presentation.impl.model.container.spi.UIContainerObject;
-import org.jboss.portal.presentation.model.state.structural.StructuralObject;
-import org.jboss.portal.presentation.model.state.StateException;
-import org.jboss.portal.presentation.model.UIObject;
-import org.jboss.portal.presentation.model.event.lifecycle.RelationshipAddedEvent;
-import org.jboss.portal.presentation.model.event.lifecycle.RelationshipRemovedEvent;
-
-import java.util.Iterator;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.Collection;
-import java.util.AbstractSet;
-import java.util.ArrayList;
-import java.util.LinkedHashSet;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-final class RelationshipContext
-{
-
- /** The owner of the relationship. */
- ObjectContext owner;
-
- /** The many to one relationship that make an object reference its parent. */
- final ManyToOne parent = new ManyToOne()
- {
- protected StructuralObject doLoad()
- {
- return owner.container.structuralStateContext.loadParent(owner.structuralObject);
- }
- protected ObjectContext getOwner()
- {
- return owner;
- }
- protected OneToMany getOneToMany(UIContainerObject related)
- {
- return ((ObjectContext)related.getContext()).relationshipContext.children;
- }
- };
-
- /** The one to many relationship that makes an object reference its children. */
- final OneToMany children = new OneToMany()
- {
- protected Collection<StructuralObject> doLoad()
- {
- return owner.container.structuralStateContext.loadChildren(owner.structuralObject);
- }
- protected ObjectContext getOwner()
- {
- return owner;
- }
- protected ManyToOne getManyToOne(UIContainerObject related)
- {
- return ((ObjectContext)related.getContext()).relationshipContext.parent;
- }
- };
-
- static abstract class ManyToOne
- {
-
- /** Indicates if the relationship is loaded. */
- private boolean loaded;
-
- /** The related object. */
- private UIContainerObject related;
-
- /** The context pointing at us via a OneToMany. */
- private final Set<ObjectContext> refs;
-
- private ManyToOne()
- {
- this.loaded = false;
- this.related = null;
- this.refs = new HashSet<ObjectContext>();
- }
-
- /**
- * Returns true if the relationship is loaded
- *
- * @return the loaded status
- */
- boolean isLoaded()
- {
- return loaded;
- }
-
- /**
- * Updates the related to a new related object.
- *
- * @param related the new related
- * @throws IllegalArgumentException if the related is null
- * @throws IllegalStateException if the relationship is not loaded already
- */
- void setLoadedRelated(UIContainerObject related) throws IllegalStateException
- {
- if (!loaded)
- {
- throw new IllegalStateException("Cannot set related of a non loaded association");
- }
- if (related == null)
- {
- throw new IllegalArgumentException();
- }
-
- // Downgrade the related side
- detach();
-
- //
- attach(related);
- }
-
- /**
- * Returns the loaded related.
- *
- * @return the loaded related
- * @throws IllegalStateException if the relationship is not loaded
- */
- UIContainerObject getLoadedRelated() throws IllegalStateException
- {
- if (!loaded)
- {
- throw new IllegalStateException("Cannot set parent of non loaded association");
- }
-
- //
- return related;
- }
-
- /**
- * Clears the reference and unload the relationship.
- *
- * @throws IllegalStateException if the relationship is not loaded
- */
- void clear() throws IllegalStateException
- {
- if (!loaded)
- {
- throw new IllegalStateException("Cannot clear parent of non loaded association");
- }
-
- // Downgrade related
- detach();
- }
-
- /**
- * Returns the related object. If the object is not loaded an attempt to load the state
- * will be done.
- *
- * @return the related object
- * @throws StateException if the state of the owner prevents to access the related
- */
- UIContainerObject getRelated() throws StateException
- {
- ObjectContext owner = getOwner();
-
- //
- owner.checkAccess();
-
- //
- if (!loaded)
- {
- load();
- }
-
- //
- owner.checkAccess();
-
- //
- return related;
- }
-
- /**
- * Loads the related side.
- *
- * @return the loaded structural object
- * @throws StateException if the load operation cannot be achieved
- */
- protected abstract StructuralObject doLoad() throws StateException;
-
- /**
- * The owner of the relationship.
- *
- * @return the owner
- */
- protected abstract ObjectContext getOwner();
-
- /**
- * Returns the related one to many relationship obtained from the related object.
- *
- * @param related the related
- * @return the one to many
- */
- protected abstract OneToMany getOneToMany(UIContainerObject related);
-
- private void attach(UIContainerObject related)
- {
- if (this.related != null)
- {
- throw new AssertionError("BUG");
- }
-
- //
- OneToMany oneToMany = getOneToMany(related);
- ObjectContext owner = getOwner();
-
- //
- if (oneToMany.refs.contains(owner))
- {
- throw new AssertionError("BUG");
- }
-
- //
- oneToMany.refs.add(owner);
- this.related = related;
- this.loaded = true;
-
- // We need to broadcast an event maybe
- ObjectContext relatedContext = oneToMany.getOwner();
- if (!refs.contains(relatedContext))
- {
- RelationshipAddedEvent event = new RelationshipAddedEvent(relatedContext.structuralObject.getId(), owner.structuralObject.getId());
- owner.container.fireEvent(event);
- }
- }
-
- private void detach()
- {
- if (related == null)
- {
- throw new AssertionError("BUG");
- }
-
- //
- OneToMany oneToMany = getOneToMany(related);
- ObjectContext owner = getOwner();
-
- //
- if (!oneToMany.refs.contains(owner))
- {
- throw new AssertionError("BUG");
- }
-
- //
- oneToMany.refs.remove(owner);
- this.related = null;
- this.loaded = false;
-
- // We need to broadcast an event maybe
- ObjectContext relatedContext = oneToMany.getOwner();
- if (!refs.contains(relatedContext))
- {
- RelationshipRemovedEvent event = new RelationshipRemovedEvent(relatedContext.structuralObject.getId(), owner.structuralObject.getId());
- owner.container.fireEvent(event);
- }
- }
-
- /**
- * Attempt for loading the related side. If a failure occurs during while loading the related side
- * the load operation is aborted and the status of the association owner is updated accordingly. If the loading
- * of the related side is successful the association is updated.
- */
- private void load()
- {
- ObjectContext owner = getOwner();
-
- //
- try
- {
- StructuralObject relatedSO = doLoad();
-
- // If null it is the root so nothing is done
- if (relatedSO != null)
- {
- UIContainerObject related = owner.container.get(relatedSO);
-
- //
- if (related != null)
- {
- attach(related);
-
- //
- ObjectContext parentContext = (ObjectContext)related.getContext();
-
- //
- if (!relatedSO.compareTo(parentContext.structuralObject))
- {
- parentContext.status = UIObject.Status.STALE;
- }
- }
- else
- {
- related = owner.container.create(relatedSO);
-
- //
- owner.container.attach(related);
-
- //
- attach(related);
- }
- }
-
- // Set as loaded
- this.loaded = true;
- }
- catch (StateException e)
- {
- owner.updateStatus(e);
- }
- }
- }
-
- static abstract class OneToMany
- {
-
- /** The lazy read only set. */
- private final LazySet set;
-
- /** Indicates if the relationship is loaded. */
- private boolean loaded;
-
- /** The related objects. */
- private Set<UIContainerObject> relateds;
-
- /** The contexts pointing at us via a ManyToOne. */
- private Set<ObjectContext> refs;
-
- private OneToMany()
- {
- this.set = new LazySet();
- this.loaded = false;
- this.relateds = new LinkedHashSet<UIContainerObject>();
- this.refs = new HashSet<ObjectContext>();
- }
-
- boolean isLoaded()
- {
- return loaded;
- }
-
- void addLoadedRelated(UIContainerObject related)
- {
- if (!isLoaded())
- {
- throw new IllegalStateException("Not loaded");
- }
- if (related == null)
- {
- throw new IllegalArgumentException("No null child accepted");
- }
-
- //
- for (UIContainerObject r : relateds)
- {
- if (related.getId().equals(r.getId()))
- {
- throw new IllegalStateException("Cannot add duplicate");
- }
- }
-
- //
- attach(related);
- }
-
- void setLoadedRelateds(Set<UIContainerObject> relateds)
- {
- if (!isLoaded())
- {
- throw new IllegalStateException("Not loaded");
- }
-
- //
- for (UIContainerObject related : new ArrayList<UIContainerObject>(this.relateds))
- {
- detach(related);
- }
-
- //
- for (UIContainerObject related : relateds)
- {
- attach(related);
- }
- }
-
- UIContainerObject removeLoadedRelated(String relatedId)
- {
- if (!isLoaded())
- {
- throw new IllegalStateException("Not loaded");
- }
- if (relatedId == null)
- {
- throw new IllegalArgumentException();
- }
-
- //
- for (UIContainerObject related : relateds)
- {
- if (relatedId.equals(related.getId()))
- {
- detach(related);
- return related;
- }
- }
-
- //
- throw new AssertionError("BUG");
- }
-
- Collection<UIContainerObject> getRelateds()
- {
- return set;
- }
-
- void clear()
- {
- if (!loaded)
- {
- throw new IllegalStateException("Cannot clear parent of non loaded association");
- }
-
- // Detach relateds
- for (UIContainerObject related : new HashSet<UIContainerObject>(relateds))
- {
- detach(related);
- }
- }
-
- /**
- * Load the related side.
- *
- * @return the list of structural objects
- * @throws StateException if the load operation cannot be achieved
- */
- protected abstract Collection<StructuralObject> doLoad() throws StateException;
-
- protected abstract ObjectContext getOwner();
-
- protected abstract ManyToOne getManyToOne(UIContainerObject related);
-
- private void detach(UIContainerObject related)
- {
- ManyToOne manyToOne = getManyToOne(related);
-
- //
- ObjectContext owner = getOwner();
-
- //
- if (!manyToOne.refs.contains(owner))
- {
- throw new AssertionError("BUG");
- }
-
- //
- manyToOne.refs.remove(owner);
- relateds.remove(related);
-
- //
- ObjectContext relatedContext = manyToOne.getOwner();
- if (!refs.contains(relatedContext))
- {
- RelationshipRemovedEvent event = new RelationshipRemovedEvent(owner.structuralObject.getId(), relatedContext.structuralObject.getId());
- owner.container.fireEvent(event);
- }
- }
-
- private void attach(UIContainerObject related)
- {
- ManyToOne manyToOne = getManyToOne(related);
-
- //
- ObjectContext owner = getOwner();
-
- //
- if (manyToOne.refs.contains(owner))
- {
- throw new AssertionError("Context already referenced by the provided object");
- }
-
- //
- manyToOne.refs.add(owner);
- relateds.add(related);
-
- //
- ObjectContext relatedContext = manyToOne.getOwner();
- if (!refs.contains(relatedContext))
- {
- RelationshipAddedEvent event = new RelationshipAddedEvent(owner.structuralObject.getId(), relatedContext.structuralObject.getId());
- owner.container.fireEvent(event);
- }
- }
-
- private void load()
- {
- ObjectContext owner = getOwner();
-
- //
- try
- {
- for (StructuralObject relatedSO : doLoad())
- {
- UIContainerObject related = owner.container.get(relatedSO);
-
- //
- if (related != null)
- {
- ObjectContext relatedContext = (ObjectContext)related.getContext();
-
- //
- if (!relatedContext.structuralObject.compareTo(relatedSO))
- {
- relatedContext.status = UIObject.Status.STALE;
- }
- }
- else
- {
- related = owner.container.create(relatedSO);
-
- //
- owner.container.attach(related);
- }
-
- //
- attach(related);
- }
-
- //
- this.loaded = true;
- }
- catch (StateException e)
- {
- owner.updateStatus(e);
- }
- }
-
- private class LazySet extends AbstractSet<UIContainerObject>
- {
-
- public Iterator<UIContainerObject> iterator()
- {
- final ObjectContext owner = getOwner();
-
- //
- owner.checkAccess();
-
- // Load the entire relationship
- if (!isLoaded())
- {
- load();
- }
-
- //
- owner.checkAccess();
-
- //
- final Iterator<UIContainerObject> iterator = relateds.iterator();
-
- //
- return new Iterator<UIContainerObject>()
- {
- public boolean hasNext()
- {
- owner.checkAccess();
-
- //
- return iterator.hasNext();
- }
-
- public UIContainerObject next()
- {
- owner.checkAccess();
-
- //
- return iterator.next();
- }
-
- public void remove()
- {
- owner.checkAccess();
-
- //
- throw new UnsupportedOperationException();
- }
- };
- }
-
- public int size()
- {
- ObjectContext owner = getOwner();
-
- //
- owner.checkAccess();
-
- //
- if (!isLoaded())
- {
- load();
- }
-
- //
- owner.checkAccess();
-
- //
- return relateds.size();
- }
-
- public String toString()
- {
- return "ProxySet[" + getOwner() + "]";
- }
- }
- }
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/RelationshipContext.java (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/RelationshipContext.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/RelationshipContext.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/RelationshipContext.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,638 @@
+/******************************************************************************
+ * 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.presentation.impl.model.container;
+
+import org.jboss.portal.presentation.impl.model.container.spi.UIContainerObject;
+import org.jboss.portal.presentation.model.state.structural.StructuralObject;
+import org.jboss.portal.presentation.model.state.StateException;
+import org.jboss.portal.presentation.model.UIObject;
+import org.jboss.portal.presentation.model.event.lifecycle.RelationshipAddedEvent;
+import org.jboss.portal.presentation.model.event.lifecycle.RelationshipRemovedEvent;
+
+import java.util.Iterator;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.Collection;
+import java.util.AbstractSet;
+import java.util.ArrayList;
+import java.util.LinkedHashSet;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+final class RelationshipContext
+{
+
+ /** The owner of the relationship. */
+ ObjectContext owner;
+
+ /** The many to one relationship that make an object reference its parent. */
+ final ManyToOne parent = new ManyToOne()
+ {
+ protected StructuralObject doLoad()
+ {
+ return owner.container.structuralStateContext.loadParent(owner.structuralObject);
+ }
+ protected ObjectContext getOwner()
+ {
+ return owner;
+ }
+ protected OneToMany getOneToMany(UIContainerObject related)
+ {
+ return ((ObjectContext)related.getContext()).relationshipContext.children;
+ }
+ };
+
+ /** The one to many relationship that makes an object reference its children. */
+ final OneToMany children = new OneToMany()
+ {
+ protected Collection<StructuralObject> doLoad()
+ {
+ return owner.container.structuralStateContext.loadChildren(owner.structuralObject);
+ }
+ protected ObjectContext getOwner()
+ {
+ return owner;
+ }
+ protected ManyToOne getManyToOne(UIContainerObject related)
+ {
+ return ((ObjectContext)related.getContext()).relationshipContext.parent;
+ }
+ };
+
+ static abstract class ManyToOne
+ {
+
+ /** Indicates if the relationship is loaded. */
+ private boolean loaded;
+
+ /** The related object. */
+ private UIContainerObject related;
+
+ /** The context pointing at us via a OneToMany. */
+ private final Set<ObjectContext> refs;
+
+ private ManyToOne()
+ {
+ this.loaded = false;
+ this.related = null;
+ this.refs = new HashSet<ObjectContext>();
+ }
+
+ /**
+ * Returns true if the relationship is loaded
+ *
+ * @return the loaded status
+ */
+ boolean isLoaded()
+ {
+ return loaded;
+ }
+
+ /**
+ * Updates the related to a new related object.
+ *
+ * @param related the new related
+ * @throws IllegalArgumentException if the related is null
+ * @throws IllegalStateException if the relationship is not loaded already
+ */
+ void setLoadedRelated(UIContainerObject related) throws IllegalStateException
+ {
+ if (!loaded)
+ {
+ throw new IllegalStateException("Cannot set related of a non loaded association");
+ }
+ if (related == null)
+ {
+ throw new IllegalArgumentException();
+ }
+
+ // Downgrade the related side
+ detach();
+
+ //
+ attach(related);
+ }
+
+ /**
+ * Returns the loaded related.
+ *
+ * @return the loaded related
+ * @throws IllegalStateException if the relationship is not loaded
+ */
+ UIContainerObject getLoadedRelated() throws IllegalStateException
+ {
+ if (!loaded)
+ {
+ throw new IllegalStateException("Cannot set parent of non loaded association");
+ }
+
+ //
+ return related;
+ }
+
+ /**
+ * Clears the reference and unload the relationship.
+ *
+ * @throws IllegalStateException if the relationship is not loaded
+ */
+ void clear() throws IllegalStateException
+ {
+ if (!loaded)
+ {
+ throw new IllegalStateException("Cannot clear parent of non loaded association");
+ }
+
+ // Downgrade related
+ detach();
+ }
+
+ /**
+ * Returns the related object. If the object is not loaded an attempt to load the state
+ * will be done.
+ *
+ * @return the related object
+ * @throws StateException if the state of the owner prevents to access the related
+ */
+ UIContainerObject getRelated() throws StateException
+ {
+ ObjectContext owner = getOwner();
+
+ //
+ owner.checkAccess();
+
+ //
+ if (!loaded)
+ {
+ load();
+ }
+
+ //
+ owner.checkAccess();
+
+ //
+ return related;
+ }
+
+ /**
+ * Loads the related side.
+ *
+ * @return the loaded structural object
+ * @throws StateException if the load operation cannot be achieved
+ */
+ protected abstract StructuralObject doLoad() throws StateException;
+
+ /**
+ * The owner of the relationship.
+ *
+ * @return the owner
+ */
+ protected abstract ObjectContext getOwner();
+
+ /**
+ * Returns the related one to many relationship obtained from the related object.
+ *
+ * @param related the related
+ * @return the one to many
+ */
+ protected abstract OneToMany getOneToMany(UIContainerObject related);
+
+ private void attach(UIContainerObject related)
+ {
+ if (this.related != null)
+ {
+ throw new AssertionError("BUG");
+ }
+
+ //
+ OneToMany oneToMany = getOneToMany(related);
+ ObjectContext owner = getOwner();
+
+ //
+ if (oneToMany.refs.contains(owner))
+ {
+ throw new AssertionError("BUG");
+ }
+
+ //
+ oneToMany.refs.add(owner);
+ this.related = related;
+ this.loaded = true;
+
+ // We need to broadcast an event maybe
+ ObjectContext relatedContext = oneToMany.getOwner();
+ if (!refs.contains(relatedContext))
+ {
+ RelationshipAddedEvent event = new RelationshipAddedEvent(relatedContext.structuralObject.getId(), owner.structuralObject.getId());
+ owner.container.fireEvent(event);
+ }
+ }
+
+ private void detach()
+ {
+ if (related == null)
+ {
+ throw new AssertionError("BUG");
+ }
+
+ //
+ OneToMany oneToMany = getOneToMany(related);
+ ObjectContext owner = getOwner();
+
+ //
+ if (!oneToMany.refs.contains(owner))
+ {
+ throw new AssertionError("BUG");
+ }
+
+ //
+ oneToMany.refs.remove(owner);
+ this.related = null;
+ this.loaded = false;
+
+ // We need to broadcast an event maybe
+ ObjectContext relatedContext = oneToMany.getOwner();
+ if (!refs.contains(relatedContext))
+ {
+ RelationshipRemovedEvent event = new RelationshipRemovedEvent(relatedContext.structuralObject.getId(), owner.structuralObject.getId());
+ owner.container.fireEvent(event);
+ }
+ }
+
+ /**
+ * Attempt for loading the related side. If a failure occurs during while loading the related side
+ * the load operation is aborted and the status of the association owner is updated accordingly. If the loading
+ * of the related side is successful the association is updated.
+ */
+ private void load()
+ {
+ ObjectContext owner = getOwner();
+
+ //
+ try
+ {
+ StructuralObject relatedSO = doLoad();
+
+ // If null it is the root so nothing is done
+ if (relatedSO != null)
+ {
+ UIContainerObject related = owner.container.get(relatedSO);
+
+ //
+ if (related != null)
+ {
+ attach(related);
+
+ //
+ ObjectContext parentContext = (ObjectContext)related.getContext();
+
+ //
+ if (!relatedSO.compareTo(parentContext.structuralObject))
+ {
+ parentContext.status = UIObject.Status.STALE;
+ }
+ }
+ else
+ {
+ related = owner.container.create(relatedSO);
+
+ //
+ owner.container.attach(related);
+
+ //
+ attach(related);
+ }
+ }
+
+ // Set as loaded
+ this.loaded = true;
+ }
+ catch (StateException e)
+ {
+ owner.updateStatus(e);
+ }
+ }
+ }
+
+ static abstract class OneToMany
+ {
+
+ /** The lazy read only set. */
+ private final LazySet set;
+
+ /** Indicates if the relationship is loaded. */
+ private boolean loaded;
+
+ /** The related objects. */
+ private Set<UIContainerObject> relateds;
+
+ /** The contexts pointing at us via a ManyToOne. */
+ private Set<ObjectContext> refs;
+
+ private OneToMany()
+ {
+ this.set = new LazySet();
+ this.loaded = false;
+ this.relateds = new LinkedHashSet<UIContainerObject>();
+ this.refs = new HashSet<ObjectContext>();
+ }
+
+ boolean isLoaded()
+ {
+ return loaded;
+ }
+
+ void addLoadedRelated(UIContainerObject related)
+ {
+ if (!isLoaded())
+ {
+ throw new IllegalStateException("Not loaded");
+ }
+ if (related == null)
+ {
+ throw new IllegalArgumentException("No null child accepted");
+ }
+
+ //
+ for (UIContainerObject r : relateds)
+ {
+ if (related.getId().equals(r.getId()))
+ {
+ throw new IllegalStateException("Cannot add duplicate");
+ }
+ }
+
+ //
+ attach(related);
+ }
+
+ void setLoadedRelateds(Set<UIContainerObject> relateds)
+ {
+ if (!isLoaded())
+ {
+ throw new IllegalStateException("Not loaded");
+ }
+
+ //
+ for (UIContainerObject related : new ArrayList<UIContainerObject>(this.relateds))
+ {
+ detach(related);
+ }
+
+ //
+ for (UIContainerObject related : relateds)
+ {
+ attach(related);
+ }
+ }
+
+ UIContainerObject removeLoadedRelated(String relatedId)
+ {
+ if (!isLoaded())
+ {
+ throw new IllegalStateException("Not loaded");
+ }
+ if (relatedId == null)
+ {
+ throw new IllegalArgumentException();
+ }
+
+ //
+ for (UIContainerObject related : relateds)
+ {
+ if (relatedId.equals(related.getId()))
+ {
+ detach(related);
+ return related;
+ }
+ }
+
+ //
+ throw new AssertionError("BUG");
+ }
+
+ Collection<UIContainerObject> getRelateds()
+ {
+ return set;
+ }
+
+ void clear()
+ {
+ if (!loaded)
+ {
+ throw new IllegalStateException("Cannot clear parent of non loaded association");
+ }
+
+ // Detach relateds
+ for (UIContainerObject related : new HashSet<UIContainerObject>(relateds))
+ {
+ detach(related);
+ }
+ }
+
+ /**
+ * Load the related side.
+ *
+ * @return the list of structural objects
+ * @throws StateException if the load operation cannot be achieved
+ */
+ protected abstract Collection<StructuralObject> doLoad() throws StateException;
+
+ protected abstract ObjectContext getOwner();
+
+ protected abstract ManyToOne getManyToOne(UIContainerObject related);
+
+ private void detach(UIContainerObject related)
+ {
+ ManyToOne manyToOne = getManyToOne(related);
+
+ //
+ ObjectContext owner = getOwner();
+
+ //
+ if (!manyToOne.refs.contains(owner))
+ {
+ throw new AssertionError("BUG");
+ }
+
+ //
+ manyToOne.refs.remove(owner);
+ relateds.remove(related);
+
+ //
+ ObjectContext relatedContext = manyToOne.getOwner();
+ if (!refs.contains(relatedContext))
+ {
+ RelationshipRemovedEvent event = new RelationshipRemovedEvent(owner.structuralObject.getId(), relatedContext.structuralObject.getId());
+ owner.container.fireEvent(event);
+ }
+ }
+
+ private void attach(UIContainerObject related)
+ {
+ ManyToOne manyToOne = getManyToOne(related);
+
+ //
+ ObjectContext owner = getOwner();
+
+ //
+ if (manyToOne.refs.contains(owner))
+ {
+ throw new AssertionError("Context already referenced by the provided object");
+ }
+
+ //
+ manyToOne.refs.add(owner);
+ relateds.add(related);
+
+ //
+ ObjectContext relatedContext = manyToOne.getOwner();
+ if (!refs.contains(relatedContext))
+ {
+ RelationshipAddedEvent event = new RelationshipAddedEvent(owner.structuralObject.getId(), relatedContext.structuralObject.getId());
+ owner.container.fireEvent(event);
+ }
+ }
+
+ private void load()
+ {
+ ObjectContext owner = getOwner();
+
+ //
+ try
+ {
+ for (StructuralObject relatedSO : doLoad())
+ {
+ UIContainerObject related = owner.container.get(relatedSO);
+
+ //
+ if (related != null)
+ {
+ ObjectContext relatedContext = (ObjectContext)related.getContext();
+
+ //
+ if (!relatedContext.structuralObject.compareTo(relatedSO))
+ {
+ relatedContext.status = UIObject.Status.STALE;
+ }
+ }
+ else
+ {
+ related = owner.container.create(relatedSO);
+
+ //
+ owner.container.attach(related);
+ }
+
+ //
+ attach(related);
+ }
+
+ //
+ this.loaded = true;
+ }
+ catch (StateException e)
+ {
+ owner.updateStatus(e);
+ }
+ }
+
+ private class LazySet extends AbstractSet<UIContainerObject>
+ {
+
+ public Iterator<UIContainerObject> iterator()
+ {
+ final ObjectContext owner = getOwner();
+
+ //
+ owner.checkAccess();
+
+ // Load the entire relationship
+ if (!isLoaded())
+ {
+ load();
+ }
+
+ //
+ owner.checkAccess();
+
+ //
+ final Iterator<UIContainerObject> iterator = relateds.iterator();
+
+ //
+ return new Iterator<UIContainerObject>()
+ {
+ public boolean hasNext()
+ {
+ owner.checkAccess();
+
+ //
+ return iterator.hasNext();
+ }
+
+ public UIContainerObject next()
+ {
+ owner.checkAccess();
+
+ //
+ return iterator.next();
+ }
+
+ public void remove()
+ {
+ owner.checkAccess();
+
+ //
+ throw new UnsupportedOperationException();
+ }
+ };
+ }
+
+ public int size()
+ {
+ ObjectContext owner = getOwner();
+
+ //
+ owner.checkAccess();
+
+ //
+ if (!isLoaded())
+ {
+ load();
+ }
+
+ //
+ owner.checkAccess();
+
+ //
+ return relateds.size();
+ }
+
+ public String toString()
+ {
+ return "ProxySet[" + getOwner() + "]";
+ }
+ }
+ }
+}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/UIObjectContainer.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/UIObjectContainer.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/UIObjectContainer.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,621 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.impl.model.container;
-
-import org.jboss.portal.presentation.model.ModelEvent;
-import org.jboss.portal.presentation.model.ModelListener;
-import org.jboss.portal.presentation.model.UIObject;
-import org.jboss.portal.presentation.model.UIContext;
-import org.jboss.portal.presentation.model.event.state.structural.StructuralStateModification;
-import org.jboss.portal.presentation.model.event.state.StateChange;
-import org.jboss.portal.presentation.model.event.state.StateChangeEvent;
-import org.jboss.portal.presentation.model.state.navigational.NavigationalStateContext;
-import org.jboss.portal.presentation.model.state.structural.StructuralObject;
-import org.jboss.portal.presentation.model.state.structural.StructuralStateContext;
-import org.jboss.portal.presentation.model.state.structural.StructuralState;
-import org.jboss.portal.presentation.model.state.NoSuchStateException;
-import org.jboss.portal.presentation.model.state.StateException;
-import org.jboss.portal.presentation.impl.model.container.spi.UIContainerObject;
-import org.jboss.portal.presentation.impl.model.container.spi.UIObjectFactory;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
- */
-public final class UIObjectContainer
-{
-
- /** . */
- private final static StructuralStateModification.Destruction DESTRUCTION = new StructuralStateModification.Destruction();
-
- /** . */
- private final Map<String, UIContainerObject> universe = new HashMap<String, UIContainerObject>();
-
- /** . */
- private final List<ModelListener> listeners;
-
- /** . */
- final UIContext root;
-
- /** . */
- final StructuralStateContext structuralStateContext;
-
- /** . */
- final NavigationalStateContext navigationalStateContext;
-
- /** . */
- private final UIObjectFactory factory = new UIObjectFactory();
-
- public UIObjectContainer(StructuralStateContext structuralStateContext, NavigationalStateContext navigationalStateContext)
- {
- // Get root so
- String rootId = structuralStateContext.getRootId();
- StructuralObject rootStructuralObject = structuralStateContext.load(rootId);
- UIContainerObject root = create(rootStructuralObject);
-
- //
- this.structuralStateContext = structuralStateContext;
- this.navigationalStateContext = navigationalStateContext;
- this.listeners = new ArrayList<ModelListener>();
- this.root = (UIContext)root;
-
- // Update universe
- attach(root);
- }
-
- UIContainerObject create(StructuralObject structuralObject)
- {
- // Create container object
- UIContainerObject object = factory.createObject(structuralObject.getState().getType());
-
- // Create context
- ObjectContext objectContext = new ObjectContext(this, object, structuralObject);
- RelationshipContext relationshipContext = new RelationshipContext();
-
- // Wire
- objectContext.relationshipContext = relationshipContext;
- relationshipContext.owner = objectContext;
-
- // Contextualize
- object.setContext(objectContext);
-
- //
- return object;
- }
-
- // Public ***********************************************************************************************************
-
- public UIContext getRoot()
- {
- return root;
- }
-
- // Package protected ************************************************************************************************
-
- /**
- * Process a change.
- *
- * @param change the change to process
- */
- void update(StructuralObject.Change change)
- {
- if (change instanceof StructuralObject.Update)
- {
- StructuralObject.Update update = (StructuralObject.Update)change;
-
- //
- UIContainerObject object = get(update.getObject());
-
- //
- if (object == null)
- {
- throw new AssertionError("It should be here, should we do something ???");
- }
-
- //
- ObjectContext context = (ObjectContext)object.getContext();
- context.structuralObject = update.getObject();
-
- // Eventing
- StructuralStateModification mod = new StructuralStateModification.Update(update.getChanges());
- StateChange<StructuralStateModification> stateChange = new StateChange<StructuralStateModification>(update.getObject().getId(), mod);
- StateChangeEvent event = new StateChangeEvent(stateChange);
- fireEvent(event);
- }
- else if (change instanceof StructuralObject.Creation)
- {
- StructuralObject.Creation creation = (StructuralObject.Creation)change;
-
- //
- UIContainerObject parent = get(creation.getParent());
-
- //
- if (parent == null)
- {
- throw new AssertionError("It should be here, should we do something ???");
- }
-
- //
- ObjectContext parentContext = (ObjectContext)parent.getContext();
-
- //
- parentContext.structuralObject = creation.getParent();
-
- //
- if (parentContext.relationshipContext.children.isLoaded())
- {
- UIContainerObject child = create(creation.getChild());
-
- //
- attach(child);
-
- //
- parentContext.relationshipContext.children.addLoadedRelated(child);
- }
-
- // Eventing
- StructuralObject childSO = creation.getChild();
- StructuralState state = childSO.getState();
- StructuralStateModification mod = new StructuralStateModification.Creation(state.getType(), state.getName(), state.getProperties());
- StateChange<StructuralStateModification> stateChange = new StateChange<StructuralStateModification>(childSO.getId(), mod);
- StateChangeEvent event = new StateChangeEvent(stateChange);
- fireEvent(event);
- }
- else if (change instanceof StructuralObject.Destruction)
- {
- StructuralObject.Destruction destruction = (StructuralObject.Destruction)change;
-
- //
- UIContainerObject parent = get(destruction.getParent());
-
- //
- if (parent != null)
- {
- ObjectContext parentContext = (ObjectContext)parent.getContext();
-
- //
- parentContext.structuralObject = destruction.getParent();
-
- //
- if (parentContext.relationshipContext.children.isLoaded())
- {
- // Get the id which is the destroyed object
- String destroyedId = destruction.getIds().get(destruction.getIds().size() - 1);
-
- //
- parentContext.relationshipContext.children.removeLoadedRelated(destroyedId);
- }
- }
-
- //
- for (String id : destruction.getIds())
- {
- UIContainerObject toDestroy = universe.get(id);
-
- //
- if (toDestroy != null)
- {
- detach(toDestroy, false);
-
- // Eventing
- StateChange<StructuralStateModification> stateChange = new StateChange<StructuralStateModification>(id, DESTRUCTION);
- StateChangeEvent event = new StateChangeEvent(stateChange);
- fireEvent(event);
- }
- }
- }
- else if (change instanceof StructuralObject.Move)
- {
- StructuralObject.Move move = (StructuralObject.Move)change;
-
- // Get the container object (some may not be loaded)
- UIContainerObject parent = get(move.getParent());
- UIContainerObject destination = get(move.getDestination());
- UIContainerObject source = get(move.getSource());
-
- // Update parent
- if (parent != null)
- {
- ObjectContext parentContext = (ObjectContext)parent.getContext();
-
- // Update so
- parentContext.structuralObject = move.getParent();
-
- // Remove the child if the relationship is loaded on this side
- if (parentContext.relationshipContext.children.isLoaded())
- {
- parentContext.relationshipContext.children.removeLoadedRelated(move.getSource().getId());
- }
- }
-
- //
- if (destination != null)
- {
- ObjectContext destinationContext = (ObjectContext)destination.getContext();
-
- //
- destinationContext.structuralObject = move.getDestination();
-
- //
- if (destinationContext.relationshipContext.children.isLoaded())
- {
- // Now we really need to add the source as we load collections entirely
- if (source == null)
- {
- source = create(move.getSource());
-
- //
- attach(source);
- }
-
- //
- destinationContext.relationshipContext.children.addLoadedRelated(source);
- }
- }
-
- // Update source
- if (source != null)
- {
- ObjectContext sourceContext = (ObjectContext)source.getContext();
-
- // Update so
- sourceContext.structuralObject = move.getSource();
-
- //
- if (sourceContext.relationshipContext.parent.isLoaded())
- {
- if (destination != null)
- {
- sourceContext.relationshipContext.parent.setLoadedRelated(destination);
- }
- else
- {
- sourceContext.relationshipContext.parent.clear();
- }
- }
- }
-
- // Eventing
- StructuralStateModification.Move mod = new StructuralStateModification.Move(move.getParent().getId(), move.getDestination().getId());
- StateChange<StructuralStateModification> stateChange = new StateChange<StructuralStateModification>(move.getSource().getId(), mod);
- StateChangeEvent event = new StateChangeEvent(stateChange);
- fireEvent(event);
- }
- else
- {
- throw new AssertionError();
- }
- }
-
- /**
- * Returns an object an object specified by the id that is referenced by this context or load
- * it if it is not present.
- *
- * @param id the id of the object to obtain
- * @return the loaded object
- */
- UIContainerObject getObject(String id)
- {
- UIContainerObject object = get(id);
-
- //
- if (object != null)
- {
- return object;
- }
-
- //
- // Fetch the state of the UIObject in question
- StructuralObject structuralObject = this.structuralStateContext.load(id);
-
- //
- if (structuralObject != null)
- {
- object = create(structuralObject);
-
- //
- attach(object);
-
- //
- return object;
- }
- else
- {
- return null;
- }
- }
-
- void addModelListener(ModelListener listener)
- {
- if (listener == null)
- {
- throw new IllegalArgumentException();
- }
-
- //
- if (!listeners.contains(listener))
- {
- listeners.add(listener);
- }
- }
-
- void fireEvent(ModelEvent event)
- {
- for (ModelListener listener : listeners)
- {
- try
- {
- listener.onEvent(event);
- }
- catch (Exception ignore)
- {
- System.out.println("ignore = " + ignore);
- }
- }
- }
-
- void validate(UIContainerObject object, UIObject.Visitor scope)
- {
- if (scope.enterObject(object))
- {
- ObjectContext context = (ObjectContext)object.getContext();
-
- // We do it only if it is not yet invalid
- if (context.isValid())
- {
- // Validate
- try
- {
- structuralStateContext.validate(context.structuralObject);
- }
- catch (StateException e)
- {
- context.updateStatus(e);
- }
-
- // Continue only if it is valid
- if (context.isValid())
- {
- boolean loaded = context.relationshipContext.children.isLoaded();
-
- // Loading children will never make the current object invalid
- // but it could make some already loaded children invalid
- if (scope.enterChildren(object, loaded))
- {
- for (UIContainerObject child : context.relationshipContext.children.getRelateds())
- {
- ObjectContext childContext = (ObjectContext)child.getContext();
-
- //
- validate(childContext.containerObject, scope);
- }
- }
- }
-
- //
- scope.leaveObject(object);
- }
- }
- }
-
- void refresh(UIContainerObject object, UIObject.Visitor scope)
- {
- if (scope.enterObject(object))
- {
- ObjectContext context = (ObjectContext)object.getContext();
-
- //
- if (context.status == UIObject.Status.INVALID)
- {
- return;
- }
-
- //
- System.err.println("<" + context.getState().getName() + ">");
-
- //
- StructuralObject.Refresh refresh = null;
- try
- {
- refresh = structuralStateContext.refresh(context.structuralObject);
- }
- catch (NoSuchStateException e)
- {
- context.status = UIObject.Status.INVALID;
- return;
- }
-
- //
- boolean loaded = context.relationshipContext.children.isLoaded();
- boolean refreshChildren = scope.enterChildren(object, loaded);
-
- // Update the structural state
- if (!context.structuralObject.compareTo(refresh.getObject()))
- {
- if (loaded)
- {
- // Take care of the added children
- for (StructuralObject addedSO : refresh.getAddedChildren())
- {
- UIContainerObject added = get(addedSO);
-
- //
- if (added != null)
- {
- ObjectContext addedContext = (ObjectContext)added.getContext();
-
-// // Find parent pointing at us and set as dirty
-// for (ObjectContext addedParentContext : addedContext.relationshipContext.parent.getReferences())
-// {
-// addedParentContext.status = UIObject.Status.STALE;
-// }
-
- // Update parent if it was loaded
- if (addedContext.relationshipContext.parent.isLoaded())
- {
- addedContext.relationshipContext.parent.setLoadedRelated(object);
- }
- }
- else
- {
- added = create(addedSO);
-
- //
- attach(added);
- }
-
- System.err.println("added " + added.getName());
-
- //
- context.relationshipContext.children.addLoadedRelated(added);
- }
-
- //
- for (StructuralObject staleSO : refresh.getStaleChildren().values())
- {
- UIContainerObject stale = get(staleSO);
-
- // It must be here as it is loaded
- ObjectContext staleContext = (ObjectContext)stale.getContext();
-
- // Mark as stale
- staleContext.status = UIObject.Status.STALE;
- }
-
- // Removals
- for (String removedId : refresh.getRemovedChildren())
- {
- UIContainerObject removed = context.relationshipContext.children.removeLoadedRelated(removedId);
-
- //
- ObjectContext removedContext = (ObjectContext)removed.getContext();
-
- //
- System.err.println("want to remove " + removed.getName());
-
- // We remove only if it's pointing at us
- if (removedContext.relationshipContext.parent.isLoaded() && removedContext.relationshipContext.parent.getRelated() == object)
- {
- System.err.println("removed " + removed.getName());
- detach(removed, true);
- }
- }
-
- // Update state
- context.structuralObject = refresh.getObject();
- context.status = UIObject.Status.VALID;
- }
- }
-
- // Recursively refresh children
- if (refreshChildren)
- {
- for (UIContainerObject child : context.relationshipContext.children.getRelateds())
- {
- refresh(child, scope);
- }
- }
-
- System.err.println("</" + context.getState().getName() + ">");
-
- //
- scope.leaveObject(object);
- }
- }
-
-// void refresh(UIContainerObject object, UIObject.Visitor scope)
-// {
-// // First pass
-//
-//
-//
-// }
-
- void attach(UIContainerObject object)
- {
- String id = object.getId();
-
- //
- if (universe.containsKey(id))
- {
- throw new AssertionError("Duplicate put for id" + id);
- }
-
- //
- universe.put(id, object);
-
- //
-// ObjectContext context = (ObjectContext)object.getContext();
-// StructuralObject so = context.structuralObject;
-// StructuralState st = so.getState();
-// ObjectAddedEvent event = new ObjectAddedEvent(so.getId(), st.getName(), st.getType(), st.getProperties());
-// fireEvent(event);
- }
-
- void detach(UIContainerObject object, boolean cascade)
- {
- ObjectContext context = (ObjectContext)object.getContext();
-
- //
- if (cascade)
- {
- for (UIContainerObject child : context.relationshipContext.children.getRelateds())
- {
- detach(child, true);
- }
- }
-
- //
- if (context.relationshipContext.parent.isLoaded())
- {
- context.relationshipContext.parent.clear();
- }
- if (context.relationshipContext.children.isLoaded())
- {
- context.relationshipContext.children.clear();
- }
-
- //
- context.status = UIObject.Status.INVALID;
- universe.remove(object.getId());
-
- //
-// StructuralObject so = context.structuralObject;
-// ObjectRemovedEvent event = new ObjectRemovedEvent(so.getId());
-// fireEvent(event);
- }
-
- UIContainerObject get(String id)
- {
- return universe.get(id);
- }
-
- UIContainerObject get(StructuralObject so)
- {
- return universe.get(so.getId());
- }
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/UIObjectContainer.java (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/UIObjectContainer.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/UIObjectContainer.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/UIObjectContainer.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,621 @@
+/******************************************************************************
+ * 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.presentation.impl.model.container;
+
+import org.jboss.portal.presentation.model.ModelEvent;
+import org.jboss.portal.presentation.model.ModelListener;
+import org.jboss.portal.presentation.model.UIObject;
+import org.jboss.portal.presentation.model.UIContext;
+import org.jboss.portal.presentation.model.event.state.structural.StructuralStateModification;
+import org.jboss.portal.presentation.model.event.state.StateChange;
+import org.jboss.portal.presentation.model.event.state.StateChangeEvent;
+import org.jboss.portal.presentation.model.state.navigational.NavigationalStateContext;
+import org.jboss.portal.presentation.model.state.structural.StructuralObject;
+import org.jboss.portal.presentation.model.state.structural.StructuralStateContext;
+import org.jboss.portal.presentation.model.state.structural.StructuralState;
+import org.jboss.portal.presentation.model.state.NoSuchStateException;
+import org.jboss.portal.presentation.model.state.StateException;
+import org.jboss.portal.presentation.impl.model.container.spi.UIContainerObject;
+import org.jboss.portal.presentation.impl.model.container.spi.UIObjectFactory;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ */
+public final class UIObjectContainer
+{
+
+ /** . */
+ private final static StructuralStateModification.Destruction DESTRUCTION = new StructuralStateModification.Destruction();
+
+ /** . */
+ private final Map<String, UIContainerObject> universe = new HashMap<String, UIContainerObject>();
+
+ /** . */
+ private final List<ModelListener> listeners;
+
+ /** . */
+ final UIContext root;
+
+ /** . */
+ final StructuralStateContext structuralStateContext;
+
+ /** . */
+ final NavigationalStateContext navigationalStateContext;
+
+ /** . */
+ private final UIObjectFactory factory = new UIObjectFactory();
+
+ public UIObjectContainer(StructuralStateContext structuralStateContext, NavigationalStateContext navigationalStateContext)
+ {
+ // Get root so
+ String rootId = structuralStateContext.getRootId();
+ StructuralObject rootStructuralObject = structuralStateContext.load(rootId);
+ UIContainerObject root = create(rootStructuralObject);
+
+ //
+ this.structuralStateContext = structuralStateContext;
+ this.navigationalStateContext = navigationalStateContext;
+ this.listeners = new ArrayList<ModelListener>();
+ this.root = (UIContext)root;
+
+ // Update universe
+ attach(root);
+ }
+
+ UIContainerObject create(StructuralObject structuralObject)
+ {
+ // Create container object
+ UIContainerObject object = factory.createObject(structuralObject.getState().getType());
+
+ // Create context
+ ObjectContext objectContext = new ObjectContext(this, object, structuralObject);
+ RelationshipContext relationshipContext = new RelationshipContext();
+
+ // Wire
+ objectContext.relationshipContext = relationshipContext;
+ relationshipContext.owner = objectContext;
+
+ // Contextualize
+ object.setContext(objectContext);
+
+ //
+ return object;
+ }
+
+ // Public ***********************************************************************************************************
+
+ public UIContext getRoot()
+ {
+ return root;
+ }
+
+ // Package protected ************************************************************************************************
+
+ /**
+ * Process a change.
+ *
+ * @param change the change to process
+ */
+ void update(StructuralObject.Change change)
+ {
+ if (change instanceof StructuralObject.Update)
+ {
+ StructuralObject.Update update = (StructuralObject.Update)change;
+
+ //
+ UIContainerObject object = get(update.getObject());
+
+ //
+ if (object == null)
+ {
+ throw new AssertionError("It should be here, should we do something ???");
+ }
+
+ //
+ ObjectContext context = (ObjectContext)object.getContext();
+ context.structuralObject = update.getObject();
+
+ // Eventing
+ StructuralStateModification mod = new StructuralStateModification.Update(update.getChanges());
+ StateChange<StructuralStateModification> stateChange = new StateChange<StructuralStateModification>(update.getObject().getId(), mod);
+ StateChangeEvent event = new StateChangeEvent(stateChange);
+ fireEvent(event);
+ }
+ else if (change instanceof StructuralObject.Creation)
+ {
+ StructuralObject.Creation creation = (StructuralObject.Creation)change;
+
+ //
+ UIContainerObject parent = get(creation.getParent());
+
+ //
+ if (parent == null)
+ {
+ throw new AssertionError("It should be here, should we do something ???");
+ }
+
+ //
+ ObjectContext parentContext = (ObjectContext)parent.getContext();
+
+ //
+ parentContext.structuralObject = creation.getParent();
+
+ //
+ if (parentContext.relationshipContext.children.isLoaded())
+ {
+ UIContainerObject child = create(creation.getChild());
+
+ //
+ attach(child);
+
+ //
+ parentContext.relationshipContext.children.addLoadedRelated(child);
+ }
+
+ // Eventing
+ StructuralObject childSO = creation.getChild();
+ StructuralState state = childSO.getState();
+ StructuralStateModification mod = new StructuralStateModification.Creation(state.getType(), state.getName(), state.getProperties());
+ StateChange<StructuralStateModification> stateChange = new StateChange<StructuralStateModification>(childSO.getId(), mod);
+ StateChangeEvent event = new StateChangeEvent(stateChange);
+ fireEvent(event);
+ }
+ else if (change instanceof StructuralObject.Destruction)
+ {
+ StructuralObject.Destruction destruction = (StructuralObject.Destruction)change;
+
+ //
+ UIContainerObject parent = get(destruction.getParent());
+
+ //
+ if (parent != null)
+ {
+ ObjectContext parentContext = (ObjectContext)parent.getContext();
+
+ //
+ parentContext.structuralObject = destruction.getParent();
+
+ //
+ if (parentContext.relationshipContext.children.isLoaded())
+ {
+ // Get the id which is the destroyed object
+ String destroyedId = destruction.getIds().get(destruction.getIds().size() - 1);
+
+ //
+ parentContext.relationshipContext.children.removeLoadedRelated(destroyedId);
+ }
+ }
+
+ //
+ for (String id : destruction.getIds())
+ {
+ UIContainerObject toDestroy = universe.get(id);
+
+ //
+ if (toDestroy != null)
+ {
+ detach(toDestroy, false);
+
+ // Eventing
+ StateChange<StructuralStateModification> stateChange = new StateChange<StructuralStateModification>(id, DESTRUCTION);
+ StateChangeEvent event = new StateChangeEvent(stateChange);
+ fireEvent(event);
+ }
+ }
+ }
+ else if (change instanceof StructuralObject.Move)
+ {
+ StructuralObject.Move move = (StructuralObject.Move)change;
+
+ // Get the container object (some may not be loaded)
+ UIContainerObject parent = get(move.getParent());
+ UIContainerObject destination = get(move.getDestination());
+ UIContainerObject source = get(move.getSource());
+
+ // Update parent
+ if (parent != null)
+ {
+ ObjectContext parentContext = (ObjectContext)parent.getContext();
+
+ // Update so
+ parentContext.structuralObject = move.getParent();
+
+ // Remove the child if the relationship is loaded on this side
+ if (parentContext.relationshipContext.children.isLoaded())
+ {
+ parentContext.relationshipContext.children.removeLoadedRelated(move.getSource().getId());
+ }
+ }
+
+ //
+ if (destination != null)
+ {
+ ObjectContext destinationContext = (ObjectContext)destination.getContext();
+
+ //
+ destinationContext.structuralObject = move.getDestination();
+
+ //
+ if (destinationContext.relationshipContext.children.isLoaded())
+ {
+ // Now we really need to add the source as we load collections entirely
+ if (source == null)
+ {
+ source = create(move.getSource());
+
+ //
+ attach(source);
+ }
+
+ //
+ destinationContext.relationshipContext.children.addLoadedRelated(source);
+ }
+ }
+
+ // Update source
+ if (source != null)
+ {
+ ObjectContext sourceContext = (ObjectContext)source.getContext();
+
+ // Update so
+ sourceContext.structuralObject = move.getSource();
+
+ //
+ if (sourceContext.relationshipContext.parent.isLoaded())
+ {
+ if (destination != null)
+ {
+ sourceContext.relationshipContext.parent.setLoadedRelated(destination);
+ }
+ else
+ {
+ sourceContext.relationshipContext.parent.clear();
+ }
+ }
+ }
+
+ // Eventing
+ StructuralStateModification.Move mod = new StructuralStateModification.Move(move.getParent().getId(), move.getDestination().getId());
+ StateChange<StructuralStateModification> stateChange = new StateChange<StructuralStateModification>(move.getSource().getId(), mod);
+ StateChangeEvent event = new StateChangeEvent(stateChange);
+ fireEvent(event);
+ }
+ else
+ {
+ throw new AssertionError();
+ }
+ }
+
+ /**
+ * Returns an object an object specified by the id that is referenced by this context or load
+ * it if it is not present.
+ *
+ * @param id the id of the object to obtain
+ * @return the loaded object
+ */
+ UIContainerObject getObject(String id)
+ {
+ UIContainerObject object = get(id);
+
+ //
+ if (object != null)
+ {
+ return object;
+ }
+
+ //
+ // Fetch the state of the UIObject in question
+ StructuralObject structuralObject = this.structuralStateContext.load(id);
+
+ //
+ if (structuralObject != null)
+ {
+ object = create(structuralObject);
+
+ //
+ attach(object);
+
+ //
+ return object;
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+ void addModelListener(ModelListener listener)
+ {
+ if (listener == null)
+ {
+ throw new IllegalArgumentException();
+ }
+
+ //
+ if (!listeners.contains(listener))
+ {
+ listeners.add(listener);
+ }
+ }
+
+ void fireEvent(ModelEvent event)
+ {
+ for (ModelListener listener : listeners)
+ {
+ try
+ {
+ listener.onEvent(event);
+ }
+ catch (Exception ignore)
+ {
+ System.out.println("ignore = " + ignore);
+ }
+ }
+ }
+
+ void validate(UIContainerObject object, UIObject.Visitor scope)
+ {
+ if (scope.enterObject(object))
+ {
+ ObjectContext context = (ObjectContext)object.getContext();
+
+ // We do it only if it is not yet invalid
+ if (context.isValid())
+ {
+ // Validate
+ try
+ {
+ structuralStateContext.validate(context.structuralObject);
+ }
+ catch (StateException e)
+ {
+ context.updateStatus(e);
+ }
+
+ // Continue only if it is valid
+ if (context.isValid())
+ {
+ boolean loaded = context.relationshipContext.children.isLoaded();
+
+ // Loading children will never make the current object invalid
+ // but it could make some already loaded children invalid
+ if (scope.enterChildren(object, loaded))
+ {
+ for (UIContainerObject child : context.relationshipContext.children.getRelateds())
+ {
+ ObjectContext childContext = (ObjectContext)child.getContext();
+
+ //
+ validate(childContext.containerObject, scope);
+ }
+ }
+ }
+
+ //
+ scope.leaveObject(object);
+ }
+ }
+ }
+
+ void refresh(UIContainerObject object, UIObject.Visitor scope)
+ {
+ if (scope.enterObject(object))
+ {
+ ObjectContext context = (ObjectContext)object.getContext();
+
+ //
+ if (context.status == UIObject.Status.INVALID)
+ {
+ return;
+ }
+
+ //
+ System.err.println("<" + context.getState().getName() + ">");
+
+ //
+ StructuralObject.Refresh refresh = null;
+ try
+ {
+ refresh = structuralStateContext.refresh(context.structuralObject);
+ }
+ catch (NoSuchStateException e)
+ {
+ context.status = UIObject.Status.INVALID;
+ return;
+ }
+
+ //
+ boolean loaded = context.relationshipContext.children.isLoaded();
+ boolean refreshChildren = scope.enterChildren(object, loaded);
+
+ // Update the structural state
+ if (!context.structuralObject.compareTo(refresh.getObject()))
+ {
+ if (loaded)
+ {
+ // Take care of the added children
+ for (StructuralObject addedSO : refresh.getAddedChildren())
+ {
+ UIContainerObject added = get(addedSO);
+
+ //
+ if (added != null)
+ {
+ ObjectContext addedContext = (ObjectContext)added.getContext();
+
+// // Find parent pointing at us and set as dirty
+// for (ObjectContext addedParentContext : addedContext.relationshipContext.parent.getReferences())
+// {
+// addedParentContext.status = UIObject.Status.STALE;
+// }
+
+ // Update parent if it was loaded
+ if (addedContext.relationshipContext.parent.isLoaded())
+ {
+ addedContext.relationshipContext.parent.setLoadedRelated(object);
+ }
+ }
+ else
+ {
+ added = create(addedSO);
+
+ //
+ attach(added);
+ }
+
+ System.err.println("added " + added.getName());
+
+ //
+ context.relationshipContext.children.addLoadedRelated(added);
+ }
+
+ //
+ for (StructuralObject staleSO : refresh.getStaleChildren().values())
+ {
+ UIContainerObject stale = get(staleSO);
+
+ // It must be here as it is loaded
+ ObjectContext staleContext = (ObjectContext)stale.getContext();
+
+ // Mark as stale
+ staleContext.status = UIObject.Status.STALE;
+ }
+
+ // Removals
+ for (String removedId : refresh.getRemovedChildren())
+ {
+ UIContainerObject removed = context.relationshipContext.children.removeLoadedRelated(removedId);
+
+ //
+ ObjectContext removedContext = (ObjectContext)removed.getContext();
+
+ //
+ System.err.println("want to remove " + removed.getName());
+
+ // We remove only if it's pointing at us
+ if (removedContext.relationshipContext.parent.isLoaded() && removedContext.relationshipContext.parent.getRelated() == object)
+ {
+ System.err.println("removed " + removed.getName());
+ detach(removed, true);
+ }
+ }
+
+ // Update state
+ context.structuralObject = refresh.getObject();
+ context.status = UIObject.Status.VALID;
+ }
+ }
+
+ // Recursively refresh children
+ if (refreshChildren)
+ {
+ for (UIContainerObject child : context.relationshipContext.children.getRelateds())
+ {
+ refresh(child, scope);
+ }
+ }
+
+ System.err.println("</" + context.getState().getName() + ">");
+
+ //
+ scope.leaveObject(object);
+ }
+ }
+
+// void refresh(UIContainerObject object, UIObject.Visitor scope)
+// {
+// // First pass
+//
+//
+//
+// }
+
+ void attach(UIContainerObject object)
+ {
+ String id = object.getId();
+
+ //
+ if (universe.containsKey(id))
+ {
+ throw new AssertionError("Duplicate put for id" + id);
+ }
+
+ //
+ universe.put(id, object);
+
+ //
+// ObjectContext context = (ObjectContext)object.getContext();
+// StructuralObject so = context.structuralObject;
+// StructuralState st = so.getState();
+// ObjectAddedEvent event = new ObjectAddedEvent(so.getId(), st.getName(), st.getType(), st.getProperties());
+// fireEvent(event);
+ }
+
+ void detach(UIContainerObject object, boolean cascade)
+ {
+ ObjectContext context = (ObjectContext)object.getContext();
+
+ //
+ if (cascade)
+ {
+ for (UIContainerObject child : context.relationshipContext.children.getRelateds())
+ {
+ detach(child, true);
+ }
+ }
+
+ //
+ if (context.relationshipContext.parent.isLoaded())
+ {
+ context.relationshipContext.parent.clear();
+ }
+ if (context.relationshipContext.children.isLoaded())
+ {
+ context.relationshipContext.children.clear();
+ }
+
+ //
+ context.status = UIObject.Status.INVALID;
+ universe.remove(object.getId());
+
+ //
+// StructuralObject so = context.structuralObject;
+// ObjectRemovedEvent event = new ObjectRemovedEvent(so.getId());
+// fireEvent(event);
+ }
+
+ UIContainerObject get(String id)
+ {
+ return universe.get(id);
+ }
+
+ UIContainerObject get(StructuralObject so)
+ {
+ return universe.get(so.getId());
+ }
+}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/spi (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/spi)
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/spi/UIContainerObject.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/spi/UIContainerObject.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/spi/UIContainerObject.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,39 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.impl.model.container.spi;
-
-import org.jboss.portal.presentation.model.UIObject;
-import org.jboss.portal.presentation.impl.model.container.spi.UIObjectContext;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public interface UIContainerObject extends UIObject
-{
-
- UIObjectContext getContext();
-
- void setContext(UIObjectContext context);
-
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/spi/UIContainerObject.java (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/spi/UIContainerObject.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/spi/UIContainerObject.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/spi/UIContainerObject.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,39 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.impl.model.container.spi;
+
+import org.jboss.portal.presentation.model.UIObject;
+import org.jboss.portal.presentation.impl.model.container.spi.UIObjectContext;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public interface UIContainerObject extends UIObject
+{
+
+ UIObjectContext getContext();
+
+ void setContext(UIObjectContext context);
+
+}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/spi/UIObjectContext.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/spi/UIObjectContext.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/spi/UIObjectContext.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,43 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.impl.model.container.spi;
-
-import org.jboss.portal.presentation.model.UIObject;
-import org.jboss.portal.presentation.model.ModelListener;
-
-/**
- * Encapsulate internal of an object.
- *
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public interface UIObjectContext
-{
-
- UIObject getManagedObject();
-
- UIObject getObject(String id);
-
- void addModelListener(ModelListener listener);
-
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/spi/UIObjectContext.java (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/spi/UIObjectContext.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/spi/UIObjectContext.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/spi/UIObjectContext.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,43 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.impl.model.container.spi;
+
+import org.jboss.portal.presentation.model.UIObject;
+import org.jboss.portal.presentation.model.ModelListener;
+
+/**
+ * Encapsulate internal of an object.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public interface UIObjectContext
+{
+
+ UIObject getManagedObject();
+
+ UIObject getObject(String id);
+
+ void addModelListener(ModelListener listener);
+
+}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/spi/UIObjectFactory.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/spi/UIObjectFactory.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/spi/UIObjectFactory.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,99 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.impl.model.container.spi;
-
-import org.jboss.portal.presentation.model.UIContext;
-import org.jboss.portal.presentation.model.UIPortal;
-import org.jboss.portal.presentation.model.UIPage;
-import org.jboss.portal.presentation.model.UIContainer;
-import org.jboss.portal.presentation.model.UIWindow;
-import org.jboss.portal.presentation.model.UIObject;
-import org.jboss.portal.presentation.impl.model.UIContextImpl;
-import org.jboss.portal.presentation.impl.model.UIPortalImpl;
-import org.jboss.portal.presentation.impl.model.UIPageImpl;
-import org.jboss.portal.presentation.impl.model.UIContainerImpl;
-import org.jboss.portal.presentation.impl.model.UIWindowImpl;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public class UIObjectFactory
-{
-
- public UIContainerObject createObject(Class<? extends UIObject> type)
- {
- if(type == UIContext.class)
- {
- return new UIContextImpl();
- }
- else if(type == UIPortal.class)
- {
- return new UIPortalImpl();
- }
- else if(type == UIPage.class)
- {
- return new UIPageImpl();
- }
- else if(type == UIContainer.class)
- {
- return new UIContainerImpl();
- }
- else if(type == UIWindow.class)
- {
- return new UIWindowImpl();
- }
- else
- {
- throw new AssertionError();
- }
- }
-
-// public <T extends UIObject> boolean isAllowedAsChild(Class<T> type)
-// {
-// if(type == UIContext.class)
-// {
-// return type == UIPortal.class;
-// }
-// else if (type == UIPortal.class)
-// {
-// return type == UIPage.class;
-// }
-// else if (type == UIPage.class)
-// {
-// return type == UIPage.class || type == UIContainer.class || type == UIWindow.class;
-// }
-// else if (type == UIContainer.class)
-// {
-// return type == UIWindow.class;
-// }
-// else if (type == UIWindow.class)
-// {
-// return false;
-// }
-// else
-// {
-// throw new AssertionError();
-// }
-// }
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/spi/UIObjectFactory.java (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/spi/UIObjectFactory.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/spi/UIObjectFactory.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/container/spi/UIObjectFactory.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,99 @@
+/******************************************************************************
+ * 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.presentation.impl.model.container.spi;
+
+import org.jboss.portal.presentation.model.UIContext;
+import org.jboss.portal.presentation.model.UIPortal;
+import org.jboss.portal.presentation.model.UIPage;
+import org.jboss.portal.presentation.model.UIContainer;
+import org.jboss.portal.presentation.model.UIWindow;
+import org.jboss.portal.presentation.model.UIObject;
+import org.jboss.portal.presentation.impl.model.UIContextImpl;
+import org.jboss.portal.presentation.impl.model.UIPortalImpl;
+import org.jboss.portal.presentation.impl.model.UIPageImpl;
+import org.jboss.portal.presentation.impl.model.UIContainerImpl;
+import org.jboss.portal.presentation.impl.model.UIWindowImpl;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class UIObjectFactory
+{
+
+ public UIContainerObject createObject(Class<? extends UIObject> type)
+ {
+ if(type == UIContext.class)
+ {
+ return new UIContextImpl();
+ }
+ else if(type == UIPortal.class)
+ {
+ return new UIPortalImpl();
+ }
+ else if(type == UIPage.class)
+ {
+ return new UIPageImpl();
+ }
+ else if(type == UIContainer.class)
+ {
+ return new UIContainerImpl();
+ }
+ else if(type == UIWindow.class)
+ {
+ return new UIWindowImpl();
+ }
+ else
+ {
+ throw new AssertionError();
+ }
+ }
+
+// public <T extends UIObject> boolean isAllowedAsChild(Class<T> type)
+// {
+// if(type == UIContext.class)
+// {
+// return type == UIPortal.class;
+// }
+// else if (type == UIPortal.class)
+// {
+// return type == UIPage.class;
+// }
+// else if (type == UIPage.class)
+// {
+// return type == UIPage.class || type == UIContainer.class || type == UIWindow.class;
+// }
+// else if (type == UIContainer.class)
+// {
+// return type == UIWindow.class;
+// }
+// else if (type == UIWindow.class)
+// {
+// return false;
+// }
+// else
+// {
+// throw new AssertionError();
+// }
+// }
+}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/state (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/state)
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/state/navigational (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/state/navigational)
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/state/navigational/NavigationalStateContextImpl.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/state/navigational/NavigationalStateContextImpl.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/state/navigational/NavigationalStateContextImpl.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,113 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.impl.model.state.navigational;
-
-import org.jboss.portal.presentation.model.state.navigational.NavigationalStateContext;
-import org.jboss.portal.presentation.model.state.StateChangeVetoException;
-import org.jboss.portal.presentation.model.state.StateException;
-
-import java.util.Map;
-import java.util.HashMap;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public class NavigationalStateContextImpl implements NavigationalStateContext
-{
-
- /** . */
- private final Map<Key, Object> map;
-
- public NavigationalStateContextImpl(Map<Key, Object> map)
- {
- this.map = map;
- }
-
- public NavigationalStateContextImpl()
- {
- this(new HashMap<Key, Object>());
- }
-
- public void set(String objectId, String key, Object navigationalState) throws StateChangeVetoException, StateException, IllegalArgumentException
- {
- Key key2 = new Key(objectId, key);
-
- //
- if (navigationalState != null)
- {
- map.put(key2, navigationalState);
- }
- else
- {
- map.remove(key2);
- }
- }
-
- public Object get(String objectId, String key) throws IllegalArgumentException
- {
- return map.get(new Key(objectId, key));
- }
-
- private final class Key
- {
- /** . */
- private final String objectId;
-
- /** . */
- private final String key;
-
- private Key(String objectId, String key)
- {
- if (objectId == null)
- {
- throw new IllegalArgumentException();
- }
- if (key == null)
- {
- throw new IllegalArgumentException();
- }
- this.objectId = objectId;
- this.key = key;
- }
-
- public int hashCode()
- {
- return objectId.hashCode() * 43 + key.hashCode();
- }
-
- public boolean equals(Object o)
- {
- if (o == this)
- {
- return true;
- }
- if (o instanceof Key)
- {
- Key that = (Key)o;
- return objectId.equals(that.objectId) && key.equals(that.key);
- }
- return false;
- }
- }
-}
\ No newline at end of file
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/state/navigational/NavigationalStateContextImpl.java (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/state/navigational/NavigationalStateContextImpl.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/state/navigational/NavigationalStateContextImpl.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/state/navigational/NavigationalStateContextImpl.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,113 @@
+/******************************************************************************
+ * 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.presentation.impl.model.state.navigational;
+
+import org.jboss.portal.presentation.model.state.navigational.NavigationalStateContext;
+import org.jboss.portal.presentation.model.state.StateChangeVetoException;
+import org.jboss.portal.presentation.model.state.StateException;
+
+import java.util.Map;
+import java.util.HashMap;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class NavigationalStateContextImpl implements NavigationalStateContext
+{
+
+ /** . */
+ private final Map<Key, Object> map;
+
+ public NavigationalStateContextImpl(Map<Key, Object> map)
+ {
+ this.map = map;
+ }
+
+ public NavigationalStateContextImpl()
+ {
+ this(new HashMap<Key, Object>());
+ }
+
+ public void set(String objectId, String key, Object navigationalState) throws StateChangeVetoException, StateException, IllegalArgumentException
+ {
+ Key key2 = new Key(objectId, key);
+
+ //
+ if (navigationalState != null)
+ {
+ map.put(key2, navigationalState);
+ }
+ else
+ {
+ map.remove(key2);
+ }
+ }
+
+ public Object get(String objectId, String key) throws IllegalArgumentException
+ {
+ return map.get(new Key(objectId, key));
+ }
+
+ private final class Key
+ {
+ /** . */
+ private final String objectId;
+
+ /** . */
+ private final String key;
+
+ private Key(String objectId, String key)
+ {
+ if (objectId == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ if (key == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ this.objectId = objectId;
+ this.key = key;
+ }
+
+ public int hashCode()
+ {
+ return objectId.hashCode() * 43 + key.hashCode();
+ }
+
+ public boolean equals(Object o)
+ {
+ if (o == this)
+ {
+ return true;
+ }
+ if (o instanceof Key)
+ {
+ Key that = (Key)o;
+ return objectId.equals(that.objectId) && key.equals(that.key);
+ }
+ return false;
+ }
+ }
+}
\ No newline at end of file
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model)
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ModelEvent.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ModelEvent.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ModelEvent.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,31 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public abstract class ModelEvent
-{
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ModelEvent.java (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ModelEvent.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ModelEvent.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ModelEvent.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,31 @@
+/******************************************************************************
+ * 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.presentation.model;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public abstract class ModelEvent
+{
+}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ModelListener.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ModelListener.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ModelListener.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,32 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public interface ModelListener
-{
- void onEvent(ModelEvent event);
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ModelListener.java (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ModelListener.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ModelListener.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ModelListener.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,32 @@
+/******************************************************************************
+ * 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.presentation.model;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public interface ModelListener
+{
+ void onEvent(ModelEvent event);
+}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/StateType.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/StateType.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/StateType.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,42 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public enum StateType
-{
- /**
- * The navigational state type. The navigational state type describe sthe a kind of change done at runtime by the user when it
- * interacts with the model (i.e not all interactions with the model are automatically navigational state changes).
- */
- NAVIGATIONAL,
-
- /**
- * The structural state type. The structural state type describes the structure of the model, i.e it defines an enduring
- * state managed by the presentation server.
- */
- STRUCTURAL
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/StateType.java (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/StateType.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/StateType.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/StateType.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,42 @@
+/******************************************************************************
+ * 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.presentation.model;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public enum StateType
+{
+ /**
+ * The navigational state type. The navigational state type describe sthe a kind of change done at runtime by the user when it
+ * interacts with the model (i.e not all interactions with the model are automatically navigational state changes).
+ */
+ NAVIGATIONAL,
+
+ /**
+ * The structural state type. The structural state type describes the structure of the model, i.e it defines an enduring
+ * state managed by the presentation server.
+ */
+ STRUCTURAL
+}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIAction.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIAction.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIAction.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,55 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model;
-
-/**
- * An action that can be triggered.
- *
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public interface UIAction extends UIObject
-{
-
- /**
- * Returns the action display name.
- *
- * @return the display name
- */
- String getDisplayName();
-
- /**
- * Returns the action icon URL.
- *
- * @return the icon URL
- */
- String getIconURL();
-
- /**
- * Returns the action URL.
- *
- * @return the url
- */
- String getURL();
-
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIAction.java (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIAction.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIAction.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIAction.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,55 @@
+/******************************************************************************
+ * 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.presentation.model;
+
+/**
+ * An action that can be triggered.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public interface UIAction extends UIObject
+{
+
+ /**
+ * Returns the action display name.
+ *
+ * @return the display name
+ */
+ String getDisplayName();
+
+ /**
+ * Returns the action icon URL.
+ *
+ * @return the icon URL
+ */
+ String getIconURL();
+
+ /**
+ * Returns the action URL.
+ *
+ * @return the url
+ */
+ String getURL();
+
+}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIContainer.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIContainer.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIContainer.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,31 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public interface UIContainer extends UIObject
-{
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIContainer.java (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIContainer.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIContainer.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIContainer.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,31 @@
+/******************************************************************************
+ * 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.presentation.model;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public interface UIContainer extends UIObject
+{
+}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIContext.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIContext.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIContext.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,43 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public interface UIContext extends UIObject
-{
- /**
- *
- * @param id the object id
- * @return the object for the specified id or null if it cannot be found
- */
- UIObject getObject(String id);
-
- /**
- *
- * @param listener the listener
- */
- void addModelListener(ModelListener listener);
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIContext.java (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIContext.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIContext.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIContext.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,43 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.model;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public interface UIContext extends UIObject
+{
+ /**
+ *
+ * @param id the object id
+ * @return the object for the specified id or null if it cannot be found
+ */
+ UIObject getObject(String id);
+
+ /**
+ *
+ * @param listener the listener
+ */
+ void addModelListener(ModelListener listener);
+}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIObject.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIObject.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIObject.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,208 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model;
-
-import org.jboss.portal.presentation.model.state.StateException;
-import org.jboss.portal.presentation.model.state.ConstraintViolationException;
-
-import java.util.Collection;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public interface UIObject
-{
-
- /**
- * The status of a user interface object.
- */
- public enum Status
- {
- /**
- * It can be used.
- */
- VALID,
-
- /**
- * It cannot be used.
- */
- INVALID,
-
- /**
- * It cannot be used as is but a recovery is possible to either become valid or invalid.
- */
- STALE
- }
-
- public interface Visitor
- {
-
- /**
- * Returns true if the provided object should be visited.
- *
- * @param object the object
- * @return true if it should be visited
- */
- boolean enterObject(UIObject object);
-
- /**
- * Callback to signal that an object visit is terminated
- *
- * @param object the object
- */
- void leaveObject(UIObject object);
-
- /**
- * Returns true if the children should be visited
- *
- * @param object the parent of the children
- * @param loaded if the relationship is already loaded
- * @return true if the children should be visited
- */
- boolean enterChildren(UIObject object, boolean loaded);
-
- }
-
- /**
- * Updates the status of the object by comparing validating it against the structural state context.
- */
- void validate();
-
- void validate(Visitor scope);
-
- /**
- * Attempt a resolution of the current conflict. The behavior of the method will change according to the
- * current status of the object:
- * <ul>
- * <li><code>STALE</code> status leads to resolve the conflict to a new status with <code>INVALID</code> or <code>VALID</code>
- * as possible values</li>
- * <li><code>VALID</code> status leads to a non operation</li>
- * <li><code>INVALID</code> status leads to throw an <code>IllegalStateException</code></li>
- * </ul>
- */
- void refresh();
-
- void refresh(Visitor scope);
-
- /**
- * Return the current status.
- *
- * @return the status
- */
- Status getStatus();
-
- /**
- * Returns the id.
- *
- * @return the id
- */
- String getId();
-
- /**
- * Returns the name.
- *
- * @return the name
- */
- String getName();
-
- /**
- * Returns the parent or null if the object does not have a parent.
- *
- * @return the parent
- */
- UIObject getParent();
-
- /**
- * Returns a named child or null if it does not exist.
- *
- * @param name the name of the child
- * @return the named child
- */
- UIObject getChild(String name);
-
- /**
- * Returns a property value or null if it does not exist.
- *
- * @param stateType the scope where to get the value from
- * @param propertyName the property name
- * @param propertyType the expected property type
- * @return the property value
- * @throws IllegalArgumentException if any argument is null or not valid
- * @throws StateException any state exception
- */
- <T> T getProperty(StateType stateType, String propertyName, Class<T> propertyType) throws IllegalArgumentException, StateException;
-
- /**
- * Equivalent to call <code>getPropertyValue(StateScopeType,String,Class)</code> with the <code>Object.class</code>
- * literal.
- *
- * @param stateType the scope where to get the value from
- * @param propertyName the property name
- * @return the property value
- * @throws IllegalArgumentException if any argument is null or not valid
- * @throws StateException any state exception
- */
- Object getProperty(StateType stateType, String propertyName) throws IllegalArgumentException, StateException;
-
- <T> void setProperty(StateType stateType, String propertyName, T propertyValue) throws IllegalArgumentException, StateException;
-
- /**
- * Create a named child with a specified type.
- *
- * @param name the child name
- * @param type the child type
- * @return the newly created child
- * @throws IllegalArgumentException if the name is null, already exists or this kind of object does not accept children of the specified type
- * @throws StateException any state exception
- */
- <T extends UIObject> T createChild(String name, Class<T> type) throws IllegalArgumentException, StateException;
-
- /**
- * Returns the children of this object.
- *
- * @return the list of children
- */
- Collection<? extends UIObject> getChildren();
-
- /**
- * Destroy a named child.
- *
- * @param name the name of the child to destroy
- * @throws IllegalArgumentException if the name is null or the child does not exist
- * @throws StateException any state exception
- */
- void destroyChild(String name) throws IllegalArgumentException, StateException;
-
- /**
- * Move the specified object to a new parent. A constraint violation will be detected if the destination
- * is a descendant of the current object.
- *
- * @param destination the new parent
- * @throws IllegalArgumentException if the destination is null
- * @throws StateException any state exception
- * @throws ConstraintViolationException if the destination is not valid
- */
- void move(UIObject destination) throws IllegalArgumentException, StateException;
-
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIObject.java (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIObject.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIObject.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIObject.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,208 @@
+/******************************************************************************
+ * 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.presentation.model;
+
+import org.jboss.portal.presentation.model.state.StateException;
+import org.jboss.portal.presentation.model.state.ConstraintViolationException;
+
+import java.util.Collection;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public interface UIObject
+{
+
+ /**
+ * The status of a user interface object.
+ */
+ public enum Status
+ {
+ /**
+ * It can be used.
+ */
+ VALID,
+
+ /**
+ * It cannot be used.
+ */
+ INVALID,
+
+ /**
+ * It cannot be used as is but a recovery is possible to either become valid or invalid.
+ */
+ STALE
+ }
+
+ public interface Visitor
+ {
+
+ /**
+ * Returns true if the provided object should be visited.
+ *
+ * @param object the object
+ * @return true if it should be visited
+ */
+ boolean enterObject(UIObject object);
+
+ /**
+ * Callback to signal that an object visit is terminated
+ *
+ * @param object the object
+ */
+ void leaveObject(UIObject object);
+
+ /**
+ * Returns true if the children should be visited
+ *
+ * @param object the parent of the children
+ * @param loaded if the relationship is already loaded
+ * @return true if the children should be visited
+ */
+ boolean enterChildren(UIObject object, boolean loaded);
+
+ }
+
+ /**
+ * Updates the status of the object by comparing validating it against the structural state context.
+ */
+ void validate();
+
+ void validate(Visitor scope);
+
+ /**
+ * Attempt a resolution of the current conflict. The behavior of the method will change according to the
+ * current status of the object:
+ * <ul>
+ * <li><code>STALE</code> status leads to resolve the conflict to a new status with <code>INVALID</code> or <code>VALID</code>
+ * as possible values</li>
+ * <li><code>VALID</code> status leads to a non operation</li>
+ * <li><code>INVALID</code> status leads to throw an <code>IllegalStateException</code></li>
+ * </ul>
+ */
+ void refresh();
+
+ void refresh(Visitor scope);
+
+ /**
+ * Return the current status.
+ *
+ * @return the status
+ */
+ Status getStatus();
+
+ /**
+ * Returns the id.
+ *
+ * @return the id
+ */
+ String getId();
+
+ /**
+ * Returns the name.
+ *
+ * @return the name
+ */
+ String getName();
+
+ /**
+ * Returns the parent or null if the object does not have a parent.
+ *
+ * @return the parent
+ */
+ UIObject getParent();
+
+ /**
+ * Returns a named child or null if it does not exist.
+ *
+ * @param name the name of the child
+ * @return the named child
+ */
+ UIObject getChild(String name);
+
+ /**
+ * Returns a property value or null if it does not exist.
+ *
+ * @param stateType the scope where to get the value from
+ * @param propertyName the property name
+ * @param propertyType the expected property type
+ * @return the property value
+ * @throws IllegalArgumentException if any argument is null or not valid
+ * @throws StateException any state exception
+ */
+ <T> T getProperty(StateType stateType, String propertyName, Class<T> propertyType) throws IllegalArgumentException, StateException;
+
+ /**
+ * Equivalent to call <code>getPropertyValue(StateScopeType,String,Class)</code> with the <code>Object.class</code>
+ * literal.
+ *
+ * @param stateType the scope where to get the value from
+ * @param propertyName the property name
+ * @return the property value
+ * @throws IllegalArgumentException if any argument is null or not valid
+ * @throws StateException any state exception
+ */
+ Object getProperty(StateType stateType, String propertyName) throws IllegalArgumentException, StateException;
+
+ <T> void setProperty(StateType stateType, String propertyName, T propertyValue) throws IllegalArgumentException, StateException;
+
+ /**
+ * Create a named child with a specified type.
+ *
+ * @param name the child name
+ * @param type the child type
+ * @return the newly created child
+ * @throws IllegalArgumentException if the name is null, already exists or this kind of object does not accept children of the specified type
+ * @throws StateException any state exception
+ */
+ <T extends UIObject> T createChild(String name, Class<T> type) throws IllegalArgumentException, StateException;
+
+ /**
+ * Returns the children of this object.
+ *
+ * @return the list of children
+ */
+ Collection<? extends UIObject> getChildren();
+
+ /**
+ * Destroy a named child.
+ *
+ * @param name the name of the child to destroy
+ * @throws IllegalArgumentException if the name is null or the child does not exist
+ * @throws StateException any state exception
+ */
+ void destroyChild(String name) throws IllegalArgumentException, StateException;
+
+ /**
+ * Move the specified object to a new parent. A constraint violation will be detected if the destination
+ * is a descendant of the current object.
+ *
+ * @param destination the new parent
+ * @throws IllegalArgumentException if the destination is null
+ * @throws StateException any state exception
+ * @throws ConstraintViolationException if the destination is not valid
+ */
+ void move(UIObject destination) throws IllegalArgumentException, StateException;
+
+}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIPage.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIPage.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIPage.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,31 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public interface UIPage extends UIObject
-{
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIPage.java (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIPage.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIPage.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIPage.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,31 @@
+/******************************************************************************
+ * 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.presentation.model;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public interface UIPage extends UIObject
+{
+}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIPortal.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIPortal.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIPortal.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,31 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public interface UIPortal extends UIObject
-{
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIPortal.java (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIPortal.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIPortal.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIPortal.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,31 @@
+/******************************************************************************
+ * 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.presentation.model;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public interface UIPortal extends UIObject
+{
+}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIWindow.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIWindow.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIWindow.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,61 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model;
-
-import org.jboss.portal.WindowState;
-import org.jboss.portal.Mode;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public interface UIWindow extends UIObject
-{
- /**
- * Returns the window state of the window or null if it does not exist.
- *
- * @return the window state
- */
- WindowState getWindowState();
-
- /**
- * Update the window state of the window.
- *
- * @param windowState the new window state
- */
- void setWindowState(WindowState windowState);
-
- /**
- * Returns the mode of the window or null if it does not exist.
- *
- * @return the mode
- */
- Mode getMode();
-
- /**
- * Update the mode of the window.
- *
- * @param mode the new mode
- */
- void setMode(Mode mode);
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIWindow.java (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIWindow.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIWindow.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIWindow.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,61 @@
+/******************************************************************************
+ * 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.presentation.model;
+
+import org.jboss.portal.WindowState;
+import org.jboss.portal.Mode;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public interface UIWindow extends UIObject
+{
+ /**
+ * Returns the window state of the window or null if it does not exist.
+ *
+ * @return the window state
+ */
+ WindowState getWindowState();
+
+ /**
+ * Update the window state of the window.
+ *
+ * @param windowState the new window state
+ */
+ void setWindowState(WindowState windowState);
+
+ /**
+ * Returns the mode of the window or null if it does not exist.
+ *
+ * @return the mode
+ */
+ Mode getMode();
+
+ /**
+ * Update the mode of the window.
+ *
+ * @param mode the new mode
+ */
+ void setMode(Mode mode);
+}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/content (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/content)
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/content/WindowContent.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/content/WindowContent.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/content/WindowContent.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,65 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model.content;
-
-/**
- * The content of a window.
- *
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public class WindowContent
-{
-
- /** . */
- private final long expirationMillis;
-
- /** . */
- private final String title;
-
- /** . */
- private final String markup;
-
-
- public WindowContent(long expirationMillis, String title, String markup)
- {
- this.expirationMillis = expirationMillis;
- this.title = title;
- this.markup = markup;
- }
-
- public long getExpirationMillis()
- {
- return expirationMillis;
- }
-
- public String getTitle()
- {
- return title;
- }
-
- public String getMarkup()
- {
- return markup;
- }
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/content/WindowContent.java (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/content/WindowContent.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/content/WindowContent.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/content/WindowContent.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,65 @@
+/******************************************************************************
+ * 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.presentation.model.content;
+
+/**
+ * The content of a window.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class WindowContent
+{
+
+ /** . */
+ private final long expirationMillis;
+
+ /** . */
+ private final String title;
+
+ /** . */
+ private final String markup;
+
+
+ public WindowContent(long expirationMillis, String title, String markup)
+ {
+ this.expirationMillis = expirationMillis;
+ this.title = title;
+ this.markup = markup;
+ }
+
+ public long getExpirationMillis()
+ {
+ return expirationMillis;
+ }
+
+ public String getTitle()
+ {
+ return title;
+ }
+
+ public String getMarkup()
+ {
+ return markup;
+ }
+}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event)
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle)
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/LifeCycleEvent.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/LifeCycleEvent.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/LifeCycleEvent.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,33 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model.event.lifecycle;
-
-import org.jboss.portal.presentation.model.ModelEvent;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public abstract class LifeCycleEvent extends ModelEvent
-{
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/LifeCycleEvent.java (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/LifeCycleEvent.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/LifeCycleEvent.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/LifeCycleEvent.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,33 @@
+/******************************************************************************
+ * 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.presentation.model.event.lifecycle;
+
+import org.jboss.portal.presentation.model.ModelEvent;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public abstract class LifeCycleEvent extends ModelEvent
+{
+}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/ObjectAddedEvent.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/ObjectAddedEvent.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/ObjectAddedEvent.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,83 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model.event.lifecycle;
-
-import org.jboss.portal.presentation.model.UIObject;
-
-import java.util.Map;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public class ObjectAddedEvent extends ObjectLifeCycleEvent
-{
-
- /** . */
- private final String name;
-
- /** . */
- private final Class<? extends UIObject> type;
-
- /** . */
- private final Map<String, String> properties;
-
- public ObjectAddedEvent(String objectId, String name, Class<? extends UIObject> type, Map<String, String> properties)
- {
- super(objectId);
-
- //
- if (name == null)
- {
- throw new IllegalArgumentException();
- }
- if (type == null)
- {
- throw new IllegalArgumentException();
- }
- if (properties == null)
- {
- throw new IllegalArgumentException();
- }
-
- //
- this.name = name;
- this.type = type;
- this.properties = properties;
- }
-
- public String getName()
- {
- return name;
- }
-
- public Class<? extends UIObject> getType()
- {
- return type;
- }
-
- public Map<String, String> getProperties()
- {
- return properties;
- }
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/ObjectAddedEvent.java (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/ObjectAddedEvent.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/ObjectAddedEvent.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/ObjectAddedEvent.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,83 @@
+/******************************************************************************
+ * 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.presentation.model.event.lifecycle;
+
+import org.jboss.portal.presentation.model.UIObject;
+
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class ObjectAddedEvent extends ObjectLifeCycleEvent
+{
+
+ /** . */
+ private final String name;
+
+ /** . */
+ private final Class<? extends UIObject> type;
+
+ /** . */
+ private final Map<String, String> properties;
+
+ public ObjectAddedEvent(String objectId, String name, Class<? extends UIObject> type, Map<String, String> properties)
+ {
+ super(objectId);
+
+ //
+ if (name == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ if (type == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ if (properties == null)
+ {
+ throw new IllegalArgumentException();
+ }
+
+ //
+ this.name = name;
+ this.type = type;
+ this.properties = properties;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public Class<? extends UIObject> getType()
+ {
+ return type;
+ }
+
+ public Map<String, String> getProperties()
+ {
+ return properties;
+ }
+}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/ObjectLifeCycleEvent.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/ObjectLifeCycleEvent.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/ObjectLifeCycleEvent.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,50 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model.event.lifecycle;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public abstract class ObjectLifeCycleEvent extends LifeCycleEvent
-{
-
- /** . */
- private final String objectId;
-
- public ObjectLifeCycleEvent(String objectId)
- {
- if (objectId == null)
- {
- throw new IllegalArgumentException();
- }
-
- //
- this.objectId = objectId;
- }
-
- public String getObjectId()
- {
- return objectId;
- }
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/ObjectLifeCycleEvent.java (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/ObjectLifeCycleEvent.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/ObjectLifeCycleEvent.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/ObjectLifeCycleEvent.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,50 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.model.event.lifecycle;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public abstract class ObjectLifeCycleEvent extends LifeCycleEvent
+{
+
+ /** . */
+ private final String objectId;
+
+ public ObjectLifeCycleEvent(String objectId)
+ {
+ if (objectId == null)
+ {
+ throw new IllegalArgumentException();
+ }
+
+ //
+ this.objectId = objectId;
+ }
+
+ public String getObjectId()
+ {
+ return objectId;
+ }
+}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/ObjectRemovedEvent.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/ObjectRemovedEvent.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/ObjectRemovedEvent.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,35 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model.event.lifecycle;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public class ObjectRemovedEvent extends ObjectLifeCycleEvent
-{
- public ObjectRemovedEvent(String objectId)
- {
- super(objectId);
- }
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/ObjectRemovedEvent.java (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/ObjectRemovedEvent.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/ObjectRemovedEvent.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/ObjectRemovedEvent.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,35 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.model.event.lifecycle;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class ObjectRemovedEvent extends ObjectLifeCycleEvent
+{
+ public ObjectRemovedEvent(String objectId)
+ {
+ super(objectId);
+ }
+}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/RelationshipAddedEvent.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/RelationshipAddedEvent.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/RelationshipAddedEvent.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,35 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model.event.lifecycle;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public class RelationshipAddedEvent extends RelationshipLifeCycleEvent
-{
- public RelationshipAddedEvent(String parentId, String childId)
- {
- super(parentId, childId);
- }
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/RelationshipAddedEvent.java (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/RelationshipAddedEvent.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/RelationshipAddedEvent.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/RelationshipAddedEvent.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,35 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.model.event.lifecycle;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class RelationshipAddedEvent extends RelationshipLifeCycleEvent
+{
+ public RelationshipAddedEvent(String parentId, String childId)
+ {
+ super(parentId, childId);
+ }
+}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/RelationshipLifeCycleEvent.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/RelationshipLifeCycleEvent.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/RelationshipLifeCycleEvent.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,63 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model.event.lifecycle;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public abstract class RelationshipLifeCycleEvent extends LifeCycleEvent
-{
-
- /** . */
- private final String parentId;
-
- /** . */
- private final String childId;
-
- public RelationshipLifeCycleEvent(String parentId, String childId)
- {
- if (parentId == null)
- {
- throw new IllegalArgumentException();
- }
- if (childId == null)
- {
- throw new IllegalArgumentException();
- }
-
- //
- this.parentId = parentId;
- this.childId = childId;
- }
-
- public String getParentId()
- {
- return parentId;
- }
-
- public String getChildId()
- {
- return childId;
- }
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/RelationshipLifeCycleEvent.java (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/RelationshipLifeCycleEvent.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/RelationshipLifeCycleEvent.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/RelationshipLifeCycleEvent.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,63 @@
+/******************************************************************************
+ * 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.presentation.model.event.lifecycle;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public abstract class RelationshipLifeCycleEvent extends LifeCycleEvent
+{
+
+ /** . */
+ private final String parentId;
+
+ /** . */
+ private final String childId;
+
+ public RelationshipLifeCycleEvent(String parentId, String childId)
+ {
+ if (parentId == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ if (childId == null)
+ {
+ throw new IllegalArgumentException();
+ }
+
+ //
+ this.parentId = parentId;
+ this.childId = childId;
+ }
+
+ public String getParentId()
+ {
+ return parentId;
+ }
+
+ public String getChildId()
+ {
+ return childId;
+ }
+}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/RelationshipRemovedEvent.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/RelationshipRemovedEvent.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/RelationshipRemovedEvent.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,35 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model.event.lifecycle;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public class RelationshipRemovedEvent extends RelationshipLifeCycleEvent
-{
- public RelationshipRemovedEvent(String parentId, String childId)
- {
- super(parentId, childId);
- }
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/RelationshipRemovedEvent.java (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/RelationshipRemovedEvent.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/RelationshipRemovedEvent.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/RelationshipRemovedEvent.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,35 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.model.event.lifecycle;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class RelationshipRemovedEvent extends RelationshipLifeCycleEvent
+{
+ public RelationshipRemovedEvent(String parentId, String childId)
+ {
+ super(parentId, childId);
+ }
+}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state)
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/StateChange.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/StateChange.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/StateChange.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,77 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model.event.state;
-
-/**
- * A change in the state of the model. The change is the association of a target id and a modification.
- * The target id refers to an object in the structural state context and the modification is a modification
- * of its state. Note that the modification could also modify the state of other objects.
- *
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public final class StateChange<M extends StateModification>
-{
-
- /** . */
- private final String targetId;
-
- /** . */
- private final M modification;
-
- public StateChange(String targetId, M modification)
- {
- if (targetId == null)
- {
- throw new IllegalArgumentException();
- }
- if (modification == null)
- {
- throw new IllegalArgumentException();
- }
-
- //
- this.targetId = targetId;
- this.modification = modification;
- }
-
- /**
- * Returns the target id of the change.
- *
- * @return the target id
- */
- public String getTargetId()
- {
- return targetId;
- }
-
- /**
- * Returns the modification operated on the target id.
- *
- * @return the modification
- */
- public M getModification()
- {
- return modification;
- }
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/StateChange.java (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/StateChange.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/StateChange.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/StateChange.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,77 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.model.event.state;
+
+/**
+ * A change in the state of the model. The change is the association of a target id and a modification.
+ * The target id refers to an object in the structural state context and the modification is a modification
+ * of its state. Note that the modification could also modify the state of other objects.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public final class StateChange<M extends StateModification>
+{
+
+ /** . */
+ private final String targetId;
+
+ /** . */
+ private final M modification;
+
+ public StateChange(String targetId, M modification)
+ {
+ if (targetId == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ if (modification == null)
+ {
+ throw new IllegalArgumentException();
+ }
+
+ //
+ this.targetId = targetId;
+ this.modification = modification;
+ }
+
+ /**
+ * Returns the target id of the change.
+ *
+ * @return the target id
+ */
+ public String getTargetId()
+ {
+ return targetId;
+ }
+
+ /**
+ * Returns the modification operated on the target id.
+ *
+ * @return the modification
+ */
+ public M getModification()
+ {
+ return modification;
+ }
+}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/StateChangeEvent.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/StateChangeEvent.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/StateChangeEvent.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,60 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model.event.state;
-
-import org.jboss.portal.presentation.model.ModelEvent;
-import org.jboss.portal.presentation.model.event.state.StateChange;
-
-/**
- * Signals a state change occured.
- *
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public final class StateChangeEvent extends ModelEvent
-{
-
- /** . */
- private final StateChange change;
-
- public StateChangeEvent(StateChange change)
- {
- if (change == null)
- {
- throw new IllegalArgumentException();
- }
-
- //
- this.change = change;
- }
-
- /**
- * Returns the state change that occured.
- *
- * @return the state change
- */
- public StateChange getChange()
- {
- return change;
- }
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/StateChangeEvent.java (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/StateChangeEvent.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/StateChangeEvent.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/StateChangeEvent.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,60 @@
+/******************************************************************************
+ * 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.presentation.model.event.state;
+
+import org.jboss.portal.presentation.model.ModelEvent;
+import org.jboss.portal.presentation.model.event.state.StateChange;
+
+/**
+ * Signals a state change occured.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public final class StateChangeEvent extends ModelEvent
+{
+
+ /** . */
+ private final StateChange change;
+
+ public StateChangeEvent(StateChange change)
+ {
+ if (change == null)
+ {
+ throw new IllegalArgumentException();
+ }
+
+ //
+ this.change = change;
+ }
+
+ /**
+ * Returns the state change that occured.
+ *
+ * @return the state change
+ */
+ public StateChange getChange()
+ {
+ return change;
+ }
+}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/StateModification.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/StateModification.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/StateModification.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,33 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model.event.state;
-
-/**
- * An abstract class for the modification of state.
- *
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public abstract class StateModification
-{
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/StateModification.java (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/StateModification.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/StateModification.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/StateModification.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,33 @@
+/******************************************************************************
+ * 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.presentation.model.event.state;
+
+/**
+ * An abstract class for the modification of state.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public abstract class StateModification
+{
+}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/navigational (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/navigational)
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/navigational/NavigationalStateModification.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/navigational/NavigationalStateModification.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/navigational/NavigationalStateModification.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,61 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model.event.state.navigational;
-
-import org.jboss.portal.presentation.model.event.state.StateModification;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public final class NavigationalStateModification extends StateModification
-{
-
- /** . */
- private final String key;
-
- /** . */
- private final Object navigationalState;
-
- public NavigationalStateModification(String key, Object navigationalState)
- {
- if (key == null)
- {
- throw new IllegalArgumentException();
- }
-
- //
- this.key = key;
- this.navigationalState = navigationalState;
- }
-
- public String getKey()
- {
- return key;
- }
-
- public Object getNavigationalState()
- {
- return navigationalState;
- }
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/navigational/NavigationalStateModification.java (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/navigational/NavigationalStateModification.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/navigational/NavigationalStateModification.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/navigational/NavigationalStateModification.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,61 @@
+/******************************************************************************
+ * 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.presentation.model.event.state.navigational;
+
+import org.jboss.portal.presentation.model.event.state.StateModification;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public final class NavigationalStateModification extends StateModification
+{
+
+ /** . */
+ private final String key;
+
+ /** . */
+ private final Object navigationalState;
+
+ public NavigationalStateModification(String key, Object navigationalState)
+ {
+ if (key == null)
+ {
+ throw new IllegalArgumentException();
+ }
+
+ //
+ this.key = key;
+ this.navigationalState = navigationalState;
+ }
+
+ public String getKey()
+ {
+ return key;
+ }
+
+ public Object getNavigationalState()
+ {
+ return navigationalState;
+ }
+}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/structural (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/structural)
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/structural/StructuralStateModification.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/structural/StructuralStateModification.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/structural/StructuralStateModification.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,145 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model.event.state.structural;
-
-import org.jboss.portal.presentation.model.event.state.StateModification;
-import org.jboss.portal.presentation.model.UIObject;
-
-import java.util.Map;
-
-/**
- * Specification of state modification for structural state.
- *
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public abstract class StructuralStateModification extends StateModification
-{
-
- protected StructuralStateModification()
- {
- }
-
- /**
- * Destruction of an object.
- */
- public final static class Destruction extends StructuralStateModification
- {
- }
-
- public final static class Creation extends StructuralStateModification
- {
-
- /** . */
- private final Class<? extends UIObject> type;
-
- /** . */
- private final String name;
-
- /** . */
- private final Map<String, String> properties;
-
- public Creation(Class<? extends UIObject> type, String name, Map<String, String> properties)
- {
- this.type = type;
- this.name = name;
- this.properties = properties;
- }
-
- public Class<? extends UIObject> getType()
- {
- return type;
- }
-
- public String getName()
- {
- return name;
- }
-
- public Map<String, String> getProperties()
- {
- return properties;
- }
- }
-
- public final static class Move extends StructuralStateModification
- {
-
- /** . */
- private final String parentId;
-
- /** . */
- private final String destinationId;
-
- public Move(String parentId, String destinationId)
- {
- this.parentId = parentId;
- this.destinationId = destinationId;
- }
-
- public String getParentId()
- {
- return parentId;
- }
-
- public String getDestinationId()
- {
- return destinationId;
- }
- }
-
-
- /**
- * Update the properties portion of the state. The <code>Map</code> values are interpreted as follow:
- * <ul>
- * <li>Each non null value will replace an existing value of create a new one</li>
- * <li>Each null value will destroy an existing value</li>
- * </ul>
- */
- public final static class Update extends StructuralStateModification
- {
-
- /** . */
- private final Map<String, String> changes;
-
- public Update(Map<String, String> changes)
- {
- if (changes == null)
- {
- throw new IllegalArgumentException();
- }
-
- //
- this.changes = changes;
- }
-
- /**
- *
- * @return
- */
- public Map<String, String> getChanges()
- {
- return changes;
- }
- }
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/structural/StructuralStateModification.java (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/structural/StructuralStateModification.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/structural/StructuralStateModification.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/structural/StructuralStateModification.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,145 @@
+/******************************************************************************
+ * 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.presentation.model.event.state.structural;
+
+import org.jboss.portal.presentation.model.event.state.StateModification;
+import org.jboss.portal.presentation.model.UIObject;
+
+import java.util.Map;
+
+/**
+ * Specification of state modification for structural state.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public abstract class StructuralStateModification extends StateModification
+{
+
+ protected StructuralStateModification()
+ {
+ }
+
+ /**
+ * Destruction of an object.
+ */
+ public final static class Destruction extends StructuralStateModification
+ {
+ }
+
+ public final static class Creation extends StructuralStateModification
+ {
+
+ /** . */
+ private final Class<? extends UIObject> type;
+
+ /** . */
+ private final String name;
+
+ /** . */
+ private final Map<String, String> properties;
+
+ public Creation(Class<? extends UIObject> type, String name, Map<String, String> properties)
+ {
+ this.type = type;
+ this.name = name;
+ this.properties = properties;
+ }
+
+ public Class<? extends UIObject> getType()
+ {
+ return type;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public Map<String, String> getProperties()
+ {
+ return properties;
+ }
+ }
+
+ public final static class Move extends StructuralStateModification
+ {
+
+ /** . */
+ private final String parentId;
+
+ /** . */
+ private final String destinationId;
+
+ public Move(String parentId, String destinationId)
+ {
+ this.parentId = parentId;
+ this.destinationId = destinationId;
+ }
+
+ public String getParentId()
+ {
+ return parentId;
+ }
+
+ public String getDestinationId()
+ {
+ return destinationId;
+ }
+ }
+
+
+ /**
+ * Update the properties portion of the state. The <code>Map</code> values are interpreted as follow:
+ * <ul>
+ * <li>Each non null value will replace an existing value of create a new one</li>
+ * <li>Each null value will destroy an existing value</li>
+ * </ul>
+ */
+ public final static class Update extends StructuralStateModification
+ {
+
+ /** . */
+ private final Map<String, String> changes;
+
+ public Update(Map<String, String> changes)
+ {
+ if (changes == null)
+ {
+ throw new IllegalArgumentException();
+ }
+
+ //
+ this.changes = changes;
+ }
+
+ /**
+ *
+ * @return
+ */
+ public Map<String, String> getChanges()
+ {
+ return changes;
+ }
+ }
+}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state)
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/ConstraintViolationException.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/ConstraintViolationException.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/ConstraintViolationException.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,49 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model.state;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public class ConstraintViolationException extends StateException
-{
- public ConstraintViolationException()
- {
- }
-
- public ConstraintViolationException(String s)
- {
- super(s);
- }
-
- public ConstraintViolationException(String s, Throwable throwable)
- {
- super(s, throwable);
- }
-
- public ConstraintViolationException(Throwable throwable)
- {
- super(throwable);
- }
-}
\ No newline at end of file
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/ConstraintViolationException.java (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/ConstraintViolationException.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/ConstraintViolationException.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/ConstraintViolationException.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,49 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.model.state;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class ConstraintViolationException extends StateException
+{
+ public ConstraintViolationException()
+ {
+ }
+
+ public ConstraintViolationException(String s)
+ {
+ super(s);
+ }
+
+ public ConstraintViolationException(String s, Throwable throwable)
+ {
+ super(s, throwable);
+ }
+
+ public ConstraintViolationException(Throwable throwable)
+ {
+ super(throwable);
+ }
+}
\ No newline at end of file
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/NoSuchStateException.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/NoSuchStateException.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/NoSuchStateException.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,49 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model.state;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public class NoSuchStateException extends StateException
-{
- public NoSuchStateException()
- {
- }
-
- public NoSuchStateException(String s)
- {
- super(s);
- }
-
- public NoSuchStateException(String s, Throwable throwable)
- {
- super(s, throwable);
- }
-
- public NoSuchStateException(Throwable throwable)
- {
- super(throwable);
- }
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/NoSuchStateException.java (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/NoSuchStateException.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/NoSuchStateException.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/NoSuchStateException.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,49 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.model.state;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class NoSuchStateException extends StateException
+{
+ public NoSuchStateException()
+ {
+ }
+
+ public NoSuchStateException(String s)
+ {
+ super(s);
+ }
+
+ public NoSuchStateException(String s, Throwable throwable)
+ {
+ super(s, throwable);
+ }
+
+ public NoSuchStateException(Throwable throwable)
+ {
+ super(throwable);
+ }
+}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/StaleStateException.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/StaleStateException.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/StaleStateException.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,49 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model.state;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public class StaleStateException extends StateException
-{
- public StaleStateException()
- {
- }
-
- public StaleStateException(String s)
- {
- super(s);
- }
-
- public StaleStateException(String s, Throwable throwable)
- {
- super(s, throwable);
- }
-
- public StaleStateException(Throwable throwable)
- {
- super(throwable);
- }
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/StaleStateException.java (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/StaleStateException.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/StaleStateException.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/StaleStateException.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,49 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.model.state;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class StaleStateException extends StateException
+{
+ public StaleStateException()
+ {
+ }
+
+ public StaleStateException(String s)
+ {
+ super(s);
+ }
+
+ public StaleStateException(String s, Throwable throwable)
+ {
+ super(s, throwable);
+ }
+
+ public StaleStateException(Throwable throwable)
+ {
+ super(throwable);
+ }
+}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/StateChangeVetoException.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/StateChangeVetoException.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/StateChangeVetoException.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,49 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model.state;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public class StateChangeVetoException extends StateException
-{
- public StateChangeVetoException()
- {
- }
-
- public StateChangeVetoException(String s)
- {
- super(s);
- }
-
- public StateChangeVetoException(String s, Throwable throwable)
- {
- super(s, throwable);
- }
-
- public StateChangeVetoException(Throwable throwable)
- {
- super(throwable);
- }
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/StateChangeVetoException.java (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/StateChangeVetoException.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/StateChangeVetoException.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/StateChangeVetoException.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,49 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.model.state;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class StateChangeVetoException extends StateException
+{
+ public StateChangeVetoException()
+ {
+ }
+
+ public StateChangeVetoException(String s)
+ {
+ super(s);
+ }
+
+ public StateChangeVetoException(String s, Throwable throwable)
+ {
+ super(s, throwable);
+ }
+
+ public StateChangeVetoException(Throwable throwable)
+ {
+ super(throwable);
+ }
+}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/StateException.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/StateException.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/StateException.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,49 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model.state;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public class StateException extends RuntimeException
-{
- public StateException()
- {
- }
-
- public StateException(String s)
- {
- super(s);
- }
-
- public StateException(String s, Throwable throwable)
- {
- super(s, throwable);
- }
-
- public StateException(Throwable throwable)
- {
- super(throwable);
- }
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/StateException.java (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/StateException.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/StateException.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/StateException.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,49 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.model.state;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class StateException extends RuntimeException
+{
+ public StateException()
+ {
+ }
+
+ public StateException(String s)
+ {
+ super(s);
+ }
+
+ public StateException(String s, Throwable throwable)
+ {
+ super(s, throwable);
+ }
+
+ public StateException(Throwable throwable)
+ {
+ super(throwable);
+ }
+}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/navigational (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/navigational)
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/navigational/NavigationalStateContext.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/navigational/NavigationalStateContext.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/navigational/NavigationalStateContext.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,37 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model.state.navigational;
-
-import org.jboss.portal.presentation.model.state.StateException;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public interface NavigationalStateContext
-{
- Object get(String objectId, String key) throws IllegalArgumentException;
-
- void set(String objectId, String key, Object navigationalState) throws StateException, IllegalArgumentException;
-
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/navigational/NavigationalStateContext.java (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/navigational/NavigationalStateContext.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/navigational/NavigationalStateContext.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/navigational/NavigationalStateContext.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,37 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.model.state.navigational;
+
+import org.jboss.portal.presentation.model.state.StateException;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public interface NavigationalStateContext
+{
+ Object get(String objectId, String key) throws IllegalArgumentException;
+
+ void set(String objectId, String key, Object navigationalState) throws StateException, IllegalArgumentException;
+
+}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural)
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/AbstractStructuralStateContext.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/AbstractStructuralStateContext.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/AbstractStructuralStateContext.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,57 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model.state.structural;
-
-import org.jboss.portal.presentation.model.state.StateChangeVetoException;
-import org.jboss.portal.presentation.model.state.StateException;
-import org.jboss.portal.presentation.model.UIObject;
-
-import java.util.Map;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public abstract class AbstractStructuralStateContext implements StructuralStateContext
-{
-
- public StructuralObject.Creation create(StructuralObject parent, Class<? extends UIObject> type, String name, Map<String, String> properties) throws StateChangeVetoException, StateException, IllegalArgumentException
- {
- throw new StateChangeVetoException();
- }
-
- public StructuralObject.Destruction destroy(StructuralObject object) throws StateException, IllegalArgumentException
- {
- throw new StateChangeVetoException();
- }
-
- public StructuralObject.Move move(StructuralObject source, StructuralObject destination) throws StateException, IllegalArgumentException
- {
- throw new StateChangeVetoException();
- }
-
- public StructuralObject.Update update(StructuralObject object, Map<String, String> changes) throws StateException, IllegalArgumentException
- {
- throw new StateChangeVetoException();
- }
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/AbstractStructuralStateContext.java (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/AbstractStructuralStateContext.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/AbstractStructuralStateContext.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/AbstractStructuralStateContext.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,57 @@
+/******************************************************************************
+ * 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.presentation.model.state.structural;
+
+import org.jboss.portal.presentation.model.state.StateChangeVetoException;
+import org.jboss.portal.presentation.model.state.StateException;
+import org.jboss.portal.presentation.model.UIObject;
+
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public abstract class AbstractStructuralStateContext implements StructuralStateContext
+{
+
+ public StructuralObject.Creation create(StructuralObject parent, Class<? extends UIObject> type, String name, Map<String, String> properties) throws StateChangeVetoException, StateException, IllegalArgumentException
+ {
+ throw new StateChangeVetoException();
+ }
+
+ public StructuralObject.Destruction destroy(StructuralObject object) throws StateException, IllegalArgumentException
+ {
+ throw new StateChangeVetoException();
+ }
+
+ public StructuralObject.Move move(StructuralObject source, StructuralObject destination) throws StateException, IllegalArgumentException
+ {
+ throw new StateChangeVetoException();
+ }
+
+ public StructuralObject.Update update(StructuralObject object, Map<String, String> changes) throws StateException, IllegalArgumentException
+ {
+ throw new StateChangeVetoException();
+ }
+}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/StructuralObject.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/StructuralObject.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/StructuralObject.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,306 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model.state.structural;
-
-import java.util.List;
-import java.util.Set;
-import java.util.Map;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public interface StructuralObject
-{
-
- String getId();
-
- StructuralState getState();
-
- boolean compareTo(StructuralObject other);
-
- /**
- * A comparison between two structural objects.
- */
- public static class Refresh
- {
-
- /** . */
- private final StructuralObject parent;
-
- /** . */
- private final StructuralObject object;
-
- /** . */
- private final Set<StructuralObject> addedChildren;
-
- /** . */
- private final Set<String> removedChildren;
-
- /** . */
-// private final Set<String> destroyedChildren;
-
- /** . */
- private final Map<String, StructuralObject> staleChildren;
-
- /** . */
- private final Set<String> validChildren;
-
- public Refresh(
- StructuralObject parent,
- StructuralObject object,
- Set<StructuralObject> addedChildren,
- Set<String> removedChildren,
- Map<String, StructuralObject> staleChildren,
- Set<String> validChildren/*,
- Set<String> destroyedChildren*/)
- {
- if (addedChildren == null)
- {
- throw new IllegalArgumentException();
- }
- if (validChildren == null)
- {
- throw new IllegalArgumentException();
- }
- if (staleChildren == null)
- {
- throw new IllegalArgumentException();
- }
- if (removedChildren == null)
- {
- throw new IllegalArgumentException();
- }
-// if (destroyedChildren == null)
-// {
-// throw new IllegalArgumentException();
-// }
- this.parent = parent;
- this.object = object;
- this.addedChildren = addedChildren;
- this.validChildren = validChildren;
- this.staleChildren = staleChildren;
- this.removedChildren = removedChildren;
-// this.destroyedChildren = destroyedChildren;
- }
-
- public StructuralObject getParent()
- {
- return parent;
- }
-
- public StructuralObject getObject()
- {
- return object;
- }
-
-// public Set<String> getDestroyedChildren()
-// {
-// return destroyedChildren;
-// }
-
- public Set<StructuralObject> getAddedChildren()
- {
- return addedChildren;
- }
-
- public Map<String, StructuralObject> getStaleChildren()
- {
- return staleChildren;
- }
-
- public Set<String> getValidChildren()
- {
- return validChildren;
- }
-
- public Set<String> getRemovedChildren()
- {
- return removedChildren;
- }
- }
-
- public static class Change
- {
- }
-
- public static class Update extends Change
- {
-
- /** . */
- private final StructuralObject object;
-
- /** . */
- private final Map<String, String> changes;
-
- public Update(StructuralObject object, Map<String, String> changes)
- {
- if (object == null)
- {
- throw new IllegalArgumentException();
- }
- if (changes == null)
- {
- throw new IllegalArgumentException();
- }
-
- //
- this.object = object;
- this.changes = changes;
- }
-
- public StructuralObject getObject()
- {
- return object;
- }
-
- public Map<String, String> getChanges()
- {
- return changes;
- }
- }
-
- public static class Move extends Change
- {
-
- /** . */
- private final StructuralObject parent;
-
- /** . */
- private final StructuralObject source;
-
- /** . */
- private final StructuralObject destination;
-
- public Move(
- StructuralObject parent,
- StructuralObject source,
- StructuralObject destination)
- {
- if (parent == null)
- {
- throw new IllegalArgumentException();
- }
- if (source == null)
- {
- throw new IllegalArgumentException();
- }
- if (destination == null)
- {
- throw new IllegalArgumentException();
- }
-
- //
- this.parent = parent;
- this.source = source;
- this.destination = destination;
- }
-
- public StructuralObject getParent()
- {
- return parent;
- }
-
- public StructuralObject getSource()
- {
- return source;
- }
-
- public StructuralObject getDestination()
- {
- return destination;
- }
- }
-
- public static class Creation extends Change
- {
-
- /** . */
- private final StructuralObject child;
-
- /** . */
- private final StructuralObject parent;
-
- public Creation(StructuralObject parent, StructuralObject child)
- {
- if (parent == null)
- {
- throw new IllegalArgumentException();
- }
- if (child == null)
- {
- throw new IllegalArgumentException();
- }
-
- //
- this.parent = parent;
- this.child = child;
- }
-
- public StructuralObject getParent()
- {
- return parent;
- }
-
- public StructuralObject getChild()
- {
- return child;
- }
- }
-
- public static class Destruction extends Change
- {
-
- /** . */
- private final StructuralObject parent;
-
- /** . */
- private final List<String> ids;
-
- public Destruction(StructuralObject parent, List<String> ids)
- {
- if (parent == null)
- {
- throw new IllegalArgumentException();
- }
- if (ids == null)
- {
- throw new IllegalArgumentException();
- }
-
- //
- this.parent = parent;
- this.ids = ids;
- }
-
- public StructuralObject getParent()
- {
- return parent;
- }
-
- public List<String> getIds()
- {
- return ids;
- }
- }
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/StructuralObject.java (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/StructuralObject.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/StructuralObject.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/StructuralObject.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,306 @@
+/******************************************************************************
+ * 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.presentation.model.state.structural;
+
+import java.util.List;
+import java.util.Set;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public interface StructuralObject
+{
+
+ String getId();
+
+ StructuralState getState();
+
+ boolean compareTo(StructuralObject other);
+
+ /**
+ * A comparison between two structural objects.
+ */
+ public static class Refresh
+ {
+
+ /** . */
+ private final StructuralObject parent;
+
+ /** . */
+ private final StructuralObject object;
+
+ /** . */
+ private final Set<StructuralObject> addedChildren;
+
+ /** . */
+ private final Set<String> removedChildren;
+
+ /** . */
+// private final Set<String> destroyedChildren;
+
+ /** . */
+ private final Map<String, StructuralObject> staleChildren;
+
+ /** . */
+ private final Set<String> validChildren;
+
+ public Refresh(
+ StructuralObject parent,
+ StructuralObject object,
+ Set<StructuralObject> addedChildren,
+ Set<String> removedChildren,
+ Map<String, StructuralObject> staleChildren,
+ Set<String> validChildren/*,
+ Set<String> destroyedChildren*/)
+ {
+ if (addedChildren == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ if (validChildren == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ if (staleChildren == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ if (removedChildren == null)
+ {
+ throw new IllegalArgumentException();
+ }
+// if (destroyedChildren == null)
+// {
+// throw new IllegalArgumentException();
+// }
+ this.parent = parent;
+ this.object = object;
+ this.addedChildren = addedChildren;
+ this.validChildren = validChildren;
+ this.staleChildren = staleChildren;
+ this.removedChildren = removedChildren;
+// this.destroyedChildren = destroyedChildren;
+ }
+
+ public StructuralObject getParent()
+ {
+ return parent;
+ }
+
+ public StructuralObject getObject()
+ {
+ return object;
+ }
+
+// public Set<String> getDestroyedChildren()
+// {
+// return destroyedChildren;
+// }
+
+ public Set<StructuralObject> getAddedChildren()
+ {
+ return addedChildren;
+ }
+
+ public Map<String, StructuralObject> getStaleChildren()
+ {
+ return staleChildren;
+ }
+
+ public Set<String> getValidChildren()
+ {
+ return validChildren;
+ }
+
+ public Set<String> getRemovedChildren()
+ {
+ return removedChildren;
+ }
+ }
+
+ public static class Change
+ {
+ }
+
+ public static class Update extends Change
+ {
+
+ /** . */
+ private final StructuralObject object;
+
+ /** . */
+ private final Map<String, String> changes;
+
+ public Update(StructuralObject object, Map<String, String> changes)
+ {
+ if (object == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ if (changes == null)
+ {
+ throw new IllegalArgumentException();
+ }
+
+ //
+ this.object = object;
+ this.changes = changes;
+ }
+
+ public StructuralObject getObject()
+ {
+ return object;
+ }
+
+ public Map<String, String> getChanges()
+ {
+ return changes;
+ }
+ }
+
+ public static class Move extends Change
+ {
+
+ /** . */
+ private final StructuralObject parent;
+
+ /** . */
+ private final StructuralObject source;
+
+ /** . */
+ private final StructuralObject destination;
+
+ public Move(
+ StructuralObject parent,
+ StructuralObject source,
+ StructuralObject destination)
+ {
+ if (parent == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ if (source == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ if (destination == null)
+ {
+ throw new IllegalArgumentException();
+ }
+
+ //
+ this.parent = parent;
+ this.source = source;
+ this.destination = destination;
+ }
+
+ public StructuralObject getParent()
+ {
+ return parent;
+ }
+
+ public StructuralObject getSource()
+ {
+ return source;
+ }
+
+ public StructuralObject getDestination()
+ {
+ return destination;
+ }
+ }
+
+ public static class Creation extends Change
+ {
+
+ /** . */
+ private final StructuralObject child;
+
+ /** . */
+ private final StructuralObject parent;
+
+ public Creation(StructuralObject parent, StructuralObject child)
+ {
+ if (parent == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ if (child == null)
+ {
+ throw new IllegalArgumentException();
+ }
+
+ //
+ this.parent = parent;
+ this.child = child;
+ }
+
+ public StructuralObject getParent()
+ {
+ return parent;
+ }
+
+ public StructuralObject getChild()
+ {
+ return child;
+ }
+ }
+
+ public static class Destruction extends Change
+ {
+
+ /** . */
+ private final StructuralObject parent;
+
+ /** . */
+ private final List<String> ids;
+
+ public Destruction(StructuralObject parent, List<String> ids)
+ {
+ if (parent == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ if (ids == null)
+ {
+ throw new IllegalArgumentException();
+ }
+
+ //
+ this.parent = parent;
+ this.ids = ids;
+ }
+
+ public StructuralObject getParent()
+ {
+ return parent;
+ }
+
+ public List<String> getIds()
+ {
+ return ids;
+ }
+ }
+}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/StructuralState.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/StructuralState.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/StructuralState.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,43 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model.state.structural;
-
-import org.jboss.portal.presentation.model.UIObject;
-
-import java.util.Map;
-
-/**
- * The structural state.
- *
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public interface StructuralState
-{
-
- Class<? extends UIObject> getType();
-
- String getName();
-
- Map<String, String> getProperties();
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/StructuralState.java (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/StructuralState.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/StructuralState.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/StructuralState.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,43 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.model.state.structural;
+
+import org.jboss.portal.presentation.model.UIObject;
+
+import java.util.Map;
+
+/**
+ * The structural state.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public interface StructuralState
+{
+
+ Class<? extends UIObject> getType();
+
+ String getName();
+
+ Map<String, String> getProperties();
+}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/StructuralStateContext.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/StructuralStateContext.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/StructuralStateContext.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,144 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model.state.structural;
-
-import org.jboss.portal.presentation.model.UIObject;
-import org.jboss.portal.presentation.model.state.StateChangeVetoException;
-import org.jboss.portal.presentation.model.state.StateException;
-
-import java.util.Map;
-import java.util.Collection;
-
-/**
- * The structural state context.
- *
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public interface StructuralStateContext
-{
-
- /**
- * Load the state of the specified object.
- *
- * @param objectId the object id
- * @return the state of the object or null if such state does not exist
- * @throws IllegalArgumentException if the object id argument is null
- */
- StructuralObject load(String objectId) throws IllegalArgumentException;
-
- /**
- * Load the children of the provided object.
- *
- * @param parent the parent
- * @return the list of children as structural objects
- * @throws IllegalArgumentException if the provided object is null
- * @throws StateException any useful exception that would make the object non valid
- */
- Collection<StructuralObject> loadChildren(StructuralObject parent) throws IllegalArgumentException, StateException;
-
- /**
- * Load the parent of the specified object.
- *
- * @param child the child
- * @return the parent or null if it does not exist
- * @throws IllegalArgumentException if the provided object is null
- * @throws StateException any useful exception that would make the object non valid
- */
- StructuralObject loadParent(StructuralObject child) throws IllegalArgumentException, StateException;
-
- /**
- * Returns the id of the root object.
- *
- * @return the id of the root object.
- */
- String getRootId();
-
- /**
- * Validate the state of the provided object. The operation is idempotent and does not modify any state.
- * If validation is succesfull the method returns otherwise it throws an exception that indicates
- * the nature of the non validation failure.
- *
- * @param object the object to check
- * @throws IllegalArgumentException if the provided object is null
- * @throws StateException any useful exception that would make the object non valid
- */
- void validate(StructuralObject object) throws IllegalArgumentException, StateException;
-
- /**
- * Attempt to return an object that contains the difference between the provided object
- * and the up to date object.
- *
- * @param object the object to refresh
- * @return the refresh
- * @throws IllegalArgumentException if the object argument is null
- * @throws StateException if the object cannot be refreshed
- */
- StructuralObject.Refresh refresh(StructuralObject object) throws IllegalArgumentException, StateException;
-
- /**
- * Create an object.
- *
- * @param parent the parent
- * @param type the type of the child
- * @param name the name of the child
- * @param properties the initial properties of the child @return the id of the newly created structural state
- * @return the creation object
- * @throws IllegalArgumentException if an argument is null or not valid
- * @throws StateException if the provided state prevents the operation to be done
- */
- StructuralObject.Creation create(StructuralObject parent, Class<? extends UIObject> type, String name, Map<String, String> properties) throws StateException, IllegalArgumentException;
-
- /**
- * Destroy a specified object.
- *
- * @param object the object to destroy
- * @return the destruction object
- * @throws IllegalArgumentException if an argument is null or not valid
- * @throws StateException if the provided state prevents the operation to be done
- */
- StructuralObject.Destruction destroy(StructuralObject object) throws IllegalArgumentException, StateException;
-
- /**
- * Move an object to a new parent.
- *
- * @param source the source object
- * @param destination the destination object
- * @return the move object
- * @throws IllegalArgumentException if an argument is null or not valid
- * @throws StateException if the provided state prevents the operation to be done
- */
- StructuralObject.Move move(StructuralObject source, StructuralObject destination) throws IllegalArgumentException, StateException;
-
- /**
- * Update the state of a specified object.
- *
- * @param object the object to udpate
- * @param changes the changes
- * @throws StateChangeVetoException if the creation is vetoed
- * @return the update object
- * @throws IllegalArgumentException if an argument is null or not valid
- * @throws StateException if the provided state prevents the operation to be done
- */
- StructuralObject.Update update(StructuralObject object, Map<String, String> changes) throws IllegalArgumentException, StateException;
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/StructuralStateContext.java (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/StructuralStateContext.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/StructuralStateContext.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/StructuralStateContext.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,144 @@
+/******************************************************************************
+ * 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.presentation.model.state.structural;
+
+import org.jboss.portal.presentation.model.UIObject;
+import org.jboss.portal.presentation.model.state.StateChangeVetoException;
+import org.jboss.portal.presentation.model.state.StateException;
+
+import java.util.Map;
+import java.util.Collection;
+
+/**
+ * The structural state context.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public interface StructuralStateContext
+{
+
+ /**
+ * Load the state of the specified object.
+ *
+ * @param objectId the object id
+ * @return the state of the object or null if such state does not exist
+ * @throws IllegalArgumentException if the object id argument is null
+ */
+ StructuralObject load(String objectId) throws IllegalArgumentException;
+
+ /**
+ * Load the children of the provided object.
+ *
+ * @param parent the parent
+ * @return the list of children as structural objects
+ * @throws IllegalArgumentException if the provided object is null
+ * @throws StateException any useful exception that would make the object non valid
+ */
+ Collection<StructuralObject> loadChildren(StructuralObject parent) throws IllegalArgumentException, StateException;
+
+ /**
+ * Load the parent of the specified object.
+ *
+ * @param child the child
+ * @return the parent or null if it does not exist
+ * @throws IllegalArgumentException if the provided object is null
+ * @throws StateException any useful exception that would make the object non valid
+ */
+ StructuralObject loadParent(StructuralObject child) throws IllegalArgumentException, StateException;
+
+ /**
+ * Returns the id of the root object.
+ *
+ * @return the id of the root object.
+ */
+ String getRootId();
+
+ /**
+ * Validate the state of the provided object. The operation is idempotent and does not modify any state.
+ * If validation is succesfull the method returns otherwise it throws an exception that indicates
+ * the nature of the non validation failure.
+ *
+ * @param object the object to check
+ * @throws IllegalArgumentException if the provided object is null
+ * @throws StateException any useful exception that would make the object non valid
+ */
+ void validate(StructuralObject object) throws IllegalArgumentException, StateException;
+
+ /**
+ * Attempt to return an object that contains the difference between the provided object
+ * and the up to date object.
+ *
+ * @param object the object to refresh
+ * @return the refresh
+ * @throws IllegalArgumentException if the object argument is null
+ * @throws StateException if the object cannot be refreshed
+ */
+ StructuralObject.Refresh refresh(StructuralObject object) throws IllegalArgumentException, StateException;
+
+ /**
+ * Create an object.
+ *
+ * @param parent the parent
+ * @param type the type of the child
+ * @param name the name of the child
+ * @param properties the initial properties of the child @return the id of the newly created structural state
+ * @return the creation object
+ * @throws IllegalArgumentException if an argument is null or not valid
+ * @throws StateException if the provided state prevents the operation to be done
+ */
+ StructuralObject.Creation create(StructuralObject parent, Class<? extends UIObject> type, String name, Map<String, String> properties) throws StateException, IllegalArgumentException;
+
+ /**
+ * Destroy a specified object.
+ *
+ * @param object the object to destroy
+ * @return the destruction object
+ * @throws IllegalArgumentException if an argument is null or not valid
+ * @throws StateException if the provided state prevents the operation to be done
+ */
+ StructuralObject.Destruction destroy(StructuralObject object) throws IllegalArgumentException, StateException;
+
+ /**
+ * Move an object to a new parent.
+ *
+ * @param source the source object
+ * @param destination the destination object
+ * @return the move object
+ * @throws IllegalArgumentException if an argument is null or not valid
+ * @throws StateException if the provided state prevents the operation to be done
+ */
+ StructuralObject.Move move(StructuralObject source, StructuralObject destination) throws IllegalArgumentException, StateException;
+
+ /**
+ * Update the state of a specified object.
+ *
+ * @param object the object to udpate
+ * @param changes the changes
+ * @throws StateChangeVetoException if the creation is vetoed
+ * @return the update object
+ * @throws IllegalArgumentException if an argument is null or not valid
+ * @throws StateException if the provided state prevents the operation to be done
+ */
+ StructuralObject.Update update(StructuralObject object, Map<String, String> changes) throws IllegalArgumentException, StateException;
+}
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/UIObject.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/UIObject.java 2008-04-17 13:37:34 UTC (rev 10621)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/UIObject.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -22,7 +22,7 @@
******************************************************************************/
package org.jboss.portal.presentation.model2;
-import org.jboss.portal.presentation.toremove.model.state.StateException;
+import org.jboss.portal.presentation.model.state.StateException;
import org.jboss.portal.presentation.state.StateType;
import java.util.Set;
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/ui/UIAction.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/ui/UIAction.java 2008-04-17 13:37:34 UTC (rev 10621)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/ui/UIAction.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -22,7 +22,7 @@
******************************************************************************/
package org.jboss.portal.presentation.model2.ui;
-import org.jboss.portal.presentation.toremove.model.UIObject;
+import org.jboss.portal.presentation.model.UIObject;
/**
* An action that can be triggered.
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/MoveUIObjectAction.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/MoveUIObjectAction.java 2008-04-17 13:37:34 UTC (rev 10621)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/MoveUIObjectAction.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -22,7 +22,7 @@
******************************************************************************/
package org.jboss.portal.presentation.protocol;
-import org.jboss.portal.presentation.toremove.model.UIObject;
+import org.jboss.portal.presentation.model.UIObject;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server)
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/PresentationServer.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/PresentationServer.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/PresentationServer.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,57 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.server;
-
-import org.jboss.portal.presentation.client.PresentationContext;
-import org.jboss.portal.presentation.model.UIWindow;
-import org.jboss.portal.presentation.model.content.WindowContent;
-import org.jboss.portal.presentation.model.state.structural.StructuralStateContext;
-
-/**
- * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
- *
- */
-public interface PresentationServer
-{
- /**
- *
- * @return
- */
- Processor getProcessor();
-
- /**
- * Obtain the markup.
- *
- * @param context the request context
- * @param window the window to get markup for
- * @return the markup of the window
- * @throws Exception for now a generic exception
- */
- WindowContent render(PresentationContext context, UIWindow window) throws Exception;
-
- /**
- *
- * @return
- */
- StructuralStateContext getStructuralStateManager();
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/PresentationServer.java (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/PresentationServer.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/PresentationServer.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/PresentationServer.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,57 @@
+/******************************************************************************
+ * 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.presentation.server;
+
+import org.jboss.portal.presentation.client.PresentationContext;
+import org.jboss.portal.presentation.model.UIWindow;
+import org.jboss.portal.presentation.model.content.WindowContent;
+import org.jboss.portal.presentation.model.state.structural.StructuralStateContext;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public interface PresentationServer
+{
+ /**
+ *
+ * @return
+ */
+ Processor getProcessor();
+
+ /**
+ * Obtain the markup.
+ *
+ * @param context the request context
+ * @param window the window to get markup for
+ * @return the markup of the window
+ * @throws Exception for now a generic exception
+ */
+ WindowContent render(PresentationContext context, UIWindow window) throws Exception;
+
+ /**
+ *
+ * @return
+ */
+ StructuralStateContext getStructuralStateManager();
+}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/Processor.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/Processor.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/Processor.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,43 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.server;
-
-import org.jboss.portal.presentation.client.PresentationContext;
-
-/**
- * UIServer calls the Processor to hand it
- * processing of an incoming Portal Request using the protocol between the two components encapsulated by the
- * ProcessorRequest object
- *
- * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
- *
- */
-public interface Processor
-{
- /**
- *
- * @param request
- * @throws ServerException
- */
- public ProcessorResponse process(PresentationContext presentationContext,ProcessorRequest request) throws ServerException;
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/Processor.java (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/Processor.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/Processor.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/Processor.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,43 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.server;
+
+import org.jboss.portal.presentation.client.PresentationContext;
+
+/**
+ * UIServer calls the Processor to hand it
+ * processing of an incoming Portal Request using the protocol between the two components encapsulated by the
+ * ProcessorRequest object
+ *
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public interface Processor
+{
+ /**
+ *
+ * @param request
+ * @throws ServerException
+ */
+ public ProcessorResponse process(PresentationContext presentationContext,ProcessorRequest request) throws ServerException;
+}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/ProcessorRequest.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/ProcessorRequest.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/ProcessorRequest.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,81 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.server;
-
-import java.io.Serializable;
-
-import org.jboss.portal.presentation.protocol.ProtocolAction;
-
-
-/**
- * ProcessorRequest is used to communicate information from the UIServer to the core Portal for it to process the incoming Portal request.
- *
- * This object is part of the protocol between the UIServer and the core
- *
- * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
- *
- */
-public class ProcessorRequest implements Serializable
-{
- /**
- * The Portal action to be performed
- */
- private ProtocolAction action = null;
-
- /**
- *
- *
- */
- public ProcessorRequest(ProtocolAction action)
- {
- this.action = action;
- }
-
- /**
- *
- * @return
- */
- public ProtocolAction getAction()
- {
- return action;
- }
-
- /**
- *
- * @param action
- */
- public void setAction(ProtocolAction action)
- {
- this.action = action;
- }
-
- /**
- *
- */
- public String toString()
- {
- StringBuffer buffer = new StringBuffer();
- buffer.append("[action="+this.action+"]");
- return buffer.toString();
- }
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/ProcessorRequest.java (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/ProcessorRequest.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/ProcessorRequest.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/ProcessorRequest.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,81 @@
+/******************************************************************************
+ * 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.presentation.server;
+
+import java.io.Serializable;
+
+import org.jboss.portal.presentation.protocol.ProtocolAction;
+
+
+/**
+ * ProcessorRequest is used to communicate information from the UIServer to the core Portal for it to process the incoming Portal request.
+ *
+ * This object is part of the protocol between the UIServer and the core
+ *
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class ProcessorRequest implements Serializable
+{
+ /**
+ * The Portal action to be performed
+ */
+ private ProtocolAction action = null;
+
+ /**
+ *
+ *
+ */
+ public ProcessorRequest(ProtocolAction action)
+ {
+ this.action = action;
+ }
+
+ /**
+ *
+ * @return
+ */
+ public ProtocolAction getAction()
+ {
+ return action;
+ }
+
+ /**
+ *
+ * @param action
+ */
+ public void setAction(ProtocolAction action)
+ {
+ this.action = action;
+ }
+
+ /**
+ *
+ */
+ public String toString()
+ {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("[action="+this.action+"]");
+ return buffer.toString();
+ }
+}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/ProcessorResponse.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/ProcessorResponse.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/ProcessorResponse.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,113 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.server;
-
-import java.io.Serializable;
-
-import org.jboss.portal.presentation.protocol.ProtocolResponse;
-
-/**
- * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
- *
- */
-public class ProcessorResponse implements Serializable
-{
- /**
- * type of content to be sent back to the client
- */
- private String contentType = null;
-
- /**
- * character set to be used
- */
- private String characterSet = null;
-
- /**
- * The ServerResponse generated by processing the ProcessorRequest by the Processor
- */
- private ProtocolResponse response = null;
-
- /**
- *
- * @param dispatcher
- * @param updatedPages
- */
- public ProcessorResponse(ProtocolResponse response)
- {
- this.response = response;
- }
-
- /**
- *
- * @return
- */
- public ProtocolResponse getResponse()
- {
- return response;
- }
-
- /**
- *
- * @param response
- */
- public void setResponse(ProtocolResponse response)
- {
- this.response = response;
- }
-
- /**
- *
- * @return
- */
- public String getCharacterSet()
- {
- return characterSet;
- }
-
- /**
- *
- * @param characterSet
- */
- public void setCharacterSet(String characterSet)
- {
- this.characterSet = characterSet;
- }
-
- /**
- *
- * @return
- */
- public String getContentType()
- {
- return contentType;
- }
-
- /**
- *
- * @param contentType
- */
- public void setContentType(String contentType)
- {
- this.contentType = contentType;
- }
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/ProcessorResponse.java (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/ProcessorResponse.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/ProcessorResponse.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/ProcessorResponse.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,113 @@
+/******************************************************************************
+ * 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.presentation.server;
+
+import java.io.Serializable;
+
+import org.jboss.portal.presentation.protocol.ProtocolResponse;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class ProcessorResponse implements Serializable
+{
+ /**
+ * type of content to be sent back to the client
+ */
+ private String contentType = null;
+
+ /**
+ * character set to be used
+ */
+ private String characterSet = null;
+
+ /**
+ * The ServerResponse generated by processing the ProcessorRequest by the Processor
+ */
+ private ProtocolResponse response = null;
+
+ /**
+ *
+ * @param dispatcher
+ * @param updatedPages
+ */
+ public ProcessorResponse(ProtocolResponse response)
+ {
+ this.response = response;
+ }
+
+ /**
+ *
+ * @return
+ */
+ public ProtocolResponse getResponse()
+ {
+ return response;
+ }
+
+ /**
+ *
+ * @param response
+ */
+ public void setResponse(ProtocolResponse response)
+ {
+ this.response = response;
+ }
+
+ /**
+ *
+ * @return
+ */
+ public String getCharacterSet()
+ {
+ return characterSet;
+ }
+
+ /**
+ *
+ * @param characterSet
+ */
+ public void setCharacterSet(String characterSet)
+ {
+ this.characterSet = characterSet;
+ }
+
+ /**
+ *
+ * @return
+ */
+ public String getContentType()
+ {
+ return contentType;
+ }
+
+ /**
+ *
+ * @param contentType
+ */
+ public void setContentType(String contentType)
+ {
+ this.contentType = contentType;
+ }
+}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/ServerException.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/ServerException.java 2008-04-17 12:40:29 UTC (rev 10615)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/ServerException.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -1,49 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.server;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 8784 $
- */
-public class ServerException extends Exception
-{
- public ServerException()
- {
- }
-
- public ServerException(String message)
- {
- super(message);
- }
-
- public ServerException(String message, Throwable cause)
- {
- super(message, cause);
- }
-
- public ServerException(Throwable cause)
- {
- super(cause);
- }
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/ServerException.java (from rev 10615, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/ServerException.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/ServerException.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/ServerException.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -0,0 +1,49 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.server;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 8784 $
+ */
+public class ServerException extends Exception
+{
+ public ServerException()
+ {
+ }
+
+ public ServerException(String message)
+ {
+ super(message);
+ }
+
+ public ServerException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+ public ServerException(Throwable cause)
+ {
+ super(cause);
+ }
+}
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server2/PresentationServer.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server2/PresentationServer.java 2008-04-17 13:37:34 UTC (rev 10621)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server2/PresentationServer.java 2008-04-17 13:51:42 UTC (rev 10622)
@@ -23,8 +23,8 @@
package org.jboss.portal.presentation.server2;
import org.jboss.portal.presentation.state.structural.StructuralStateContext;
-import org.jboss.portal.presentation.content.WindowContent;
-import org.jboss.portal.presentation.client.PresentationClient;
+import org.jboss.portal.presentation.model.content.WindowContent;
+import org.jboss.portal.presentation.client2.PresentationClient;
import org.jboss.portal.presentation.protocol.ProtocolAction;
/**
18 years
JBoss Portal SVN: r10621 - in branches/JBoss_Portal_Branch_2_7: faces/src/main/org/jboss/portal/faces/component/portlet and 1 other directory.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-04-17 09:37:34 -0400 (Thu, 17 Apr 2008)
New Revision: 10621
Modified:
branches/JBoss_Portal_Branch_2_7/build/build.xml
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/JSFInvocation.java
Log:
- Deploy-all should deploy all
- minor
Modified: branches/JBoss_Portal_Branch_2_7/build/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/build/build.xml 2008-04-17 13:26:47 UTC (rev 10620)
+++ branches/JBoss_Portal_Branch_2_7/build/build.xml 2008-04-17 13:37:34 UTC (rev 10621)
@@ -292,7 +292,7 @@
<require file="${jboss.home}/server/${portal.deploy.dir}"/>
<copy file="../core/output/lib/jboss-portal.sar" todir="${jboss.home}/server/${portal.deploy.dir}" overwrite="true"/>
<copy file="../core-admin/output/lib/portal-admin.sar" todir="${jboss.home}/server/${portal.deploy.dir}" overwrite="true"/>
- <!--copy file="../core-cms/output/lib/portal-cms.sar" todir="${jboss.home}/server/${portal.deploy.dir}" overwrite="true"/-->
+ <copy file="../core-cms/output/lib/portal-cms.sar" todir="${jboss.home}/server/${portal.deploy.dir}" overwrite="true"/>
<copy file="../core-identity/output/lib/portal-identity.sar" todir="${jboss.home}/server/${portal.deploy.dir}" overwrite="true"/>
<copy file="../workflow/output/lib/portal-workflow.sar" todir="${jboss.home}/server/${portal.deploy.dir}" overwrite="true"/>
<copy file="../core-management/output/lib/portal-management.sar" todir="${jboss.home}/server/${portal.deploy.dir}" overwrite="true"/>
Modified: branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/JSFInvocation.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/JSFInvocation.java 2008-04-17 13:26:47 UTC (rev 10620)
+++ branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/component/portlet/JSFInvocation.java 2008-04-17 13:37:34 UTC (rev 10621)
@@ -24,7 +24,6 @@
import org.jboss.portal.Mode;
import org.jboss.portal.WindowState;
-import org.jboss.portal.common.invocation.EmptyAttributeResolver;
import org.jboss.portal.common.invocation.resolver.MapAttributeResolver;
import org.jboss.portal.common.invocation.resolver.PrincipalAttributeResolver;
import org.jboss.portal.common.net.media.MediaType;
18 years
JBoss Portal SVN: r10620 - in modules/presentation/trunk: ajax/src/main/java/org/jboss/portal/presentation/toremove/client and 18 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-04-17 09:26:47 -0400 (Thu, 17 Apr 2008)
New Revision: 10620
Added:
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/ModelEvent.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/ModelListener.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/StateType.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/UIAction.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/UIContainer.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/UIContext.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/UIObject.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/UIPage.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/UIPortal.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/UIWindow.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/event/
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/state/
Removed:
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/ModelEvent.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/ModelListener.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/StateType.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/UIAction.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/UIContainer.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/UIContext.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/UIObject.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/UIPage.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/UIPortal.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/UIWindow.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/content/
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/event/
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/state/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/
Modified:
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/client/PresentationContext.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/UIContainerImpl.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/UIContextImpl.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/UIObjectImpl.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/UIPageImpl.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/UIPortalImpl.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/UIWindowImpl.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/container/ManagedObject.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/container/ObjectContext.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/container/RelationshipContext.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/container/UIObjectContainer.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/container/spi/UIContainerObject.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/container/spi/UIObjectContext.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/container/spi/UIObjectFactory.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/state/navigational/NavigationalStateContextImpl.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/event/lifecycle/LifeCycleEvent.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/event/lifecycle/ObjectAddedEvent.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/event/lifecycle/ObjectLifeCycleEvent.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/event/lifecycle/ObjectRemovedEvent.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/event/lifecycle/RelationshipAddedEvent.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/event/lifecycle/RelationshipLifeCycleEvent.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/event/lifecycle/RelationshipRemovedEvent.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/event/state/StateChange.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/event/state/StateChangeEvent.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/event/state/StateModification.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/event/state/navigational/NavigationalStateModification.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/event/state/structural/StructuralStateModification.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/state/ConstraintViolationException.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/state/NoSuchStateException.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/state/StaleStateException.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/state/StateChangeVetoException.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/state/StateException.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/state/navigational/NavigationalStateContext.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/state/structural/AbstractStructuralStateContext.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/state/structural/StructuralObject.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/state/structural/StructuralState.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/state/structural/StructuralStateContext.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/server/PresentationServer.java
modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/plugin/MainProcessor.java
modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/plugin/PresentationServerImpl.java
modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/plugin/StructuralObjectImpl.java
modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/plugin/StructuralStateContextImpl.java
modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/plugin/StructuralStateImpl.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/UIObject.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/ui/UIAction.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/MoveUIObjectAction.java
Log:
move previous model package to ajax where it is still used
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/client/PresentationContext.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/client/PresentationContext.java 2008-04-17 13:23:31 UTC (rev 10619)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/client/PresentationContext.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -23,7 +23,7 @@
package org.jboss.portal.presentation.client;
import org.jboss.portal.presentation.protocol.ProtocolAction;
-import org.jboss.portal.presentation.model.UIContext;
+import org.jboss.portal.presentation.toremove.model.UIContext;
import org.jboss.portal.web.ServletContextDispatcher;
/**
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/UIContainerImpl.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/UIContainerImpl.java 2008-04-17 13:23:31 UTC (rev 10619)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/UIContainerImpl.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -22,7 +22,7 @@
******************************************************************************/
package org.jboss.portal.presentation.impl.model;
-import org.jboss.portal.presentation.model.UIContainer;
+import org.jboss.portal.presentation.toremove.model.UIContainer;
/**
* @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/UIContextImpl.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/UIContextImpl.java 2008-04-17 13:23:31 UTC (rev 10619)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/UIContextImpl.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -22,9 +22,9 @@
******************************************************************************/
package org.jboss.portal.presentation.impl.model;
-import org.jboss.portal.presentation.model.UIObject;
-import org.jboss.portal.presentation.model.UIContext;
-import org.jboss.portal.presentation.model.ModelListener;
+import org.jboss.portal.presentation.toremove.model.UIObject;
+import org.jboss.portal.presentation.toremove.model.UIContext;
+import org.jboss.portal.presentation.toremove.model.ModelListener;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/UIObjectImpl.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/UIObjectImpl.java 2008-04-17 13:23:31 UTC (rev 10619)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/UIObjectImpl.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -22,10 +22,10 @@
******************************************************************************/
package org.jboss.portal.presentation.impl.model;
-import org.jboss.portal.presentation.model.UIObject;
-import org.jboss.portal.presentation.model.StateType;
-import org.jboss.portal.presentation.model.state.StateException;
-import org.jboss.portal.presentation.model.state.StateChangeVetoException;
+import org.jboss.portal.presentation.toremove.model.UIObject;
+import org.jboss.portal.presentation.toremove.model.StateType;
+import org.jboss.portal.presentation.toremove.model.state.StateException;
+import org.jboss.portal.presentation.toremove.model.state.StateChangeVetoException;
import org.jboss.portal.presentation.impl.model.container.spi.UIContainerObject;
import org.jboss.portal.presentation.impl.model.container.spi.UIObjectContext;
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/UIPageImpl.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/UIPageImpl.java 2008-04-17 13:23:31 UTC (rev 10619)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/UIPageImpl.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -22,7 +22,7 @@
******************************************************************************/
package org.jboss.portal.presentation.impl.model;
-import org.jboss.portal.presentation.model.UIPage;
+import org.jboss.portal.presentation.toremove.model.UIPage;
/**
* @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/UIPortalImpl.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/UIPortalImpl.java 2008-04-17 13:23:31 UTC (rev 10619)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/UIPortalImpl.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -22,7 +22,7 @@
******************************************************************************/
package org.jboss.portal.presentation.impl.model;
-import org.jboss.portal.presentation.model.UIPortal;
+import org.jboss.portal.presentation.toremove.model.UIPortal;
/**
* @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/UIWindowImpl.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/UIWindowImpl.java 2008-04-17 13:23:31 UTC (rev 10619)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/UIWindowImpl.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -24,8 +24,8 @@
import org.jboss.portal.Mode;
import org.jboss.portal.WindowState;
-import org.jboss.portal.presentation.model.StateType;
-import org.jboss.portal.presentation.model.UIWindow;
+import org.jboss.portal.presentation.toremove.model.StateType;
+import org.jboss.portal.presentation.toremove.model.UIWindow;
/**
* @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/container/ManagedObject.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/container/ManagedObject.java 2008-04-17 13:23:31 UTC (rev 10619)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/container/ManagedObject.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -22,23 +22,21 @@
******************************************************************************/
package org.jboss.portal.presentation.impl.model.container;
-import org.jboss.portal.presentation.model.StateType;
-import org.jboss.portal.presentation.model.UIObject;
-import org.jboss.portal.presentation.model.event.state.StateChange;
-import org.jboss.portal.presentation.model.event.state.StateChangeEvent;
-import org.jboss.portal.presentation.model.event.state.navigational.NavigationalStateModification;
-import org.jboss.portal.presentation.model.state.StateChangeVetoException;
-import org.jboss.portal.presentation.model.state.StateException;
-import org.jboss.portal.presentation.model.state.structural.StructuralObject;
-import org.jboss.portal.presentation.model.state.structural.StructuralState;
+import org.jboss.portal.presentation.toremove.model.StateType;
+import org.jboss.portal.presentation.toremove.model.UIObject;
+import org.jboss.portal.presentation.toremove.model.event.state.StateChange;
+import org.jboss.portal.presentation.toremove.model.event.state.StateChangeEvent;
+import org.jboss.portal.presentation.toremove.model.event.state.navigational.NavigationalStateModification;
+import org.jboss.portal.presentation.toremove.model.state.StateChangeVetoException;
+import org.jboss.portal.presentation.toremove.model.state.StateException;
+import org.jboss.portal.presentation.toremove.model.state.structural.StructuralObject;
+import org.jboss.portal.presentation.toremove.model.state.structural.StructuralState;
import org.jboss.portal.presentation.impl.model.container.spi.UIContainerObject;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Collection;
-import java.io.StringWriter;
-import java.io.PrintWriter;
/**
* Implement base fonctionnality of the <code>UIObject</code> interface.
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/container/ObjectContext.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/container/ObjectContext.java 2008-04-17 13:23:31 UTC (rev 10619)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/container/ObjectContext.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -22,14 +22,14 @@
******************************************************************************/
package org.jboss.portal.presentation.impl.model.container;
-import org.jboss.portal.presentation.model.state.structural.StructuralObject;
-import org.jboss.portal.presentation.model.state.structural.StructuralState;
-import org.jboss.portal.presentation.model.state.StateException;
-import org.jboss.portal.presentation.model.state.NoSuchStateException;
-import org.jboss.portal.presentation.model.state.StaleStateException;
-import org.jboss.portal.presentation.model.UIObject;
-import org.jboss.portal.presentation.model.UIContext;
-import org.jboss.portal.presentation.model.ModelListener;
+import org.jboss.portal.presentation.toremove.model.state.structural.StructuralObject;
+import org.jboss.portal.presentation.toremove.model.state.structural.StructuralState;
+import org.jboss.portal.presentation.toremove.model.state.StateException;
+import org.jboss.portal.presentation.toremove.model.state.NoSuchStateException;
+import org.jboss.portal.presentation.toremove.model.state.StaleStateException;
+import org.jboss.portal.presentation.toremove.model.UIObject;
+import org.jboss.portal.presentation.toremove.model.UIContext;
+import org.jboss.portal.presentation.toremove.model.ModelListener;
import org.jboss.portal.presentation.impl.model.container.spi.UIObjectContext;
import org.jboss.portal.presentation.impl.model.container.spi.UIContainerObject;
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/container/RelationshipContext.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/container/RelationshipContext.java 2008-04-17 13:23:31 UTC (rev 10619)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/container/RelationshipContext.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -23,11 +23,11 @@
package org.jboss.portal.presentation.impl.model.container;
import org.jboss.portal.presentation.impl.model.container.spi.UIContainerObject;
-import org.jboss.portal.presentation.model.state.structural.StructuralObject;
-import org.jboss.portal.presentation.model.state.StateException;
-import org.jboss.portal.presentation.model.UIObject;
-import org.jboss.portal.presentation.model.event.lifecycle.RelationshipAddedEvent;
-import org.jboss.portal.presentation.model.event.lifecycle.RelationshipRemovedEvent;
+import org.jboss.portal.presentation.toremove.model.state.structural.StructuralObject;
+import org.jboss.portal.presentation.toremove.model.state.StateException;
+import org.jboss.portal.presentation.toremove.model.UIObject;
+import org.jboss.portal.presentation.toremove.model.event.lifecycle.RelationshipAddedEvent;
+import org.jboss.portal.presentation.toremove.model.event.lifecycle.RelationshipRemovedEvent;
import java.util.Iterator;
import java.util.Set;
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/container/UIObjectContainer.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/container/UIObjectContainer.java 2008-04-17 13:23:31 UTC (rev 10619)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/container/UIObjectContainer.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -22,19 +22,19 @@
******************************************************************************/
package org.jboss.portal.presentation.impl.model.container;
-import org.jboss.portal.presentation.model.ModelEvent;
-import org.jboss.portal.presentation.model.ModelListener;
-import org.jboss.portal.presentation.model.UIObject;
-import org.jboss.portal.presentation.model.UIContext;
-import org.jboss.portal.presentation.model.event.state.structural.StructuralStateModification;
-import org.jboss.portal.presentation.model.event.state.StateChange;
-import org.jboss.portal.presentation.model.event.state.StateChangeEvent;
-import org.jboss.portal.presentation.model.state.navigational.NavigationalStateContext;
-import org.jboss.portal.presentation.model.state.structural.StructuralObject;
-import org.jboss.portal.presentation.model.state.structural.StructuralStateContext;
-import org.jboss.portal.presentation.model.state.structural.StructuralState;
-import org.jboss.portal.presentation.model.state.NoSuchStateException;
-import org.jboss.portal.presentation.model.state.StateException;
+import org.jboss.portal.presentation.toremove.model.ModelEvent;
+import org.jboss.portal.presentation.toremove.model.ModelListener;
+import org.jboss.portal.presentation.toremove.model.UIObject;
+import org.jboss.portal.presentation.toremove.model.UIContext;
+import org.jboss.portal.presentation.toremove.model.event.state.structural.StructuralStateModification;
+import org.jboss.portal.presentation.toremove.model.event.state.StateChange;
+import org.jboss.portal.presentation.toremove.model.event.state.StateChangeEvent;
+import org.jboss.portal.presentation.toremove.model.state.navigational.NavigationalStateContext;
+import org.jboss.portal.presentation.toremove.model.state.structural.StructuralObject;
+import org.jboss.portal.presentation.toremove.model.state.structural.StructuralStateContext;
+import org.jboss.portal.presentation.toremove.model.state.structural.StructuralState;
+import org.jboss.portal.presentation.toremove.model.state.NoSuchStateException;
+import org.jboss.portal.presentation.toremove.model.state.StateException;
import org.jboss.portal.presentation.impl.model.container.spi.UIContainerObject;
import org.jboss.portal.presentation.impl.model.container.spi.UIObjectFactory;
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/container/spi/UIContainerObject.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/container/spi/UIContainerObject.java 2008-04-17 13:23:31 UTC (rev 10619)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/container/spi/UIContainerObject.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -22,7 +22,7 @@
******************************************************************************/
package org.jboss.portal.presentation.impl.model.container.spi;
-import org.jboss.portal.presentation.model.UIObject;
+import org.jboss.portal.presentation.toremove.model.UIObject;
import org.jboss.portal.presentation.impl.model.container.spi.UIObjectContext;
/**
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/container/spi/UIObjectContext.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/container/spi/UIObjectContext.java 2008-04-17 13:23:31 UTC (rev 10619)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/container/spi/UIObjectContext.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -22,8 +22,8 @@
******************************************************************************/
package org.jboss.portal.presentation.impl.model.container.spi;
-import org.jboss.portal.presentation.model.UIObject;
-import org.jboss.portal.presentation.model.ModelListener;
+import org.jboss.portal.presentation.toremove.model.UIObject;
+import org.jboss.portal.presentation.toremove.model.ModelListener;
/**
* Encapsulate internal of an object.
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/container/spi/UIObjectFactory.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/container/spi/UIObjectFactory.java 2008-04-17 13:23:31 UTC (rev 10619)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/container/spi/UIObjectFactory.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -22,12 +22,12 @@
******************************************************************************/
package org.jboss.portal.presentation.impl.model.container.spi;
-import org.jboss.portal.presentation.model.UIContext;
-import org.jboss.portal.presentation.model.UIPortal;
-import org.jboss.portal.presentation.model.UIPage;
-import org.jboss.portal.presentation.model.UIContainer;
-import org.jboss.portal.presentation.model.UIWindow;
-import org.jboss.portal.presentation.model.UIObject;
+import org.jboss.portal.presentation.toremove.model.UIContext;
+import org.jboss.portal.presentation.toremove.model.UIPortal;
+import org.jboss.portal.presentation.toremove.model.UIPage;
+import org.jboss.portal.presentation.toremove.model.UIContainer;
+import org.jboss.portal.presentation.toremove.model.UIWindow;
+import org.jboss.portal.presentation.toremove.model.UIObject;
import org.jboss.portal.presentation.impl.model.UIContextImpl;
import org.jboss.portal.presentation.impl.model.UIPortalImpl;
import org.jboss.portal.presentation.impl.model.UIPageImpl;
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/state/navigational/NavigationalStateContextImpl.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/state/navigational/NavigationalStateContextImpl.java 2008-04-17 13:23:31 UTC (rev 10619)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/impl/model/state/navigational/NavigationalStateContextImpl.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -22,9 +22,9 @@
******************************************************************************/
package org.jboss.portal.presentation.impl.model.state.navigational;
-import org.jboss.portal.presentation.model.state.navigational.NavigationalStateContext;
-import org.jboss.portal.presentation.model.state.StateChangeVetoException;
-import org.jboss.portal.presentation.model.state.StateException;
+import org.jboss.portal.presentation.toremove.model.state.navigational.NavigationalStateContext;
+import org.jboss.portal.presentation.toremove.model.state.StateChangeVetoException;
+import org.jboss.portal.presentation.toremove.model.state.StateException;
import java.util.Map;
import java.util.HashMap;
Copied: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model (from rev 10617, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model)
Deleted: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/ModelEvent.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ModelEvent.java 2008-04-17 12:48:35 UTC (rev 10617)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/ModelEvent.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -1,31 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public abstract class ModelEvent
-{
-}
Copied: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/ModelEvent.java (from rev 10619, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ModelEvent.java)
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/ModelEvent.java (rev 0)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/ModelEvent.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -0,0 +1,31 @@
+/******************************************************************************
+ * 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.presentation.toremove.model;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public abstract class ModelEvent
+{
+}
Deleted: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/ModelListener.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ModelListener.java 2008-04-17 12:48:35 UTC (rev 10617)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/ModelListener.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -1,32 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public interface ModelListener
-{
- void onEvent(ModelEvent event);
-}
Copied: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/ModelListener.java (from rev 10619, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ModelListener.java)
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/ModelListener.java (rev 0)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/ModelListener.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -0,0 +1,32 @@
+/******************************************************************************
+ * 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.presentation.toremove.model;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public interface ModelListener
+{
+ void onEvent(ModelEvent event);
+}
Deleted: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/StateType.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/StateType.java 2008-04-17 12:48:35 UTC (rev 10617)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/StateType.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -1,42 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public enum StateType
-{
- /**
- * The navigational state type. The navigational state type describe sthe a kind of change done at runtime by the user when it
- * interacts with the model (i.e not all interactions with the model are automatically navigational state changes).
- */
- NAVIGATIONAL,
-
- /**
- * The structural state type. The structural state type describes the structure of the model, i.e it defines an enduring
- * state managed by the presentation server.
- */
- STRUCTURAL
-}
Copied: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/StateType.java (from rev 10619, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/StateType.java)
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/StateType.java (rev 0)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/StateType.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -0,0 +1,42 @@
+/******************************************************************************
+ * 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.presentation.toremove.model;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public enum StateType
+{
+ /**
+ * The navigational state type. The navigational state type describe sthe a kind of change done at runtime by the user when it
+ * interacts with the model (i.e not all interactions with the model are automatically navigational state changes).
+ */
+ NAVIGATIONAL,
+
+ /**
+ * The structural state type. The structural state type describes the structure of the model, i.e it defines an enduring
+ * state managed by the presentation server.
+ */
+ STRUCTURAL
+}
Deleted: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/UIAction.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIAction.java 2008-04-17 12:48:35 UTC (rev 10617)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/UIAction.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -1,55 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model;
-
-/**
- * An action that can be triggered.
- *
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public interface UIAction extends UIObject
-{
-
- /**
- * Returns the action display name.
- *
- * @return the display name
- */
- String getDisplayName();
-
- /**
- * Returns the action icon URL.
- *
- * @return the icon URL
- */
- String getIconURL();
-
- /**
- * Returns the action URL.
- *
- * @return the url
- */
- String getURL();
-
-}
Copied: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/UIAction.java (from rev 10619, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIAction.java)
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/UIAction.java (rev 0)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/UIAction.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -0,0 +1,55 @@
+/******************************************************************************
+ * 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.presentation.toremove.model;
+
+/**
+ * An action that can be triggered.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public interface UIAction extends UIObject
+{
+
+ /**
+ * Returns the action display name.
+ *
+ * @return the display name
+ */
+ String getDisplayName();
+
+ /**
+ * Returns the action icon URL.
+ *
+ * @return the icon URL
+ */
+ String getIconURL();
+
+ /**
+ * Returns the action URL.
+ *
+ * @return the url
+ */
+ String getURL();
+
+}
Deleted: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/UIContainer.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIContainer.java 2008-04-17 12:48:35 UTC (rev 10617)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/UIContainer.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -1,31 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public interface UIContainer extends UIObject
-{
-}
Copied: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/UIContainer.java (from rev 10619, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIContainer.java)
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/UIContainer.java (rev 0)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/UIContainer.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -0,0 +1,31 @@
+/******************************************************************************
+ * 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.presentation.toremove.model;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public interface UIContainer extends UIObject
+{
+}
Deleted: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/UIContext.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIContext.java 2008-04-17 12:48:35 UTC (rev 10617)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/UIContext.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -1,43 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public interface UIContext extends UIObject
-{
- /**
- *
- * @param id the object id
- * @return the object for the specified id or null if it cannot be found
- */
- UIObject getObject(String id);
-
- /**
- *
- * @param listener the listener
- */
- void addModelListener(ModelListener listener);
-}
Copied: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/UIContext.java (from rev 10619, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIContext.java)
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/UIContext.java (rev 0)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/UIContext.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -0,0 +1,43 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.toremove.model;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public interface UIContext extends UIObject
+{
+ /**
+ *
+ * @param id the object id
+ * @return the object for the specified id or null if it cannot be found
+ */
+ UIObject getObject(String id);
+
+ /**
+ *
+ * @param listener the listener
+ */
+ void addModelListener(ModelListener listener);
+}
Deleted: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/UIObject.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIObject.java 2008-04-17 12:48:35 UTC (rev 10617)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/UIObject.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -1,208 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model;
-
-import org.jboss.portal.presentation.model.state.StateException;
-import org.jboss.portal.presentation.model.state.ConstraintViolationException;
-
-import java.util.Collection;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public interface UIObject
-{
-
- /**
- * The status of a user interface object.
- */
- public enum Status
- {
- /**
- * It can be used.
- */
- VALID,
-
- /**
- * It cannot be used.
- */
- INVALID,
-
- /**
- * It cannot be used as is but a recovery is possible to either become valid or invalid.
- */
- STALE
- }
-
- public interface Visitor
- {
-
- /**
- * Returns true if the provided object should be visited.
- *
- * @param object the object
- * @return true if it should be visited
- */
- boolean enterObject(UIObject object);
-
- /**
- * Callback to signal that an object visit is terminated
- *
- * @param object the object
- */
- void leaveObject(UIObject object);
-
- /**
- * Returns true if the children should be visited
- *
- * @param object the parent of the children
- * @param loaded if the relationship is already loaded
- * @return true if the children should be visited
- */
- boolean enterChildren(UIObject object, boolean loaded);
-
- }
-
- /**
- * Updates the status of the object by comparing validating it against the structural state context.
- */
- void validate();
-
- void validate(Visitor scope);
-
- /**
- * Attempt a resolution of the current conflict. The behavior of the method will change according to the
- * current status of the object:
- * <ul>
- * <li><code>STALE</code> status leads to resolve the conflict to a new status with <code>INVALID</code> or <code>VALID</code>
- * as possible values</li>
- * <li><code>VALID</code> status leads to a non operation</li>
- * <li><code>INVALID</code> status leads to throw an <code>IllegalStateException</code></li>
- * </ul>
- */
- void refresh();
-
- void refresh(Visitor scope);
-
- /**
- * Return the current status.
- *
- * @return the status
- */
- Status getStatus();
-
- /**
- * Returns the id.
- *
- * @return the id
- */
- String getId();
-
- /**
- * Returns the name.
- *
- * @return the name
- */
- String getName();
-
- /**
- * Returns the parent or null if the object does not have a parent.
- *
- * @return the parent
- */
- UIObject getParent();
-
- /**
- * Returns a named child or null if it does not exist.
- *
- * @param name the name of the child
- * @return the named child
- */
- UIObject getChild(String name);
-
- /**
- * Returns a property value or null if it does not exist.
- *
- * @param stateType the scope where to get the value from
- * @param propertyName the property name
- * @param propertyType the expected property type
- * @return the property value
- * @throws IllegalArgumentException if any argument is null or not valid
- * @throws StateException any state exception
- */
- <T> T getProperty(StateType stateType, String propertyName, Class<T> propertyType) throws IllegalArgumentException, StateException;
-
- /**
- * Equivalent to call <code>getPropertyValue(StateScopeType,String,Class)</code> with the <code>Object.class</code>
- * literal.
- *
- * @param stateType the scope where to get the value from
- * @param propertyName the property name
- * @return the property value
- * @throws IllegalArgumentException if any argument is null or not valid
- * @throws StateException any state exception
- */
- Object getProperty(StateType stateType, String propertyName) throws IllegalArgumentException, StateException;
-
- <T> void setProperty(StateType stateType, String propertyName, T propertyValue) throws IllegalArgumentException, StateException;
-
- /**
- * Create a named child with a specified type.
- *
- * @param name the child name
- * @param type the child type
- * @return the newly created child
- * @throws IllegalArgumentException if the name is null, already exists or this kind of object does not accept children of the specified type
- * @throws StateException any state exception
- */
- <T extends UIObject> T createChild(String name, Class<T> type) throws IllegalArgumentException, StateException;
-
- /**
- * Returns the children of this object.
- *
- * @return the list of children
- */
- Collection<? extends UIObject> getChildren();
-
- /**
- * Destroy a named child.
- *
- * @param name the name of the child to destroy
- * @throws IllegalArgumentException if the name is null or the child does not exist
- * @throws StateException any state exception
- */
- void destroyChild(String name) throws IllegalArgumentException, StateException;
-
- /**
- * Move the specified object to a new parent. A constraint violation will be detected if the destination
- * is a descendant of the current object.
- *
- * @param destination the new parent
- * @throws IllegalArgumentException if the destination is null
- * @throws StateException any state exception
- * @throws ConstraintViolationException if the destination is not valid
- */
- void move(UIObject destination) throws IllegalArgumentException, StateException;
-
-}
Copied: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/UIObject.java (from rev 10619, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIObject.java)
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/UIObject.java (rev 0)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/UIObject.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -0,0 +1,208 @@
+/******************************************************************************
+ * 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.presentation.toremove.model;
+
+import org.jboss.portal.presentation.toremove.model.state.StateException;
+import org.jboss.portal.presentation.toremove.model.state.ConstraintViolationException;
+
+import java.util.Collection;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public interface UIObject
+{
+
+ /**
+ * The status of a user interface object.
+ */
+ public enum Status
+ {
+ /**
+ * It can be used.
+ */
+ VALID,
+
+ /**
+ * It cannot be used.
+ */
+ INVALID,
+
+ /**
+ * It cannot be used as is but a recovery is possible to either become valid or invalid.
+ */
+ STALE
+ }
+
+ public interface Visitor
+ {
+
+ /**
+ * Returns true if the provided object should be visited.
+ *
+ * @param object the object
+ * @return true if it should be visited
+ */
+ boolean enterObject(UIObject object);
+
+ /**
+ * Callback to signal that an object visit is terminated
+ *
+ * @param object the object
+ */
+ void leaveObject(UIObject object);
+
+ /**
+ * Returns true if the children should be visited
+ *
+ * @param object the parent of the children
+ * @param loaded if the relationship is already loaded
+ * @return true if the children should be visited
+ */
+ boolean enterChildren(UIObject object, boolean loaded);
+
+ }
+
+ /**
+ * Updates the status of the object by comparing validating it against the structural state context.
+ */
+ void validate();
+
+ void validate(Visitor scope);
+
+ /**
+ * Attempt a resolution of the current conflict. The behavior of the method will change according to the
+ * current status of the object:
+ * <ul>
+ * <li><code>STALE</code> status leads to resolve the conflict to a new status with <code>INVALID</code> or <code>VALID</code>
+ * as possible values</li>
+ * <li><code>VALID</code> status leads to a non operation</li>
+ * <li><code>INVALID</code> status leads to throw an <code>IllegalStateException</code></li>
+ * </ul>
+ */
+ void refresh();
+
+ void refresh(Visitor scope);
+
+ /**
+ * Return the current status.
+ *
+ * @return the status
+ */
+ Status getStatus();
+
+ /**
+ * Returns the id.
+ *
+ * @return the id
+ */
+ String getId();
+
+ /**
+ * Returns the name.
+ *
+ * @return the name
+ */
+ String getName();
+
+ /**
+ * Returns the parent or null if the object does not have a parent.
+ *
+ * @return the parent
+ */
+ UIObject getParent();
+
+ /**
+ * Returns a named child or null if it does not exist.
+ *
+ * @param name the name of the child
+ * @return the named child
+ */
+ UIObject getChild(String name);
+
+ /**
+ * Returns a property value or null if it does not exist.
+ *
+ * @param stateType the scope where to get the value from
+ * @param propertyName the property name
+ * @param propertyType the expected property type
+ * @return the property value
+ * @throws IllegalArgumentException if any argument is null or not valid
+ * @throws StateException any state exception
+ */
+ <T> T getProperty(StateType stateType, String propertyName, Class<T> propertyType) throws IllegalArgumentException, StateException;
+
+ /**
+ * Equivalent to call <code>getPropertyValue(StateScopeType,String,Class)</code> with the <code>Object.class</code>
+ * literal.
+ *
+ * @param stateType the scope where to get the value from
+ * @param propertyName the property name
+ * @return the property value
+ * @throws IllegalArgumentException if any argument is null or not valid
+ * @throws StateException any state exception
+ */
+ Object getProperty(StateType stateType, String propertyName) throws IllegalArgumentException, StateException;
+
+ <T> void setProperty(StateType stateType, String propertyName, T propertyValue) throws IllegalArgumentException, StateException;
+
+ /**
+ * Create a named child with a specified type.
+ *
+ * @param name the child name
+ * @param type the child type
+ * @return the newly created child
+ * @throws IllegalArgumentException if the name is null, already exists or this kind of object does not accept children of the specified type
+ * @throws StateException any state exception
+ */
+ <T extends UIObject> T createChild(String name, Class<T> type) throws IllegalArgumentException, StateException;
+
+ /**
+ * Returns the children of this object.
+ *
+ * @return the list of children
+ */
+ Collection<? extends UIObject> getChildren();
+
+ /**
+ * Destroy a named child.
+ *
+ * @param name the name of the child to destroy
+ * @throws IllegalArgumentException if the name is null or the child does not exist
+ * @throws StateException any state exception
+ */
+ void destroyChild(String name) throws IllegalArgumentException, StateException;
+
+ /**
+ * Move the specified object to a new parent. A constraint violation will be detected if the destination
+ * is a descendant of the current object.
+ *
+ * @param destination the new parent
+ * @throws IllegalArgumentException if the destination is null
+ * @throws StateException any state exception
+ * @throws ConstraintViolationException if the destination is not valid
+ */
+ void move(UIObject destination) throws IllegalArgumentException, StateException;
+
+}
Deleted: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/UIPage.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIPage.java 2008-04-17 12:48:35 UTC (rev 10617)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/UIPage.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -1,31 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public interface UIPage extends UIObject
-{
-}
Copied: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/UIPage.java (from rev 10619, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIPage.java)
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/UIPage.java (rev 0)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/UIPage.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -0,0 +1,31 @@
+/******************************************************************************
+ * 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.presentation.toremove.model;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public interface UIPage extends UIObject
+{
+}
Deleted: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/UIPortal.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIPortal.java 2008-04-17 12:48:35 UTC (rev 10617)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/UIPortal.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -1,31 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public interface UIPortal extends UIObject
-{
-}
Copied: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/UIPortal.java (from rev 10619, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIPortal.java)
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/UIPortal.java (rev 0)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/UIPortal.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -0,0 +1,31 @@
+/******************************************************************************
+ * 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.presentation.toremove.model;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public interface UIPortal extends UIObject
+{
+}
Deleted: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/UIWindow.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIWindow.java 2008-04-17 12:48:35 UTC (rev 10617)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/UIWindow.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -1,61 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model;
-
-import org.jboss.portal.WindowState;
-import org.jboss.portal.Mode;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public interface UIWindow extends UIObject
-{
- /**
- * Returns the window state of the window or null if it does not exist.
- *
- * @return the window state
- */
- WindowState getWindowState();
-
- /**
- * Update the window state of the window.
- *
- * @param windowState the new window state
- */
- void setWindowState(WindowState windowState);
-
- /**
- * Returns the mode of the window or null if it does not exist.
- *
- * @return the mode
- */
- Mode getMode();
-
- /**
- * Update the mode of the window.
- *
- * @param mode the new mode
- */
- void setMode(Mode mode);
-}
Copied: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/UIWindow.java (from rev 10619, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIWindow.java)
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/UIWindow.java (rev 0)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/UIWindow.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -0,0 +1,61 @@
+/******************************************************************************
+ * 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.presentation.toremove.model;
+
+import org.jboss.portal.WindowState;
+import org.jboss.portal.Mode;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public interface UIWindow extends UIObject
+{
+ /**
+ * Returns the window state of the window or null if it does not exist.
+ *
+ * @return the window state
+ */
+ WindowState getWindowState();
+
+ /**
+ * Update the window state of the window.
+ *
+ * @param windowState the new window state
+ */
+ void setWindowState(WindowState windowState);
+
+ /**
+ * Returns the mode of the window or null if it does not exist.
+ *
+ * @return the mode
+ */
+ Mode getMode();
+
+ /**
+ * Update the mode of the window.
+ *
+ * @param mode the new mode
+ */
+ void setMode(Mode mode);
+}
Copied: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/event (from rev 10619, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event)
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/event/lifecycle/LifeCycleEvent.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/LifeCycleEvent.java 2008-04-17 13:23:31 UTC (rev 10619)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/event/lifecycle/LifeCycleEvent.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -20,9 +20,9 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
******************************************************************************/
-package org.jboss.portal.presentation.model.event.lifecycle;
+package org.jboss.portal.presentation.toremove.model.event.lifecycle;
-import org.jboss.portal.presentation.model.ModelEvent;
+import org.jboss.portal.presentation.toremove.model.ModelEvent;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/event/lifecycle/ObjectAddedEvent.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/ObjectAddedEvent.java 2008-04-17 13:23:31 UTC (rev 10619)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/event/lifecycle/ObjectAddedEvent.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -20,9 +20,9 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
******************************************************************************/
-package org.jboss.portal.presentation.model.event.lifecycle;
+package org.jboss.portal.presentation.toremove.model.event.lifecycle;
-import org.jboss.portal.presentation.model.UIObject;
+import org.jboss.portal.presentation.toremove.model.UIObject;
import java.util.Map;
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/event/lifecycle/ObjectLifeCycleEvent.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/ObjectLifeCycleEvent.java 2008-04-17 13:23:31 UTC (rev 10619)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/event/lifecycle/ObjectLifeCycleEvent.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -20,7 +20,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
******************************************************************************/
-package org.jboss.portal.presentation.model.event.lifecycle;
+package org.jboss.portal.presentation.toremove.model.event.lifecycle;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/event/lifecycle/ObjectRemovedEvent.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/ObjectRemovedEvent.java 2008-04-17 13:23:31 UTC (rev 10619)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/event/lifecycle/ObjectRemovedEvent.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -20,7 +20,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
******************************************************************************/
-package org.jboss.portal.presentation.model.event.lifecycle;
+package org.jboss.portal.presentation.toremove.model.event.lifecycle;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/event/lifecycle/RelationshipAddedEvent.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/RelationshipAddedEvent.java 2008-04-17 13:23:31 UTC (rev 10619)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/event/lifecycle/RelationshipAddedEvent.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -20,7 +20,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
******************************************************************************/
-package org.jboss.portal.presentation.model.event.lifecycle;
+package org.jboss.portal.presentation.toremove.model.event.lifecycle;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/event/lifecycle/RelationshipLifeCycleEvent.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/RelationshipLifeCycleEvent.java 2008-04-17 13:23:31 UTC (rev 10619)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/event/lifecycle/RelationshipLifeCycleEvent.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -20,7 +20,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
******************************************************************************/
-package org.jboss.portal.presentation.model.event.lifecycle;
+package org.jboss.portal.presentation.toremove.model.event.lifecycle;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/event/lifecycle/RelationshipRemovedEvent.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/lifecycle/RelationshipRemovedEvent.java 2008-04-17 13:23:31 UTC (rev 10619)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/event/lifecycle/RelationshipRemovedEvent.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -20,7 +20,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
******************************************************************************/
-package org.jboss.portal.presentation.model.event.lifecycle;
+package org.jboss.portal.presentation.toremove.model.event.lifecycle;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/event/state/StateChange.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/StateChange.java 2008-04-17 13:23:31 UTC (rev 10619)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/event/state/StateChange.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -20,7 +20,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
******************************************************************************/
-package org.jboss.portal.presentation.model.event.state;
+package org.jboss.portal.presentation.toremove.model.event.state;
/**
* A change in the state of the model. The change is the association of a target id and a modification.
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/event/state/StateChangeEvent.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/StateChangeEvent.java 2008-04-17 13:23:31 UTC (rev 10619)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/event/state/StateChangeEvent.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -20,10 +20,10 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
******************************************************************************/
-package org.jboss.portal.presentation.model.event.state;
+package org.jboss.portal.presentation.toremove.model.event.state;
-import org.jboss.portal.presentation.model.ModelEvent;
-import org.jboss.portal.presentation.model.event.state.StateChange;
+import org.jboss.portal.presentation.toremove.model.ModelEvent;
+import org.jboss.portal.presentation.toremove.model.event.state.StateChange;
/**
* Signals a state change occured.
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/event/state/StateModification.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/StateModification.java 2008-04-17 13:23:31 UTC (rev 10619)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/event/state/StateModification.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -20,7 +20,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
******************************************************************************/
-package org.jboss.portal.presentation.model.event.state;
+package org.jboss.portal.presentation.toremove.model.event.state;
/**
* An abstract class for the modification of state.
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/event/state/navigational/NavigationalStateModification.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/navigational/NavigationalStateModification.java 2008-04-17 13:23:31 UTC (rev 10619)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/event/state/navigational/NavigationalStateModification.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -20,9 +20,9 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
******************************************************************************/
-package org.jboss.portal.presentation.model.event.state.navigational;
+package org.jboss.portal.presentation.toremove.model.event.state.navigational;
-import org.jboss.portal.presentation.model.event.state.StateModification;
+import org.jboss.portal.presentation.toremove.model.event.state.StateModification;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/event/state/structural/StructuralStateModification.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/state/structural/StructuralStateModification.java 2008-04-17 13:23:31 UTC (rev 10619)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/event/state/structural/StructuralStateModification.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -20,10 +20,10 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
******************************************************************************/
-package org.jboss.portal.presentation.model.event.state.structural;
+package org.jboss.portal.presentation.toremove.model.event.state.structural;
-import org.jboss.portal.presentation.model.event.state.StateModification;
-import org.jboss.portal.presentation.model.UIObject;
+import org.jboss.portal.presentation.toremove.model.event.state.StateModification;
+import org.jboss.portal.presentation.toremove.model.UIObject;
import java.util.Map;
Copied: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/state (from rev 10619, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state)
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/state/ConstraintViolationException.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/ConstraintViolationException.java 2008-04-17 13:23:31 UTC (rev 10619)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/state/ConstraintViolationException.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -20,7 +20,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
******************************************************************************/
-package org.jboss.portal.presentation.model.state;
+package org.jboss.portal.presentation.toremove.model.state;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/state/NoSuchStateException.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/NoSuchStateException.java 2008-04-17 13:23:31 UTC (rev 10619)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/state/NoSuchStateException.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -20,7 +20,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
******************************************************************************/
-package org.jboss.portal.presentation.model.state;
+package org.jboss.portal.presentation.toremove.model.state;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/state/StaleStateException.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/StaleStateException.java 2008-04-17 13:23:31 UTC (rev 10619)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/state/StaleStateException.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -20,7 +20,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
******************************************************************************/
-package org.jboss.portal.presentation.model.state;
+package org.jboss.portal.presentation.toremove.model.state;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/state/StateChangeVetoException.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/StateChangeVetoException.java 2008-04-17 13:23:31 UTC (rev 10619)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/state/StateChangeVetoException.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -20,7 +20,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
******************************************************************************/
-package org.jboss.portal.presentation.model.state;
+package org.jboss.portal.presentation.toremove.model.state;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/state/StateException.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/StateException.java 2008-04-17 13:23:31 UTC (rev 10619)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/state/StateException.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -20,7 +20,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
******************************************************************************/
-package org.jboss.portal.presentation.model.state;
+package org.jboss.portal.presentation.toremove.model.state;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/state/navigational/NavigationalStateContext.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/navigational/NavigationalStateContext.java 2008-04-17 13:23:31 UTC (rev 10619)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/state/navigational/NavigationalStateContext.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -20,9 +20,9 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
******************************************************************************/
-package org.jboss.portal.presentation.model.state.navigational;
+package org.jboss.portal.presentation.toremove.model.state.navigational;
-import org.jboss.portal.presentation.model.state.StateException;
+import org.jboss.portal.presentation.toremove.model.state.StateException;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/state/structural/AbstractStructuralStateContext.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/AbstractStructuralStateContext.java 2008-04-17 13:23:31 UTC (rev 10619)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/state/structural/AbstractStructuralStateContext.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -20,11 +20,11 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
******************************************************************************/
-package org.jboss.portal.presentation.model.state.structural;
+package org.jboss.portal.presentation.toremove.model.state.structural;
-import org.jboss.portal.presentation.model.state.StateChangeVetoException;
-import org.jboss.portal.presentation.model.state.StateException;
-import org.jboss.portal.presentation.model.UIObject;
+import org.jboss.portal.presentation.toremove.model.state.StateChangeVetoException;
+import org.jboss.portal.presentation.toremove.model.state.StateException;
+import org.jboss.portal.presentation.toremove.model.UIObject;
import java.util.Map;
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/state/structural/StructuralObject.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/StructuralObject.java 2008-04-17 13:23:31 UTC (rev 10619)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/state/structural/StructuralObject.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -20,7 +20,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
******************************************************************************/
-package org.jboss.portal.presentation.model.state.structural;
+package org.jboss.portal.presentation.toremove.model.state.structural;
import java.util.List;
import java.util.Set;
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/state/structural/StructuralState.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/StructuralState.java 2008-04-17 13:23:31 UTC (rev 10619)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/state/structural/StructuralState.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -20,9 +20,9 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
******************************************************************************/
-package org.jboss.portal.presentation.model.state.structural;
+package org.jboss.portal.presentation.toremove.model.state.structural;
-import org.jboss.portal.presentation.model.UIObject;
+import org.jboss.portal.presentation.toremove.model.UIObject;
import java.util.Map;
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/state/structural/StructuralStateContext.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/StructuralStateContext.java 2008-04-17 13:23:31 UTC (rev 10619)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/model/state/structural/StructuralStateContext.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -20,11 +20,11 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
******************************************************************************/
-package org.jboss.portal.presentation.model.state.structural;
+package org.jboss.portal.presentation.toremove.model.state.structural;
-import org.jboss.portal.presentation.model.UIObject;
-import org.jboss.portal.presentation.model.state.StateChangeVetoException;
-import org.jboss.portal.presentation.model.state.StateException;
+import org.jboss.portal.presentation.toremove.model.UIObject;
+import org.jboss.portal.presentation.toremove.model.state.StateChangeVetoException;
+import org.jboss.portal.presentation.toremove.model.state.StateException;
import java.util.Map;
import java.util.Collection;
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/server/PresentationServer.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/server/PresentationServer.java 2008-04-17 13:23:31 UTC (rev 10619)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/server/PresentationServer.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -23,9 +23,9 @@
package org.jboss.portal.presentation.server;
import org.jboss.portal.presentation.client.PresentationContext;
-import org.jboss.portal.presentation.model.UIWindow;
+import org.jboss.portal.presentation.toremove.model.UIWindow;
import org.jboss.portal.presentation.content.WindowContent;
-import org.jboss.portal.presentation.model.state.structural.StructuralStateContext;
+import org.jboss.portal.presentation.toremove.model.state.structural.StructuralStateContext;
/**
* @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
Modified: modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/plugin/MainProcessor.java
===================================================================
--- modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/plugin/MainProcessor.java 2008-04-17 13:23:31 UTC (rev 10619)
+++ modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/plugin/MainProcessor.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -37,8 +37,8 @@
import org.jboss.portal.presentation.toremove.client.PresentationContext;
-import org.jboss.portal.presentation.model.StateType;
-import org.jboss.portal.presentation.model.UIWindow;
+import org.jboss.portal.presentation.toremove.model.StateType;
+import org.jboss.portal.presentation.toremove.model.UIWindow;
import org.jboss.portal.presentation.protocol.LinkActivation;
import org.jboss.portal.presentation.protocol.PostActivation;
Modified: modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/plugin/PresentationServerImpl.java
===================================================================
--- modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/plugin/PresentationServerImpl.java 2008-04-17 13:23:31 UTC (rev 10619)
+++ modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/plugin/PresentationServerImpl.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -25,9 +25,9 @@
import org.jboss.portal.presentation.toremove.client.PresentationContext;
import org.jboss.portal.presentation.toremove.server.Processor;
import org.jboss.portal.presentation.toremove.server.PresentationServer;
-import org.jboss.portal.presentation.model.UIWindow;
+import org.jboss.portal.presentation.toremove.model.UIWindow;
import org.jboss.portal.presentation.content.WindowContent;
-import org.jboss.portal.presentation.model.state.structural.StructuralStateContext;
+import org.jboss.portal.presentation.toremove.model.state.structural.StructuralStateContext;
import org.jboss.portal.presentation.test.portal.MockPortalServer;
import org.jboss.portal.presentation.test.portal.MockWindow;
Modified: modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/plugin/StructuralObjectImpl.java
===================================================================
--- modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/plugin/StructuralObjectImpl.java 2008-04-17 13:23:31 UTC (rev 10619)
+++ modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/plugin/StructuralObjectImpl.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -22,8 +22,8 @@
******************************************************************************/
package org.jboss.portal.presentation.test.portal.plugin;
-import org.jboss.portal.presentation.model.state.structural.StructuralObject;
-import org.jboss.portal.presentation.model.state.structural.StructuralState;
+import org.jboss.portal.presentation.toremove.model.state.structural.StructuralObject;
+import org.jboss.portal.presentation.toremove.model.state.structural.StructuralState;
import org.jboss.portal.presentation.test.portal.MockPortalObject;
Modified: modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/plugin/StructuralStateContextImpl.java
===================================================================
--- modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/plugin/StructuralStateContextImpl.java 2008-04-17 13:23:31 UTC (rev 10619)
+++ modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/plugin/StructuralStateContextImpl.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -23,9 +23,9 @@
package org.jboss.portal.presentation.test.portal.plugin;
-import org.jboss.portal.presentation.model.state.StateException;
-import org.jboss.portal.presentation.model.state.structural.AbstractStructuralStateContext;
-import org.jboss.portal.presentation.model.state.structural.StructuralObject;
+import org.jboss.portal.presentation.toremove.model.state.StateException;
+import org.jboss.portal.presentation.toremove.model.state.structural.AbstractStructuralStateContext;
+import org.jboss.portal.presentation.toremove.model.state.structural.StructuralObject;
import org.jboss.portal.common.NotYetImplemented;
import org.jboss.portal.presentation.test.portal.MockPortalServer;
Modified: modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/plugin/StructuralStateImpl.java
===================================================================
--- modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/plugin/StructuralStateImpl.java 2008-04-17 13:23:31 UTC (rev 10619)
+++ modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/plugin/StructuralStateImpl.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -22,12 +22,12 @@
******************************************************************************/
package org.jboss.portal.presentation.test.portal.plugin;
-import org.jboss.portal.presentation.model.state.structural.StructuralState;
-import org.jboss.portal.presentation.model.UIObject;
-import org.jboss.portal.presentation.model.UIContext;
-import org.jboss.portal.presentation.model.UIPortal;
-import org.jboss.portal.presentation.model.UIPage;
-import org.jboss.portal.presentation.model.UIWindow;
+import org.jboss.portal.presentation.toremove.model.state.structural.StructuralState;
+import org.jboss.portal.presentation.toremove.model.UIObject;
+import org.jboss.portal.presentation.toremove.model.UIContext;
+import org.jboss.portal.presentation.toremove.model.UIPortal;
+import org.jboss.portal.presentation.toremove.model.UIPage;
+import org.jboss.portal.presentation.toremove.model.UIWindow;
import org.jboss.portal.presentation.test.portal.MockPortalObject;
import org.jboss.portal.presentation.test.portal.MockContext;
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/UIObject.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/UIObject.java 2008-04-17 13:23:31 UTC (rev 10619)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/UIObject.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -22,7 +22,7 @@
******************************************************************************/
package org.jboss.portal.presentation.model2;
-import org.jboss.portal.presentation.model.state.StateException;
+import org.jboss.portal.presentation.toremove.model.state.StateException;
import org.jboss.portal.presentation.state.StateType;
import java.util.Set;
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/ui/UIAction.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/ui/UIAction.java 2008-04-17 13:23:31 UTC (rev 10619)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/ui/UIAction.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -22,7 +22,7 @@
******************************************************************************/
package org.jboss.portal.presentation.model2.ui;
-import org.jboss.portal.presentation.model.UIObject;
+import org.jboss.portal.presentation.toremove.model.UIObject;
/**
* An action that can be triggered.
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/MoveUIObjectAction.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/MoveUIObjectAction.java 2008-04-17 13:23:31 UTC (rev 10619)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/MoveUIObjectAction.java 2008-04-17 13:26:47 UTC (rev 10620)
@@ -22,7 +22,7 @@
******************************************************************************/
package org.jboss.portal.presentation.protocol;
-import org.jboss.portal.presentation.model.UIObject;
+import org.jboss.portal.presentation.toremove.model.UIObject;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
18 years
JBoss Portal SVN: r10619 - in modules/presentation/trunk: ajax/src/main/java/org/jboss/portal/presentation/toremove/server and 7 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-04-17 09:23:31 -0400 (Thu, 17 Apr 2008)
New Revision: 10619
Added:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/content/
Removed:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/content/
Modified:
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/AjaxPresentationClient.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/server/PresentationServer.java
modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/plugin/PresentationServerImpl.java
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/PresentationServerImpl.java
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationClient.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/content/WindowContent.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server2/PresentationServer.java
Log:
move content package
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/AjaxPresentationClient.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/AjaxPresentationClient.java 2008-04-17 13:21:54 UTC (rev 10618)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/AjaxPresentationClient.java 2008-04-17 13:23:31 UTC (rev 10619)
@@ -26,7 +26,7 @@
import java.util.Collection;
import org.jboss.portal.presentation.impl.model2.UIModelImpl;
-import org.jboss.portal.presentation.model.content.WindowContent;
+import org.jboss.portal.presentation.content.WindowContent;
import org.jboss.portal.presentation.model2.UIModel;
import org.jboss.portal.presentation.model2.UIObject;
import org.jboss.portal.presentation.model2.ViewPort;
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/server/PresentationServer.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/server/PresentationServer.java 2008-04-17 13:21:54 UTC (rev 10618)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/toremove/server/PresentationServer.java 2008-04-17 13:23:31 UTC (rev 10619)
@@ -24,7 +24,7 @@
import org.jboss.portal.presentation.client.PresentationContext;
import org.jboss.portal.presentation.model.UIWindow;
-import org.jboss.portal.presentation.model.content.WindowContent;
+import org.jboss.portal.presentation.content.WindowContent;
import org.jboss.portal.presentation.model.state.structural.StructuralStateContext;
/**
Modified: modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/plugin/PresentationServerImpl.java
===================================================================
--- modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/plugin/PresentationServerImpl.java 2008-04-17 13:21:54 UTC (rev 10618)
+++ modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/plugin/PresentationServerImpl.java 2008-04-17 13:23:31 UTC (rev 10619)
@@ -26,7 +26,7 @@
import org.jboss.portal.presentation.toremove.server.Processor;
import org.jboss.portal.presentation.toremove.server.PresentationServer;
import org.jboss.portal.presentation.model.UIWindow;
-import org.jboss.portal.presentation.model.content.WindowContent;
+import org.jboss.portal.presentation.content.WindowContent;
import org.jboss.portal.presentation.model.state.structural.StructuralStateContext;
import org.jboss.portal.presentation.test.portal.MockPortalServer;
Modified: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/PresentationServerImpl.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/PresentationServerImpl.java 2008-04-17 13:21:54 UTC (rev 10618)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/PresentationServerImpl.java 2008-04-17 13:23:31 UTC (rev 10619)
@@ -32,7 +32,7 @@
import org.jboss.portal.presentation.protocol.UIObjectAction;
import org.jboss.portal.presentation.protocol.ErrorResponse;
import org.jboss.portal.presentation.protocol.ShowUIObjectResponse;
-import org.jboss.portal.presentation.model.content.WindowContent;
+import org.jboss.portal.presentation.content.WindowContent;
import org.jboss.portal.presentation.client.PresentationClient;
import org.jboss.portal.presentation.impl.state.structural.StructuralStateContextImpl;
import org.jboss.portal.presentation.impl.state.structural.StructuralNode;
Modified: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationClient.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationClient.java 2008-04-17 13:21:54 UTC (rev 10618)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationClient.java 2008-04-17 13:23:31 UTC (rev 10619)
@@ -43,7 +43,7 @@
import org.jboss.portal.presentation.model2.ui.UIPage;
import org.jboss.portal.presentation.model2.ui.UIWindow;
import org.jboss.portal.presentation.impl.model2.UIModelImpl;
-import org.jboss.portal.presentation.model.content.WindowContent;
+import org.jboss.portal.presentation.content.WindowContent;
import org.jboss.portal.presentation.protocol.ViewUIObjectAction;
import org.jboss.portal.presentation.protocol.ProtocolAction;
import org.jboss.portal.presentation.protocol.ProtocolResponse;
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/content (from rev 10617, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/content)
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/content/WindowContent.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/content/WindowContent.java 2008-04-17 12:48:35 UTC (rev 10617)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/content/WindowContent.java 2008-04-17 13:23:31 UTC (rev 10619)
@@ -20,7 +20,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
******************************************************************************/
-package org.jboss.portal.presentation.model.content;
+package org.jboss.portal.presentation.content;
/**
* The content of a window.
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server2/PresentationServer.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server2/PresentationServer.java 2008-04-17 13:21:54 UTC (rev 10618)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server2/PresentationServer.java 2008-04-17 13:23:31 UTC (rev 10619)
@@ -23,7 +23,7 @@
package org.jboss.portal.presentation.server2;
import org.jboss.portal.presentation.state.structural.StructuralStateContext;
-import org.jboss.portal.presentation.model.content.WindowContent;
+import org.jboss.portal.presentation.content.WindowContent;
import org.jboss.portal.presentation.client.PresentationClient;
import org.jboss.portal.presentation.protocol.ProtocolAction;
18 years