Author: julien(a)jboss.com
Date: 2008-04-02 16:43:58 -0400 (Wed, 02 Apr 2008)
New Revision: 10487
Added:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client2/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client2/PresentationClient.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server2/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server2/PresentationRequest.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server2/PresentationResponse.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server2/PresentationServer.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server2/PresentationServerException.java
Log:
added client2 and server2 refactored packages
Added:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client2/PresentationClient.java
===================================================================
---
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client2/PresentationClient.java
(rev 0)
+++
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client2/PresentationClient.java 2008-04-02
20:43:58 UTC (rev 10487)
@@ -0,0 +1,38 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, 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.client2;
+
+import org.jboss.portal.presentation.model2.state.navigational.NavigationalStateContext;
+
+/**
+ * The contract that defines the services that the client provides to the server during a
presentation server invocation.
+ *
+ * @author <a href="mailto:julien@jboss-portal.org">Julien
Viet</a>
+ * @version $Revision: 630 $
+ */
+public interface PresentationClient
+{
+
+ NavigationalStateContext getNavigationalStateContext();
+
+}
Added:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server2/PresentationRequest.java
===================================================================
---
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server2/PresentationRequest.java
(rev 0)
+++
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server2/PresentationRequest.java 2008-04-02
20:43:58 UTC (rev 10487)
@@ -0,0 +1,52 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, 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.server2;
+
+import org.jboss.portal.presentation.protocol.ProtocolAction;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien
Viet</a>
+ * @version $Revision: 630 $
+ */
+public class PresentationRequest
+{
+
+ /** . */
+ private final ProtocolAction protocolAction;
+
+ public PresentationRequest(ProtocolAction protocolAction)
+ {
+ if (protocolAction == null)
+ {
+ throw new IllegalArgumentException("No null protocol action");
+ }
+
+ //
+ this.protocolAction = protocolAction;
+ }
+
+ public ProtocolAction getProtocolAction()
+ {
+ return protocolAction;
+ }
+}
Added:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server2/PresentationResponse.java
===================================================================
---
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server2/PresentationResponse.java
(rev 0)
+++
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server2/PresentationResponse.java 2008-04-02
20:43:58 UTC (rev 10487)
@@ -0,0 +1,52 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, 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.server2;
+
+import org.jboss.portal.presentation.protocol.ProtocolResponse;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien
Viet</a>
+ * @version $Revision: 630 $
+ */
+public class PresentationResponse
+{
+
+ /** . */
+ private final ProtocolResponse protocolResponse;
+
+ public PresentationResponse(ProtocolResponse protocolResponse)
+ {
+ if (protocolResponse == null)
+ {
+ throw new IllegalArgumentException("No null protocol response");
+ }
+
+ //
+ this.protocolResponse = protocolResponse;
+ }
+
+ public ProtocolResponse getProtocolResponse()
+ {
+ return protocolResponse;
+ }
+}
Added:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server2/PresentationServer.java
===================================================================
---
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server2/PresentationServer.java
(rev 0)
+++
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server2/PresentationServer.java 2008-04-02
20:43:58 UTC (rev 10487)
@@ -0,0 +1,45 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, 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.server2;
+
+import org.jboss.portal.presentation.model2.state.structural.StructuralStateContext;
+import org.jboss.portal.presentation.model.content.WindowContent;
+import org.jboss.portal.presentation.client2.PresentationClient;
+import org.jboss.portal.presentation.protocol.ProtocolAction;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien
Viet</a>
+ * @version $Revision: 630 $
+ */
+public interface PresentationServer
+{
+
+ StructuralStateContext getStructuralStateContext();
+
+ String render(ProtocolAction action) throws IllegalArgumentException;
+
+ WindowContent renderWindow(PresentationClient client, String windowId) throws
PresentationServerException;
+
+ PresentationResponse process(PresentationClient client, PresentationRequest request)
throws PresentationServerException;
+
+}
Added:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server2/PresentationServerException.java
===================================================================
---
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server2/PresentationServerException.java
(rev 0)
+++
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server2/PresentationServerException.java 2008-04-02
20:43:58 UTC (rev 10487)
@@ -0,0 +1,49 @@
+/******************************************************************************
+ * 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.server2;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 8784 $
+ */
+public class PresentationServerException extends Exception
+{
+ public PresentationServerException()
+ {
+ }
+
+ public PresentationServerException(String message)
+ {
+ super(message);
+ }
+
+ public PresentationServerException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+ public PresentationServerException(Throwable cause)
+ {
+ super(cause);
+ }
+}
\ No newline at end of file