Author: julien(a)jboss.com
Date: 2007-11-13 13:29:00 -0500 (Tue, 13 Nov 2007)
New Revision: 8911
Added:
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model2/
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model2/UIContainer.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model2/UIContext.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model2/UIObject.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model2/UIPage.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model2/UIPortal.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model2/UIWindow.java
Modified:
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/RequestContext.java
Log:
udpates
Modified:
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/RequestContext.java
===================================================================
---
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/RequestContext.java 2007-11-13
17:51:48 UTC (rev 8910)
+++
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/RequestContext.java 2007-11-13
18:29:00 UTC (rev 8911)
@@ -23,6 +23,7 @@
package org.jboss.portal.presentation;
import org.jboss.portal.presentation.action.server.ServerAction;
+import org.jboss.portal.presentation.model2.UIContext;
/**
* The contract that defines the services that the client provides to the server during a
server invocation.
@@ -42,4 +43,9 @@
*/
String render(ServerAction action) throws IllegalArgumentException;
+ /**
+ * Returns the root UI context provided by the portal.
+ */
+ UIContext getUIContext();
+
}
Added:
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model2/UIContainer.java
===================================================================
---
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model2/UIContainer.java
(rev 0)
+++
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model2/UIContainer.java 2007-11-13
18:29:00 UTC (rev 8911)
@@ -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.model2;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public interface UIContainer extends UIObject
+{
+}
Added:
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model2/UIContext.java
===================================================================
---
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model2/UIContext.java
(rev 0)
+++
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model2/UIContext.java 2007-11-13
18:29:00 UTC (rev 8911)
@@ -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.model2;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public interface UIContext extends UIObject
+{
+
+ UIObject getObject(String id);
+
+}
Added:
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model2/UIObject.java
===================================================================
---
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model2/UIObject.java
(rev 0)
+++
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model2/UIObject.java 2007-11-13
18:29:00 UTC (rev 8911)
@@ -0,0 +1,52 @@
+/******************************************************************************
+ * 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;
+
+import java.util.List;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public interface UIObject
+{
+
+ String getId();
+
+ /**
+ * Create a 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
+ */
+ <T extends UIObject> T createChild(String name, Class<T> type) throws
IllegalArgumentException;
+
+ void destroyChild(String name);
+
+ List<UIObject> getChildren();
+
+ <T extends UIObject> List<T> getChildren(Class<T> type);
+
+}
Added:
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model2/UIPage.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model2/UIPage.java
(rev 0)
+++
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model2/UIPage.java 2007-11-13
18:29:00 UTC (rev 8911)
@@ -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.model2;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public interface UIPage extends UIObject
+{
+}
Added:
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model2/UIPortal.java
===================================================================
---
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model2/UIPortal.java
(rev 0)
+++
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model2/UIPortal.java 2007-11-13
18:29:00 UTC (rev 8911)
@@ -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.model2;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public interface UIPortal extends UIObject
+{
+}
Added:
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model2/UIWindow.java
===================================================================
---
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model2/UIWindow.java
(rev 0)
+++
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model2/UIWindow.java 2007-11-13
18:29:00 UTC (rev 8911)
@@ -0,0 +1,47 @@
+/******************************************************************************
+ * 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;
+
+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
+{
+
+ String getTitle();
+
+ void setTitle(String title);
+
+ WindowState getWindowState();
+
+ void setWindowState(WindowState windowState);
+
+ Mode getMode();
+
+ void setMode(Mode mode);
+
+}