Author: julien(a)jboss.com
Date: 2008-04-18 03:19:12 -0400 (Fri, 18 Apr 2008)
New Revision: 10634
Removed:
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/state/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ui/UIObject.java
Modified:
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/UIAction.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/MoveUIObjectAction.java
Log:
remove garbage stuff
Modified:
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-18
07:02:38 UTC (rev 10633)
+++
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIObject.java 2008-04-18
07:19:12 UTC (rev 10634)
@@ -22,8 +22,8 @@
******************************************************************************/
package org.jboss.portal.presentation.model;
-import org.jboss.portal.presentation.model.state.StateException;
import org.jboss.portal.presentation.state.StateType;
+import org.jboss.portal.presentation.state.StateException;
import java.util.Set;
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/model/ui/UIAction.java 2008-04-18
07:02:38 UTC (rev 10633)
+++
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ui/UIAction.java 2008-04-18
07:19:12 UTC (rev 10634)
@@ -22,7 +22,9 @@
******************************************************************************/
package org.jboss.portal.presentation.model.ui;
+import org.jboss.portal.presentation.model.UIObject;
+
/**
* An action that can be triggered.
*
Deleted:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ui/UIObject.java
===================================================================
---
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ui/UIObject.java 2008-04-18
07:02:38 UTC (rev 10633)
+++
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ui/UIObject.java 2008-04-18
07:19:12 UTC (rev 10634)
@@ -1,209 +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.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/protocol/MoveUIObjectAction.java
===================================================================
---
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/MoveUIObjectAction.java 2008-04-18
07:02:38 UTC (rev 10633)
+++
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/MoveUIObjectAction.java 2008-04-18
07:19:12 UTC (rev 10634)
@@ -22,8 +22,6 @@
******************************************************************************/
package org.jboss.portal.presentation.protocol;
-import org.jboss.portal.presentation.model.ui.UIObject;
-
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $