JBoss Portal SVN: r10487 - in modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation: client2 and 1 other directories.
by portal-commits@lists.jboss.org
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
16 years, 2 months
JBoss Portal SVN: r10486 - modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/ui.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-04-02 14:50:59 -0400 (Wed, 02 Apr 2008)
New Revision: 10486
Modified:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/ui/UIObjectImpl.java
Log:
- use safeCast from org.jboss.portal.common
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/ui/UIObjectImpl.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/ui/UIObjectImpl.java 2008-04-02 15:55:51 UTC (rev 10485)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/ui/UIObjectImpl.java 2008-04-02 18:50:59 UTC (rev 10486)
@@ -26,6 +26,7 @@
import org.jboss.portal.presentation.model2.state.StateException;
import org.jboss.portal.presentation.model2.state.structural.StructuralObject;
import org.jboss.portal.presentation.impl.model2.UIObjectRef;
+import org.jboss.portal.common.reflect.Reflection;
import java.util.Map;
import java.util.Set;
@@ -60,7 +61,7 @@
public <T> T getProperty(String propertyName, Class<T> propertyType) throws IllegalArgumentException, StateException
{
- return safeCast(getProperty(propertyName), propertyType);
+ return Reflection.safeCast(getProperty(propertyName), propertyType);
}
public Set<String> getPropertyNames()
@@ -76,35 +77,4 @@
}
return structuralObject.getState().getProperties().get(propertyName);
}
-
- /**
- * Attempt to cast the value argument to the provided type argument. If the value argument type is assignable
- * to the provided type, the value is returned, otherwise if it is not or the value is null, null is returned.
- *
- * @param value the value to cast
- * @param type the type to downcast
- * @return the casted value or null
- */
- private <T> T safeCast(Object value, Class<T> type)
- {
- if (type == null)
- {
- throw new IllegalArgumentException();
- }
- if (value == null)
- {
- return null;
- }
- else
- {
- if (type.isAssignableFrom(value.getClass()))
- {
- return type.cast(value);
- }
- else
- {
- return null;
- }
- }
- }
}
\ No newline at end of file
16 years, 2 months
JBoss Portal SVN: r10485 - modules/presentation/trunk/presentation/src/main/config/sar/META-INF.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2008-04-02 11:55:51 -0400 (Wed, 02 Apr 2008)
New Revision: 10485
Modified:
modules/presentation/trunk/presentation/src/main/config/sar/META-INF/jboss-service.xml
Log:
just cleanup
Modified: modules/presentation/trunk/presentation/src/main/config/sar/META-INF/jboss-service.xml
===================================================================
--- modules/presentation/trunk/presentation/src/main/config/sar/META-INF/jboss-service.xml 2008-04-02 15:29:09 UTC (rev 10484)
+++ modules/presentation/trunk/presentation/src/main/config/sar/META-INF/jboss-service.xml 2008-04-02 15:55:51 UTC (rev 10485)
@@ -40,71 +40,9 @@
<xmbean/>
<depends optional-attribute-name="PresentationServer" proxy-type="attribute">portal:service=PresentationServer</depends>
</mbean>
-
- <!-- Not needed in a Mock Portal Server setup -->
- <!--
+
+ <!-- PF Plugin Services: Out-Of-The_Box Plugging in PF integrated with the Mock Portal Server -->
<mbean
- code="org.jboss.portal.core.presentation.model.StructuralStateContextImpl"
- name="portal:container=ModelLoader"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends optional-attribute-name="PortalObjectContainer" proxy-type="attribute">portal:container=PortalObject</depends>
- <depends>portal:container=PortalObject</depends>
- <depends>portal:service=PageService</depends>
- <depends>portal:commandFactory=DefaultPortal</depends>
- <depends>portal:urlFactory=Delegating</depends>
- <depends>portal:service=InterceptorStackFactory,type=Command</depends>
- <depends>portal:container=Instance</depends>
- <depends>portal:service=PortalAuthorizationManagerFactory</depends>
- <depends>portal:service=CustomizationManager</depends>
- <depends>portal:service=ContentProviderRegistry</depends>
- <depends>portal:service=ResponseHandler,type=Selector</depends>
- <depends>portal:service=ControlPolicy,type=Page</depends>
- </mbean>
- <mbean
- code="org.jboss.portal.core.presentation.server.PresentationServerImpl"
- name="portal:service=PresentationServer"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends optional-attribute-name="Processor" proxy-type="attribute">portal:service=Processor</depends>
- <depends optional-attribute-name="ModelLoader" proxy-type="attribute">portal:container=ModelLoader</depends>
- <depends optional-attribute-name="ContentRendererRegistry" proxy-type="attribute">portal:service=ContentProviderRegistry</depends>
- <depends optional-attribute-name="PortalObjectContainer" proxy-type="attribute">portal:container=PortalObject</depends>
- <depends>portal:service=PageService</depends>
- <depends>portal:commandFactory=DefaultPortal</depends>
- <depends>portal:urlFactory=Delegating</depends>
- <depends>portal:service=InterceptorStackFactory,type=Command</depends>
- <depends>portal:container=Instance</depends>
- <depends>portal:service=PortalAuthorizationManagerFactory</depends>
- <depends>portal:service=CustomizationManager</depends>
- <depends>portal:service=ContentProviderRegistry</depends>
- <depends>portal:service=ResponseHandler,type=Selector</depends>
- <depends>portal:service=ControlPolicy,type=Page</depends>
- </mbean>
- <mbean
- code="org.jboss.portal.core.presentation.server.MainProcessor"
- name="portal:service=Processor"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends>portal:service=PageService</depends>
- <depends>portal:commandFactory=DefaultPortal</depends>
- <depends>portal:urlFactory=Delegating</depends>
- <depends>portal:service=InterceptorStackFactory,type=Command</depends>
- <depends>portal:container=Instance</depends>
- <depends>portal:service=PortalAuthorizationManagerFactory</depends>
- <depends>portal:service=ContentProviderRegistry</depends>
- <depends>portal:service=ResponseHandler,type=Selector</depends>
- <depends>portal:service=ControlPolicy,type=Page</depends>
- <depends optional-attribute-name="PortalObjectContainer" proxy-type="attribute">portal:container=PortalObject</depends>
- <depends optional-attribute-name="CustomizationManager" proxy-type="attribute">portal:service=CustomizationManager</depends>
- </mbean>
- -->
-
- <!-- PF Plugin Services: Temprarily hooking in PF integrated with the Mock Portal Server -->
- <mbean
code="org.jboss.portal.presentation.test.portal.plugin.PresentationServerImpl"
name="portal:service=PresentationServer"
xmbean-dd=""
16 years, 2 months
JBoss Portal SVN: r10484 - in modules/presentation/trunk/presentation: src/main/java/org/jboss/portal/presentation/impl/model2 and 14 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-04-02 11:29:09 -0400 (Wed, 02 Apr 2008)
New Revision: 10484
Added:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/state/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/state/ConstraintViolationException.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/state/NoSuchStateException.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/state/StaleStateException.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/state/StateChangeVetoException.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/state/StateException.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/state/navigational/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/state/navigational/NavigationalStateContext.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/state/structural/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/state/structural/StructuralObject.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/state/structural/StructuralState.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/state/structural/StructuralStateContext.java
modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/state/navigational/
modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/state/navigational/NavigationalStateContextImpl.java
Removed:
modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/EventAssert.java
modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/EventTestCase.java
modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/ModelTestCase.java
modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/UIModelTester.java
Modified:
modules/presentation/trunk/presentation/pom.xml
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/UIModelImpl.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/UIObjectImpl.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/diff/CreateDiffPhase.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/ui/UIObjectImpl.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/update/ObjectUpdate.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/StructuralStateContext.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/ui/UIPage.java
modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/AbstractModelTestCase.java
modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/MockModelTestCase.java
modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/state/structural/MockModel.java
modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/state/structural/MockModelImpl.java
modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/state/structural/MockObject.java
modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/state/structural/StructuralObjectImpl.java
modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/state/structural/StructuralStateImpl.java
modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/AbstractModelTestCase.java
modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/AddChildTestCase.java
modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/NodeDef.java
modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/TraversalModelTestCase.java
Log:
- had to fork the previous model package state package
- added junit test to pom.xml
Modified: modules/presentation/trunk/presentation/pom.xml
===================================================================
--- modules/presentation/trunk/presentation/pom.xml 2008-04-02 14:34:34 UTC (rev 10483)
+++ modules/presentation/trunk/presentation/pom.xml 2008-04-02 15:29:09 UTC (rev 10484)
@@ -169,6 +169,24 @@
</execution>
</executions>
</plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <!-- To use in conjonctin with
+ export MAVEN_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000"
+ -->
+ <forkMode>never</forkMode>
+ <argLine>-enableassertions</argLine>
+ <excludes>
+ <exclude>org/jboss/portal/presentation/test/layout/TestFlexibleGrid.java</exclude>
+ <exclude>org/jboss/portal/presentation/test/layout/TestRegionLayoutManager.java</exclude>
+ <exclude>org/jboss/portal/presentation/test/model/AbstractModelTestCase.java</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+
</plugins>
</build>
</project>
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/UIModelImpl.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/UIModelImpl.java 2008-04-02 14:34:34 UTC (rev 10483)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/UIModelImpl.java 2008-04-02 15:29:09 UTC (rev 10484)
@@ -22,8 +22,8 @@
******************************************************************************/
package org.jboss.portal.presentation.impl.model2;
-import org.jboss.portal.presentation.model.state.structural.StructuralStateContext;
-import org.jboss.portal.presentation.model.state.navigational.NavigationalStateContext;
+import org.jboss.portal.presentation.model2.state.structural.StructuralStateContext;
+import org.jboss.portal.presentation.model2.state.navigational.NavigationalStateContext;
import org.jboss.portal.presentation.model2.UIModel;
import org.jboss.portal.presentation.model2.ViewPortContext;
import org.jboss.portal.presentation.model2.ViewPortScope;
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/UIObjectImpl.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/UIObjectImpl.java 2008-04-02 14:34:34 UTC (rev 10483)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/UIObjectImpl.java 2008-04-02 15:29:09 UTC (rev 10484)
@@ -23,8 +23,8 @@
package org.jboss.portal.presentation.impl.model2;
import org.jboss.portal.presentation.model2.ui.UIObject;
-import org.jboss.portal.presentation.model.state.StateException;
-import org.jboss.portal.presentation.model.state.structural.StructuralObject;
+import org.jboss.portal.presentation.model2.state.StateException;
+import org.jboss.portal.presentation.model2.state.structural.StructuralObject;
import java.util.Map;
import java.util.Set;
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/diff/CreateDiffPhase.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/diff/CreateDiffPhase.java 2008-04-02 14:34:34 UTC (rev 10483)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/diff/CreateDiffPhase.java 2008-04-02 15:29:09 UTC (rev 10484)
@@ -26,8 +26,8 @@
import org.jboss.portal.presentation.model2.ViewPortContext;
import org.jboss.portal.presentation.model2.ObjectTraversalType;
import org.jboss.portal.presentation.impl.model2.ui.UIObjectImpl;
-import org.jboss.portal.presentation.model.state.structural.StructuralStateContext;
-import org.jboss.portal.presentation.model.state.structural.StructuralObject;
+import org.jboss.portal.presentation.model2.state.structural.StructuralStateContext;
+import org.jboss.portal.presentation.model2.state.structural.StructuralObject;
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/ui/UIObjectImpl.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/ui/UIObjectImpl.java 2008-04-02 14:34:34 UTC (rev 10483)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/ui/UIObjectImpl.java 2008-04-02 15:29:09 UTC (rev 10484)
@@ -23,8 +23,8 @@
package org.jboss.portal.presentation.impl.model2.ui;
import org.jboss.portal.presentation.model2.ui.UIObject;
-import org.jboss.portal.presentation.model.state.StateException;
-import org.jboss.portal.presentation.model.state.structural.StructuralObject;
+import org.jboss.portal.presentation.model2.state.StateException;
+import org.jboss.portal.presentation.model2.state.structural.StructuralObject;
import org.jboss.portal.presentation.impl.model2.UIObjectRef;
import java.util.Map;
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/update/ObjectUpdate.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/update/ObjectUpdate.java 2008-04-02 14:34:34 UTC (rev 10483)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/update/ObjectUpdate.java 2008-04-02 15:29:09 UTC (rev 10484)
@@ -25,7 +25,7 @@
import org.jboss.portal.presentation.impl.model2.ui.UIObjectImpl;
import org.jboss.portal.presentation.impl.model2.UIObjectRef;
import org.jboss.portal.presentation.model2.ViewPortContext;
-import org.jboss.portal.presentation.model.state.structural.StructuralObject;
+import org.jboss.portal.presentation.model2.state.structural.StructuralObject;
import java.util.List;
import java.util.HashMap;
@@ -124,7 +124,7 @@
}
// Perform state update
- if (object.structuralObject.compareTo(structuralObject))
+ if (object.structuralObject.equals(structuralObject))
{
object.structuralObject = structuralObject;
context.updateObject(structuralObject.getId());
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/StructuralStateContext.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/StructuralStateContext.java 2008-04-02 14:34:34 UTC (rev 10483)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/StructuralStateContext.java 2008-04-02 15:29:09 UTC (rev 10484)
@@ -25,9 +25,7 @@
import org.jboss.portal.presentation.model.UIObject;
import org.jboss.portal.presentation.model.state.StateChangeVetoException;
import org.jboss.portal.presentation.model.state.StateException;
-import org.jboss.portal.presentation.model.state.NoSuchStateException;
-import java.util.List;
import java.util.Map;
import java.util.Collection;
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/state/ConstraintViolationException.java (from rev 10476, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/ConstraintViolationException.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/state/ConstraintViolationException.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/state/ConstraintViolationException.java 2008-04-02 15:29:09 UTC (rev 10484)
@@ -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.model2.state;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class ConstraintViolationException extends StateException
+{
+ public ConstraintViolationException()
+ {
+ }
+
+ public ConstraintViolationException(String s)
+ {
+ super(s);
+ }
+
+ public ConstraintViolationException(String s, Throwable throwable)
+ {
+ super(s, throwable);
+ }
+
+ public ConstraintViolationException(Throwable throwable)
+ {
+ super(throwable);
+ }
+}
\ No newline at end of file
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/state/NoSuchStateException.java (from rev 10476, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/NoSuchStateException.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/state/NoSuchStateException.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/state/NoSuchStateException.java 2008-04-02 15:29:09 UTC (rev 10484)
@@ -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.model2.state;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class NoSuchStateException extends StateException
+{
+ public NoSuchStateException()
+ {
+ }
+
+ public NoSuchStateException(String s)
+ {
+ super(s);
+ }
+
+ public NoSuchStateException(String s, Throwable throwable)
+ {
+ super(s, throwable);
+ }
+
+ public NoSuchStateException(Throwable throwable)
+ {
+ super(throwable);
+ }
+}
\ No newline at end of file
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/state/StaleStateException.java (from rev 10476, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/StaleStateException.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/state/StaleStateException.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/state/StaleStateException.java 2008-04-02 15:29:09 UTC (rev 10484)
@@ -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.model2.state;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class StaleStateException extends StateException
+{
+ public StaleStateException()
+ {
+ }
+
+ public StaleStateException(String s)
+ {
+ super(s);
+ }
+
+ public StaleStateException(String s, Throwable throwable)
+ {
+ super(s, throwable);
+ }
+
+ public StaleStateException(Throwable throwable)
+ {
+ super(throwable);
+ }
+}
\ No newline at end of file
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/state/StateChangeVetoException.java (from rev 10476, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/StateChangeVetoException.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/state/StateChangeVetoException.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/state/StateChangeVetoException.java 2008-04-02 15:29:09 UTC (rev 10484)
@@ -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.model2.state;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class StateChangeVetoException extends StateException
+{
+ public StateChangeVetoException()
+ {
+ }
+
+ public StateChangeVetoException(String s)
+ {
+ super(s);
+ }
+
+ public StateChangeVetoException(String s, Throwable throwable)
+ {
+ super(s, throwable);
+ }
+
+ public StateChangeVetoException(Throwable throwable)
+ {
+ super(throwable);
+ }
+}
\ No newline at end of file
Added: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/state/StateException.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/state/StateException.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/state/StateException.java 2008-04-02 15:29:09 UTC (rev 10484)
@@ -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.model2.state;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class StateException extends RuntimeException
+{
+ public StateException()
+ {
+ }
+
+ public StateException(String s)
+ {
+ super(s);
+ }
+
+ public StateException(String s, Throwable throwable)
+ {
+ super(s, throwable);
+ }
+
+ public StateException(Throwable throwable)
+ {
+ super(throwable);
+ }
+}
\ No newline at end of file
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/state/navigational/NavigationalStateContext.java (from rev 10476, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/navigational/NavigationalStateContext.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/state/navigational/NavigationalStateContext.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/state/navigational/NavigationalStateContext.java 2008-04-02 15:29:09 UTC (rev 10484)
@@ -0,0 +1,37 @@
+/******************************************************************************
+ * 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.navigational;
+
+import org.jboss.portal.presentation.model2.state.StateException;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public interface NavigationalStateContext
+{
+ Object get(String objectId, String key) throws IllegalArgumentException;
+
+ void set(String objectId, String key, Object navigationalState) throws StateException, IllegalArgumentException;
+
+}
\ No newline at end of file
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/state/structural/StructuralObject.java (from rev 10476, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/StructuralObject.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/state/structural/StructuralObject.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/state/structural/StructuralObject.java 2008-04-02 15:29:09 UTC (rev 10484)
@@ -0,0 +1,127 @@
+/******************************************************************************
+ * 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.structural;
+
+import java.util.Set;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public interface StructuralObject
+{
+
+ String getId();
+
+ StructuralState getState();
+
+ boolean equals(Object obj);
+
+ /**
+ * A comparison between two structural objects.
+ */
+ public static class Refresh
+ {
+
+ /** . */
+ private final StructuralObject parent;
+
+ /** . */
+ private final StructuralObject object;
+
+ /** . */
+ private final Set<StructuralObject> addedChildren;
+
+ /** . */
+ private final Set<String> removedChildren;
+
+ /** . */
+ private final Map<String, StructuralObject> staleChildren;
+
+ /** . */
+ private final Set<String> validChildren;
+
+ public Refresh(
+ StructuralObject parent,
+ StructuralObject object,
+ Set<StructuralObject> addedChildren,
+ Set<String> removedChildren,
+ Map<String, StructuralObject> staleChildren,
+ Set<String> validChildren)
+ {
+ if (addedChildren == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ if (validChildren == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ if (staleChildren == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ if (removedChildren == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ this.parent = parent;
+ this.object = object;
+ this.addedChildren = addedChildren;
+ this.validChildren = validChildren;
+ this.staleChildren = staleChildren;
+ this.removedChildren = removedChildren;
+ }
+
+ public StructuralObject getParent()
+ {
+ return parent;
+ }
+
+ public StructuralObject getObject()
+ {
+ return object;
+ }
+
+ public Set<StructuralObject> getAddedChildren()
+ {
+ return addedChildren;
+ }
+
+ public Map<String, StructuralObject> getStaleChildren()
+ {
+ return staleChildren;
+ }
+
+ public Set<String> getValidChildren()
+ {
+ return validChildren;
+ }
+
+ public Set<String> getRemovedChildren()
+ {
+ return removedChildren;
+ }
+ }
+}
\ No newline at end of file
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/state/structural/StructuralState.java (from rev 10476, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/StructuralState.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/state/structural/StructuralState.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/state/structural/StructuralState.java 2008-04-02 15:29:09 UTC (rev 10484)
@@ -0,0 +1,43 @@
+/******************************************************************************
+ * 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.structural;
+
+import org.jboss.portal.presentation.model2.ui.UIObject;
+
+import java.util.Map;
+
+/**
+ * The structural state.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public interface StructuralState
+{
+
+ Class<? extends UIObject> getType();
+
+ String getName();
+
+ Map<String, String> getProperties();
+}
\ No newline at end of file
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/state/structural/StructuralStateContext.java (from rev 10476, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/structural/StructuralStateContext.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/state/structural/StructuralStateContext.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/state/structural/StructuralStateContext.java 2008-04-02 15:29:09 UTC (rev 10484)
@@ -0,0 +1,95 @@
+/******************************************************************************
+ * 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.structural;
+
+import org.jboss.portal.presentation.model2.state.StateException;
+
+import java.util.Collection;
+
+/**
+ * The structural state context.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public interface StructuralStateContext
+{
+
+ /**
+ * Load the state of the 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
+ */
+ StructuralObject load(String objectId) throws IllegalArgumentException;
+
+ /**
+ * Load the children of the provided object.
+ *
+ * @param parent the parent
+ * @return the list of children as structural objects
+ * @throws IllegalArgumentException if the provided object is null
+ * @throws StateException any useful exception that would make the object non valid
+ */
+ Collection<StructuralObject> loadChildren(StructuralObject parent) throws IllegalArgumentException, StateException;
+
+ /**
+ * Load the parent of the specified object.
+ *
+ * @param child the child
+ * @return the parent or null if it does not exist
+ * @throws IllegalArgumentException if the provided object is null
+ * @throws StateException any useful exception that would make the object non valid
+ */
+ StructuralObject loadParent(StructuralObject child) throws IllegalArgumentException, StateException;
+
+ /**
+ * Validate the state of the provided object. The operation is idempotent and does not modify any state.
+ * If validation is succesfull the method returns otherwise it throws an exception that indicates
+ * the nature of the non validation failure.
+ *
+ * @param object the object to check
+ * @throws IllegalArgumentException if the provided object is null
+ * @throws StateException any useful exception that would make the object non valid
+ */
+ void validate(StructuralObject object) throws IllegalArgumentException, StateException;
+
+ /**
+ * Returns the id of the root object.
+ *
+ * @return the id of the root object.
+ */
+ String getRootId();
+
+ /**
+ * Attempt to return an object that contains the difference between the provided object
+ * and the up to date object.
+ *
+ * @param object the object to refresh
+ * @return the refresh
+ * @throws IllegalArgumentException if the object argument is null
+ * @throws StateException if the object cannot be refreshed
+ */
+ StructuralObject.Refresh refresh(StructuralObject object) throws IllegalArgumentException, StateException;
+}
\ No newline at end of file
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/ui/UIPage.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/ui/UIPage.java 2008-04-02 14:34:34 UTC (rev 10483)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/ui/UIPage.java 2008-04-02 15:29:09 UTC (rev 10484)
@@ -22,8 +22,6 @@
******************************************************************************/
package org.jboss.portal.presentation.model2.ui;
-import org.jboss.portal.presentation.model.UIObject;
-
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
Modified: modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/AbstractModelTestCase.java
===================================================================
--- modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/AbstractModelTestCase.java 2008-04-02 14:34:34 UTC (rev 10483)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/AbstractModelTestCase.java 2008-04-02 15:29:09 UTC (rev 10484)
@@ -24,10 +24,6 @@
import org.jboss.portal.presentation.test.model.state.structural.MockModel;
import org.jboss.portal.presentation.test.model.state.structural.MockModelImpl;
-import org.jboss.portal.presentation.model.UIContext;
-import org.jboss.portal.presentation.model.UIObject;
-import org.jboss.portal.presentation.impl.model.container.UIObjectContainer;
-import org.jboss.portal.presentation.impl.model.state.navigational.NavigationalStateContextImpl;
import junit.framework.TestCase;
/**
@@ -59,30 +55,8 @@
this.model = null;
}
- protected final UIContext createContext()
- {
- return new UIObjectContainer(model.getStructuralStateContext(), new NavigationalStateContextImpl()).getRoot();
- }
-
protected final void resetModel()
{
this.model = new MockModelImpl();
}
-
- protected static final UIObject.Visitor CRAWLER = new UIObject.Visitor()
- {
- public boolean enterObject(UIObject object)
- {
- return true;
- }
-
- public void leaveObject(UIObject object)
- {
- }
-
- public boolean enterChildren(UIObject object, boolean loaded)
- {
- return loaded;
- }
- };
}
Deleted: modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/EventAssert.java
===================================================================
--- modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/EventAssert.java 2008-04-02 14:34:34 UTC (rev 10483)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/EventAssert.java 2008-04-02 15:29:09 UTC (rev 10484)
@@ -1,105 +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.test.model;
-
-import junit.framework.Assert;
-import org.jboss.portal.presentation.model.ModelEvent;
-import org.jboss.portal.presentation.model.ModelListener;
-import org.jboss.portal.presentation.model.event.state.StateChange;
-import org.jboss.portal.presentation.model.event.state.StateChangeEvent;
-import org.jboss.portal.presentation.model.event.state.navigational.NavigationalStateModification;
-import org.jboss.portal.presentation.model.event.state.structural.StructuralStateModification;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public class EventAssert implements ModelListener
-{
-
- /** . */
- private final List<ModelEvent> events = new ArrayList<ModelEvent>();
-
- /** . */
- private int index = 0;
-
- public void onEvent(ModelEvent event)
- {
- events.add(event);
- }
-
- public <T> T next(Class<T> clazz)
- {
- Assert.assertTrue(index < events.size());
- ModelEvent event = events.get(index++);
- Assert.assertNotNull(event);
- Assert.assertTrue(clazz.isInstance(event));
- return clazz.cast(event);
- }
-
- public void next(String targetId, StructuralStateModification.Update sp)
- {
- StateChangeEvent ste = next(StateChangeEvent.class);
- StateChange change = ste.getChange();
- Assert.assertEquals(targetId, change.getTargetId());
- StructuralStateModification.Update mod = (StructuralStateModification.Update)change.getModification();
- Assert.assertEquals(sp.getChanges(), mod.getChanges());
- }
-
- public void next(String targetId, StructuralStateModification.Creation sp)
- {
- StateChangeEvent ste = next(StateChangeEvent.class);
- StateChange change = ste.getChange();
- Assert.assertEquals(targetId, change.getTargetId());
- StructuralStateModification.Creation mod = (StructuralStateModification.Creation)change.getModification();
- Assert.assertEquals(sp.getName(), mod.getName());
- Assert.assertEquals(sp.getType(), mod.getType());
- Assert.assertEquals(sp.getProperties(), mod.getProperties());
- }
-
- public void next(String targetId, StructuralStateModification.Destruction sp)
- {
- StateChangeEvent ste = next(StateChangeEvent.class);
- StateChange change = ste.getChange();
- Assert.assertEquals(targetId, change.getTargetId());
- StructuralStateModification.Destruction mod = (StructuralStateModification.Destruction)change.getModification();
- }
-
- public void next(String targetId, NavigationalStateModification ns)
- {
- StateChangeEvent ste = next(StateChangeEvent.class);
- StateChange change = ste.getChange();
- Assert.assertEquals(targetId, change.getTargetId());
- NavigationalStateModification mod = (NavigationalStateModification)change.getModification();
- Assert.assertEquals(ns.getKey(), mod.getKey());
- Assert.assertEquals(ns.getNavigationalState(), mod.getNavigationalState());
- }
-
- public void assertEmpty()
- {
- Assert.assertEquals(events.size(), index);
- }
-}
Deleted: modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/EventTestCase.java
===================================================================
--- modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/EventTestCase.java 2008-04-02 14:34:34 UTC (rev 10483)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/EventTestCase.java 2008-04-02 15:29:09 UTC (rev 10484)
@@ -1,79 +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.test.model;
-
-import org.jboss.portal.presentation.model.UIContext;
-import org.jboss.portal.presentation.model.UIPortal;
-import org.jboss.portal.presentation.model.UIObject;
-import org.jboss.portal.presentation.model.event.state.structural.StructuralStateModification;
-import org.jboss.portal.presentation.model.event.lifecycle.RelationshipAddedEvent;
-import org.jboss.portal.presentation.model.event.lifecycle.RelationshipRemovedEvent;
-
-import java.util.HashMap;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public class EventTestCase extends AbstractModelTestCase
-{
-
- public EventTestCase()
- {
- }
-
- public void testCreateChildEvents()
- {
- UIContext context = createContext();
- context.getChildren().size();
-
- EventAssert eventAssert = new EventAssert();
- context.addModelListener(eventAssert);
-
- //
- UIObject foo = context.createChild("foo", UIPortal.class);
- String fooId = foo.getId();
-
- //
- eventAssert.next(RelationshipAddedEvent.class);
- eventAssert.next(fooId, new StructuralStateModification.Creation(UIPortal.class, "foo", new HashMap<String, String>()));
- }
-
- public void testDestroyChildEvents()
- {
- UIContext context = createContext();
- UIObject foo = context.createChild("foo", UIPortal.class);
- String fooId = foo.getId();
- context.getChildren().size();
-
- EventAssert eventAssert = new EventAssert();
- context.addModelListener(eventAssert);
-
- //
- context.destroyChild("foo");
-
- //
- eventAssert.next(RelationshipRemovedEvent.class);
- eventAssert.next(fooId, new StructuralStateModification.Destruction());
- }
-}
Modified: modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/MockModelTestCase.java
===================================================================
--- modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/MockModelTestCase.java 2008-04-02 14:34:34 UTC (rev 10483)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/MockModelTestCase.java 2008-04-02 15:29:09 UTC (rev 10484)
@@ -23,23 +23,20 @@
package org.jboss.portal.presentation.test.model;
import junit.framework.TestCase;
-import org.jboss.portal.presentation.model.UIContext;
-import org.jboss.portal.presentation.model.UIPortal;
-import org.jboss.portal.presentation.model.UIPage;
-import org.jboss.portal.presentation.model.state.StaleStateException;
-import org.jboss.portal.presentation.model.state.StateException;
-import org.jboss.portal.presentation.model.state.NoSuchStateException;
-import org.jboss.portal.presentation.model.state.structural.StructuralObject;
-import org.jboss.portal.presentation.model.state.structural.StructuralState;
-import org.jboss.portal.presentation.model.state.structural.StructuralStateContext;
+import org.jboss.portal.presentation.model2.ui.UIContext;
+import org.jboss.portal.presentation.model2.ui.UIPage;
+import org.jboss.portal.presentation.model2.state.StaleStateException;
+import org.jboss.portal.presentation.model2.state.StateException;
+import org.jboss.portal.presentation.model2.state.NoSuchStateException;
+import org.jboss.portal.presentation.model2.state.structural.StructuralObject;
+import org.jboss.portal.presentation.model2.state.structural.StructuralState;
+import org.jboss.portal.presentation.model2.state.structural.StructuralStateContext;
import org.jboss.portal.presentation.test.model.state.structural.MockModel;
import org.jboss.portal.presentation.test.model.state.structural.MockObject;
import org.jboss.portal.presentation.test.model.state.structural.MockException;
import org.jboss.portal.presentation.test.model.state.structural.MockModelImpl;
import java.util.Collections;
-import java.util.List;
-import java.util.HashMap;
import java.util.Set;
import java.util.Map;
import java.util.Collection;
@@ -94,39 +91,6 @@
assertEquals(Collections.EMPTY_MAP, state.getProperties());
}
- public void testSetProperty()
- {
- MockObject mockRoot = model.getRoot();
- String rootId = mockRoot.getId();
- int rootV0 = mockRoot.getVersion();
-
- //
- StructuralObject root0 = ssc.load(rootId);
- StructuralState rootState0 = root0.getState();
- assertEquals(Collections.EMPTY_MAP, rootState0.getProperties());
-
- // Set
- StructuralObject.Update update = ssc.update(root0, Collections.singletonMap("foo", "bar"));
-
- //
- int rootV1 = mockRoot.getVersion();
- assertTrue(rootV1 > rootV0);
- assertEquals(Collections.singleton("foo"), mockRoot.getPropertyNames());
- assertEquals("bar", mockRoot.getPropertyValue("foo"));
- assertEquals(Collections.EMPTY_MAP, rootState0.getProperties());
- assertStale(root0);
- StructuralObject root1_0 = update.getObject();
- assertNotNull(root1_0);
- assertNotStale(root1_0);
- StructuralState rootState1_0 = root1_0.getState();
- assertEquals(Collections.singletonMap("foo", "bar"), rootState1_0.getProperties());
- StructuralObject root1_1 = ssc.load(rootId);
- assertNotNull(root1_1);
- assertNotStale(root1_1);
- StructuralState rootState1_1 = root1_1.getState();
- assertEquals(Collections.singletonMap("foo", "bar"), rootState1_1.getProperties());
- }
-
public void testUpdateProperty() throws MockException
{
MockObject mockRoot = model.getRoot();
@@ -153,30 +117,6 @@
assertNotStale(root1);
StructuralState rootState1 = root1.getState();
assertEquals(Collections.singletonMap("foo", "bar"), rootState1.getProperties());
-
- // Update
- StructuralObject.Update update = ssc.update(root1, Collections.singletonMap("foo", "bar2"));
-
- //
- int rootV2 = mockRoot.getVersion();
- assertTrue(rootV2 > rootV1);
- assertEquals(Collections.singleton("foo"), mockRoot.getPropertyNames());
- assertEquals("bar2", mockRoot.getPropertyValue("foo"));
- assertEquals(Collections.EMPTY_MAP, rootState0.getProperties());
- assertStale(root0);
- assertStale(root1);
-
- //
- StructuralObject root2_0 = update.getObject();
- assertNotNull(root2_0);
- assertNotStale(root2_0);
- StructuralState rootState2_0 = root2_0.getState();
- assertEquals(Collections.singletonMap("foo", "bar2"), rootState2_0.getProperties());
- StructuralObject root2_1 = ssc.load(rootId);
- assertNotNull(root2_1);
- assertNotStale(root2_1);
- StructuralState rootState2_1 = root2_1.getState();
- assertEquals(Collections.singletonMap("foo", "bar2"), rootState2_1.getProperties());
}
public void testAddChild() throws MockException
@@ -189,14 +129,14 @@
StructuralObject root = ssc.load(rootId);
//
- MockObject mockFoo = mockRoot.addChild("foo", MockObject.Type.PORTAL);
+ MockObject mockFoo = mockRoot.addChild("foo", MockObject.Type.PAGE);
assertNotNull(mockFoo);
String fooId = mockFoo.getId();
//
assertNotNull(fooId);
assertEquals("foo", mockFoo.getName());
- assertEquals(MockObject.Type.PORTAL, mockFoo.getType());
+ assertEquals(MockObject.Type.PAGE, mockFoo.getType());
assertSame(mockRoot, mockFoo.getParent());
assertEquals(Collections.singletonList(mockFoo), mockRoot.getChildren());
assertEquals(Collections.EMPTY_SET, mockFoo.getPropertyNames());
@@ -236,7 +176,7 @@
assertNotNull(fooState);
assertEquals("foo", fooState.getName());
assertEquals(Collections.EMPTY_MAP, fooState.getProperties());
- assertEquals(UIPortal.class, fooState.getType());
+ assertEquals(UIPage.class, fooState.getType());
root = ssc.loadParent(foo);
assertNotNull(root);
assertEquals(rootId, root.getId());
@@ -245,7 +185,7 @@
public void testDestroy() throws MockException
{
MockObject mockRoot = model.getRoot();
- MockObject mockFoo = mockRoot.addChild("foo", MockObject.Type.PORTAL);
+ MockObject mockFoo = mockRoot.addChild("foo", MockObject.Type.PAGE);
MockObject mockBar = mockFoo.addChild("bar", MockObject.Type.PAGE);
MockObject mockJuu = mockFoo.addChild("juu", MockObject.Type.PAGE);
int rootV0 = mockRoot.getVersion();
@@ -360,49 +300,6 @@
assertEquals(Collections.singletonList(mockBar), mockRoot.getChildren());
}
- public void testMove2() throws MockException
- {
- MockObject mockRoot = model.getRoot();
- MockObject mockFoo = mockRoot.addChild("foo", MockObject.Type.PAGE);
- MockObject mockBar = mockRoot.addChild("bar", MockObject.Type.PAGE);
-
- //
- String fooId = mockFoo.getId();
- String barId = mockBar.getId();
- String rootId = mockRoot.getId();
-
- //
- StructuralObject fooSO = ssc.load(fooId);
- StructuralObject barSO = ssc.load(barId);
- StructuralObject rootSO = ssc.load(rootId);
-
- //
- StructuralObject.Move move = ssc.move(fooSO, barSO);
-
- //
- assertNotNull(move);
-
- //
- StructuralObject newFooSO = move.getSource();
- StructuralObject newBarSO = move.getDestination();
- StructuralObject newRootSO = move.getParent();
-
- //
- assertEquals(rootId, newRootSO.getId());
- assertEquals(fooId, newFooSO.getId());
- assertEquals(barId, newBarSO.getId());
-
- //
- assertStale(fooSO);
- assertStale(barSO);
- assertStale(rootSO);
-
- //
- assertNotStale(newRootSO);
- assertNotStale(newBarSO);
- assertNotStale(newFooSO);
- }
-
public void testMoveViolatesConstraint() throws MockException
{
MockObject mockRoot = model.getRoot();
@@ -549,16 +446,16 @@
{
MockObject mockRoot = model.getRoot();
String rootId = mockRoot.getId();
- MockObject mockFoo = mockRoot.addChild("foo", MockObject.Type.PORTAL);
+ MockObject mockFoo = mockRoot.addChild("foo", MockObject.Type.PAGE);
String fooId = mockFoo.getId();
- MockObject mockJuu = mockRoot.addChild("juu", MockObject.Type.PORTAL);
+ MockObject mockJuu = mockRoot.addChild("juu", MockObject.Type.PAGE);
String juuId = mockJuu.getId();
- MockObject mockFaa = mockRoot.addChild("faa", MockObject.Type.PORTAL);
+ MockObject mockFaa = mockRoot.addChild("faa", MockObject.Type.PAGE);
String faaId = mockFaa.getId();
StructuralObject rootV0 = ssc.load(rootId);
//
- MockObject mockBar = mockRoot.addChild("bar", MockObject.Type.PORTAL);
+ MockObject mockBar = mockRoot.addChild("bar", MockObject.Type.PAGE);
String barId = mockBar.getId();
model.destroy(mockFoo);
mockJuu.setPropertyValue("blah", "blah");
@@ -628,50 +525,6 @@
assertTrue(expected.isInstance(e));
}
- //
- try
- {
- StructuralObject bar = model.getRoot().addChild("bar", MockObject.Type.PAGE).takeSnapshot();
- ssc.move(object, bar);
- fail();
- }
- catch (StateException e)
- {
- assertTrue(expected.isInstance(e));
- }
-
- //
- try
- {
- ssc.create(object, UIPage.class, "juu", new HashMap<String, String>());
- fail();
- }
- catch (StateException e)
- {
- assertTrue(expected.isInstance(e));
- }
-
- //
- try
- {
- ssc.destroy(object);
- fail();
- }
- catch (StateException e)
- {
- assertTrue(expected.isInstance(e));
- }
-
- //
- try
- {
- ssc.update(object, new HashMap<String, String>());
- fail();
- }
- catch (StateException e)
- {
- assertTrue(expected.isInstance(e));
- }
}
private void assertStale(StructuralObject object)
Deleted: modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/ModelTestCase.java
===================================================================
--- modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/ModelTestCase.java 2008-04-02 14:34:34 UTC (rev 10483)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/ModelTestCase.java 2008-04-02 15:29:09 UTC (rev 10484)
@@ -1,903 +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.test.model;
-
-import junit.framework.Assert;
-import org.jboss.portal.presentation.model.StateType;
-import org.jboss.portal.presentation.model.UIContext;
-import org.jboss.portal.presentation.model.UIObject;
-import org.jboss.portal.presentation.model.UIPage;
-import org.jboss.portal.presentation.model.UIPortal;
-import org.jboss.portal.presentation.model.event.state.structural.StructuralStateModification;
-import org.jboss.portal.presentation.model.event.lifecycle.RelationshipAddedEvent;
-import org.jboss.portal.presentation.model.state.NoSuchStateException;
-import org.jboss.portal.presentation.model.state.StaleStateException;
-import org.jboss.portal.presentation.model.state.StateChangeVetoException;
-import org.jboss.portal.presentation.test.model.state.structural.MockObject;
-import org.jboss.portal.presentation.test.model.state.structural.MockException;
-import org.jboss.portal.common.util.Tools;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Collection;
-
-/**
- * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- */
-public class ModelTestCase extends AbstractModelTestCase
-{
-
- public void testUIContextParentIsNull()
- {
- UIContext context = createContext();
- assertEquals(null, context.getParent());
- }
-
- public void testSetPropertyThrowsIAE()
- {
- UIContext context = createContext();
-
- //
- try
- {
- context.setProperty(null, "foo", "foo_value");
- fail();
- }
- catch (IllegalArgumentException ignore)
- {
- }
-
- //
- try
- {
- context.setProperty(StateType.STRUCTURAL, null, "foo_value");
- fail();
- }
- catch (IllegalArgumentException ignore)
- {
- }
- }
-
- public void testGetPropertyThrowsIAE()
- {
- UIContext context = createContext();
-
- //
- try
- {
- context.getProperty(null, "foo");
- fail();
- }
- catch (IllegalArgumentException ignore)
- {
- }
-
- //
- try
- {
- context.getProperty(StateType.STRUCTURAL, null);
- fail();
- }
- catch (IllegalArgumentException ignore)
- {
- }
- }
-
- public void testLoadChildren() throws Exception
- {
- MockObject mockDefaultPortal = model.getRoot().addChild("defaultPortal", MockObject.Type.PORTAL);
- MockObject mockSomeOtherPortal = model.getRoot().addChild("someOtherPortal", MockObject.Type.PORTAL);
- UIContext context = createContext();
-
- //
- Collection<? extends UIObject> children = context.getChildren();
- assertNotNull(children);
- assertEquals(2, children.size());
- Map childrenMap = toMap(children);
-
- //
- UIPortal defaultPortal = (UIPortal)childrenMap.get(mockDefaultPortal.getId());
- assertNotNull(defaultPortal);
- assertSame(defaultPortal, context.getObject(defaultPortal.getId()));
- assertEquals("defaultPortal", defaultPortal.getName());
- assertEquals(mockDefaultPortal.getId(), defaultPortal.getId());
- assertSame(context, defaultPortal.getParent());
- assertEquals(0, defaultPortal.getChildren().size());
-
- //
- UIPortal someOtherPortal = (UIPortal)childrenMap.get(mockSomeOtherPortal.getId());
- assertNotNull(someOtherPortal);
- assertSame(someOtherPortal, context.getObject(someOtherPortal.getId()));
- assertEquals("someOtherPortal", someOtherPortal.getName());
- assertEquals(mockSomeOtherPortal.getId(), someOtherPortal.getId());
- assertSame(context, someOtherPortal.getParent());
- assertEquals(0, defaultPortal.getChildren().size());
- }
-
- Map<String, UIObject> toMap(Collection<? extends UIObject> objects)
- {
- Map<String, UIObject> map = new HashMap<String, UIObject>();
- for (UIObject o : objects)
- {
- map.put(o.getId(), o);
- }
- return map;
- }
-
- public void testLoadChildrenFromStale() throws Exception
- {
- MockObject mockRoot = model.getRoot();
- MockObject mockFoo = mockRoot.addChild("foo", MockObject.Type.PORTAL);
- MockObject mockBar = mockFoo.addChild("bar", MockObject.Type.PORTAL);
-
- // Load the context object
- UIObject foo = createContext().getObject(mockFoo.getId());
-
- // Make a concurrent modification of the children
- model.destroy(mockBar);
-
- // Access children
- try
- {
- Collection<? extends UIObject> children = foo.getChildren();
- for (UIObject child : children)
- {
- }
- fail();
- }
- catch (StaleStateException expected)
- {
- }
-
- // Now state should be stale
- assertEquals(UIObject.Status.STALE, foo.getStatus());
- }
-
- public void testLoadParentFromStale() throws Exception
- {
- MockObject mockRoot = model.getRoot();
- MockObject mockFoo = mockRoot.addChild("foo", MockObject.Type.PORTAL);
- MockObject mockBar = mockFoo.addChild("bar", MockObject.Type.PORTAL);
-
- // Load the context object
- UIObject foo = createContext().getObject(mockFoo.getId());
-
- // Make a concurrent modification of the children
- model.destroy(mockBar);
-
- // Access children
- try
- {
- foo.getParent();
- fail();
- }
- catch (StaleStateException expected)
- {
- }
-
- // Now state should be stale
- assertEquals(UIObject.Status.STALE, foo.getStatus());
- }
-
- public void loadChildrenFromDestroyed() throws Exception
- {
- MockObject mockRoot = model.getRoot();
- MockObject mockFoo = mockRoot.addChild("foo", MockObject.Type.PORTAL);
- MockObject mockBar = mockFoo.addChild("bar", MockObject.Type.PORTAL);
-
- // Load the context object
- UIObject foo = createContext().getObject(mockFoo.getId());
-
- // Make a concurrent modification of the children
- model.destroy(mockFoo);
-
- // Access children
- try
- {
- Collection<? extends UIObject> children = foo.getChildren();
- for (UIObject child : children)
- {
- }
- fail();
- }
- catch (NoSuchStateException expected)
- {
- }
-
- // Now state should be invalid
- assertEquals(UIObject.Status.INVALID, foo.getStatus());
- }
-
- public void loadParentFromDestroyed() throws Exception
- {
- MockObject mockRoot = model.getRoot();
- MockObject mockFoo = mockRoot.addChild("foo", MockObject.Type.PORTAL);
- MockObject mockBar = mockFoo.addChild("bar", MockObject.Type.PORTAL);
-
- // Load the context object
- UIObject foo = createContext().getObject(mockFoo.getId());
-
- // Make a concurrent modification of the children
- model.destroy(mockFoo);
-
- // Access children
- try
- {
- foo.getParent();
- fail();
- }
- catch (NoSuchStateException expected)
- {
- }
-
- // Now state should be invalid
- assertEquals(UIObject.Status.INVALID, foo.getStatus());
- }
-
- public void testLoadParent() throws Exception
- {
- MockObject mockDefaultPortal = model.getRoot().addChild("defaultPortal", MockObject.Type.PORTAL);
- MockObject mockDefaultPage = mockDefaultPortal.addChild("defaultPage", MockObject.Type.PAGE);
- UIContext context = createContext();
-
- //
- UIPage defaultPage = (UIPage)context.getObject(mockDefaultPage.getId());
- assertNotNull(defaultPage);
- assertEquals("defaultPage", defaultPage.getName());
- assertEquals(mockDefaultPage.getId(), defaultPage.getId());
-
- //
- UIPortal defaultPortal = (UIPortal)defaultPage.getParent();
- assertNotNull(defaultPortal);
- assertEquals(defaultPortal.getName(), "defaultPortal");
- assertEquals(mockDefaultPortal.getId(), defaultPortal.getId());
- }
-
- private static class PropertyAssert
- {
- /** . */
- private final UIObject object;
-
- private PropertyAssert(UIObject object)
- {
- this.object = object;
- }
-
- private static final class Blah
- {
- }
-
- void assertStructuralEquals(String propertyName, String propertyValue)
- {
- assertEquals(StateType.STRUCTURAL, propertyName, propertyValue, String.class);
- }
-
- <T> void assertNavigationalEquals(String propertyName, T propertyValue, Class<T> propertyClass)
- {
- assertEquals(StateType.NAVIGATIONAL, propertyName, propertyValue, propertyClass);
- }
-
- <T> void assertEquals(StateType stateType, String propertyName, T propertyValue, Class<T> propertyClass)
- {
- Assert.assertEquals(propertyValue, object.getProperty(stateType, propertyName, propertyClass));
- Assert.assertEquals(propertyValue, object.getProperty(stateType, propertyName, Object.class));
- Assert.assertEquals(propertyValue, object.getProperty(stateType, propertyName));
- Assert.assertEquals(null, object.getProperty(stateType, propertyName, Blah.class)); }
- }
-
- public void testUpdatePropertyNonExistingObject() throws MockException
- {
- UIContext context = createContext();
- MockObject mockFoo = model.getRoot().addChild("foo", MockObject.Type.PORTAL);
- UIPortal foo = (UIPortal)context.getObject(mockFoo.getId());
- model.destroy(mockFoo);
-
- //
- try
- {
- foo.setProperty(StateType.STRUCTURAL, "foo", "foo_value");
- fail();
- }
- catch (NoSuchStateException e)
- {
- }
- }
-
- public void testUpdateExistingMutableStructuralProperty() throws MockException
- {
- MockObject mockFoo = model.getRoot().addChild("foo", MockObject.Type.PORTAL);
- String fooId = mockFoo.getId();
- mockFoo.setPropertyValue("foo", "foo_value");
- UIContext context = createContext();
- EventAssert eventAssert = new EventAssert();
- context.addModelListener(eventAssert);
-
- // Check initial state
- UIPortal foo = (UIPortal)context.getObject(fooId);
- PropertyAssert fooAssert = new PropertyAssert(foo);
- fooAssert.assertStructuralEquals("foo", "foo_value");
-
- // Update structural property
- foo.setProperty(StateType.STRUCTURAL, "foo", "foo_new_value");
- fooAssert.assertStructuralEquals("foo", "foo_new_value");
- eventAssert.next(fooId, new StructuralStateModification.Update(Collections.singletonMap("foo", "foo_new_value")));
-
- // Try a non string type
- try
- {
- foo.setProperty(StateType.STRUCTURAL, "foo", 2);
- fail("Property update should have been vetoed");
- }
- catch (StateChangeVetoException ignore)
- {
- }
- fooAssert.assertStructuralEquals("foo", "foo_new_value");
- eventAssert.assertEmpty();
- }
-
- public void testUpdateExistingNonMutableStructuralProperty() throws MockException
- {
- MockObject mockFoo = model.getRoot().addChild("foo", MockObject.Type.PORTAL);
- String fooId = mockFoo.getId();
- mockFoo.setPropertyValue("foo", "foo_value");
- mockFoo.setPropertyBehavior("foo", MockObject.Failure.veto());
- UIContext context = createContext();
- EventAssert eventAssert = new EventAssert();
-
- // Check initial state
- UIPortal foo = (UIPortal)context.getObject(fooId);
- PropertyAssert fooAssert = new PropertyAssert(foo);
- fooAssert.assertStructuralEquals("foo", "foo_value");
-
- // Try an update
- try
- {
- foo.setProperty(StateType.STRUCTURAL, "foo", "foo_new_value");
- fail("Property update should have been vetoed");
- }
- catch (StateChangeVetoException ignore)
- {
- }
- fooAssert.assertStructuralEquals("foo", "foo_value");
- eventAssert.assertEmpty();
-
- // Try a non string type
- try
- {
- foo.setProperty(StateType.STRUCTURAL, "foo", 2);
- fail("Property update should have been vetoed");
- }
- catch (StateChangeVetoException ignore)
- {
- }
- fooAssert.assertStructuralEquals("foo", "foo_value");
- eventAssert.assertEmpty();
- }
-
- public void testUpdateNonExistingMutableStructuralProperty() throws MockException
- {
- MockObject mockFoo = model.getRoot().addChild("foo", MockObject.Type.PORTAL);
- String fooId = mockFoo.getId();
- UIContext context = createContext();
- EventAssert eventAssert = new EventAssert();
- context.addModelListener(eventAssert);
-
- // Check initial state
- UIPortal foo = (UIPortal)context.getObject(fooId);
- PropertyAssert fooAssert = new PropertyAssert(foo);
- fooAssert.assertStructuralEquals("foo", null);
-
- // Update structural property
- foo.setProperty(StateType.STRUCTURAL, "foo", "foo_new_value");
- fooAssert.assertStructuralEquals("foo", "foo_new_value");
- eventAssert.next(fooId, new StructuralStateModification.Update(Collections.singletonMap("foo", "foo_new_value")));
-
- // Try a non string type
- try
- {
- foo.setProperty(StateType.STRUCTURAL, "foo", 2);
- fail("Property update should have been vetoed");
- }
- catch (StateChangeVetoException ignore)
- {
- }
- fooAssert.assertStructuralEquals("foo", "foo_new_value");
- eventAssert.assertEmpty();
- }
-
- public void testUpdateNonExistingNonMutableStructuralProperty() throws MockException
- {
- MockObject mockFoo = model.getRoot().addChild("foo", MockObject.Type.PORTAL);
- mockFoo.setPropertyBehavior("foo", MockObject.Failure.veto());
- UIContext context = createContext();
- EventAssert eventAssert = new EventAssert();
- context.addModelListener(eventAssert);
-
- // Check initial state
- UIPortal foo = (UIPortal)context.getObject(mockFoo.getId());
- PropertyAssert fooAssert = new PropertyAssert(foo);
- fooAssert.assertStructuralEquals("foo", null);
-
- // Try an update
- try
- {
- foo.setProperty(StateType.STRUCTURAL, "foo", "foo_new_value");
- fail("Property update should have been vetoed");
- }
- catch (StateChangeVetoException ignore)
- {
- }
- fooAssert.assertStructuralEquals("foo", null);
- eventAssert.assertEmpty();
-
- // Try a non string type
- try
- {
- foo.setProperty(StateType.STRUCTURAL, "foo", 2);
- fail("Property update should have been vetoed");
- }
- catch (StateChangeVetoException ignore)
- {
- }
- fooAssert.assertStructuralEquals("foo", null);
- eventAssert.assertEmpty();
- }
-
- public void testUpdateNavigationalProperty() throws MockException
- {
- MockObject mockFoo = model.getRoot().addChild("foo", MockObject.Type.PORTAL);
- UIContext context = createContext();
- EventAssert eventAssert = new EventAssert();
- context.addModelListener(eventAssert);
-
- // Check initial state
- UIPortal foo = (UIPortal)context.getObject(mockFoo.getId());
- PropertyAssert fooAssert = new PropertyAssert(foo);
- fooAssert.assertNavigationalEquals("foo", null, String.class);
-
- // Update navigational state
- foo.setProperty(StateType.NAVIGATIONAL, "foo", "foo_new_value");
- fooAssert.assertNavigationalEquals("foo", "foo_new_value", String.class);
-
- // Update navigational state
- foo.setProperty(StateType.NAVIGATIONAL, "foo", 2);
- fooAssert.assertNavigationalEquals("foo", 2, Integer.class);
- }
-
- public void testStructuralPropertyUpdateKeepModelStateConsistent()
- {
- UIContext context = createContext();
-
- //
- context.setProperty(StateType.STRUCTURAL, "foo", "bar");
- context.setProperty(StateType.STRUCTURAL, "foo", "bar2");
- }
-
- public void testConcurrentStructuralPropertyDetection() throws MockException
- {
- UIContext context = createContext();
-
- //
- context.setProperty(StateType.STRUCTURAL, "foo", "bar");
-
- // The concurrent update
- model.getRoot().setPropertyValue("foo", "bar2");
-
- //
- try
- {
- context.setProperty(StateType.STRUCTURAL, "foo", "bar3");
- fail("Was expecting an stale state exception");
- }
- catch (StaleStateException ignore)
- {
- }
- }
-
- public void testCreateChild()
- {
- UIContext context = createContext();
- EventAssert eventAssert = new EventAssert();
- context.addModelListener(eventAssert);
-
- //
- Collection<? extends UIObject> rootChildren = context.getChildren();
- assertNotNull(rootChildren);
- assertEquals(0, rootChildren.size());
- assertNull(context.getChild("foo"));
-
- //
- UIPortal portal = context.createChild("foo", UIPortal.class);
- assertNotNull(portal);
- assertSame(context, portal.getParent());
- assertSame(portal, context.getChild("foo"));
- assertEquals(1, rootChildren.size());
- assertSame(portal, rootChildren.iterator().next());
- eventAssert.next(portal.getId(), new StructuralStateModification.Creation(UIPortal.class, "foo", new HashMap<String, String>()));
- }
-
- public void testDestroyChildUpdatesLoadedDescendant() throws Exception
- {
- MockObject mockRoot = model.getRoot();
- MockObject mockFoo = mockRoot.addChild("foo", MockObject.Type.PORTAL);
- MockObject mockJuu = mockFoo.addChild("juu", MockObject.Type.PAGE);
- MockObject mockDaa = mockJuu.addChild("daa", MockObject.Type.PAGE);
-
- //
- String daaId = mockDaa.getId();
-
- //
- UIContext context = createContext();
-
- // Load only the descendant
- UIObject daa = context.getObject(daaId);
- Collection<? extends UIObject> daaChildren = daa.getChildren();
-
- // Destroy foo
- context.destroyChild("foo");
-
- // Check daa state
- assertEquals(UIObject.Status.INVALID, daa.getStatus());
- assertEquals(null, context.getObject(daaId));
- try
- {
- daaChildren.size();
- fail();
- }
- catch (NoSuchStateException ignore)
- {
- }
- }
-
- public void testDestroyChildUpdatesLoadedSubtree() throws Exception
- {
- MockObject mockRoot = model.getRoot();
- MockObject mockFoo = mockRoot.addChild("foo", MockObject.Type.PORTAL);
- MockObject mockJuu = mockFoo.addChild("juu", MockObject.Type.PAGE);
- MockObject mockDaa = mockJuu.addChild("daa", MockObject.Type.PAGE);
-
- //
- String fooId = mockFoo.getId();
- String juuId = mockJuu.getId();
- String daaId = mockDaa.getId();
-
- //
- UIContext context = createContext();
-
- // Load subtree entirely
- UIObject foo = context.getChild("foo");
- UIObject juu = foo.getChild("juu");
- UIObject daa = juu.getChild("daa");
- Collection<? extends UIObject> fooChildren = foo.getChildren();
- Collection<? extends UIObject> juuChildren = juu.getChildren();
- Collection<? extends UIObject> daaChildren = daa.getChildren();
-
- //
- foo.destroyChild("juu");
-
- //
- try
- {
- juuChildren.size();
- fail();
- }
- catch (NoSuchStateException ignore)
- {
- }
- try
- {
- daaChildren.size();
- fail();
- }
- catch (NoSuchStateException ignore)
- {
- }
- assertEquals(0, fooChildren.size());
- assertEquals(UIObject.Status.VALID, foo.getStatus());
- assertEquals(UIObject.Status.INVALID, juu.getStatus());
- assertEquals(UIObject.Status.INVALID, daa.getStatus());
- assertSame(foo, context.getObject(fooId));
- assertEquals(null, context.getObject(juuId));
- assertEquals(null, context.getObject(daaId));
- }
-
- public void testParentNavigationUpdatesExistingParentStatus() throws Exception
- {
- MockObject mockRoot = model.getRoot();
- MockObject mockFoo = mockRoot.addChild("foo", MockObject.Type.PORTAL);
- MockObject mockJuu = mockFoo.addChild("juu", MockObject.Type.PAGE);
-
- //
- String fooId = mockFoo.getId();
- String juuId = mockJuu.getId();
-
- //
- UIContext context = createContext();
-
- // Get the object
- UIObject foo = context.getObject(fooId);
- UIObject juu = context.getObject(juuId);
-
- //
- assertEquals(UIObject.Status.VALID, juu.getStatus());
- assertEquals(UIObject.Status.VALID, foo.getStatus());
-
- // Now update foo concurrently
- mockFoo.setPropertyValue("abc", "def");
-
- // Now navigate
- UIObject foo2 = juu.getParent();
-
- //
- assertSame(foo, foo2);
- assertEquals(UIObject.Status.VALID, juu.getStatus());
- assertEquals(UIObject.Status.STALE, foo.getStatus());
- }
-
- public void testChildrenNavigationUpdatesExistingChildStatus() throws Exception
- {
- MockObject mockRoot = model.getRoot();
- MockObject mockFoo = mockRoot.addChild("foo", MockObject.Type.PORTAL);
- MockObject mockJuu = mockFoo.addChild("juu", MockObject.Type.PAGE);
-
- //
- String fooId = mockFoo.getId();
- String juuId = mockJuu.getId();
-
- //
- UIContext context = createContext();
-
- // Get the object
- UIObject foo = context.getObject(fooId);
- UIObject juu = context.getObject(juuId);
-
- //
- assertEquals(UIObject.Status.VALID, juu.getStatus());
- assertEquals(UIObject.Status.VALID, foo.getStatus());
-
- // Now update juu concurrently
- mockJuu.setPropertyValue("abc", "def");
-
- // Now navigate
- Collection<? extends UIObject> fooChildren = foo.getChildren();
-
- //
- assertNotNull(fooChildren);
- assertEquals(1, fooChildren.size());
- assertSame(juu, fooChildren.iterator().next());
- assertEquals(UIObject.Status.STALE, juu.getStatus());
- assertEquals(UIObject.Status.VALID, foo.getStatus());
- }
-
- public void testChildrenNavigationCombinesExistingChildrenAndLoadAbsentChildren() throws Exception
- {
- MockObject mockRoot = model.getRoot();
- MockObject mockFoo = mockRoot.addChild("foo", MockObject.Type.PORTAL);
- MockObject mockJuu = mockFoo.addChild("juu", MockObject.Type.PAGE);
- MockObject mockDaa = mockFoo.addChild("daa", MockObject.Type.PAGE);
-
- //
- String fooId = mockFoo.getId();
- String juuId = mockJuu.getId();
- String daaId = mockDaa.getId();
-
- //
- UIContext context = createContext();
-
- // Load foo and juu but not daa
- UIObject foo = context.getObject(fooId);
- UIObject juu = context.getObject(juuId);
-
- // Now navigate
- Collection<? extends UIObject> fooChildren = foo.getChildren();
-
- //
- assertNotNull(fooChildren);
- Map<String, UIObject> tmp = new HashMap<String, UIObject>();
- for (UIObject o : fooChildren)
- {
- tmp.put(o.getId(), o);
- }
-
- //
- assertEquals(2, tmp.size());
- assertEquals(Tools.toSet(juuId, daaId), tmp.keySet());
- assertSame(juu, tmp.get(juuId));
- UIObject daa = tmp.get(daaId);
- assertSame(context.getObject(daaId), daa);
- }
-
- public void testRefreshAfterConcurrentMove() throws Exception
- {
- MockObject mockRoot = model.getRoot();
-
- MockObject mockFoo = mockRoot.addChild("foo", MockObject.Type.PORTAL);
- MockObject mockBar = mockRoot.addChild("bar", MockObject.Type.PORTAL);
-
- MockObject mockFooJuu = mockFoo.addChild("juu", MockObject.Type.PAGE);
- MockObject mockFooDaa = mockFoo.addChild("daa", MockObject.Type.PAGE);
-
- MockObject mockBarDaa = mockBar.addChild("daa", MockObject.Type.PAGE);
-
- // Load fully the context 1
- UIContext context1 = createContext();
- loadSubTree(context1);
-
- // Concurrent move
- UIContext context2 = createContext();
- context2.getChild("foo").getChild("juu").move(context2.getChild("bar"));
-
- //
- context1.getChild("bar").refresh();
- }
-
- public void testPartialRefreshAfterConcurrentMove() throws Exception
- {
- MockObject mockRoot = model.getRoot();
- MockObject mockFoo = mockRoot.addChild("foo", MockObject.Type.PORTAL);
- MockObject mockBar = mockRoot.addChild("bar", MockObject.Type.PORTAL);
- MockObject mockJuu = mockFoo.addChild("juu", MockObject.Type.PAGE);
-
- //
- doTestPartialRefreshAfterConcurrentMove(true);
-
- //
- resetModel();
-
- //
- mockRoot = model.getRoot();
- mockBar = mockRoot.addChild("bar", MockObject.Type.PORTAL);
- mockFoo = mockRoot.addChild("foo", MockObject.Type.PORTAL);
- mockJuu = mockFoo.addChild("juu", MockObject.Type.PAGE);
-
- //
- doTestPartialRefreshAfterConcurrentMove(false);
- }
-
- public void doTestPartialRefreshAfterConcurrentMove(boolean bilto) throws Exception
- {
-
- // Load fully the context 1
- UIContext context1 = createContext();
- loadSubTree(context1);
- UIObject foo1 = context1.getChild("foo");
- UIObject juu1 = foo1.getChild("juu");
- UIObject bar1 = context1.getChild("bar");
-
- // Load fully the context 2
- UIContext context2 = createContext();
- loadSubTree(context2);
- UIObject foo2 = context2.getChild("foo");
- UIObject juu2 = foo2.getChild("juu");
- UIObject bar2 = context2.getChild("bar");
-
- // Load fully the context 3
- UIContext context3 = createContext();
- loadSubTree(context3);
- UIObject foo3 = context3.getChild("foo");
- UIObject juu3 = foo3.getChild("juu");
- UIObject bar3 = context3.getChild("bar");
-
- // Load fully the context 4
- UIContext context4 = createContext();
- loadSubTree(context4);
- UIObject foo4 = context4.getChild("foo");
- UIObject juu4 = foo4.getChild("juu");
- UIObject bar4 = context4.getChild("bar");
- String juu4id = juu4.getId();
-
- // Concurrent move
- UIContext context = createContext();
- context.getChild("foo").getChild("juu").move(context.getChild("bar"));
-
- //
- System.err.println("-------------");
- foo1.refresh(CRAWLER);
- assertEquals(UIObject.Status.VALID, foo1.getStatus());
- assertEquals(0, foo1.getChildren().size());
-
- //
- bar2.refresh(CRAWLER);
- assertEquals(UIObject.Status.VALID, foo2.getStatus());
- assertEquals(UIObject.Status.VALID, bar2.getStatus());
- assertEquals(Tools.toSet(juu2), new HashSet<UIObject>(bar2.getChildren()));
- assertEquals(bar2, juu2.getParent());
-
- //
- System.err.println("bilto = " + bilto);
- context3.refresh(CRAWLER);
- assertEquals(UIObject.Status.VALID, foo3.getStatus());
- assertEquals(UIObject.Status.VALID, bar3.getStatus());
- if (bilto)
- {
- assertEquals(UIObject.Status.INVALID, juu3.getStatus());
- juu3 = context3.getObject(juu4id);
- }
- assertEquals(UIObject.Status.VALID, juu3.getStatus());
- assertEquals(Tools.toSet(juu3), new HashSet<UIObject>(bar3.getChildren()));
-
- //
- }
-
- private void loadSubTree(UIObject object)
- {
- for (UIObject child : object.getChildren())
- {
- child.getParent();
- loadSubTree(child);
- }
- }
-
- public void testMove() throws Exception
- {
- MockObject mockRoot = model.getRoot();
-
- MockObject mockFoo = mockRoot.addChild("foo", MockObject.Type.PORTAL);
- MockObject mockBar = mockRoot.addChild("bar", MockObject.Type.PORTAL);
-
- MockObject mockFooJuu = mockFoo.addChild("juu", MockObject.Type.PAGE);
- MockObject mockFooDaa = mockFoo.addChild("daa", MockObject.Type.PAGE);
-
- MockObject mockBarDaa = mockBar.addChild("daa", MockObject.Type.PAGE);
-
- //
- UIContext context = createContext();
-
- //
- UIObject foo = context.getChild("foo");
- Collection<? extends UIObject> fooChildren = foo.getChildren();
- UIObject fooJuu = foo.getChild("juu");
- UIObject fooDaa = foo.getChild("daa");
- UIObject bar = context.getChild("bar");
- UIObject barDaa = bar.getChild("daa");
- Collection<? extends UIObject> barChildren = bar.getChildren();
-
- //
- fooJuu.move(bar);
-
- //
- assertEquals(bar, fooJuu.getParent());
- assertEquals(Collections.singleton(fooDaa), new HashSet<UIObject>(fooChildren));
- assertEquals(Tools.toSet(barDaa, fooJuu), new HashSet<UIObject>(barChildren));
- }
-
- public void testBlah() throws Exception
- {
- MockObject mockRoot = model.getRoot();
- MockObject mockFoo = mockRoot.addChild("foo", MockObject.Type.PORTAL);
- MockObject mockBar = mockRoot.addChild("bar", MockObject.Type.PORTAL);
-
- EventAssert blah = new EventAssert();
-
- UIContext context = createContext();
- context.addModelListener(blah);
- UIObject foo = context.getObject(mockFoo.getId());
- blah.assertEmpty();
- foo.getParent();
- blah.next(RelationshipAddedEvent.class);
- }
-
-}
Deleted: modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/UIModelTester.java
===================================================================
--- modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/UIModelTester.java 2008-04-02 14:34:34 UTC (rev 10483)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/UIModelTester.java 2008-04-02 15:29:09 UTC (rev 10484)
@@ -1,186 +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.test.model;
-
-import junit.framework.TestCase;
-import org.apache.log4j.Logger;
-import org.jboss.portal.presentation.impl.model.container.UIObjectContainer;
-import org.jboss.portal.presentation.impl.model.state.navigational.NavigationalStateContextImpl;
-import org.jboss.portal.presentation.model.UIContext;
-import org.jboss.portal.presentation.test.model.state.structural.MockModelImpl;
-
-/**
- * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
- *
- */
-public class UIModelTester extends TestCase
-{
- private Logger logger = Logger.getLogger(this.getClass());
- private UIContext uiContext = null;
-
- /**
- *
- */
- protected void setUp() throws Exception
- {
- this.uiContext = new UIObjectContainer(new MockModelImpl().getStructuralStateContext(), new NavigationalStateContextImpl()).getRoot();
- }
-
- /**
- *
- */
- protected void tearDown() throws Exception
- {
- this.uiContext = null;
- }
-
- /**
- *
- * @throws Exception
- */
- /*public void testCreateChild() throws Exception
- {
- //Adding a UIContext...this should result in an IllegalArgumentException
- try
- {
- this.uiContext.createChild("duplicateRoot", UIContext.class);
- }
- catch(Exception e)
- {
- this.assertEquals(e.getClass(), IllegalArgumentException.class);
- }
-
- //Assert the state of UIPortal added to the UIObject tree
- UIPortal portal = this.uiContext.createChild("defaultPortal", UIPortal.class);
- assertEquals(portal.getName(), "defaultPortal");
- assertEquals(portal.getId(), "/defaultPortal");
- assertTrue(portal.getParent() instanceof UIContext);
-
- //Add a UIPage to the UIPortal
- UIPage page = portal.createChild("defaultPage", UIPage.class);
- assertEquals(page.getName(), "defaultPage");
- assertEquals(page.getId(), "/defaultPortal/defaultPage");
- assertTrue(page.getParent() instanceof UIPortal);
-
- //Add a UIPage to the UIContainer
- UIContainer container = page.createChild("defaultContainer", UIContainer.class);
- assertEquals(container.getName(), "defaultContainer");
- assertEquals(container.getId(), "/defaultPortal/defaultPage/defaultContainer");
- assertTrue(container.getParent() instanceof UIPage);
-
- //Add a UIWindow to UIPage
- UIWindow window = container.createChild("defaultWindow", UIWindow.class);
- assertEquals(window.getName(), "defaultWindow");
- assertEquals(window.getId(), "/defaultPortal/defaultPage/defaultContainer/defaultWindow");
- assertTrue(window.getParent() instanceof UIContainer);
- }*/
-
- /**
- *
- * @throws Exception
- */
- /*public void testDestroyChild() throws Exception
- {
- //Assert the state of UIPortal added to the UIObject tree
- UIPortal portal = this.uiContext.createChild("defaultPortal", UIPortal.class);
-
- //Add a UIPage to the UIPortal
- UIPage page = portal.createChild("defaultPage", UIPage.class);
-
- //Add a UIPage to the UIContainer
- UIContainer container = page.createChild("defaultContainer", UIContainer.class);
-
- //Add a UIWindow to UIPage
- UIWindow window = container.createChild("defaultWindow", UIWindow.class);
-
- //Destroy the container. When this is done, both container and window must be destroyed from the UIObject tree
- page.removeChild(container.getName());
- List<UIObject> pageChildren = page.getChildren();
- assertTrue(pageChildren == null || pageChildren.size() == 0);
- }*/
-
- /**
- *
- * @throws Exception
- */
- /*public void testModelLoading() throws Exception
- {
- //Setup rootChildrenInfo
- Map rootChildrenInfo = new HashMap();
- rootChildrenInfo.put("defaultPortal", UIPortal.class);
- rootChildrenInfo.put("someOtherPortal", UIPortal.class);
-
- UIContext objectTree = this.uiContext.initUIObjectTree(rootChildrenInfo);
- UIPortal defaultPortal = objectTree.getChildren(UIPortal.class).get(0);
- UIPortal someOtherPortal = objectTree.getChildren(UIPortal.class).get(1);
-
- assertEquals(defaultPortal.getName(), "defaultPortal");
- assertEquals(defaultPortal.getId(), "/defaultPortal");
- assertEquals(someOtherPortal.getName(), "someOtherPortal");
- assertEquals(someOtherPortal.getId(), "/someOtherPortal");
- }*/
-
- /**
- *
- * @throws Exception
- */
- /*public void testParentLoading() throws Exception
- {
- //Setup rootChildrenInfo
- Map rootChildrenInfo = new HashMap();
- rootChildrenInfo.put("defaultPortal", UIPortal.class);
-
- UIContext objectTree = this.uiContext.initUIObjectTree(rootChildrenInfo);
-
- UIPortal portal = objectTree.getObject("/defaultPortal/defaultPage", UIPortal.class);
- UIObject parent = portal.getParent();
-
- assertEquals(parent.getName(), "defaultPortal");
- assertEquals(parent.getId(), "/defaultPortal");
- }*/
-
- /**
- *
- * @throws Exception
- */
- /*public void testLazyLoading() throws Exception
- {
- Map rootChildrenInfo = new HashMap();
- rootChildrenInfo.put("testingLazyLoading", UIPortal.class);
-
- UIContext objectTree = this.uiContext.initUIObjectTree(rootChildrenInfo);
- UIPortal defaultPortal = objectTree.getChildren(UIPortal.class).get(0);
- List<UIObject> lazyLoadedChildren = defaultPortal.getChildren();
-
- assertTrue((lazyLoadedChildren != null && lazyLoadedChildren.size()>0));
- logger.info("-----------------------------------------------------------");
- for(int i=0; i<lazyLoadedChildren.size(); i++)
- {
- UIObject child = lazyLoadedChildren.get(i);
- logger.info(child.getId());
- assertEquals(child.getParent().getName(), "testingLazyLoading");
- assertEquals(child.getParent().getId(), "/testingLazyLoading");
- }
- logger.info("--------------------------------------------------------");
- }*/
-}
Copied: modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/state/navigational/NavigationalStateContextImpl.java (from rev 10476, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/state/navigational/NavigationalStateContextImpl.java)
===================================================================
--- modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/state/navigational/NavigationalStateContextImpl.java (rev 0)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/state/navigational/NavigationalStateContextImpl.java 2008-04-02 15:29:09 UTC (rev 10484)
@@ -0,0 +1,113 @@
+/******************************************************************************
+ * 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.test.model.state.navigational;
+
+import org.jboss.portal.presentation.model2.state.navigational.NavigationalStateContext;
+import org.jboss.portal.presentation.model2.state.StateChangeVetoException;
+import org.jboss.portal.presentation.model2.state.StateException;
+
+import java.util.Map;
+import java.util.HashMap;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class NavigationalStateContextImpl implements NavigationalStateContext
+{
+
+ /** . */
+ private final Map<Key, Object> map;
+
+ public NavigationalStateContextImpl(Map<Key, Object> map)
+ {
+ this.map = map;
+ }
+
+ public NavigationalStateContextImpl()
+ {
+ this(new HashMap<Key, Object>());
+ }
+
+ public void set(String objectId, String key, Object navigationalState) throws StateChangeVetoException, StateException, IllegalArgumentException
+ {
+ Key key2 = new Key(objectId, key);
+
+ //
+ if (navigationalState != null)
+ {
+ map.put(key2, navigationalState);
+ }
+ else
+ {
+ map.remove(key2);
+ }
+ }
+
+ public Object get(String objectId, String key) throws IllegalArgumentException
+ {
+ return map.get(new Key(objectId, key));
+ }
+
+ private final class Key
+ {
+ /** . */
+ private final String objectId;
+
+ /** . */
+ private final String key;
+
+ private Key(String objectId, String key)
+ {
+ if (objectId == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ if (key == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ this.objectId = objectId;
+ this.key = key;
+ }
+
+ public int hashCode()
+ {
+ return objectId.hashCode() * 43 + key.hashCode();
+ }
+
+ public boolean equals(Object o)
+ {
+ if (o == this)
+ {
+ return true;
+ }
+ if (o instanceof Key)
+ {
+ Key that = (Key)o;
+ return objectId.equals(that.objectId) && key.equals(that.key);
+ }
+ return false;
+ }
+ }
+}
\ No newline at end of file
Modified: modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/state/structural/MockModel.java
===================================================================
--- modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/state/structural/MockModel.java 2008-04-02 14:34:34 UTC (rev 10483)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/state/structural/MockModel.java 2008-04-02 15:29:09 UTC (rev 10484)
@@ -22,7 +22,7 @@
******************************************************************************/
package org.jboss.portal.presentation.test.model.state.structural;
-import org.jboss.portal.presentation.model.state.structural.StructuralStateContext;
+import org.jboss.portal.presentation.model2.state.structural.StructuralStateContext;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
Modified: modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/state/structural/MockModelImpl.java
===================================================================
--- modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/state/structural/MockModelImpl.java 2008-04-02 14:34:34 UTC (rev 10483)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/state/structural/MockModelImpl.java 2008-04-02 15:29:09 UTC (rev 10484)
@@ -22,19 +22,15 @@
******************************************************************************/
package org.jboss.portal.presentation.test.model.state.structural;
-import org.jboss.portal.presentation.model.UIContext;
-import org.jboss.portal.presentation.model.UIObject;
-import org.jboss.portal.presentation.model.UIPage;
-import org.jboss.portal.presentation.model.UIPortal;
-import org.jboss.portal.presentation.model.UIWindow;
-import org.jboss.portal.presentation.model.state.NoSuchStateException;
-import org.jboss.portal.presentation.model.state.StaleStateException;
-import org.jboss.portal.presentation.model.state.StateChangeVetoException;
-import org.jboss.portal.presentation.model.state.StateException;
-import org.jboss.portal.presentation.model.state.ConstraintViolationException;
-import org.jboss.portal.presentation.model.state.structural.AbstractStructuralStateContext;
-import org.jboss.portal.presentation.model.state.structural.StructuralObject;
-import org.jboss.portal.presentation.model.state.structural.StructuralStateContext;
+import org.jboss.portal.presentation.model2.ui.UIContext;
+import org.jboss.portal.presentation.model2.ui.UIObject;
+import org.jboss.portal.presentation.model2.ui.UIPage;
+import org.jboss.portal.presentation.model2.ui.UIWindow;
+import org.jboss.portal.presentation.model2.state.NoSuchStateException;
+import org.jboss.portal.presentation.model2.state.StaleStateException;
+import org.jboss.portal.presentation.model2.state.StateException;
+import org.jboss.portal.presentation.model2.state.structural.StructuralObject;
+import org.jboss.portal.presentation.model2.state.structural.StructuralStateContext;
import java.util.ArrayList;
import java.util.HashMap;
@@ -43,7 +39,6 @@
import java.util.HashSet;
import java.util.Set;
import java.util.Collection;
-import java.util.Collections;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -69,7 +64,6 @@
map = new HashMap<Class<? extends UIObject>, MockObject.Type>();
map.put(UIContext.class, MockObject.Type.CONTEXT);
map.put(UIPage.class, MockObject.Type.PAGE);
- map.put(UIPortal.class, MockObject.Type.PORTAL);
map.put(UIWindow.class, MockObject.Type.WINDOW);
}
@@ -112,7 +106,7 @@
return mockObject;
}
- private final StructuralStateContext structuralStateContext = new AbstractStructuralStateContext()
+ private final StructuralStateContext structuralStateContext = new StructuralStateContext()
{
public StructuralObject load(String objectId) throws IllegalArgumentException
{
@@ -224,124 +218,6 @@
return new StructuralObject.Refresh(parent, current, addedChildren, removedChildren, staleChildrenHandleMap, validChildren);
}
- public StructuralObject.Update update(StructuralObject object, Map<String, String> changes) throws StateChangeVetoException
- {
- MockObject mockObject = getValidMockObject(object);
-
- // Create an non mutable clone (for the event)
- changes = Collections.unmodifiableMap(new HashMap<String, String>(changes));
-
- //
- for (Map.Entry<String, String> entry : changes.entrySet())
- {
- String propertyName = entry.getKey();
- MockObject.UpdateBehavior behavior = mockObject.getPropertyBehavior(propertyName);
- if (behavior instanceof MockObject.Veto)
- {
- throw new StateChangeVetoException("Cannot modify non behavior property");
- }
- else if (behavior instanceof MockObject.Failure)
- {
- MockObject.Failure failure = (MockObject.Failure)behavior;
- failure.throwAs(IllegalArgumentException.class).
- throwAs(StateChangeVetoException.class).
- throwAs(StateException.class);
- }
- else
- {
- try
- {
- mockObject.setPropertyValue(propertyName, entry.getValue());
- }
- catch (MockException e)
- {
- throw new AssertionError();
- }
- }
- }
-
- //
- return new StructuralObject.Update(mockObject.takeSnapshot(), changes);
- }
-
- public StructuralObject.Creation create(StructuralObject parent, Class<? extends UIObject> classType, String name, Map<String, String> properties) throws StateException, IllegalArgumentException
- {
- MockObject mockParent = getValidMockObject(parent);
-
- //
- MockObject.Type type = map.get(classType);
-
- //
- try
- {
- MockObject mockChild = mockParent.addChild(name, type, properties);
-
- //
- return new StructuralObject.Creation(mockParent.takeSnapshot(), mockChild.takeSnapshot());
- }
- catch (MockException e)
- {
- switch (e.getCode())
- {
- case CONSTRAINT_VIOLATION:
- throw new ConstraintViolationException();
- default:
- throw new AssertionError();
- }
- }
- }
-
- public StructuralObject.Destruction destroy(StructuralObject object) throws StateException, IllegalArgumentException
- {
- MockObjectImpl mockObject = getValidMockObject(object);
-
- //
- MockObjectImpl parent = mockObject.getParent();
-
- //
- List<String> ids = new ArrayList<String>();
-
- //
- try
- {
- MockModelImpl.this.destroy(mockObject, ids);
- }
- catch (MockException e)
- {
- // It is kind of unexpected since we are destroying something valid
- throw new StateException(e);
- }
-
- //
- return new StructuralObject.Destruction(parent.takeSnapshot(), ids);
- }
-
- public StructuralObject.Move move(StructuralObject source, StructuralObject destination) throws StateException, IllegalArgumentException
- {
- MockObject mockSource = getValidMockObject(source);
- MockObject mockDestination = getValidMockObject(destination);
- MockObject mockParent = mockSource.getParent();
-
- //
- try
- {
- mockSource.move(mockDestination);
-
- //
- return new StructuralObject.Move(mockParent.takeSnapshot(), mockSource.takeSnapshot(), mockDestination.takeSnapshot());
- }
- catch (MockException e)
- {
- switch (e.getCode())
- {
- default:
- throw new AssertionError();
- case CONSTRAINT_VIOLATION:
- throw new ConstraintViolationException();
- }
- }
- }
-
public Collection<StructuralObject> loadChildren(StructuralObject parent)
{
MockObject mockParent = getValidMockObject(parent);
Modified: modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/state/structural/MockObject.java
===================================================================
--- modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/state/structural/MockObject.java 2008-04-02 14:34:34 UTC (rev 10483)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/state/structural/MockObject.java 2008-04-02 15:29:09 UTC (rev 10484)
@@ -22,12 +22,11 @@
******************************************************************************/
package org.jboss.portal.presentation.test.model.state.structural;
-import org.jboss.portal.presentation.model.UIContext;
-import org.jboss.portal.presentation.model.UIObject;
-import org.jboss.portal.presentation.model.UIPage;
-import org.jboss.portal.presentation.model.UIPortal;
-import org.jboss.portal.presentation.model.UIWindow;
-import org.jboss.portal.presentation.model.state.structural.StructuralObject;
+import org.jboss.portal.presentation.model2.ui.UIContext;
+import org.jboss.portal.presentation.model2.ui.UIObject;
+import org.jboss.portal.presentation.model2.ui.UIPage;
+import org.jboss.portal.presentation.model2.ui.UIWindow;
+import org.jboss.portal.presentation.model2.state.structural.StructuralObject;
import java.util.List;
import java.util.Map;
@@ -46,7 +45,7 @@
public enum Type
{
- PORTAL(UIPortal.class), PAGE(UIPage.class), WINDOW(UIWindow.class), CONTEXT(UIContext.class);
+ PAGE(UIPage.class), WINDOW(UIWindow.class), CONTEXT(UIContext.class);
/** . */
final Class<? extends UIObject> clazz;
Modified: modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/state/structural/StructuralObjectImpl.java
===================================================================
--- modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/state/structural/StructuralObjectImpl.java 2008-04-02 14:34:34 UTC (rev 10483)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/state/structural/StructuralObjectImpl.java 2008-04-02 15:29:09 UTC (rev 10484)
@@ -22,8 +22,8 @@
******************************************************************************/
package org.jboss.portal.presentation.test.model.state.structural;
-import org.jboss.portal.presentation.model.state.structural.StructuralObject;
-import org.jboss.portal.presentation.model.state.structural.StructuralState;
+import org.jboss.portal.presentation.model2.state.structural.StructuralObject;
+import org.jboss.portal.presentation.model2.state.structural.StructuralState;
import java.util.List;
@@ -68,15 +68,15 @@
return state;
}
- public boolean compareTo(StructuralObject other)
+ public boolean equals(Object obj)
{
- if (other == this)
+ if (obj == this)
{
return true;
}
- if (other instanceof StructuralObjectImpl)
+ if (obj instanceof StructuralObjectImpl)
{
- StructuralObjectImpl that = (StructuralObjectImpl)other;
+ StructuralObjectImpl that = (StructuralObjectImpl)obj;
//
return handle.equals(that.handle);
Modified: modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/state/structural/StructuralStateImpl.java
===================================================================
--- modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/state/structural/StructuralStateImpl.java 2008-04-02 14:34:34 UTC (rev 10483)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/state/structural/StructuralStateImpl.java 2008-04-02 15:29:09 UTC (rev 10484)
@@ -22,8 +22,8 @@
******************************************************************************/
package org.jboss.portal.presentation.test.model.state.structural;
-import org.jboss.portal.presentation.model.state.structural.StructuralState;
-import org.jboss.portal.presentation.model.UIObject;
+import org.jboss.portal.presentation.model2.state.structural.StructuralState;
+import org.jboss.portal.presentation.model2.ui.UIObject;
import java.util.Map;
Modified: modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/AbstractModelTestCase.java
===================================================================
--- modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/AbstractModelTestCase.java 2008-04-02 14:34:34 UTC (rev 10483)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/AbstractModelTestCase.java 2008-04-02 15:29:09 UTC (rev 10484)
@@ -25,16 +25,16 @@
import org.jboss.portal.presentation.model2.UIModel;
import org.jboss.portal.presentation.test.model.state.structural.MockModel;
import org.jboss.portal.presentation.test.model.state.structural.MockModelImpl;
-import org.jboss.portal.presentation.model.state.structural.StructuralStateContext;
+import org.jboss.portal.presentation.test.model.state.navigational.NavigationalStateContextImpl;
+import org.jboss.portal.presentation.model2.state.structural.StructuralStateContext;
import org.jboss.portal.presentation.impl.model2.UIModelImpl;
-import org.jboss.portal.presentation.impl.model.state.navigational.NavigationalStateContextImpl;
import junit.framework.TestCase;
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
* @version $Revision: 630 $
*/
-public class AbstractModelTestCase extends TestCase
+public abstract class AbstractModelTestCase extends TestCase
{
/** . */
Modified: modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/AddChildTestCase.java
===================================================================
--- modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/AddChildTestCase.java 2008-04-02 14:34:34 UTC (rev 10483)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/AddChildTestCase.java 2008-04-02 15:29:09 UTC (rev 10484)
@@ -59,7 +59,7 @@
context.assertConsistency(model.getRootId());
//
- mockModel.getRoot().getChild("foo").addChild("juu", MockObject.Type.PORTAL);
+ mockModel.getRoot().getChild("foo").addChild("juu", MockObject.Type.PAGE);
fooDef.addChild("juu");
fooDef.setTraversal(after[0]);
Modified: modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/NodeDef.java
===================================================================
--- modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/NodeDef.java 2008-04-02 14:34:34 UTC (rev 10483)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/NodeDef.java 2008-04-02 15:29:09 UTC (rev 10484)
@@ -164,7 +164,7 @@
{
for (Map.Entry<String, NodeDef> childNodeEntry : children.entrySet())
{
- MockObject child = object.addChild(childNodeEntry.getKey(), MockObject.Type.PORTAL, properties);
+ MockObject child = object.addChild(childNodeEntry.getKey(), MockObject.Type.PAGE, properties);
childNodeEntry.getValue().populate(child);
}
}
Modified: modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/TraversalModelTestCase.java
===================================================================
--- modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/TraversalModelTestCase.java 2008-04-02 14:34:34 UTC (rev 10483)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/TraversalModelTestCase.java 2008-04-02 15:29:09 UTC (rev 10484)
@@ -26,9 +26,9 @@
import org.jboss.portal.presentation.model2.UIModel;
import org.jboss.portal.presentation.test.model.state.structural.MockModel;
import org.jboss.portal.presentation.test.model.state.structural.MockModelImpl;
-import org.jboss.portal.presentation.model.state.structural.StructuralStateContext;
+import org.jboss.portal.presentation.test.model.state.navigational.NavigationalStateContextImpl;
+import org.jboss.portal.presentation.model2.state.structural.StructuralStateContext;
import org.jboss.portal.presentation.impl.model2.UIModelImpl;
-import org.jboss.portal.presentation.impl.model.state.navigational.NavigationalStateContextImpl;
import java.util.Collection;
import java.util.Collections;
16 years, 2 months
JBoss Portal SVN: r10483 - in modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation: model2 and 1 other directory.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-04-02 10:34:34 -0400 (Wed, 02 Apr 2008)
New Revision: 10483
Removed:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/UIObject.java
Modified:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/UIObjectImpl.java
Log:
remove duplicated class (for some reason it was duplicated)
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/UIObjectImpl.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/UIObjectImpl.java 2008-04-02 14:33:05 UTC (rev 10482)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/UIObjectImpl.java 2008-04-02 14:34:34 UTC (rev 10483)
@@ -22,7 +22,7 @@
******************************************************************************/
package org.jboss.portal.presentation.impl.model2;
-import org.jboss.portal.presentation.model2.UIObject;
+import org.jboss.portal.presentation.model2.ui.UIObject;
import org.jboss.portal.presentation.model.state.StateException;
import org.jboss.portal.presentation.model.state.structural.StructuralObject;
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/UIObject.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/UIObject.java 2008-04-02 14:33:05 UTC (rev 10482)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/UIObject.java 2008-04-02 14:34:34 UTC (rev 10483)
@@ -1,70 +0,0 @@
-/******************************************************************************
- * 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.model2;
-
-import org.jboss.portal.presentation.model.state.StateException;
-
-import java.util.Set;
-
-/**
- * A wrapper of a structural object. The main goal of this object is to let the viewport add custom payload
- * in addition of the structural state.
- *
- * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public interface UIObject
-{
-
- /**
- * Returns the id.
- *
- * @return the id
- */
- String getId();
-
- /**
- * Returns the name.
- *
- * @return the name
- */
- String getName();
-
- /**
- * Returns a property value or null if it does not exist.
- *
- * @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 org.jboss.portal.presentation.model.state.StateException any state exception
- */
- <T> T getProperty(String propertyName, Class<T> propertyType) throws IllegalArgumentException, StateException;
-
- /**
- * Returns the set of property names of this object
- *
- * @return the property names
- */
- Set<String> getPropertyNames();
-}
16 years, 2 months
JBoss Portal SVN: r10482 - in branches/JBoss_Portal_Branch_2_6/core-identity/src: main/org/jboss/portal/core/identity/services/workflow/impl and 3 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-04-02 10:33:05 -0400 (Wed, 02 Apr 2008)
New Revision: 10482
Modified:
branches/JBoss_Portal_Branch_2_6/core-identity/src/main/org/jboss/portal/core/identity/services/IdentityConstants.java
branches/JBoss_Portal_Branch_2_6/core-identity/src/main/org/jboss/portal/core/identity/services/workflow/impl/RegistrationServiceImpl.java
branches/JBoss_Portal_Branch_2_6/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/CreateUserAction.java
branches/JBoss_Portal_Branch_2_6/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/UsernameValidator.java
branches/JBoss_Portal_Branch_2_6/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity.properties
Log:
JBPORTAL-1974: User management portlet doesn't check if user was created sucessfully
(Partially resolved, still need to solve what happens when the user gets created after a business process, see: org.jboss.portal.core.identity.jbpm.CreateUserAction)
Modified: branches/JBoss_Portal_Branch_2_6/core-identity/src/main/org/jboss/portal/core/identity/services/IdentityConstants.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-identity/src/main/org/jboss/portal/core/identity/services/IdentityConstants.java 2008-04-02 12:19:06 UTC (rev 10481)
+++ branches/JBoss_Portal_Branch_2_6/core-identity/src/main/org/jboss/portal/core/identity/services/IdentityConstants.java 2008-04-02 14:33:05 UTC (rev 10482)
@@ -60,6 +60,7 @@
/** Registration and validation status */
public static final String REGISTRATION_REGISTERED = "registered";
+ public static final String REGISTRATION_FAILED = "failed";
public static final String REGISTRATION_PENDING = "registration_pending";
public static final String VALIDATION_FAILED = "validation_failed";
public static final String VALIDATION_VALIDATED = "validated";
Modified: branches/JBoss_Portal_Branch_2_6/core-identity/src/main/org/jboss/portal/core/identity/services/workflow/impl/RegistrationServiceImpl.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-identity/src/main/org/jboss/portal/core/identity/services/workflow/impl/RegistrationServiceImpl.java 2008-04-02 12:19:06 UTC (rev 10481)
+++ branches/JBoss_Portal_Branch_2_6/core-identity/src/main/org/jboss/portal/core/identity/services/workflow/impl/RegistrationServiceImpl.java 2008-04-02 14:33:05 UTC (rev 10482)
@@ -160,8 +160,16 @@
|| IdentityConstants.SUBSCRIPTION_MODE_AUTOMATIC.equals(adminSubscriptionMode))
{
// Admin - automatic subscription
- this.getIdentityUserManagementService().createUser(username, password, profileMap, roles);
- return IdentityConstants.REGISTRATION_REGISTERED;
+
+ boolean success = this.getIdentityUserManagementService().createUser(username, password, profileMap, roles);
+ if (success)
+ {
+ return IdentityConstants.REGISTRATION_REGISTERED;
+ }
+ else
+ {
+ return IdentityConstants.REGISTRATION_FAILED;
+ }
}
else
{
@@ -176,8 +184,15 @@
if (subscriptionMode == null || IdentityConstants.SUBSCRIPTION_MODE_AUTOMATIC.equals(subscriptionMode))
{
// User - automatic subscription
- this.getIdentityUserManagementService().createUser(username, password, profileMap, roles);
- return IdentityConstants.REGISTRATION_REGISTERED;
+ boolean success = this.getIdentityUserManagementService().createUser(username, password, profileMap, roles);
+ if (success)
+ {
+ return IdentityConstants.REGISTRATION_REGISTERED;
+ }
+ else
+ {
+ return IdentityConstants.REGISTRATION_FAILED;
+ }
}
else
{
Modified: branches/JBoss_Portal_Branch_2_6/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/CreateUserAction.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/CreateUserAction.java 2008-04-02 12:19:06 UTC (rev 10481)
+++ branches/JBoss_Portal_Branch_2_6/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/CreateUserAction.java 2008-04-02 14:33:05 UTC (rev 10482)
@@ -30,6 +30,7 @@
import java.util.ResourceBundle;
import javax.faces.application.FacesMessage;
+import javax.faces.application.FacesMessage.Severity;
import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
import javax.faces.event.ActionEvent;
@@ -141,7 +142,7 @@
public void register(ActionEvent ev)
{
- String registrationStatus = "failed";
+ String registrationStatus = IdentityConstants.REGISTRATION_FAILED;
FacesContext ctx = FacesContext.getCurrentInstance();
String adminSubscription = (String) ev.getComponent().getId();
ResourceBundle bundle = ResourceBundle.getBundle("conf.bundles.Identity", ctx.getViewRoot().getLocale());
@@ -205,10 +206,14 @@
{
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(bundle.getString("IDENTITY_REGISTER_SUCCESS_TITLE")));
}
- else if (adminSubscription.equals("admin"))
+ else if (adminSubscription.equals("admin") && !registrationStatus.equals(IdentityConstants.REGISTRATION_FAILED))
{
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(bundle.getString("IDENTITY_MANAGEMENT_CREATE_USER_CREATED")));
}
+ else if (registrationStatus.equals(IdentityConstants.REGISTRATION_FAILED))
+ {
+ FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, bundle.getString("IDENTITY_REGISTER_FAILED"), bundle.getString("IDENTITY_REGISTER_FAILED")));
+ }
else
{
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(bundle.getString("IDENTITY_VALIDATION_ERROR_REGISTRATION")));
Modified: branches/JBoss_Portal_Branch_2_6/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/UsernameValidator.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/UsernameValidator.java 2008-04-02 12:19:06 UTC (rev 10481)
+++ branches/JBoss_Portal_Branch_2_6/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/UsernameValidator.java 2008-04-02 14:33:05 UTC (rev 10482)
@@ -89,7 +89,7 @@
catch (IdentityException e)
{
log.error("Error validation username", e);
- throw new ValidatorException(new FacesMessage(bundle.getString("IDENTITY_VALIDATION_ERROR_USERNAME_ERROR")));
+ throw new ValidatorException(new FacesMessage(bundle.getString("IDENTITY_SERVER_ERROR")));
}
catch (CoreIdentityConfigurationException e)
{
Modified: branches/JBoss_Portal_Branch_2_6/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity.properties
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity.properties 2008-04-02 12:19:06 UTC (rev 10481)
+++ branches/JBoss_Portal_Branch_2_6/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity.properties 2008-04-02 14:33:05 UTC (rev 10482)
@@ -39,7 +39,10 @@
IDENTITY_REGISTER_SUCCESS_TITLE=Your account has been successfully created. You may want to login now.
IDENTITY_REGISTER_PENDING_TITLE=An e-mail has been sent to your e-mail address to verify your registration.
IDENTITY_REGISTER_REQUIRED_INFORMATION=indicates a required field.
+IDENTITY_REGISTER_FAILED=The registration has failed for an unknown reason.
+IDENTITY_SERVER_ERROR=Unexpected identity server error
+
IDENTITY_LOST_PASSWORD_TITLE=Forgot your login data?
IDENTITY_LOST_PASSWORD_DESCRIPTION=Please enter your username to reset your password.
IDENTITY_LOST_PASSWORD_ERROR=Failed to reset password.
16 years, 2 months
JBoss Portal SVN: r10481 - branches/JBoss_Portal_Branch_2_7/theme/src/main/org/jboss/portal/theme/impl/render/dynamic.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-04-02 08:19:06 -0400 (Wed, 02 Apr 2008)
New Revision: 10481
Modified:
branches/JBoss_Portal_Branch_2_7/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaRegionRenderer.java
Log:
JBPORTAL-1965: Scriptaculous modules are added twice
Modified: branches/JBoss_Portal_Branch_2_7/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaRegionRenderer.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaRegionRenderer.java 2008-04-02 12:14:10 UTC (rev 10480)
+++ branches/JBoss_Portal_Branch_2_7/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaRegionRenderer.java 2008-04-02 12:19:06 UTC (rev 10481)
@@ -132,15 +132,9 @@
markup.print("/prototype.js'></script>\n");
markup.print("<script type='text/javascript' src='");
markup.print(jsBase);
- markup.print("/scriptaculous.js'></script>\n");
+ markup.print("/scriptaculous.js?load=effects,dragdrop'></script>\n");
markup.print("<script type='text/javascript' src='");
markup.print(jsBase);
- markup.print("/effects.js'></script>\n");
- markup.print("<script type='text/javascript' src='");
- markup.print(jsBase);
- markup.print("/dragdrop.js'></script>\n");
- markup.print("<script type='text/javascript' src='");
- markup.print(jsBase);
markup.print("/dyna.js'></script>\n");
markup.print("<script type='text/javascript'>\n");
16 years, 2 months
JBoss Portal SVN: r10480 - branches/JBoss_Portal_Branch_2_6/theme/src/main/org/jboss/portal/theme/impl/render/dynamic.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-04-02 08:14:10 -0400 (Wed, 02 Apr 2008)
New Revision: 10480
Modified:
branches/JBoss_Portal_Branch_2_6/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaRegionRenderer.java
Log:
JBPORTAL-1965: Scriptaculous modules are added twice
Modified: branches/JBoss_Portal_Branch_2_6/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaRegionRenderer.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaRegionRenderer.java 2008-04-02 11:50:58 UTC (rev 10479)
+++ branches/JBoss_Portal_Branch_2_6/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaRegionRenderer.java 2008-04-02 12:14:10 UTC (rev 10480)
@@ -132,15 +132,9 @@
markup.print("/prototype.js'></script>\n");
markup.print("<script type='text/javascript' src='");
markup.print(jsBase);
- markup.print("/scriptaculous.js'></script>\n");
+ markup.print("/scriptaculous.js?load=effects,dragdrop'></script>\n");
markup.print("<script type='text/javascript' src='");
markup.print(jsBase);
- markup.print("/effects.js'></script>\n");
- markup.print("<script type='text/javascript' src='");
- markup.print(jsBase);
- markup.print("/dragdrop.js'></script>\n");
- markup.print("<script type='text/javascript' src='");
- markup.print(jsBase);
markup.print("/dyna.js'></script>\n");
markup.print("<script type='text/javascript'>\n");
16 years, 2 months
JBoss Portal SVN: r10479 - in branches/JBoss_Portal_Branch_2_7: core/src/bin/portal-core-war/layouts/3columns and 16 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-04-02 07:50:58 -0400 (Wed, 02 Apr 2008)
New Revision: 10479
Added:
branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/layouts/common/modal_body.jsp
branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/layouts/common/modal_head.jsp
Removed:
branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/layouts/common/modal.jsp
Modified:
branches/JBoss_Portal_Branch_2_7/core-cms/src/bin/portal-cms-war/images/cms/admin/tiny_mce/themes/default/editor_ui.css
branches/JBoss_Portal_Branch_2_7/core-cms/src/bin/portal-cms-war/images/cms/admin/tiny_mce/themes/simple/editor_ui.css
branches/JBoss_Portal_Branch_2_7/core-samples/src/resources/portal-jsp-samples-war/WEB-INF/jsp/jsp/view.jsp
branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/layouts/1column/index.jsp
branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/layouts/3columns/index.jsp
branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/layouts/generic/index.jsp
branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/layouts/generic/maximized.jsp
branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/login/error.jsp
branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/login/index.jsp
branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/themes/industrial/portal_style.css
branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/themes/maple/portal_style.css
branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/themes/mission-critical/portal_style.css
branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/themes/phalanx/portal_style.css
branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/themes/renaissance/portal_style.css
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-war/WEB-INF/jsp/header/header.jsp
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-server-war/login.jsp
branches/JBoss_Portal_Branch_2_7/jems/.classpath
branches/JBoss_Portal_Branch_2_7/registration/.classpath
branches/JBoss_Portal_Branch_2_7/theme/src/main/org/jboss/portal/theme/impl/render/div/DivDecorationRenderer.java
Log:
JBPORTAL-1874: Default installation of JBoss Portal 2.6.3 does not validate as correct XHTML and CSS
Modified: branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/layouts/1column/index.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/layouts/1column/index.jsp 2008-04-02 11:41:30 UTC (rev 10478)
+++ branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/layouts/1column/index.jsp 2008-04-02 11:50:58 UTC (rev 10479)
@@ -12,11 +12,12 @@
<p:theme themeName="renaissance"/>
<!-- insert header content that was possibly set by portlets on the page -->
<p:headerContent/>
+ <%@include file="/layouts/common/modal_head.jsp"%>
</head>
<body id="body">
<p:region regionName='AJAXScripts' regionID='AJAXScripts'/>
-<%@include file="/layouts/common/modal.jsp"%>
+<%@include file="/layouts/common/modal_body.jsp"%>
<div id="portal-container">
<div id="sizer">
<div id="expander">
Modified: branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/layouts/3columns/index.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/layouts/3columns/index.jsp 2008-04-02 11:41:30 UTC (rev 10478)
+++ branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/layouts/3columns/index.jsp 2008-04-02 11:50:58 UTC (rev 10479)
@@ -12,11 +12,12 @@
<p:theme themeName="renaissance"/>
<!-- insert header content that was possibly set by portlets on the page -->
<p:headerContent/>
+ <%@include file="/layouts/common/modal_head.jsp"%>
</head>
<body id="body">
<p:region regionName='AJAXScripts' regionID='AJAXScripts'/>
-<%@include file="/layouts/common/modal.jsp"%>
+<%@include file="/layouts/common/modal_body.jsp"%>
<div id="portal-container">
<div id="sizer">
<div id="expander">
Deleted: branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/layouts/common/modal.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/layouts/common/modal.jsp 2008-04-02 11:41:30 UTC (rev 10478)
+++ branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/layouts/common/modal.jsp 2008-04-02 11:50:58 UTC (rev 10479)
@@ -1,7 +0,0 @@
-<script src="<%=request.getContextPath()%>/js/modal.js" type="text/javascript"></script>
-<link rel="stylesheet" href="<%=request.getContextPath()%>/css/modal.css" type="text/css" />
- <div id="login-modal" style="display:none">
- <div id="login-modal-msg" style="display:none;width:257px;height:157px">
- <iframe src="" frameborder="0" width="257" height="157" scrolling="no" marginheight="0" marginwidth="0" name="login-content" class="login-content" id="loginIframe"></iframe>
- </div>
- </div>
\ No newline at end of file
Copied: branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/layouts/common/modal_body.jsp (from rev 10478, branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/layouts/common/modal_body.jsp)
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/layouts/common/modal_body.jsp (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/layouts/common/modal_body.jsp 2008-04-02 11:50:58 UTC (rev 10479)
@@ -0,0 +1,5 @@
+ <div id="login-modal" style="display:none">
+ <div id="login-modal-msg" style="display:none;width:257px;height:157px">
+ <iframe src="" frameborder="0" width="257" height="157" scrolling="no" marginheight="0" marginwidth="0" name="login-content" class="login-content" id="loginIframe"></iframe>
+ </div>
+ </div>
\ No newline at end of file
Copied: branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/layouts/common/modal_head.jsp (from rev 10478, branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/layouts/common/modal_head.jsp)
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/layouts/common/modal_head.jsp (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/layouts/common/modal_head.jsp 2008-04-02 11:50:58 UTC (rev 10479)
@@ -0,0 +1,2 @@
+<script src="<%=request.getContextPath()%>/js/modal.js" type="text/javascript"></script>
+<link rel="stylesheet" href="<%=request.getContextPath()%>/css/modal.css" type="text/css" />
\ No newline at end of file
Modified: branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/layouts/generic/index.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/layouts/generic/index.jsp 2008-04-02 11:41:30 UTC (rev 10478)
+++ branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/layouts/generic/index.jsp 2008-04-02 11:50:58 UTC (rev 10479)
@@ -12,11 +12,12 @@
<p:theme themeName="renaissance"/>
<!-- insert header content that was possibly set by portlets on the page -->
<p:headerContent/>
+ <%@include file="/layouts/common/modal_head.jsp"%>
</head>
<body id="body">
<p:region regionName='AJAXScripts' regionID='AJAXScripts'/>
-<%@include file="/layouts/common/modal.jsp"%>
+<%@include file="/layouts/common/modal_body.jsp"%>
<div id="portal-container">
<div id="sizer">
<div id="expander">
Modified: branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/layouts/generic/maximized.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/layouts/generic/maximized.jsp 2008-04-02 11:41:30 UTC (rev 10478)
+++ branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/layouts/generic/maximized.jsp 2008-04-02 11:50:58 UTC (rev 10479)
@@ -12,11 +12,12 @@
<p:theme themeName="renaissance"/>
<!-- inject header content that was generated by the portlets on the requested page -->
<p:headerContent/>
+ <%@include file="/layouts/common/modal_head.jsp"%>
</head>
<body id="body">
<p:region regionName='AJAXScripts' regionID='AJAXScripts'/>
-<%@include file="/layouts/common/modal.jsp"%>
+<%@include file="/layouts/common/modal_body.jsp"%>
<div id="portal-container">
<div id="sizer">
<div id="expander">
Modified: branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/login/error.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/login/error.jsp 2008-04-02 11:41:30 UTC (rev 10478)
+++ branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/login/error.jsp 2008-04-02 11:50:58 UTC (rev 10479)
@@ -1,5 +1,5 @@
<html>
-<head/>
+<head></head>
<body>
bad login
</body>
Modified: branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/login/index.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/login/index.jsp 2008-04-02 11:41:30 UTC (rev 10478)
+++ branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/login/index.jsp 2008-04-02 11:50:58 UTC (rev 10479)
@@ -1,5 +1,5 @@
<%@ page import="org.jboss.portal.common.util.Tools"%><html>
-<head/>
+<head></head>
<body>
<form method="POST" action="j_security_check">
<%--
Modified: branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/themes/industrial/portal_style.css
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/themes/industrial/portal_style.css 2008-04-02 11:41:30 UTC (rev 10478)
+++ branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/themes/industrial/portal_style.css 2008-04-02 11:50:58 UTC (rev 10479)
@@ -307,7 +307,7 @@
}
UL#tabsHeader ul a {
- font: 11px;
+ font-size: 11px;
font-family: Verdana, Arial, Helvetica, Sans-Serif, sans-serif;
font-weight: normal;
color: #5078aa;
@@ -315,14 +315,14 @@
}
UL#tabsHeader ul a:hover {
- font: 11px;
+ font-size: 11px;
font-family: Verdana, Arial, Helvetica, Sans-Serif, sans-serif;
font-weight: normal;
color: #5078aa;
}
UL#tabsHeader #current ul a {
- font: 11px;
+ font-size: 11px;
font-family: Verdana, Arial, Helvetica, Sans-Serif, sans-serif;
font-weight: normal;
color: #5078aa;
Modified: branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/themes/maple/portal_style.css
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/themes/maple/portal_style.css 2008-04-02 11:41:30 UTC (rev 10478)
+++ branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/themes/maple/portal_style.css 2008-04-02 11:50:58 UTC (rev 10479)
@@ -323,7 +323,7 @@
}
UL#tabsHeader ul a {
- font: 11px;
+ font-size: 11px;
font-family: Verdana, Arial, Helvetica, Sans-Serif, sans-serif;
font-weight: normal;
color: #5078aa;
@@ -331,14 +331,14 @@
}
UL#tabsHeader ul a:hover {
- font: 11px;
+ font-size: 11px;
font-family: Verdana, Arial, Helvetica, Sans-Serif, sans-serif;
font-weight: normal;
color: #5078aa;
}
UL#tabsHeader #current ul a {
- font: 11px;
+ font-size: 11px;
font-family: Verdana, Arial, Helvetica, Sans-Serif, sans-serif;
font-weight: normal;
color: #5078aa;
@@ -688,7 +688,7 @@
#foldheader {
list-style-image: url( images/bullet.gif ) ! Important;
vertical-align: middle;
- cursor: hand !important;
+ cursor: pointer !important;
margin-left: -10px;
}
@@ -696,13 +696,13 @@
margin-left: 10px;
list-style-image: url( images/bullet.gif ) ! Important;
list-style-position: outside;
- cursor: hand !important;
+ cursor: pointer !important;
margin-left: -10px;
}
#pagenosub {
list-style-image: url( images/bullet.gif ) ! Important;
- cursor: hand !important;
+ cursor: pointer !important;
margin-left: -10px;
vertical-align: middle;
}
Modified: branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/themes/mission-critical/portal_style.css
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/themes/mission-critical/portal_style.css 2008-04-02 11:41:30 UTC (rev 10478)
+++ branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/themes/mission-critical/portal_style.css 2008-04-02 11:50:58 UTC (rev 10479)
@@ -303,7 +303,7 @@
}
UL#tabsHeader ul a {
- font: 11px;
+ font-size: 11px;
font-family: Verdana, Arial, Helvetica, Sans-Serif, sans-serif;
font-weight: normal;
color: #5078aa;
@@ -311,14 +311,14 @@
}
UL#tabsHeader ul a:hover {
- font: 11px;
+ font-size: 11px;
font-family: Verdana, Arial, Helvetica, Sans-Serif, sans-serif;
font-weight: normal;
color: #5078aa;
}
UL#tabsHeader #current ul a {
- font: 11px;
+ font-size: 11px;
font-family: Verdana, Arial, Helvetica, Sans-Serif, sans-serif;
font-weight: normal;
color: #5078aa;
Modified: branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/themes/phalanx/portal_style.css
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/themes/phalanx/portal_style.css 2008-04-02 11:41:30 UTC (rev 10478)
+++ branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/themes/phalanx/portal_style.css 2008-04-02 11:50:58 UTC (rev 10479)
@@ -341,7 +341,7 @@
}
UL#tabsHeader ul a {
- font: 11px;
+ font-size: 11px;
font-family: Verdana, Arial, Helvetica, Sans-Serif, sans-serif;
font-weight: normal;
color: #5078aa;
@@ -349,14 +349,14 @@
}
UL#tabsHeader ul a:hover {
- font: 11px;
+ font-size: 11px;
font-family: Verdana, Arial, Helvetica, Sans-Serif, sans-serif;
font-weight: normal;
color: #5078aa;
}
UL#tabsHeader #current ul a {
- font: 11px;
+ font-size: 11px;
font-family: Verdana, Arial, Helvetica, Sans-Serif, sans-serif;
font-weight: normal;
color: #5078aa;
Modified: branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/themes/renaissance/portal_style.css
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/themes/renaissance/portal_style.css 2008-04-02 11:41:30 UTC (rev 10478)
+++ branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/themes/renaissance/portal_style.css 2008-04-02 11:50:58 UTC (rev 10479)
@@ -321,21 +321,21 @@
ul#tabsHeader ul a {
text-decoration: none;
- font: 11px;
+ font-size: 11px;
font-family: Verdana, Arial, Helvetica, Sans-Serif, sans-serif;
font-weight: normal;
color: #5078aa;
}
ul#tabsHeader ul a:hover {
- font: 11px;
+ font-size: 11px;
font-family: Verdana, Arial, Helvetica, Sans-Serif, sans-serif;
font-weight: normal;
color: #5078aa;
}
ul#tabsHeader #current ul a {
- font: 11px;
+ font-size: 11px;
font-family: Verdana, Arial, Helvetica, Sans-Serif, sans-serif;
font-weight: normal;
color: #5078aa;
@@ -393,14 +393,15 @@
ul#tabsHeader #addpage {
display: inline;
- background-color: none;
- background-image: none;
+ background-color: transparent;
margin-bottom: -3px;
padding-top: 1px;
}
ul#tabsHeader #addpage a, #addpage a:hover {
- font: 11px / normal Verdana, Arial, Helvetica, Sans-Serif, sans-serif;
+ font-size: 11px;
+ font-family: Verdana, Arial, Helvetica, Sans-Serif, sans-serif;
+ font-variant: normal;
font-weight: bold;
color: white;
line-height: 22px;
Modified: branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-war/WEB-INF/jsp/header/header.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-war/WEB-INF/jsp/header/header.jsp 2008-04-02 11:41:30 UTC (rev 10478)
+++ branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-war/WEB-INF/jsp/header/header.jsp 2008-04-02 11:50:58 UTC (rev 10479)
@@ -19,6 +19,7 @@
<%if(request.getAttribute("ssoEnabled") == null){%>
<script type="text/javascript">
+ /* <![CDATA[ */
if (typeof isModalLoaded != 'undefined'){
document.write('<a href=\"#\" onclick=\"alertModal(\'login-modal\',\'login-modal-msg\');return false;\">Login</a>');
}else{
@@ -27,6 +28,7 @@
//set the iframe src for login modal to requested URL
var iframeSrc = '<%= loginURL %>' + '?loginheight=0';
document.getElementById('loginIframe').src = iframeSrc;
+ /* ]]> */
</script>
<noscript>
@@ -43,8 +45,10 @@
{
%>
<script type="text/javascript">
+ /* <![CDATA[ */
//we don't need the iframe/modal if logged in
document.getElementById('loginIframe').src = '';
+ /* ]]> */
</script>
Logged in as: <%= user.getUserName() %><br/><br/>
Modified: branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-server-war/login.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-server-war/login.jsp 2008-04-02 11:41:30 UTC (rev 10478)
+++ branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-server-war/login.jsp 2008-04-02 11:50:58 UTC (rev 10479)
@@ -20,22 +20,25 @@
~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--%>
+<%@ page pageEncoding="utf-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
+ <title>Login</title>
<style type="text/css">
+ /* <![CDATA[ */
body {
margin: 0;
padding: 0;
border: 0;
padding-top: <%=(request.getParameter("loginheight") != null ? request.getParameter("loginheight") : "300px")%>;
}
-
+ /* ]]> */
</style>
<link rel="stylesheet" href="/portal-core/css/login.css" type="text/css" />
</head>
-<body OnLoad="document.loginform.j_username.focus();">
+<body onload="document.loginform.j_username.focus();">
<div class="login-container">
@@ -44,19 +47,20 @@
</div>
<div class="login-content">
<div class="error-message"
- style="display:<%=(request.getAttribute("org.jboss.portal.loginError") != null ? "" : "none")%>;"><%=request.getAttribute("org.jboss.portal.loginError") %>
+ style="<%=(request.getAttribute("org.jboss.portal.loginError") != null ? "" : "display:none")%>;"><%=
+ (request.getAttribute("org.jboss.portal.loginError") == null ? "" : request.getAttribute("org.jboss.portal.loginError"))%>
</div>
- <form method="POST" action="<%= response.encodeURL("j_security_check") %>" name="loginform" id="loginForm"
+ <form method="post" action="<%= response.encodeURL("j_security_check") %>" name="loginform" id="loginForm"
target="_parent">
- <label for="j_username">
- <div class="form-field">Username:
- <input type="text" name="j_username" id="j_username" value=""/></div>
- </label>
- <label for="j_password">
- <div class="form-field bottom-field">Password:
- <input type="password" name="j_password" id="j_password" value=""/></div>
- </label>
- <input style="display:<%=(request.getParameter("loginheight") != null ? "" : "none")%>;" type="button" name="cancel" value="Cancel" class="cancel-button" onclick="window.parent.hideContentModal('login-modal');"/>
+ <div class="form-field">
+ <label for="j_username">Username:</label>
+ <input type="text" name="j_username" id="j_username" value=""/>
+ </div>
+ <div class="form-field bottom-field">
+ <label for="j_password">Password:</label>
+ <input type="password" name="j_password" id="j_password" value=""/>
+ </div>
+ <input style="<%=(request.getParameter("loginheight") != null ? "" : "display:none")%>;" type="button" name="cancel" value="Cancel" class="cancel-button" onclick="window.parent.hideContentModal('login-modal');"/>
<input style="<%=(request.getParameter("loginheight") != null ? "" : "right:10px")%>;" type="submit" name="login" value="Login" class="login-button"/>
</form>
Modified: branches/JBoss_Portal_Branch_2_7/core-cms/src/bin/portal-cms-war/images/cms/admin/tiny_mce/themes/default/editor_ui.css
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-cms/src/bin/portal-cms-war/images/cms/admin/tiny_mce/themes/default/editor_ui.css 2008-04-02 11:41:30 UTC (rev 10478)
+++ branches/JBoss_Portal_Branch_2_7/core-cms/src/bin/portal-cms-war/images/cms/admin/tiny_mce/themes/default/editor_ui.css 2008-04-02 11:50:58 UTC (rev 10479)
@@ -9,7 +9,7 @@
border-bottom: 1px solid;
border-right: 1px solid;
border-color: #F0F0EE;
- cursor: hand
+ cursor: pointer;
}
.mceButtonOver {
@@ -17,7 +17,7 @@
border-left: 1px solid buttonhighlight;
border-bottom: 1px solid buttonshadow;
border-right: 1px solid buttonshadow;
- cursor: hand
+ cursor: pointer;
}
.mceButtonDown {
@@ -25,7 +25,7 @@
border-right: 1px solid buttonhighlight;
border-top: 1px solid buttonshadow;
border-left: 1px solid buttonshadow;
- cursor: hand
+ cursor: pointer;
}
.mceButtonSelected {
@@ -34,17 +34,17 @@
border-top: 1px solid;
border-left: 1px solid;
border-color: #C0C0BB;
- cursor: hand
+ cursor: pointer;
}
.mceButtonDisabled {
- filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30);
border-top: 1px solid;
border-left: 1px solid;
border-bottom: 1px solid;
border-right: 1px solid;
border-color: #F0F0EE;
- cursor: text
+ cursor: text;
+ filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30);
}
.mceSeparator {
@@ -69,14 +69,14 @@
}
.mceSelectList {
- font-family: "MS Sans Serif";
+ font-family: "MS Sans Serif",sans-serif;;
font-size: 7pt;
font-weight: normal;
margin-top: 2px;
}
.mceLabel, .mceLabelDisabled {
- font-family: "MS Sans Serif";
+ font-family: "MS Sans Serif",sans-serif;;
font-size: 9pt;
}
Modified: branches/JBoss_Portal_Branch_2_7/core-cms/src/bin/portal-cms-war/images/cms/admin/tiny_mce/themes/simple/editor_ui.css
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-cms/src/bin/portal-cms-war/images/cms/admin/tiny_mce/themes/simple/editor_ui.css 2008-04-02 11:41:30 UTC (rev 10478)
+++ branches/JBoss_Portal_Branch_2_7/core-cms/src/bin/portal-cms-war/images/cms/admin/tiny_mce/themes/simple/editor_ui.css 2008-04-02 11:50:58 UTC (rev 10479)
@@ -9,7 +9,7 @@
border-bottom: 1px solid;
border-right: 1px solid;
border-color: #F0F0EE;
- cursor: hand
+ cursor: pointer;
}
.mceButtonOver {
@@ -17,7 +17,7 @@
border-left: 1px solid buttonhighlight;
border-bottom: 1px solid buttonshadow;
border-right: 1px solid buttonshadow;
- cursor: hand
+ cursor: pointer;
}
.mceButtonDown {
@@ -25,7 +25,7 @@
border-right: 1px solid buttonhighlight;
border-top: 1px solid buttonshadow;
border-left: 1px solid buttonshadow;
- cursor: hand
+ cursor: pointer;
}
.mceButtonSelected {
@@ -34,17 +34,17 @@
border-top: 1px solid;
border-left: 1px solid;
border-color: #C0C0BB;
- cursor: hand
+ cursor: pointer;
}
.mceButtonDisabled {
- filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30);
border-top: 1px solid;
border-left: 1px solid;
border-bottom: 1px solid;
border-right: 1px solid;
border-color: #F0F0EE;
- cursor: text
+ cursor: text;
+ filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30);
}
.mceSeparator {
@@ -69,14 +69,14 @@
}
.mceSelectList {
- font-family: "MS Sans Serif";
+ font-family: "MS Sans Serif",sans-serif;
font-size: 7pt;
font-weight: normal;
margin-top: 2px;
}
.mceLabel, .mceLabelDisabled {
- font-family: "MS Sans Serif";
+ font-family: "MS Sans Serif",sans-serif;
font-size: 9pt;
}
@@ -95,7 +95,7 @@
}
.mceEditorArea {
- font-family: "MS Sans Serif";
+ font-family: "MS Sans Serif",sans-serif;
background: #FFFFFF;
}
Modified: branches/JBoss_Portal_Branch_2_7/core-samples/src/resources/portal-jsp-samples-war/WEB-INF/jsp/jsp/view.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-samples/src/resources/portal-jsp-samples-war/WEB-INF/jsp/jsp/view.jsp 2008-04-02 11:41:30 UTC (rev 10478)
+++ branches/JBoss_Portal_Branch_2_7/core-samples/src/resources/portal-jsp-samples-war/WEB-INF/jsp/jsp/view.jsp 2008-04-02 11:50:58 UTC (rev 10479)
@@ -31,13 +31,13 @@
<tr>
<td align="center"><a href="http://portal.demo.jboss.com" target="_blank"><img
src="<%= renderRequest.getContextPath() %>/images/dodemo.gif" border="0"
- alt="Try the latest release of JBoss Portal, live and online."></a>
+ alt="Try the latest release of JBoss Portal, live and online." /></a>
<a href="http://labs.jboss.com/portal/jbossportal/download/index.html" target="_blank"><img
src="<%= renderRequest.getContextPath() %>/images/getcode.gif" border="0"
- alt="Download JBoss Portal and have it up and running in minutes."></a>
+ alt="Download JBoss Portal and have it up and running in minutes." /></a>
<a href="http://www.portletswap.com" target="_blank"><img
src="<%= renderRequest.getContextPath() %>/images/accessorize.gif" border="0"
- alt="Download portlets and layouts for your new JBoss Portal installation."></a></td>
+ alt="Download portlets and layouts for your new JBoss Portal installation." /></a></td>
</tr>
<tr>
<td></td>
Modified: branches/JBoss_Portal_Branch_2_7/jems/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_7/jems/.classpath 2008-04-02 11:41:30 UTC (rev 10478)
+++ branches/JBoss_Portal_Branch_2_7/jems/.classpath 2008-04-02 11:50:58 UTC (rev 10479)
@@ -23,7 +23,6 @@
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-jmx.jar" sourcepath="/JBoss_AS_4.0.5/jmx/src/main"/>
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-system.jar"/>
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jmx-invoker-adaptor-client.jar"/>
- <classpathentry kind="lib" path="/thirdparty/apache-xerces/lib/xml-apis.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/common/lib/portal-common-lib.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: branches/JBoss_Portal_Branch_2_7/registration/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_7/registration/.classpath 2008-04-02 11:41:30 UTC (rev 10478)
+++ branches/JBoss_Portal_Branch_2_7/registration/.classpath 2008-04-02 11:50:58 UTC (rev 10479)
@@ -8,7 +8,6 @@
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-system.jar"/>
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-jmx.jar"/>
<classpathentry kind="lib" path="/thirdparty/junit/lib/junit.jar"/>
- <classpathentry kind="lib" path="/thirdparty/apache-xerces/lib/xml-apis.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/common/lib/portal-common-lib.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: branches/JBoss_Portal_Branch_2_7/theme/src/main/org/jboss/portal/theme/impl/render/div/DivDecorationRenderer.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/theme/src/main/org/jboss/portal/theme/impl/render/div/DivDecorationRenderer.java 2008-04-02 11:41:30 UTC (rev 10478)
+++ branches/JBoss_Portal_Branch_2_7/theme/src/main/org/jboss/portal/theme/impl/render/div/DivDecorationRenderer.java 2008-04-02 11:50:58 UTC (rev 10479)
@@ -58,11 +58,6 @@
//
renderTitle(rendererContext, drc);
- //End the dyna-handle early so it doesn't encompass
- //the mode container -
- markup.print("</div>");
- markup.print("</div>");
-
markup.print("<div class=\"portlet-mode-container\">");
renderTriggerableActions(rendererContext, drc, ActionRendererContext.MODES_KEY);
renderTriggerableActions(rendererContext, drc, ActionRendererContext.WINDOWSTATES_KEY);
16 years, 2 months
JBoss Portal SVN: r10478 - in branches/JBoss_Portal_Branch_2_6: core/src/bin/portal-core-war/layouts/3columns and 16 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-04-02 07:41:30 -0400 (Wed, 02 Apr 2008)
New Revision: 10478
Added:
branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/layouts/common/modal_body.jsp
branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/layouts/common/modal_head.jsp
Removed:
branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/layouts/common/modal.jsp
Modified:
branches/JBoss_Portal_Branch_2_6/core-cms/src/bin/portal-cms-war/images/cms/admin/tiny_mce/themes/default/editor_ui.css
branches/JBoss_Portal_Branch_2_6/core-cms/src/bin/portal-cms-war/images/cms/admin/tiny_mce/themes/simple/editor_ui.css
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-jsp-samples-war/WEB-INF/jsp/jsp/view.jsp
branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/layouts/1column/index.jsp
branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/layouts/3columns/index.jsp
branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/layouts/generic/index.jsp
branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/layouts/generic/maximized.jsp
branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/login/error.jsp
branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/login/index.jsp
branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/themes/industrial/portal_style.css
branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/themes/maple/portal_style.css
branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/themes/mission-critical/portal_style.css
branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/themes/phalanx/portal_style.css
branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/themes/renaissance/portal_style.css
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB-INF/jsp/header/header.jsp
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-server-war/login.jsp
branches/JBoss_Portal_Branch_2_6/jems/.classpath
branches/JBoss_Portal_Branch_2_6/registration/.classpath
branches/JBoss_Portal_Branch_2_6/theme/src/main/org/jboss/portal/theme/impl/render/div/DivDecorationRenderer.java
Log:
JBPORTAL-1874: Default installation of JBoss Portal 2.6.3 does not validate as correct XHTML and CSS
Modified: branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/layouts/1column/index.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/layouts/1column/index.jsp 2008-04-02 10:23:40 UTC (rev 10477)
+++ branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/layouts/1column/index.jsp 2008-04-02 11:41:30 UTC (rev 10478)
@@ -12,11 +12,12 @@
<p:theme themeName="renaissance"/>
<!-- insert header content that was possibly set by portlets on the page -->
<p:headerContent/>
+ <%@include file="/layouts/common/modal_head.jsp"%>
</head>
<body id="body">
<p:region regionName='AJAXScripts' regionID='AJAXScripts'/>
-<%@include file="/layouts/common/modal.jsp"%>
+<%@include file="/layouts/common/modal_body.jsp"%>
<div id="portal-container">
<div id="sizer">
<div id="expander">
Modified: branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/layouts/3columns/index.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/layouts/3columns/index.jsp 2008-04-02 10:23:40 UTC (rev 10477)
+++ branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/layouts/3columns/index.jsp 2008-04-02 11:41:30 UTC (rev 10478)
@@ -12,11 +12,12 @@
<p:theme themeName="renaissance"/>
<!-- insert header content that was possibly set by portlets on the page -->
<p:headerContent/>
+ <%@include file="/layouts/common/modal_head.jsp"%>
</head>
<body id="body">
<p:region regionName='AJAXScripts' regionID='AJAXScripts'/>
-<%@include file="/layouts/common/modal.jsp"%>
+<%@include file="/layouts/common/modal_body.jsp"%>
<div id="portal-container">
<div id="sizer">
<div id="expander">
Deleted: branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/layouts/common/modal.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/layouts/common/modal.jsp 2008-04-02 10:23:40 UTC (rev 10477)
+++ branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/layouts/common/modal.jsp 2008-04-02 11:41:30 UTC (rev 10478)
@@ -1,7 +0,0 @@
-<script src="<%=request.getContextPath()%>/js/modal.js" type="text/javascript"></script>
-<link rel="stylesheet" href="<%=request.getContextPath()%>/css/modal.css" type="text/css" />
- <div id="login-modal" style="display:none">
- <div id="login-modal-msg" style="display:none;width:257px;height:157px">
- <iframe src="" frameborder="0" width="257" height="157" scrolling="no" marginheight="0" marginwidth="0" name="login-content" class="login-content" id="loginIframe"></iframe>
- </div>
- </div>
\ No newline at end of file
Added: branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/layouts/common/modal_body.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/layouts/common/modal_body.jsp (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/layouts/common/modal_body.jsp 2008-04-02 11:41:30 UTC (rev 10478)
@@ -0,0 +1,5 @@
+ <div id="login-modal" style="display:none">
+ <div id="login-modal-msg" style="display:none;width:257px;height:157px">
+ <iframe src="" frameborder="0" width="257" height="157" scrolling="no" marginheight="0" marginwidth="0" name="login-content" class="login-content" id="loginIframe"></iframe>
+ </div>
+ </div>
\ No newline at end of file
Added: branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/layouts/common/modal_head.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/layouts/common/modal_head.jsp (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/layouts/common/modal_head.jsp 2008-04-02 11:41:30 UTC (rev 10478)
@@ -0,0 +1,2 @@
+<script src="<%=request.getContextPath()%>/js/modal.js" type="text/javascript"></script>
+<link rel="stylesheet" href="<%=request.getContextPath()%>/css/modal.css" type="text/css" />
\ No newline at end of file
Modified: branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/layouts/generic/index.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/layouts/generic/index.jsp 2008-04-02 10:23:40 UTC (rev 10477)
+++ branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/layouts/generic/index.jsp 2008-04-02 11:41:30 UTC (rev 10478)
@@ -12,11 +12,12 @@
<p:theme themeName="renaissance"/>
<!-- insert header content that was possibly set by portlets on the page -->
<p:headerContent/>
+ <%@include file="/layouts/common/modal_head.jsp"%>
</head>
<body id="body">
<p:region regionName='AJAXScripts' regionID='AJAXScripts'/>
-<%@include file="/layouts/common/modal.jsp"%>
+<%@include file="/layouts/common/modal_body.jsp"%>
<div id="portal-container">
<div id="sizer">
<div id="expander">
Modified: branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/layouts/generic/maximized.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/layouts/generic/maximized.jsp 2008-04-02 10:23:40 UTC (rev 10477)
+++ branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/layouts/generic/maximized.jsp 2008-04-02 11:41:30 UTC (rev 10478)
@@ -12,11 +12,12 @@
<p:theme themeName="renaissance"/>
<!-- inject header content that was generated by the portlets on the requested page -->
<p:headerContent/>
+ <%@include file="/layouts/common/modal_head.jsp"%>
</head>
<body id="body">
<p:region regionName='AJAXScripts' regionID='AJAXScripts'/>
-<%@include file="/layouts/common/modal.jsp"%>
+<%@include file="/layouts/common/modal_body.jsp"%>
<div id="portal-container">
<div id="sizer">
<div id="expander">
Modified: branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/login/error.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/login/error.jsp 2008-04-02 10:23:40 UTC (rev 10477)
+++ branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/login/error.jsp 2008-04-02 11:41:30 UTC (rev 10478)
@@ -1,5 +1,5 @@
<html>
-<head/>
+<head></head>
<body>
bad login
</body>
Modified: branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/login/index.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/login/index.jsp 2008-04-02 10:23:40 UTC (rev 10477)
+++ branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/login/index.jsp 2008-04-02 11:41:30 UTC (rev 10478)
@@ -1,5 +1,5 @@
<%@ page import="org.jboss.portal.common.util.Tools"%><html>
-<head/>
+<head></head>
<body>
<form method="POST" action="j_security_check">
<%--
Modified: branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/themes/industrial/portal_style.css
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/themes/industrial/portal_style.css 2008-04-02 10:23:40 UTC (rev 10477)
+++ branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/themes/industrial/portal_style.css 2008-04-02 11:41:30 UTC (rev 10478)
@@ -307,7 +307,7 @@
}
UL#tabsHeader ul a {
- font: 11px;
+ font-size: 11px;
font-family: Verdana, Arial, Helvetica, Sans-Serif, sans-serif;
font-weight: normal;
color: #5078aa;
@@ -315,14 +315,14 @@
}
UL#tabsHeader ul a:hover {
- font: 11px;
+ font-size: 11px;
font-family: Verdana, Arial, Helvetica, Sans-Serif, sans-serif;
font-weight: normal;
color: #5078aa;
}
UL#tabsHeader #current ul a {
- font: 11px;
+ font-size: 11px;
font-family: Verdana, Arial, Helvetica, Sans-Serif, sans-serif;
font-weight: normal;
color: #5078aa;
Modified: branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/themes/maple/portal_style.css
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/themes/maple/portal_style.css 2008-04-02 10:23:40 UTC (rev 10477)
+++ branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/themes/maple/portal_style.css 2008-04-02 11:41:30 UTC (rev 10478)
@@ -323,7 +323,7 @@
}
UL#tabsHeader ul a {
- font: 11px;
+ font-size: 11px;
font-family: Verdana, Arial, Helvetica, Sans-Serif, sans-serif;
font-weight: normal;
color: #5078aa;
@@ -331,14 +331,14 @@
}
UL#tabsHeader ul a:hover {
- font: 11px;
+ font-size: 11px;
font-family: Verdana, Arial, Helvetica, Sans-Serif, sans-serif;
font-weight: normal;
color: #5078aa;
}
UL#tabsHeader #current ul a {
- font: 11px;
+ font-size: 11px;
font-family: Verdana, Arial, Helvetica, Sans-Serif, sans-serif;
font-weight: normal;
color: #5078aa;
@@ -688,7 +688,7 @@
#foldheader {
list-style-image: url( images/bullet.gif ) ! Important;
vertical-align: middle;
- cursor: hand !important;
+ cursor: pointer !important;
margin-left: -10px;
}
@@ -696,13 +696,13 @@
margin-left: 10px;
list-style-image: url( images/bullet.gif ) ! Important;
list-style-position: outside;
- cursor: hand !important;
+ cursor: pointer !important;
margin-left: -10px;
}
#pagenosub {
list-style-image: url( images/bullet.gif ) ! Important;
- cursor: hand !important;
+ cursor: pointer !important;
margin-left: -10px;
vertical-align: middle;
}
Modified: branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/themes/mission-critical/portal_style.css
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/themes/mission-critical/portal_style.css 2008-04-02 10:23:40 UTC (rev 10477)
+++ branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/themes/mission-critical/portal_style.css 2008-04-02 11:41:30 UTC (rev 10478)
@@ -303,7 +303,7 @@
}
UL#tabsHeader ul a {
- font: 11px;
+ font-size: 11px;
font-family: Verdana, Arial, Helvetica, Sans-Serif, sans-serif;
font-weight: normal;
color: #5078aa;
@@ -311,14 +311,14 @@
}
UL#tabsHeader ul a:hover {
- font: 11px;
+ font-size: 11px;
font-family: Verdana, Arial, Helvetica, Sans-Serif, sans-serif;
font-weight: normal;
color: #5078aa;
}
UL#tabsHeader #current ul a {
- font: 11px;
+ font-size: 11px;
font-family: Verdana, Arial, Helvetica, Sans-Serif, sans-serif;
font-weight: normal;
color: #5078aa;
Modified: branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/themes/phalanx/portal_style.css
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/themes/phalanx/portal_style.css 2008-04-02 10:23:40 UTC (rev 10477)
+++ branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/themes/phalanx/portal_style.css 2008-04-02 11:41:30 UTC (rev 10478)
@@ -341,7 +341,7 @@
}
UL#tabsHeader ul a {
- font: 11px;
+ font-size: 11px;
font-family: Verdana, Arial, Helvetica, Sans-Serif, sans-serif;
font-weight: normal;
color: #5078aa;
@@ -349,14 +349,14 @@
}
UL#tabsHeader ul a:hover {
- font: 11px;
+ font-size: 11px;
font-family: Verdana, Arial, Helvetica, Sans-Serif, sans-serif;
font-weight: normal;
color: #5078aa;
}
UL#tabsHeader #current ul a {
- font: 11px;
+ font-size: 11px;
font-family: Verdana, Arial, Helvetica, Sans-Serif, sans-serif;
font-weight: normal;
color: #5078aa;
Modified: branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/themes/renaissance/portal_style.css
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/themes/renaissance/portal_style.css 2008-04-02 10:23:40 UTC (rev 10477)
+++ branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/themes/renaissance/portal_style.css 2008-04-02 11:41:30 UTC (rev 10478)
@@ -321,21 +321,21 @@
ul#tabsHeader ul a {
text-decoration: none;
- font: 11px;
+ font-size: 11px;
font-family: Verdana, Arial, Helvetica, Sans-Serif, sans-serif;
font-weight: normal;
color: #5078aa;
}
ul#tabsHeader ul a:hover {
- font: 11px;
+ font-size: 11px;
font-family: Verdana, Arial, Helvetica, Sans-Serif, sans-serif;
font-weight: normal;
color: #5078aa;
}
ul#tabsHeader #current ul a {
- font: 11px;
+ font-size: 11px;
font-family: Verdana, Arial, Helvetica, Sans-Serif, sans-serif;
font-weight: normal;
color: #5078aa;
@@ -393,14 +393,15 @@
ul#tabsHeader #addpage {
display: inline;
- background-color: none;
- background-image: none;
+ background-color: transparent;
margin-bottom: -3px;
padding-top: 1px;
}
ul#tabsHeader #addpage a, #addpage a:hover {
- font: 11px / normal Verdana, Arial, Helvetica, Sans-Serif, sans-serif;
+ font-size: 11px;
+ font-family: Verdana, Arial, Helvetica, Sans-Serif, sans-serif;
+ font-variant: normal;
font-weight: bold;
color: white;
line-height: 22px;
Modified: branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB-INF/jsp/header/header.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB-INF/jsp/header/header.jsp 2008-04-02 10:23:40 UTC (rev 10477)
+++ branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB-INF/jsp/header/header.jsp 2008-04-02 11:41:30 UTC (rev 10478)
@@ -19,6 +19,7 @@
<%if(request.getAttribute("ssoEnabled") == null){%>
<script type="text/javascript">
+ /* <![CDATA[ */
if (typeof isModalLoaded != 'undefined'){
document.write('<a href=\"#\" onclick=\"alertModal(\'login-modal\',\'login-modal-msg\');return false;\">Login</a>');
}else{
@@ -27,6 +28,7 @@
//set the iframe src for login modal to requested URL
var iframeSrc = '<%= loginURL %>' + '?loginheight=0';
document.getElementById('loginIframe').src = iframeSrc;
+ /* ]]> */
</script>
<noscript>
@@ -43,8 +45,10 @@
{
%>
<script type="text/javascript">
+ /* <![CDATA[ */
//we don't need the iframe/modal if logged in
document.getElementById('loginIframe').src = '';
+ /* ]]> */
</script>
Logged in as: <%= user.getUserName() %><br/><br/>
Modified: branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-server-war/login.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-server-war/login.jsp 2008-04-02 10:23:40 UTC (rev 10477)
+++ branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-server-war/login.jsp 2008-04-02 11:41:30 UTC (rev 10478)
@@ -20,22 +20,25 @@
~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--%>
+<%@ page pageEncoding="utf-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
+ <title>Login</title>
<style type="text/css">
+ /* <![CDATA[ */
body {
margin: 0;
padding: 0;
border: 0;
padding-top: <%=(request.getParameter("loginheight") != null ? request.getParameter("loginheight") : "300px")%>;
}
-
+ /* ]]> */
</style>
<link rel="stylesheet" href="/portal-core/css/login.css" type="text/css" />
</head>
-<body OnLoad="document.loginform.j_username.focus();">
+<body onload="document.loginform.j_username.focus();">
<div class="login-container">
@@ -44,19 +47,20 @@
</div>
<div class="login-content">
<div class="error-message"
- style="display:<%=(request.getAttribute("org.jboss.portal.loginError") != null ? "" : "none")%>;"><%=request.getAttribute("org.jboss.portal.loginError") %>
+ style="<%=(request.getAttribute("org.jboss.portal.loginError") != null ? "" : "display:none")%>;"><%=
+ (request.getAttribute("org.jboss.portal.loginError") == null ? "" : request.getAttribute("org.jboss.portal.loginError"))%>
</div>
- <form method="POST" action="<%= response.encodeURL("j_security_check") %>" name="loginform" id="loginForm"
+ <form method="post" action="<%= response.encodeURL("j_security_check") %>" name="loginform" id="loginForm"
target="_parent">
- <label for="j_username">
- <div class="form-field">Username:
- <input type="text" name="j_username" id="j_username" value=""/></div>
- </label>
- <label for="j_password">
- <div class="form-field bottom-field">Password:
- <input type="password" name="j_password" id="j_password" value=""/></div>
- </label>
- <input style="display:<%=(request.getParameter("loginheight") != null ? "" : "none")%>;" type="button" name="cancel" value="Cancel" class="cancel-button" onclick="window.parent.hideContentModal('login-modal');"/>
+ <div class="form-field">
+ <label for="j_username">Username:</label>
+ <input type="text" name="j_username" id="j_username" value=""/>
+ </div>
+ <div class="form-field bottom-field">
+ <label for="j_password">Password:</label>
+ <input type="password" name="j_password" id="j_password" value=""/>
+ </div>
+ <input style="<%=(request.getParameter("loginheight") != null ? "" : "display:none")%>;" type="button" name="cancel" value="Cancel" class="cancel-button" onclick="window.parent.hideContentModal('login-modal');"/>
<input style="<%=(request.getParameter("loginheight") != null ? "" : "right:10px")%>;" type="submit" name="login" value="Login" class="login-button"/>
</form>
Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/bin/portal-cms-war/images/cms/admin/tiny_mce/themes/default/editor_ui.css
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-cms/src/bin/portal-cms-war/images/cms/admin/tiny_mce/themes/default/editor_ui.css 2008-04-02 10:23:40 UTC (rev 10477)
+++ branches/JBoss_Portal_Branch_2_6/core-cms/src/bin/portal-cms-war/images/cms/admin/tiny_mce/themes/default/editor_ui.css 2008-04-02 11:41:30 UTC (rev 10478)
@@ -9,7 +9,7 @@
border-bottom: 1px solid;
border-right: 1px solid;
border-color: #F0F0EE;
- cursor: hand
+ cursor: pointer;
}
.mceButtonOver {
@@ -17,7 +17,7 @@
border-left: 1px solid buttonhighlight;
border-bottom: 1px solid buttonshadow;
border-right: 1px solid buttonshadow;
- cursor: hand
+ cursor: pointer;
}
.mceButtonDown {
@@ -25,7 +25,7 @@
border-right: 1px solid buttonhighlight;
border-top: 1px solid buttonshadow;
border-left: 1px solid buttonshadow;
- cursor: hand
+ cursor: pointer;
}
.mceButtonSelected {
@@ -34,17 +34,17 @@
border-top: 1px solid;
border-left: 1px solid;
border-color: #C0C0BB;
- cursor: hand
+ cursor: pointer;
}
.mceButtonDisabled {
- filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30);
border-top: 1px solid;
border-left: 1px solid;
border-bottom: 1px solid;
border-right: 1px solid;
border-color: #F0F0EE;
- cursor: text
+ cursor: text;
+ filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30);
}
.mceSeparator {
@@ -69,14 +69,14 @@
}
.mceSelectList {
- font-family: "MS Sans Serif";
+ font-family: "MS Sans Serif",sans-serif;;
font-size: 7pt;
font-weight: normal;
margin-top: 2px;
}
.mceLabel, .mceLabelDisabled {
- font-family: "MS Sans Serif";
+ font-family: "MS Sans Serif",sans-serif;;
font-size: 9pt;
}
Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/bin/portal-cms-war/images/cms/admin/tiny_mce/themes/simple/editor_ui.css
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-cms/src/bin/portal-cms-war/images/cms/admin/tiny_mce/themes/simple/editor_ui.css 2008-04-02 10:23:40 UTC (rev 10477)
+++ branches/JBoss_Portal_Branch_2_6/core-cms/src/bin/portal-cms-war/images/cms/admin/tiny_mce/themes/simple/editor_ui.css 2008-04-02 11:41:30 UTC (rev 10478)
@@ -9,7 +9,7 @@
border-bottom: 1px solid;
border-right: 1px solid;
border-color: #F0F0EE;
- cursor: hand
+ cursor: pointer;
}
.mceButtonOver {
@@ -17,7 +17,7 @@
border-left: 1px solid buttonhighlight;
border-bottom: 1px solid buttonshadow;
border-right: 1px solid buttonshadow;
- cursor: hand
+ cursor: pointer;
}
.mceButtonDown {
@@ -25,7 +25,7 @@
border-right: 1px solid buttonhighlight;
border-top: 1px solid buttonshadow;
border-left: 1px solid buttonshadow;
- cursor: hand
+ cursor: pointer;
}
.mceButtonSelected {
@@ -34,17 +34,17 @@
border-top: 1px solid;
border-left: 1px solid;
border-color: #C0C0BB;
- cursor: hand
+ cursor: pointer;
}
.mceButtonDisabled {
- filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30);
border-top: 1px solid;
border-left: 1px solid;
border-bottom: 1px solid;
border-right: 1px solid;
border-color: #F0F0EE;
- cursor: text
+ cursor: text;
+ filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30);
}
.mceSeparator {
@@ -69,14 +69,14 @@
}
.mceSelectList {
- font-family: "MS Sans Serif";
+ font-family: "MS Sans Serif",sans-serif;
font-size: 7pt;
font-weight: normal;
margin-top: 2px;
}
.mceLabel, .mceLabelDisabled {
- font-family: "MS Sans Serif";
+ font-family: "MS Sans Serif",sans-serif;
font-size: 9pt;
}
@@ -95,7 +95,7 @@
}
.mceEditorArea {
- font-family: "MS Sans Serif";
+ font-family: "MS Sans Serif",sans-serif;
background: #FFFFFF;
}
Modified: branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-jsp-samples-war/WEB-INF/jsp/jsp/view.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-jsp-samples-war/WEB-INF/jsp/jsp/view.jsp 2008-04-02 10:23:40 UTC (rev 10477)
+++ branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-jsp-samples-war/WEB-INF/jsp/jsp/view.jsp 2008-04-02 11:41:30 UTC (rev 10478)
@@ -31,13 +31,13 @@
<tr>
<td align="center"><a href="http://portal.demo.jboss.com" target="_blank"><img
src="<%= renderRequest.getContextPath() %>/images/dodemo.gif" border="0"
- alt="Try the latest release of JBoss Portal, live and online."></a>
+ alt="Try the latest release of JBoss Portal, live and online." /></a>
<a href="http://labs.jboss.com/portal/jbossportal/download/index.html" target="_blank"><img
src="<%= renderRequest.getContextPath() %>/images/getcode.gif" border="0"
- alt="Download JBoss Portal and have it up and running in minutes."></a>
+ alt="Download JBoss Portal and have it up and running in minutes." /></a>
<a href="http://www.portletswap.com" target="_blank"><img
src="<%= renderRequest.getContextPath() %>/images/accessorize.gif" border="0"
- alt="Download portlets and layouts for your new JBoss Portal installation."></a></td>
+ alt="Download portlets and layouts for your new JBoss Portal installation." /></a></td>
</tr>
<tr>
<td></td>
Modified: branches/JBoss_Portal_Branch_2_6/jems/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_6/jems/.classpath 2008-04-02 10:23:40 UTC (rev 10477)
+++ branches/JBoss_Portal_Branch_2_6/jems/.classpath 2008-04-02 11:41:30 UTC (rev 10478)
@@ -23,7 +23,6 @@
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-jmx.jar" sourcepath="/JBoss_AS_4.0.5/jmx/src/main"/>
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-system.jar"/>
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jmx-invoker-adaptor-client.jar"/>
- <classpathentry kind="lib" path="/thirdparty/apache-xerces/lib/xml-apis.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/common/lib/portal-common-lib.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: branches/JBoss_Portal_Branch_2_6/registration/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_6/registration/.classpath 2008-04-02 10:23:40 UTC (rev 10477)
+++ branches/JBoss_Portal_Branch_2_6/registration/.classpath 2008-04-02 11:41:30 UTC (rev 10478)
@@ -8,7 +8,6 @@
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-system.jar"/>
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-jmx.jar"/>
<classpathentry kind="lib" path="/thirdparty/junit/lib/junit.jar"/>
- <classpathentry kind="lib" path="/thirdparty/apache-xerces/lib/xml-apis.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/common/lib/portal-common-lib.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: branches/JBoss_Portal_Branch_2_6/theme/src/main/org/jboss/portal/theme/impl/render/div/DivDecorationRenderer.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/theme/src/main/org/jboss/portal/theme/impl/render/div/DivDecorationRenderer.java 2008-04-02 10:23:40 UTC (rev 10477)
+++ branches/JBoss_Portal_Branch_2_6/theme/src/main/org/jboss/portal/theme/impl/render/div/DivDecorationRenderer.java 2008-04-02 11:41:30 UTC (rev 10478)
@@ -58,11 +58,6 @@
//
renderTitle(rendererContext, drc);
- //End the dyna-handle early so it doesn't encompass
- //the mode container -
- markup.print("</div>");
- markup.print("</div>");
-
markup.print("<div class=\"portlet-mode-container\">");
renderTriggerableActions(rendererContext, drc, ActionRendererContext.MODES_KEY);
renderTriggerableActions(rendererContext, drc, ActionRendererContext.WINDOWSTATES_KEY);
16 years, 2 months