[portal-commits] JBoss Portal SVN: r8914 - in branches/UIServer/uiserver/src/main/org/jboss/portal/presentation: model2/state and 1 other directories.

portal-commits at lists.jboss.org portal-commits at lists.jboss.org
Tue Nov 13 16:53:52 EST 2007


Author: julien at jboss.com
Date: 2007-11-13 16:53:52 -0500 (Tue, 13 Nov 2007)
New Revision: 8914

Added:
   branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model2/state/
   branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model2/state/ObjectState.java
Modified:
   branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/server/ModelLoader.java
Log:
update of model loader.

Added: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model2/state/ObjectState.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model2/state/ObjectState.java	                        (rev 0)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model2/state/ObjectState.java	2007-11-13 21:53:52 UTC (rev 8914)
@@ -0,0 +1,74 @@
+/******************************************************************************
+ * 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.model2.state;
+
+import java.util.Map;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class ObjectState
+{
+
+   /** . */
+   private final String name;
+
+   /** . */
+   private final Map<String, String> properties;
+
+   /** . */
+   private final String parentId;
+
+   /** . */
+   private final List<String> childrenIds;
+
+   public ObjectState(String name, Map<String, String> properties, String parentId, List<String> childrenIds)
+   {
+      this.name = name;
+      this.properties = properties;
+      this.parentId = parentId;
+      this.childrenIds = childrenIds;
+   }
+
+   public String getName()
+   {
+      return name;
+   }
+
+   public Map<String, String> getProperties()
+   {
+      return properties;
+   }
+
+   public String getParentId()
+   {
+      return parentId;
+   }
+
+   public List<String> getChildrenIds()
+   {
+      return childrenIds;
+   }
+}

Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/server/ModelLoader.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/server/ModelLoader.java	2007-11-13 21:47:48 UTC (rev 8913)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/server/ModelLoader.java	2007-11-13 21:53:52 UTC (rev 8914)
@@ -22,8 +22,7 @@
  ******************************************************************************/
 package org.jboss.portal.presentation.server;
 
-import java.util.Map;
-import java.util.List;
+import org.jboss.portal.presentation.model2.state.ObjectState;
 
 /**
  * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
@@ -32,10 +31,13 @@
 public interface ModelLoader
 {
 
-   Map<String, String> loadState(String objectId);
+   /**
+    * Load the state of a 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
+    */
+   ObjectState loadState(String objectId) throws IllegalArgumentException;
 
-   List<String> loadChildren(String objectId);
-
-   String loadParent(String objectId);
-
 }




More information about the portal-commits mailing list