From portal-commits at lists.jboss.org Tue Nov 13 16:53:52 2007 Content-Type: multipart/mixed; boundary="===============5774678005256988791==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8914 - in branches/UIServer/uiserver/src/main/org/jboss/portal/presentation: model2/state and 1 other directories. Date: Tue, 13 Nov 2007 16:53:52 -0500 Message-ID: --===============5774678005256988791== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)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/mo= del2/state/ObjectState.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model= 2/state/ObjectState.java (rev 0) +++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model= 2/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 Julien Viet + * @version $Revision: 1.1 $ + */ +public class ObjectState +{ + + /** . */ + private final String name; + + /** . */ + private final Map properties; + + /** . */ + private final String parentId; + + /** . */ + private final List childrenIds; + + public ObjectState(String name, Map properties, String = parentId, List childrenIds) + { + this.name =3D name; + this.properties =3D properties; + this.parentId =3D parentId; + this.childrenIds =3D childrenIds; + } + + public String getName() + { + return name; + } + + public Map getProperties() + { + return properties; + } + + public String getParentId() + { + return parentId; + } + + public List getChildrenIds() + { + return childrenIds; + } +} Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation= /server/ModelLoader.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/serve= r/ModelLoader.java 2007-11-13 21:47:48 UTC (rev 8913) +++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/serve= r/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 Julien Viet @@ -32,10 +31,13 @@ public interface ModelLoader { = - Map 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 loadChildren(String objectId); - - String loadParent(String objectId); - } --===============5774678005256988791==--