Author: julien(a)jboss.com
Date: 2007-12-18 17:57:38 -0500 (Tue, 18 Dec 2007)
New Revision: 9367
Added:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/event/state/
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/event/state/StateChange.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/event/state/StateChangeEvent.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/event/state/StateModification.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/event/state/navigational/
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/event/state/structural/
Removed:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/event/StateChange.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/event/StateChangeEvent.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/event/StateModification.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/event/navigational/
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/event/structural/
Modified:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/impl/model/container/AbstractUIObject.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/event/state/navigational/NavigationalStateModification.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/event/state/structural/StructuralStateModification.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/model/EventAssert.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/model/ModelTestCase.java
Log:
create a state package in the event package
Modified:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/impl/model/container/AbstractUIObject.java
===================================================================
---
branches/presentation/presentation/src/main/org/jboss/portal/presentation/impl/model/container/AbstractUIObject.java 2007-12-18
22:47:00 UTC (rev 9366)
+++
branches/presentation/presentation/src/main/org/jboss/portal/presentation/impl/model/container/AbstractUIObject.java 2007-12-18
22:57:38 UTC (rev 9367)
@@ -25,10 +25,10 @@
import org.jboss.portal.common.NotYetImplemented;
import org.jboss.portal.presentation.model.StateScopeType;
import org.jboss.portal.presentation.model.UIObject;
-import org.jboss.portal.presentation.model.event.StateChange;
-import org.jboss.portal.presentation.model.event.StateChangeEvent;
-import
org.jboss.portal.presentation.model.event.navigational.NavigationalStateModification;
-import org.jboss.portal.presentation.model.event.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.event.state.navigational.NavigationalStateModification;
+import
org.jboss.portal.presentation.model.event.state.structural.StructuralStateModification;
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;
Deleted:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/event/StateChange.java
===================================================================
---
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/event/StateChange.java 2007-12-18
22:47:00 UTC (rev 9366)
+++
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/event/StateChange.java 2007-12-18
22:57:38 UTC (rev 9367)
@@ -1,79 +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;
-
-import org.jboss.portal.presentation.model.event.StateModification;
-
-/**
- * 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:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/event/StateChangeEvent.java
===================================================================
---
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/event/StateChangeEvent.java 2007-12-18
22:47:00 UTC (rev 9366)
+++
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/event/StateChangeEvent.java 2007-12-18
22:57:38 UTC (rev 9367)
@@ -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;
-
-import org.jboss.portal.presentation.model.ModelEvent;
-import org.jboss.portal.presentation.model.event.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:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/event/StateModification.java
===================================================================
---
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/event/StateModification.java 2007-12-18
22:47:00 UTC (rev 9366)
+++
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/event/StateModification.java 2007-12-18
22:57:38 UTC (rev 9367)
@@ -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;
-
-/**
- * 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:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/event/state/StateChange.java
(from rev 9366,
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/event/StateChange.java)
===================================================================
---
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/event/state/StateChange.java
(rev 0)
+++
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/event/state/StateChange.java 2007-12-18
22:57:38 UTC (rev 9367)
@@ -0,0 +1,79 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.model.event.state;
+
+import org.jboss.portal.presentation.model.event.state.StateModification;
+
+/**
+ * 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:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/event/state/StateChangeEvent.java
(from rev 9366,
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/event/StateChangeEvent.java)
===================================================================
---
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/event/state/StateChangeEvent.java
(rev 0)
+++
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/event/state/StateChangeEvent.java 2007-12-18
22:57:38 UTC (rev 9367)
@@ -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;
+ }
+}
Copied:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/event/state/StateModification.java
(from rev 9366,
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/event/StateModification.java)
===================================================================
---
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/event/state/StateModification.java
(rev 0)
+++
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/event/state/StateModification.java 2007-12-18
22:57:38 UTC (rev 9367)
@@ -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:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/event/state/navigational
(from rev 9366,
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/event/navigational)
Modified:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/event/state/navigational/NavigationalStateModification.java
===================================================================
---
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/event/navigational/NavigationalStateModification.java 2007-12-18
22:47:00 UTC (rev 9366)
+++
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/event/state/navigational/NavigationalStateModification.java 2007-12-18
22:57:38 UTC (rev 9367)
@@ -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.navigational;
+package org.jboss.portal.presentation.model.event.state.navigational;
-import org.jboss.portal.presentation.model.event.StateModification;
+import org.jboss.portal.presentation.model.event.state.StateModification;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
Copied:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/event/state/structural
(from rev 9366,
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/event/structural)
Modified:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/event/state/structural/StructuralStateModification.java
===================================================================
---
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/event/structural/StructuralStateModification.java 2007-12-18
22:47:00 UTC (rev 9366)
+++
branches/presentation/presentation/src/main/org/jboss/portal/presentation/model/event/state/structural/StructuralStateModification.java 2007-12-18
22:57:38 UTC (rev 9367)
@@ -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.structural;
+package org.jboss.portal.presentation.model.event.state.structural;
-import org.jboss.portal.presentation.model.event.StateModification;
+import org.jboss.portal.presentation.model.event.state.StateModification;
import org.jboss.portal.presentation.model.UIObject;
import java.util.Map;
Modified:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/model/EventAssert.java
===================================================================
---
branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/model/EventAssert.java 2007-12-18
22:47:00 UTC (rev 9366)
+++
branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/model/EventAssert.java 2007-12-18
22:57:38 UTC (rev 9367)
@@ -25,10 +25,10 @@
import junit.framework.Assert;
import org.jboss.portal.presentation.model.ModelEvent;
import org.jboss.portal.presentation.model.ModelListener;
-import org.jboss.portal.presentation.model.event.StateChange;
-import org.jboss.portal.presentation.model.event.StateChangeEvent;
-import
org.jboss.portal.presentation.model.event.navigational.NavigationalStateModification;
-import org.jboss.portal.presentation.model.event.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.event.state.navigational.NavigationalStateModification;
+import
org.jboss.portal.presentation.model.event.state.structural.StructuralStateModification;
import java.util.ArrayList;
import java.util.List;
Modified:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/model/ModelTestCase.java
===================================================================
---
branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/model/ModelTestCase.java 2007-12-18
22:47:00 UTC (rev 9366)
+++
branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/model/ModelTestCase.java 2007-12-18
22:57:38 UTC (rev 9367)
@@ -31,7 +31,7 @@
import org.jboss.portal.presentation.model.UIObject;
import org.jboss.portal.presentation.model.UIPage;
import org.jboss.portal.presentation.model.UIPortal;
-import org.jboss.portal.presentation.model.event.structural.StructuralStateModification;
+import
org.jboss.portal.presentation.model.event.state.structural.StructuralStateModification;
import org.jboss.portal.presentation.model.state.NoSuchStateException;
import org.jboss.portal.presentation.model.state.StaleStateException;
import org.jboss.portal.presentation.model.state.StateChangeVetoException;