JBoss Portal SVN: r10638 - modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/identity/src/main/org/jboss/portal/identity/ldap.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2008-04-18 04:59:41 -0400 (Fri, 18 Apr 2008)
New Revision: 10638
Modified:
modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPExtRoleModuleImpl.java
modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPExtUserModuleImpl.java
modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPRoleModuleImpl.java
modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserModuleImpl.java
Log:
make sure to close all used NamingEnumeration objects
Modified: modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPExtRoleModuleImpl.java
===================================================================
--- modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPExtRoleModuleImpl.java 2008-04-18 07:43:16 UTC (rev 10637)
+++ modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPExtRoleModuleImpl.java 2008-04-18 08:59:41 UTC (rev 10638)
@@ -28,6 +28,7 @@
import org.jboss.portal.identity.Role;
import javax.naming.NamingException;
+import javax.naming.NamingEnumeration;
import javax.naming.directory.DirContext;
import javax.naming.directory.SearchControls;
import javax.naming.directory.SearchResult;
@@ -210,7 +211,8 @@
{
LdapContext ldapContext = getConnectionContext().createInitialContext();
-
+ NamingEnumeration results = null;
+
try
{
SearchControls controls = new SearchControls();
@@ -236,7 +238,7 @@
if (roleCtxs.size() == 1)
{
- Enumeration results = null;
+
if (filterArgs == null)
{
results = ldapContext.search(getRoleCtxDN(), filter, controls);
@@ -256,7 +258,7 @@
for (Iterator iterator = roleCtxs.iterator(); iterator.hasNext();)
{
String roleCtx = (String)iterator.next();
- Enumeration results = null;
+
if (filterArgs == null)
{
results = ldapContext.search(roleCtx, filter, controls);
@@ -266,6 +268,7 @@
results = ldapContext.search(roleCtx, filter, filterArgs, controls);
}
merged.addAll(Tools.toList(results));
+ results.close();
}
return merged;
@@ -273,6 +276,10 @@
}
finally
{
+ if (results != null)
+ {
+ results.close();
+ }
ldapContext.close();
}
}
Modified: modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPExtUserModuleImpl.java
===================================================================
--- modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPExtUserModuleImpl.java 2008-04-18 07:43:16 UTC (rev 10637)
+++ modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPExtUserModuleImpl.java 2008-04-18 08:59:41 UTC (rev 10638)
@@ -30,6 +30,7 @@
import javax.naming.Context;
import javax.naming.NamingException;
+import javax.naming.NamingEnumeration;
import javax.naming.directory.SearchControls;
import javax.naming.directory.SearchResult;
import javax.naming.ldap.LdapContext;
@@ -155,8 +156,6 @@
filter = "*" + filter + "*";
}
- Enumeration results = null;
-
String ldap_filter = getUserSearchFilter();
//* chars are escaped in filterArgs so we must replace it manually
@@ -237,6 +236,7 @@
{
LdapContext ldapContext = getConnectionContext().createInitialContext();
+ NamingEnumeration results = null;
try
{
@@ -260,7 +260,6 @@
if (userCtxs.size() == 1)
{
- Enumeration results = null;
if (filterArgs == null)
{
results = ldapContext.search(getUserSearchCtxDN(), filter, controls);
@@ -280,7 +279,6 @@
for (Iterator iterator = userCtxs.iterator(); iterator.hasNext();)
{
String userCtx = (String)iterator.next();
- Enumeration results = null;
if (filterArgs == null)
{
results = ldapContext.search(userCtx, filter, controls);
@@ -290,6 +288,7 @@
results = ldapContext.search(userCtx, filter, filterArgs, controls);
}
merged.addAll(Tools.toList(results));
+ results.close();
}
return merged;
@@ -297,6 +296,10 @@
}
finally
{
+ if (results != null)
+ {
+ results.close();
+ }
ldapContext.close();
}
}
Modified: modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPRoleModuleImpl.java
===================================================================
--- modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPRoleModuleImpl.java 2008-04-18 07:43:16 UTC (rev 10637)
+++ modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPRoleModuleImpl.java 2008-04-18 08:59:41 UTC (rev 10638)
@@ -328,7 +328,7 @@
{
LdapContext ldapContext = getConnectionContext().createInitialContext();
-
+ NamingEnumeration results = null;
try
{
SearchControls controls = new SearchControls();
@@ -339,7 +339,7 @@
filter = filter.replaceAll("\\\\", "\\\\\\\\");
log.debug("Search filter: " + filter);
- Enumeration results = null;
+
if (filterArgs == null)
{
results = ldapContext.search(getContainerDN(), filter, controls);
@@ -352,6 +352,10 @@
}
finally
{
+ if (results != null)
+ {
+ results.close();
+ }
ldapContext.close();
}
}
Modified: modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserModuleImpl.java
===================================================================
--- modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserModuleImpl.java 2008-04-18 07:43:16 UTC (rev 10637)
+++ modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserModuleImpl.java 2008-04-18 08:59:41 UTC (rev 10638)
@@ -30,6 +30,7 @@
import javax.naming.NamingException;
import javax.naming.Context;
+import javax.naming.NamingEnumeration;
import javax.naming.directory.Attribute;
import javax.naming.directory.Attributes;
import javax.naming.directory.BasicAttribute;
@@ -394,10 +395,10 @@
log.debug("Search filter: " + filter);
LdapContext ldapContext = getConnectionContext().createInitialContext();
-
+ NamingEnumeration results = null;
try
{
- Enumeration results = null;
+
if (filterArgs == null)
{
results = ldapContext.search(getContainerDN(), filter, controls);
@@ -411,7 +412,15 @@
}
finally
{
- ldapContext.close();
+ if (results != null)
+ {
+ results.close();
+ }
+ if (ldapContext != null)
+ {
+ ldapContext.close();
+ }
+
}
}
18 years
JBoss Portal SVN: r10637 - in modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/identity/src/main/org/jboss/portal/identity: db and 3 other directories.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2008-04-18 03:43:16 -0400 (Fri, 18 Apr 2008)
New Revision: 10637
Added:
modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/identity/src/main/org/jboss/portal/identity/event/UserProfileChangedEvent.java
Modified:
modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/identity/src/main/org/jboss/portal/identity/DelegatingUserProfileModuleImpl.java
modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/identity/src/main/org/jboss/portal/identity/db/HibernateUserProfileModuleImpl.java
modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserProfileModuleImpl.java
modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/identity/src/main/org/jboss/portal/identity/service/UserProfileModuleService.java
Log:
Add identity event for user profile change
Modified: modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/identity/src/main/org/jboss/portal/identity/DelegatingUserProfileModuleImpl.java
===================================================================
--- modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/identity/src/main/org/jboss/portal/identity/DelegatingUserProfileModuleImpl.java 2008-04-18 07:32:54 UTC (rev 10636)
+++ modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/identity/src/main/org/jboss/portal/identity/DelegatingUserProfileModuleImpl.java 2008-04-18 07:43:16 UTC (rev 10637)
@@ -134,6 +134,7 @@
log.debug("Delegating to DB module");
getDBModule().setProperty(user, name, propertyValue);
+ fireUserProfileChangedEvent(user.getId(), user.getUserName(), name);
return;
}
throw new IdentityException("Cannot process property - incorrect profile or module configuration");
Modified: modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/identity/src/main/org/jboss/portal/identity/db/HibernateUserProfileModuleImpl.java
===================================================================
--- modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/identity/src/main/org/jboss/portal/identity/db/HibernateUserProfileModuleImpl.java 2008-04-18 07:32:54 UTC (rev 10636)
+++ modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/identity/src/main/org/jboss/portal/identity/db/HibernateUserProfileModuleImpl.java 2008-04-18 07:43:16 UTC (rev 10637)
@@ -162,6 +162,7 @@
{
dbUser.getProfileMap().remove(propertyName);
}
+ fireUserProfileChangedEvent(user.getId(), user.getUserName(), propertyName);
}
public Map getProperties(User user) throws IdentityException
Copied: modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/identity/src/main/org/jboss/portal/identity/event/UserProfileChangedEvent.java (from rev 10605, modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/identity/src/main/org/jboss/portal/identity/event/UserCreatedEvent.java)
===================================================================
--- modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/identity/src/main/org/jboss/portal/identity/event/UserProfileChangedEvent.java (rev 0)
+++ modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/identity/src/main/org/jboss/portal/identity/event/UserProfileChangedEvent.java 2008-04-18 07:43:16 UTC (rev 10637)
@@ -0,0 +1,79 @@
+/******************************************************************************
+ * 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.identity.event;
+
+/**
+ * @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot com">Boleslaw Dawidowicz</a>
+ * @version $Revision: 1.1 $
+ */
+public class UserProfileChangedEvent extends IdentityEvent
+{
+
+ /** . */
+ private final Object userId;
+
+ /** . */
+ private final String userName;
+
+ /** . */
+ private final String propertyName;
+
+ public UserProfileChangedEvent(Object userId, String userName, String propertyName)
+ {
+ if (userId == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ if (userName == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ if (propertyName == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ this.userId = userId;
+ this.userName = userName;
+ this.propertyName = propertyName;
+ }
+
+ public Object getUserId()
+ {
+ return userId;
+ }
+
+ public String getUserName()
+ {
+ return userName;
+ }
+
+ public String getPropertyName()
+ {
+ return propertyName;
+ }
+
+ public String toString()
+ {
+ return "UserProfileChangedEvent[userId=" + userId + ",userName=" + userName + ",propertyName=" + propertyName + "]";
+ }
+}
\ No newline at end of file
Modified: modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserProfileModuleImpl.java
===================================================================
--- modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserProfileModuleImpl.java 2008-04-18 07:32:54 UTC (rev 10636)
+++ modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserProfileModuleImpl.java 2008-04-18 07:43:16 UTC (rev 10637)
@@ -214,6 +214,7 @@
attrs.put(attr);
ldapContext.modifyAttributes(ldapUser.getDn(), DirContext.REPLACE_ATTRIBUTE,attrs);
+ fireUserProfileChangedEvent(user.getId(), user.getUserName(), propertyName);
}
catch (NamingException e)
{
Modified: modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/identity/src/main/org/jboss/portal/identity/service/UserProfileModuleService.java
===================================================================
--- modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/identity/src/main/org/jboss/portal/identity/service/UserProfileModuleService.java 2008-04-18 07:32:54 UTC (rev 10636)
+++ modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/identity/src/main/org/jboss/portal/identity/service/UserProfileModuleService.java 2008-04-18 07:43:16 UTC (rev 10637)
@@ -23,6 +23,9 @@
import org.jboss.portal.identity.IdentityContext;
import org.jboss.portal.identity.UserProfileModule;
+import org.jboss.portal.identity.IdentityException;
+import org.jboss.portal.identity.event.IdentityEvent;
+import org.jboss.portal.identity.event.UserProfileChangedEvent;
import org.jboss.portal.identity.metadata.profile.info.ProfileInfoSupport;
import org.jboss.portal.identity.metadata.config.ConfigurationParser;
import org.jboss.portal.identity.info.ProfileInfo;
@@ -79,5 +82,12 @@
{
this.profileConfigFile = profileConfigFile;
}
+
+ protected void fireUserProfileChangedEvent(Object userId, String userName, String propertyName) throws IdentityException
+ {
+ IdentityEvent event = new UserProfileChangedEvent(userId, userName, propertyName);
+ getIdentityEventBroadcaster().fireEvent(event);
+ }
+
}
18 years
JBoss Portal SVN: r10636 - branches/JBoss_Portal_Branch_2_6/core-identity/src/resources/portal-identity-war/WEB-INF.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2008-04-18 03:32:54 -0400 (Fri, 18 Apr 2008)
New Revision: 10636
Modified:
branches/JBoss_Portal_Branch_2_6/core-identity/src/resources/portal-identity-war/WEB-INF/portlet.xml
Log:
Cache IdentityUserPortlet for 10 minutes
Modified: branches/JBoss_Portal_Branch_2_6/core-identity/src/resources/portal-identity-war/WEB-INF/portlet.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-identity/src/resources/portal-identity-war/WEB-INF/portlet.xml 2008-04-18 07:24:55 UTC (rev 10635)
+++ branches/JBoss_Portal_Branch_2_6/core-identity/src/resources/portal-identity-war/WEB-INF/portlet.xml 2008-04-18 07:32:54 UTC (rev 10636)
@@ -37,7 +37,7 @@
<name>default-view</name>
<value>/WEB-INF/jsf/index.xhtml</value>
</init-param>
- <expiration-cache>0</expiration-cache>
+ <expiration-cache>600</expiration-cache>
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>VIEW</portlet-mode>
18 years
JBoss Portal SVN: r10635 - in modules/presentation/trunk: ajax/src/main/java/org/jboss/portal/presentation/ajax/client and 32 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-04-18 03:24:55 -0400 (Fri, 18 Apr 2008)
New Revision: 10635
Modified:
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/AjaxPresentationClient.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/AsyncPages.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/MyGWTPrototype.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/PartialRefresh.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/Portal.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/PortalLayout.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/PortletService.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/PortletWindowPanel.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/Session.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/Util.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/layout/LayoutManager.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/listener/AnchorListener.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/listener/SubmitListener.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/model/AjaxUIContext.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/model/AjaxUIObject.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/model/AjaxUIPage.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/model/AjaxUIWindow.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/protocol/AjaxUpdateWindowStateAction.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/protocol/AjaxViewUIObjectAction.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/protocol/AsyncGetAction.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/protocol/AsyncPostAction.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/service/PortalRPC.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/service/PortalRPCAsync.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/widget/PortletWindow.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/impl/ajax/entry/GWTClientFilter.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/impl/ajax/entry/PortalEntryPoint.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/AjaxRequest.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/AjaxResponse.java
modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/ajax/HostedModeProxy.java
modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/ajax/PortletServiceImpl.java
modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/MockPortalEntryPoint.java
modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/MockPortalServer.java
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/PresentationServerImpl.java
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationClient.java
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationServlet.java
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/model/ClassicUINode.java
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/model/ClassicViewPortContext.java
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionDecoder.java
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionEncoder.java
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/portlet/StructuralPortletControllerContext.java
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/portlet/spi/PresentationClientContext.java
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/portlet/spi/PresentationInstanceContext.java
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/portlet/spi/PresentationPortalContext.java
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/portlet/spi/PresentationServerContext.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client/PresentationClient.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/classic/layout/FlexibleGridLayoutManager.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/classic/layout/RegionLayoutManager.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ChildrenVisit.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/CreateDiffPhase.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/CreateUpdatePhase.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ObjectUpdate.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIModelImpl.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIObjectImpl.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ui/UIContextImpl.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ui/UIPageImpl.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ui/UIWindowImpl.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/navigational/NavigationalStateContextImpl.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/NodeImporter.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/StructuralNode.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/StructuralStateContextImpl.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/StructuralStateImpl.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIObject.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ViewPortContext.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ViewPortScope.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ui/UIWindow.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/GetActivation.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/PostActivation.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/PresentationServer.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/state/structural/StructuralObject.java
modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/layout/TestFlexibleGrid.java
modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/layout/TestRegionLayoutManager.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/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/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/ModelTestCase.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
modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/UIObjectNode.java
modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/UIObjectTree.java
modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/state/structural/StructuralStateContextTestCase.java
Log:
dilonization
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/AjaxPresentationClient.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/AjaxPresentationClient.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/AjaxPresentationClient.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,9 +22,13 @@
******************************************************************************/
package org.jboss.portal.presentation.ajax;
-import java.io.IOException;
-import java.util.Collection;
-
+import org.jboss.portal.presentation.ajax.client.model.AjaxUIPage;
+import org.jboss.portal.presentation.ajax.client.model.AjaxUIWindow;
+import org.jboss.portal.presentation.classic.ClassicPresentationClient;
+import org.jboss.portal.presentation.classic.model.ClassicUINode;
+import org.jboss.portal.presentation.classic.model.ClassicViewPortContext;
+import org.jboss.portal.presentation.classic.model.DefaultPageViewPortScope;
+import org.jboss.portal.presentation.classic.model.PageViewPortScope;
import org.jboss.portal.presentation.impl.model.UIModelImpl;
import org.jboss.portal.presentation.model.UIModel;
import org.jboss.portal.presentation.model.UIObject;
@@ -42,16 +46,12 @@
import org.jboss.portal.presentation.server.PresentationServer;
import org.jboss.portal.presentation.server.PresentationServerException;
import org.jboss.portal.presentation.state.structural.StructuralStateContext;
-import org.jboss.portal.presentation.classic.ClassicPresentationClient;
-import org.jboss.portal.presentation.classic.model.ClassicUINode;
-import org.jboss.portal.presentation.classic.model.ClassicViewPortContext;
-import org.jboss.portal.presentation.classic.model.DefaultPageViewPortScope;
-import org.jboss.portal.presentation.classic.model.PageViewPortScope;
-import org.jboss.portal.presentation.ajax.client.model.*;
-
import org.jboss.portal.web.WebRequest;
import org.jboss.portal.web.WebResponse;
+import java.io.IOException;
+import java.util.Collection;
+
/**
* @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
*
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/AsyncPages.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/AsyncPages.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/AsyncPages.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -23,33 +23,31 @@
package org.jboss.portal.presentation.ajax.client;
-import com.google.gwt.core.client.GWT;
import com.google.gwt.core.client.EntryPoint;
-
+import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.Element;
import com.google.gwt.user.client.Event;
import com.google.gwt.user.client.HTTPRequest;
import com.google.gwt.user.client.ResponseTextHandler;
-import com.google.gwt.user.client.ui.HTML;
-import com.google.gwt.user.client.ui.Widget;
+import com.google.gwt.user.client.rpc.AsyncCallback;
+import com.google.gwt.user.client.rpc.ServiceDefTarget;
import com.google.gwt.user.client.ui.ClickListener;
+import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.SourcesTabEvents;
import com.google.gwt.user.client.ui.TabBar;
import com.google.gwt.user.client.ui.TabListener;
-import com.google.gwt.user.client.ui.SourcesTabEvents;
-
-import com.google.gwt.user.client.rpc.ServiceDefTarget;
-import com.google.gwt.user.client.rpc.AsyncCallback;
-
+import com.google.gwt.user.client.ui.Widget;
+import net.mygwt.ui.client.Style;
+import net.mygwt.ui.client.event.BaseEvent;
+import net.mygwt.ui.client.event.Listener;
import net.mygwt.ui.client.widget.ContentPanel;
import net.mygwt.ui.client.widget.IconButton;
-import net.mygwt.ui.client.widget.WidgetContainer;
import net.mygwt.ui.client.widget.Viewport;
-import net.mygwt.ui.client.widget.layout.*;
-import net.mygwt.ui.client.Style;
-import net.mygwt.ui.client.event.Listener;
-import net.mygwt.ui.client.event.BaseEvent;
-
+import net.mygwt.ui.client.widget.WidgetContainer;
+import net.mygwt.ui.client.widget.layout.BorderLayout;
+import net.mygwt.ui.client.widget.layout.BorderLayoutData;
+import net.mygwt.ui.client.widget.layout.FlowLayout;
import org.jboss.portal.presentation.ajax.client.model.Page;
import org.jboss.portal.presentation.ajax.client.model.Window;
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/MyGWTPrototype.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/MyGWTPrototype.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/MyGWTPrototype.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -23,24 +23,21 @@
package org.jboss.portal.presentation.ajax.client;
import com.google.gwt.core.client.EntryPoint;
+import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.Element;
import com.google.gwt.user.client.Event;
-import com.google.gwt.user.client.ui.ClickListener;
-import com.google.gwt.user.client.ui.VerticalPanel;
-import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.HTML;
-import com.google.gwt.user.client.ui.Widget;
-import com.google.gwt.core.client.JavaScriptObject;
-
+import com.google.gwt.user.client.ui.RootPanel;
+import com.google.gwt.user.client.ui.VerticalPanel;
import net.mygwt.ui.client.Style;
-import net.mygwt.ui.client.event.BaseEvent;
-import net.mygwt.ui.client.event.SelectionListener;
+import net.mygwt.ui.client.event.BaseEvent;
+import net.mygwt.ui.client.event.SelectionListener;
import net.mygwt.ui.client.widget.Button;
+import net.mygwt.ui.client.widget.ButtonBar;
+import net.mygwt.ui.client.widget.ContentPanel;
import net.mygwt.ui.client.widget.IconButton;
-import net.mygwt.ui.client.widget.ButtonBar;
import net.mygwt.ui.client.widget.Info;
-import net.mygwt.ui.client.widget.ContentPanel;
/**
* @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/PartialRefresh.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/PartialRefresh.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/PartialRefresh.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,26 +22,23 @@
******************************************************************************/
package org.jboss.portal.presentation.ajax.client;
-import com.google.gwt.core.client.GWT;
import com.google.gwt.core.client.EntryPoint;
-
+import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.Element;
import com.google.gwt.user.client.Event;
import com.google.gwt.user.client.HTTPRequest;
import com.google.gwt.user.client.ResponseTextHandler;
-import com.google.gwt.user.client.ui.RootPanel;
-import com.google.gwt.user.client.ui.VerticalPanel;
-import com.google.gwt.user.client.ui.HorizontalPanel;
+import com.google.gwt.user.client.rpc.AsyncCallback;
+import com.google.gwt.user.client.rpc.ServiceDefTarget;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.ClickListener;
-import com.google.gwt.user.client.ui.Widget;
import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Panel;
-
-import com.google.gwt.user.client.rpc.ServiceDefTarget;
-import com.google.gwt.user.client.rpc.AsyncCallback;
-
+import com.google.gwt.user.client.ui.RootPanel;
+import com.google.gwt.user.client.ui.VerticalPanel;
+import com.google.gwt.user.client.ui.Widget;
import org.jboss.portal.presentation.ajax.client.model.Page;
import org.jboss.portal.presentation.ajax.client.model.Window;
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/Portal.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/Portal.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/Portal.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -23,11 +23,10 @@
package org.jboss.portal.presentation.ajax.client;
import com.google.gwt.core.client.EntryPoint;
-
-import org.jboss.portal.presentation.ajax.client.protocol.Caller;
-import org.jboss.portal.presentation.ajax.client.protocol.AjaxViewUIObjectAction;
-import org.jboss.portal.presentation.ajax.client.listener.SubmitListener;
import org.jboss.portal.presentation.ajax.client.listener.AnchorListener;
+import org.jboss.portal.presentation.ajax.client.listener.SubmitListener;
+import org.jboss.portal.presentation.ajax.client.protocol.AjaxViewUIObjectAction;
+import org.jboss.portal.presentation.ajax.client.protocol.Caller;
/**
* This is the Entry Point of the client-side Ajax agent of the Presentation Framework
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/PortalLayout.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/PortalLayout.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/PortalLayout.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,20 +22,18 @@
******************************************************************************/
package org.jboss.portal.presentation.ajax.client;
-import com.google.gwt.core.client.GWT;
import com.google.gwt.core.client.EntryPoint;
-
-import com.google.gwt.user.client.ui.RootPanel;
-import com.google.gwt.user.client.ui.VerticalPanel;
-import com.google.gwt.user.client.ui.HTMLPanel;
-import com.google.gwt.user.client.ui.FlexTable;
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.user.client.rpc.AsyncCallback;
+import com.google.gwt.user.client.rpc.ServiceDefTarget;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.ClickListener;
+import com.google.gwt.user.client.ui.FlexTable;
+import com.google.gwt.user.client.ui.HTMLPanel;
+import com.google.gwt.user.client.ui.RootPanel;
+import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Widget;
-import com.google.gwt.user.client.rpc.ServiceDefTarget;
-import com.google.gwt.user.client.rpc.AsyncCallback;
-
/**
* Prototyping some client side layout concepts
*
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/PortletService.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/PortletService.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/PortletService.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -23,7 +23,6 @@
package org.jboss.portal.presentation.ajax.client;
import com.google.gwt.user.client.rpc.RemoteService;
-
import org.jboss.portal.presentation.ajax.client.model.Page;
/**
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/PortletWindowPanel.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/PortletWindowPanel.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/PortletWindowPanel.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,8 +22,8 @@
******************************************************************************/
package org.jboss.portal.presentation.ajax.client;
+import com.google.gwt.user.client.Event;
import com.google.gwt.user.client.ui.HTMLPanel;
-import com.google.gwt.user.client.Event;
public class PortletWindowPanel extends HTMLPanel
{
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/Session.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/Session.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/Session.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,13 +22,13 @@
******************************************************************************/
package org.jboss.portal.presentation.ajax.client;
+import org.jboss.portal.presentation.ajax.client.listener.AnchorListener;
+import org.jboss.portal.presentation.ajax.client.listener.SubmitListener;
+import org.jboss.portal.presentation.ajax.client.model.AjaxUIContext;
+
+import java.util.HashMap;
import java.util.Map;
-import java.util.HashMap;
-import org.jboss.portal.presentation.ajax.client.model.AjaxUIContext;
-import org.jboss.portal.presentation.ajax.client.listener.SubmitListener;
-import org.jboss.portal.presentation.ajax.client.listener.AnchorListener;
-
/**
* This is the client side Session. This is a singleton since there should only be one session for each client
*
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/Util.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/Util.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/Util.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,14 +22,14 @@
******************************************************************************/
package org.jboss.portal.presentation.ajax.client;
-import java.util.ArrayList;
-import java.util.List;
-
import org.jboss.portal.presentation.ajax.client.layout.LayoutManager;
import org.jboss.portal.presentation.ajax.client.model.AjaxUIPage;
import org.jboss.portal.presentation.ajax.client.model.AjaxUIWindow;
import org.jboss.portal.presentation.ajax.client.widget.PortletWindow;
+import java.util.ArrayList;
+import java.util.List;
+
/**
* @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
*
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/layout/LayoutManager.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/layout/LayoutManager.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/layout/LayoutManager.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,24 +22,22 @@
******************************************************************************/
package org.jboss.portal.presentation.ajax.client.layout;
-import java.util.List;
-import java.util.Map;
-import java.util.Iterator;
-import java.util.HashMap;
-import java.util.ArrayList;
-
import com.google.gwt.user.client.ui.Widget;
+import net.mygwt.ui.client.Style;
import net.mygwt.ui.client.widget.ContentPanel;
-
import net.mygwt.ui.client.widget.Viewport;
import net.mygwt.ui.client.widget.WidgetContainer;
import net.mygwt.ui.client.widget.layout.BorderLayout;
import net.mygwt.ui.client.widget.layout.BorderLayoutData;
import net.mygwt.ui.client.widget.layout.FlowLayout;
-import net.mygwt.ui.client.Style;
-
import org.jboss.portal.presentation.ajax.client.widget.PortletWindow;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
/**
* This layout manager provides a Flexible Grid for laying out the UI components (which would be Portlet Windows)
* inside a flexible coordinates based Grid
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/listener/AnchorListener.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/listener/AnchorListener.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/listener/AnchorListener.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -25,9 +25,8 @@
import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.Element;
import com.google.gwt.user.client.Event;
-import com.google.gwt.user.client.ui.Widget;
import com.google.gwt.user.client.ui.ClickListener;
-
+import com.google.gwt.user.client.ui.Widget;
import org.jboss.portal.presentation.ajax.client.Util;
import org.jboss.portal.presentation.ajax.client.protocol.AsyncGetAction;
import org.jboss.portal.presentation.ajax.client.protocol.Caller;
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/listener/SubmitListener.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/listener/SubmitListener.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/listener/SubmitListener.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -26,9 +26,8 @@
import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.Element;
import com.google.gwt.user.client.Event;
-
-import org.jboss.portal.presentation.ajax.client.Util;
import org.jboss.portal.presentation.ajax.client.Session;
+import org.jboss.portal.presentation.ajax.client.Util;
import org.jboss.portal.presentation.ajax.client.protocol.AsyncPostAction;
import org.jboss.portal.presentation.ajax.client.protocol.Caller;
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/model/AjaxUIContext.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/model/AjaxUIContext.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/model/AjaxUIContext.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,8 +22,8 @@
******************************************************************************/
package org.jboss.portal.presentation.ajax.client.model;
+import java.util.HashMap;
import java.util.Map;
-import java.util.HashMap;
/**
* @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/model/AjaxUIObject.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/model/AjaxUIObject.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/model/AjaxUIObject.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,11 +22,11 @@
******************************************************************************/
package org.jboss.portal.presentation.ajax.client.model;
+import com.google.gwt.user.client.rpc.IsSerializable;
+
+import java.util.ArrayList;
import java.util.List;
-import java.util.ArrayList;
-import com.google.gwt.user.client.rpc.IsSerializable;
-
/**
* @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
*
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/model/AjaxUIPage.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/model/AjaxUIPage.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/model/AjaxUIPage.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,8 +22,6 @@
******************************************************************************/
package org.jboss.portal.presentation.ajax.client.model;
-import java.util.List;
-
/**
* @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
*
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/model/AjaxUIWindow.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/model/AjaxUIWindow.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/model/AjaxUIWindow.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,8 +22,6 @@
******************************************************************************/
package org.jboss.portal.presentation.ajax.client.model;
-import java.util.List;
-
/**
* @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
*
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/protocol/AjaxUpdateWindowStateAction.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/protocol/AjaxUpdateWindowStateAction.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/protocol/AjaxUpdateWindowStateAction.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,19 +22,15 @@
******************************************************************************/
package org.jboss.portal.presentation.ajax.client.protocol;
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.user.client.rpc.AsyncCallback;
+import com.google.gwt.user.client.rpc.ServiceDefTarget;
import org.jboss.portal.presentation.ajax.client.Session;
import org.jboss.portal.presentation.ajax.client.model.AjaxUIObject;
import org.jboss.portal.presentation.ajax.client.model.AjaxUIPage;
import org.jboss.portal.presentation.ajax.client.service.PortalRPC;
import org.jboss.portal.presentation.ajax.client.service.PortalRPCAsync;
-import java.util.Map;
-import java.util.HashMap;
-
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.user.client.rpc.AsyncCallback;
-import com.google.gwt.user.client.rpc.ServiceDefTarget;
-
/**
* @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
*
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/protocol/AjaxViewUIObjectAction.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/protocol/AjaxViewUIObjectAction.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/protocol/AjaxViewUIObjectAction.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,15 +22,14 @@
******************************************************************************/
package org.jboss.portal.presentation.ajax.client.protocol;
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.user.client.rpc.AsyncCallback;
+import com.google.gwt.user.client.rpc.ServiceDefTarget;
import org.jboss.portal.presentation.ajax.client.Session;
import org.jboss.portal.presentation.ajax.client.model.AjaxUIObject;
import org.jboss.portal.presentation.ajax.client.service.PortalRPC;
import org.jboss.portal.presentation.ajax.client.service.PortalRPCAsync;
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.user.client.rpc.AsyncCallback;
-import com.google.gwt.user.client.rpc.ServiceDefTarget;
-
/**
* @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
*
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/protocol/AsyncGetAction.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/protocol/AsyncGetAction.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/protocol/AsyncGetAction.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,19 +22,15 @@
******************************************************************************/
package org.jboss.portal.presentation.ajax.client.protocol;
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.user.client.rpc.AsyncCallback;
+import com.google.gwt.user.client.rpc.ServiceDefTarget;
import org.jboss.portal.presentation.ajax.client.Session;
import org.jboss.portal.presentation.ajax.client.model.AjaxUIObject;
import org.jboss.portal.presentation.ajax.client.model.AjaxUIPage;
import org.jboss.portal.presentation.ajax.client.service.PortalRPC;
import org.jboss.portal.presentation.ajax.client.service.PortalRPCAsync;
-import java.util.Map;
-import java.util.HashMap;
-
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.user.client.rpc.AsyncCallback;
-import com.google.gwt.user.client.rpc.ServiceDefTarget;
-
/**
* @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
*
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/protocol/AsyncPostAction.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/protocol/AsyncPostAction.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/protocol/AsyncPostAction.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,19 +22,15 @@
******************************************************************************/
package org.jboss.portal.presentation.ajax.client.protocol;
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.user.client.rpc.AsyncCallback;
+import com.google.gwt.user.client.rpc.ServiceDefTarget;
import org.jboss.portal.presentation.ajax.client.Session;
import org.jboss.portal.presentation.ajax.client.model.AjaxUIObject;
import org.jboss.portal.presentation.ajax.client.model.AjaxUIPage;
import org.jboss.portal.presentation.ajax.client.service.PortalRPC;
import org.jboss.portal.presentation.ajax.client.service.PortalRPCAsync;
-import java.util.Map;
-import java.util.HashMap;
-
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.user.client.rpc.AsyncCallback;
-import com.google.gwt.user.client.rpc.ServiceDefTarget;
-
/**
* @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
*
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/service/PortalRPC.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/service/PortalRPC.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/service/PortalRPC.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,9 +22,7 @@
******************************************************************************/
package org.jboss.portal.presentation.ajax.client.service;
-import java.util.Map;
import com.google.gwt.user.client.rpc.RemoteService;
-
import org.jboss.portal.presentation.ajax.client.protocol.ClientResponse;
/**
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/service/PortalRPCAsync.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/service/PortalRPCAsync.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/service/PortalRPCAsync.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,8 +22,6 @@
******************************************************************************/
package org.jboss.portal.presentation.ajax.client.service;
-import java.util.Map;
-
import com.google.gwt.user.client.rpc.AsyncCallback;
/**
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/widget/PortletWindow.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/widget/PortletWindow.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/widget/PortletWindow.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -23,16 +23,14 @@
package org.jboss.portal.presentation.ajax.client.widget;
import com.google.gwt.user.client.ui.HTML;
-
-import net.mygwt.ui.client.widget.ContentPanel;
import net.mygwt.ui.client.Style;
+import net.mygwt.ui.client.event.BaseEvent;
+import net.mygwt.ui.client.event.Listener;
+import net.mygwt.ui.client.widget.ContentPanel;
import net.mygwt.ui.client.widget.IconButton;
import net.mygwt.ui.client.widget.Info;
-import net.mygwt.ui.client.event.Listener;
-import net.mygwt.ui.client.event.BaseEvent;
-
-import org.jboss.portal.presentation.ajax.client.Util;
import org.jboss.portal.presentation.ajax.client.Session;
+import org.jboss.portal.presentation.ajax.client.Util;
import org.jboss.portal.presentation.ajax.client.model.AjaxUIWindow;
import org.jboss.portal.presentation.ajax.client.protocol.AjaxUpdateWindowStateAction;
import org.jboss.portal.presentation.ajax.client.protocol.Caller;
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/impl/ajax/entry/GWTClientFilter.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/impl/ajax/entry/GWTClientFilter.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/impl/ajax/entry/GWTClientFilter.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,12 +22,8 @@
******************************************************************************/
package org.jboss.portal.presentation.impl.ajax.entry;
-import java.util.Map;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.ByteArrayOutputStream;
+import org.jboss.portal.presentation.protocol.GetActivation;
+import org.jboss.portal.presentation.protocol.PostActivation;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
@@ -37,10 +33,13 @@
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Map;
-import org.jboss.portal.presentation.protocol.GetActivation;
-import org.jboss.portal.presentation.protocol.PostActivation;
-
/**
* This filter is activated or deactivated depending on whether the Portal needs to runs in Ajax mode or Classic Html mode
*
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/impl/ajax/entry/PortalEntryPoint.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/impl/ajax/entry/PortalEntryPoint.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/impl/ajax/entry/PortalEntryPoint.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -1,39 +1,32 @@
package org.jboss.portal.presentation.impl.ajax.entry;
-import java.util.Map;
-import java.util.StringTokenizer;
-import java.util.HashMap;
-import java.io.InputStream;
-import java.net.URLDecoder;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
+import com.google.gwt.user.client.rpc.SerializationException;
+import com.google.gwt.user.server.rpc.RemoteServiceServlet;
import org.apache.log4j.Logger;
-
-import org.jboss.portal.web.WebRequest;
-import org.jboss.portal.web.WebResponse;
-
import org.jboss.portal.common.io.IOTools;
-import org.jboss.portal.presentation.PresentationServerImpl;
-import org.jboss.portal.presentation.invocation.AjaxRequest;
-import org.jboss.portal.presentation.invocation.AjaxResponse;
-import org.jboss.portal.presentation.ajax.client.service.PortalRPC;
+import org.jboss.portal.presentation.ajax.AjaxPresentationClient;
import org.jboss.portal.presentation.ajax.client.model.AjaxUIObject;
-import org.jboss.portal.presentation.ajax.client.protocol.ClientResponse;
import org.jboss.portal.presentation.ajax.client.protocol.AjaxShowUIObjectResponse;
-import org.jboss.portal.presentation.ajax.AjaxPresentationClient;
-import org.jboss.portal.presentation.protocol.GetActivation;
-import org.jboss.portal.presentation.protocol.PostActivation;
-import org.jboss.portal.presentation.server.PresentationServer;
+import org.jboss.portal.presentation.ajax.client.protocol.ClientResponse;
+import org.jboss.portal.presentation.ajax.client.service.PortalRPC;
import org.jboss.portal.presentation.impl.state.structural.ContextNode;
import org.jboss.portal.presentation.impl.state.structural.NodeImporter;
import org.jboss.portal.presentation.impl.state.structural.StructuralStateContextImpl;
+import org.jboss.portal.presentation.invocation.AjaxRequest;
+import org.jboss.portal.presentation.invocation.AjaxResponse;
+import org.jboss.portal.presentation.protocol.GetActivation;
+import org.jboss.portal.presentation.protocol.PostActivation;
+import org.jboss.portal.presentation.server.PresentationServer;
-import com.google.gwt.user.client.rpc.SerializationException;
-import com.google.gwt.user.server.rpc.RemoteServiceServlet;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.InputStream;
+import java.net.URLDecoder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.StringTokenizer;
/**
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/AjaxRequest.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/AjaxRequest.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/AjaxRequest.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,12 +22,12 @@
******************************************************************************/
package org.jboss.portal.presentation.invocation;
+import org.jboss.portal.common.net.media.MediaType;
+import org.jboss.portal.web.Body;
import org.jboss.portal.web.WebRequest;
-import org.jboss.portal.web.Body;
-import org.jboss.portal.common.net.media.MediaType;
+import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;
-import javax.servlet.http.HttpServletRequest;
import java.util.Map;
/**
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/AjaxResponse.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/AjaxResponse.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/invocation/AjaxResponse.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,14 +22,14 @@
******************************************************************************/
package org.jboss.portal.presentation.invocation;
+import org.jboss.portal.common.servlet.URLFormat;
import org.jboss.portal.web.WebResponse;
-import org.jboss.portal.common.servlet.URLFormat;
+import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponseWrapper;
-import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.Writer;
import java.util.Map;
-import java.io.Writer;
-import java.io.IOException;
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
Modified: modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/ajax/HostedModeProxy.java
===================================================================
--- modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/ajax/HostedModeProxy.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/ajax/HostedModeProxy.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,19 +22,17 @@
******************************************************************************/
package org.jboss.portal.presentation.test.ajax;
-import java.io.ByteArrayInputStream;
-
-import javax.servlet.http.HttpServletRequest;
-
import com.google.gwt.user.client.rpc.SerializationException;
import com.google.gwt.user.server.rpc.RemoteServiceServlet;
-
-import com.meterware.httpunit.WebConversation;
import com.meterware.httpunit.PostMethodWebRequest;
+import com.meterware.httpunit.WebConversation;
import com.meterware.httpunit.WebRequest;
import com.meterware.httpunit.WebResponse;
+import javax.servlet.http.HttpServletRequest;
+import java.io.ByteArrayInputStream;
+
/**
* This is a RPC Proxy Service that is used only during development. This lets the GWT client-side agent integrate with the Portal server while running in
* Hosted Mode. It is very efficient to debug/develop client side GWT code in Hosted Mode.
Modified: modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/ajax/PortletServiceImpl.java
===================================================================
--- modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/ajax/PortletServiceImpl.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/ajax/PortletServiceImpl.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -1,14 +1,12 @@
package org.jboss.portal.presentation.test.ajax;
-import java.io.InputStream;
-
-import javax.servlet.http.HttpServletRequest;
-
+import com.google.gwt.user.server.rpc.RemoteServiceServlet;
import org.jboss.portal.presentation.ajax.client.PortletService;
import org.jboss.portal.presentation.ajax.client.model.Page;
import org.jboss.portal.presentation.ajax.client.model.Window;
-import com.google.gwt.user.server.rpc.RemoteServiceServlet;
+import javax.servlet.http.HttpServletRequest;
+import java.io.InputStream;
/**
* This is just a STUB server side component to test the client side components
Modified: modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/MockPortalEntryPoint.java
===================================================================
--- modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/MockPortalEntryPoint.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/MockPortalEntryPoint.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -1,33 +1,26 @@
package org.jboss.portal.presentation.test.portal;
-import java.util.Map;
-import java.util.StringTokenizer;
-import java.util.HashMap;
-import java.net.URLDecoder;
-
-import javax.management.MBeanServer;
-
-import javax.servlet.ServletException;
-import javax.servlet.UnavailableException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
+import com.google.gwt.user.client.rpc.SerializationException;
+import com.google.gwt.user.server.rpc.RemoteServiceServlet;
import org.apache.log4j.Logger;
import org.jboss.mx.util.MBeanServerLocator;
-
-
-import org.jboss.portal.presentation.ajax.client.service.PortalRPC;
import org.jboss.portal.presentation.ajax.client.model.AjaxUIObject;
-import org.jboss.portal.presentation.ajax.client.protocol.ClientResponse;
import org.jboss.portal.presentation.ajax.client.protocol.AjaxShowUIObjectResponse;
+import org.jboss.portal.presentation.ajax.client.protocol.ClientResponse;
+import org.jboss.portal.presentation.ajax.client.service.PortalRPC;
import org.jboss.portal.presentation.protocol.GetActivation;
import org.jboss.portal.presentation.protocol.PostActivation;
-import org.jboss.portal.presentation.invocation.AjaxRequest;
-import org.jboss.portal.presentation.invocation.AjaxResponse;
-import com.google.gwt.user.client.rpc.SerializationException;
-import com.google.gwt.user.server.rpc.RemoteServiceServlet;
+import javax.management.MBeanServer;
+import javax.servlet.ServletException;
+import javax.servlet.UnavailableException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.net.URLDecoder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.StringTokenizer;
/**
* This serves as the Portal Entry Point for AJAX (Asynchronous) RPC calls being made by the
Modified: modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/MockPortalServer.java
===================================================================
--- modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/MockPortalServer.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/ajax/src/test/java/org/jboss/portal/presentation/test/portal/MockPortalServer.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,10 +22,10 @@
******************************************************************************/
package org.jboss.portal.presentation.test.portal;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
import java.util.Map;
-import java.util.List;
-import java.util.HashMap;
-import java.util.ArrayList;
/**
* @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
Modified: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/PresentationServerImpl.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/PresentationServerImpl.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/PresentationServerImpl.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,21 +22,21 @@
******************************************************************************/
package org.jboss.portal.presentation;
+import org.jboss.portal.presentation.client.PresentationClient;
+import org.jboss.portal.presentation.impl.state.structural.StructuralNode;
+import org.jboss.portal.presentation.impl.state.structural.StructuralStateContextImpl;
+import org.jboss.portal.presentation.impl.state.structural.WindowNode;
+import org.jboss.portal.presentation.model.content.WindowContent;
+import org.jboss.portal.presentation.protocol.ErrorResponse;
+import org.jboss.portal.presentation.protocol.ProtocolAction;
+import org.jboss.portal.presentation.protocol.ShowUIObjectResponse;
+import org.jboss.portal.presentation.protocol.UIObjectAction;
+import org.jboss.portal.presentation.protocol.ViewUIObjectAction;
import org.jboss.portal.presentation.server.PresentationRequest;
import org.jboss.portal.presentation.server.PresentationResponse;
import org.jboss.portal.presentation.server.PresentationServer;
import org.jboss.portal.presentation.server.PresentationServerException;
import org.jboss.portal.presentation.state.structural.StructuralStateContext;
-import org.jboss.portal.presentation.protocol.ProtocolAction;
-import org.jboss.portal.presentation.protocol.ViewUIObjectAction;
-import org.jboss.portal.presentation.protocol.UIObjectAction;
-import org.jboss.portal.presentation.protocol.ErrorResponse;
-import org.jboss.portal.presentation.protocol.ShowUIObjectResponse;
-import org.jboss.portal.presentation.model.content.WindowContent;
-import org.jboss.portal.presentation.client.PresentationClient;
-import org.jboss.portal.presentation.impl.state.structural.StructuralStateContextImpl;
-import org.jboss.portal.presentation.impl.state.structural.StructuralNode;
-import org.jboss.portal.presentation.impl.state.structural.WindowNode;
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
Modified: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationClient.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationClient.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationClient.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,19 +22,14 @@
******************************************************************************/
package org.jboss.portal.presentation.classic;
-import org.jboss.portal.presentation.client.PresentationClient;
-import org.jboss.portal.presentation.state.navigational.NavigationalStateContext;
-import org.jboss.portal.presentation.state.structural.StructuralStateContext;
+import org.jboss.portal.portlet.URLFormat;
+import org.jboss.portal.presentation.classic.model.ClassicUINode;
+import org.jboss.portal.presentation.classic.model.ClassicViewPortContext;
import org.jboss.portal.presentation.classic.model.DefaultPageViewPortScope;
-import org.jboss.portal.presentation.classic.model.ClassicViewPortContext;
-import org.jboss.portal.presentation.classic.model.ClassicUINode;
import org.jboss.portal.presentation.classic.model.PageViewPortScope;
import org.jboss.portal.presentation.classic.protocol.ActionDecoder;
import org.jboss.portal.presentation.classic.protocol.ActionEncoder;
-import org.jboss.portal.presentation.server.PresentationRequest;
-import org.jboss.portal.presentation.server.PresentationResponse;
-import org.jboss.portal.presentation.server.PresentationServer;
-import org.jboss.portal.presentation.server.PresentationServerException;
+import org.jboss.portal.presentation.client.PresentationClient;
import org.jboss.portal.presentation.impl.model.UIModelImpl;
import org.jboss.portal.presentation.model.UIModel;
import org.jboss.portal.presentation.model.UIObject;
@@ -44,19 +39,24 @@
import org.jboss.portal.presentation.model.ui.UIContext;
import org.jboss.portal.presentation.model.ui.UIPage;
import org.jboss.portal.presentation.model.ui.UIWindow;
-import org.jboss.portal.presentation.protocol.ViewUIObjectAction;
import org.jboss.portal.presentation.protocol.ProtocolAction;
import org.jboss.portal.presentation.protocol.ProtocolResponse;
import org.jboss.portal.presentation.protocol.ShowUIObjectResponse;
+import org.jboss.portal.presentation.protocol.ViewUIObjectAction;
+import org.jboss.portal.presentation.server.PresentationRequest;
+import org.jboss.portal.presentation.server.PresentationResponse;
+import org.jboss.portal.presentation.server.PresentationServer;
+import org.jboss.portal.presentation.server.PresentationServerException;
+import org.jboss.portal.presentation.state.navigational.NavigationalStateContext;
+import org.jboss.portal.presentation.state.structural.StructuralStateContext;
+import org.jboss.portal.web.ServletContainer;
+import org.jboss.portal.web.ServletContextDispatcher;
import org.jboss.portal.web.WebRequest;
import org.jboss.portal.web.WebResponse;
-import org.jboss.portal.web.ServletContextDispatcher;
-import org.jboss.portal.web.ServletContainer;
import org.jboss.portal.web.impl.DefaultServletContainerFactory;
-import org.jboss.portal.portlet.URLFormat;
+import java.io.IOException;
import java.io.PrintWriter;
-import java.io.IOException;
import java.io.Writer;
import java.util.Collection;
Modified: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationServlet.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationServlet.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationServlet.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,20 +22,17 @@
******************************************************************************/
package org.jboss.portal.presentation.classic;
-import org.jboss.portal.web.WebRequest;
-import org.jboss.portal.web.WebResponse;
-import org.jboss.portal.web.endpoint.EndPointServlet;
-import org.jboss.portal.presentation.server.PresentationServer;
-import org.jboss.portal.presentation.server.PresentationServerException;
+import org.jboss.portal.common.io.IOTools;
import org.jboss.portal.presentation.PresentationServerImpl;
import org.jboss.portal.presentation.impl.state.structural.ContextNode;
import org.jboss.portal.presentation.impl.state.structural.NodeImporter;
import org.jboss.portal.presentation.impl.state.structural.StructuralStateContextImpl;
-import org.jboss.portal.common.io.IOTools;
+import org.jboss.portal.presentation.server.PresentationServer;
+import org.jboss.portal.presentation.server.PresentationServerException;
+import org.jboss.portal.web.WebRequest;
+import org.jboss.portal.web.WebResponse;
+import org.jboss.portal.web.endpoint.EndPointServlet;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
import javax.servlet.ServletException;
import java.io.IOException;
import java.io.InputStream;
Modified: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/model/ClassicUINode.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/model/ClassicUINode.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/model/ClassicUINode.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -24,9 +24,8 @@
import org.jboss.portal.presentation.model.UIObject;
-import java.util.Map;
-import java.util.HashMap;
import java.util.Collection;
+import java.util.Map;
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
Modified: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/model/ClassicViewPortContext.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/model/ClassicViewPortContext.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/model/ClassicViewPortContext.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -25,8 +25,8 @@
import org.jboss.portal.presentation.model.UIObject;
import org.jboss.portal.presentation.model.ViewPortContext;
+import java.util.HashMap;
import java.util.Map;
-import java.util.HashMap;
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
Modified: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionDecoder.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionDecoder.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionDecoder.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,10 +22,10 @@
******************************************************************************/
package org.jboss.portal.presentation.classic.protocol;
+import org.jboss.portal.presentation.protocol.GetActivation;
+import org.jboss.portal.presentation.protocol.PostActivation;
import org.jboss.portal.presentation.protocol.ProtocolAction;
import org.jboss.portal.presentation.protocol.ViewUIObjectAction;
-import org.jboss.portal.presentation.protocol.GetActivation;
-import org.jboss.portal.presentation.protocol.PostActivation;
import org.jboss.portal.web.WebRequest;
/**
Modified: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionEncoder.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionEncoder.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/protocol/ActionEncoder.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,11 +22,11 @@
******************************************************************************/
package org.jboss.portal.presentation.classic.protocol;
+import org.jboss.portal.common.text.FastURLEncoder;
+import org.jboss.portal.presentation.protocol.LinkActivation;
import org.jboss.portal.presentation.protocol.ProtocolAction;
+import org.jboss.portal.presentation.protocol.UIObjectAction;
import org.jboss.portal.presentation.protocol.ViewUIObjectAction;
-import org.jboss.portal.presentation.protocol.LinkActivation;
-import org.jboss.portal.presentation.protocol.UIObjectAction;
-import org.jboss.portal.common.text.FastURLEncoder;
import org.jboss.portal.web.WebResponse;
/**
Modified: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/portlet/StructuralPortletControllerContext.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/portlet/StructuralPortletControllerContext.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/portlet/StructuralPortletControllerContext.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,18 +22,18 @@
******************************************************************************/
package org.jboss.portal.presentation.portlet;
+import org.jboss.portal.portlet.PortletInvoker;
+import org.jboss.portal.portlet.PortletInvokerException;
+import org.jboss.portal.portlet.controller.PortletControllerContext;
+import org.jboss.portal.portlet.controller.event.EventControllerContext;
import org.jboss.portal.portlet.controller.state.PageNavigationalState;
import org.jboss.portal.portlet.controller.state.StateControllerContext;
-import org.jboss.portal.portlet.controller.event.EventControllerContext;
-import org.jboss.portal.portlet.controller.PortletControllerContext;
-import org.jboss.portal.portlet.PortletInvokerException;
-import org.jboss.portal.portlet.PortletInvoker;
-import org.jboss.portal.portlet.spi.PortletInvocationContext;
import org.jboss.portal.portlet.info.PortletInfo;
-import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
import org.jboss.portal.portlet.invocation.ActionInvocation;
import org.jboss.portal.portlet.invocation.EventInvocation;
import org.jboss.portal.portlet.invocation.ResourceInvocation;
+import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
+import org.jboss.portal.portlet.spi.PortletInvocationContext;
import org.jboss.portal.presentation.impl.state.structural.PageNode;
import javax.servlet.http.Cookie;
Modified: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/portlet/spi/PresentationClientContext.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/portlet/spi/PresentationClientContext.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/portlet/spi/PresentationClientContext.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,15 +22,15 @@
******************************************************************************/
package org.jboss.portal.presentation.portlet.spi;
-import org.jboss.portal.portlet.spi.ClientContext;
import org.jboss.portal.common.util.MultiValuedPropertyMap;
import org.jboss.portal.common.util.SimpleMultiValuedPropertyMap;
+import org.jboss.portal.portlet.spi.ClientContext;
+import org.jboss.portal.presentation.protocol.GetActivation;
import org.jboss.portal.presentation.protocol.LinkActivation;
-import org.jboss.portal.presentation.protocol.GetActivation;
import javax.servlet.http.Cookie;
+import java.util.Collections;
import java.util.List;
-import java.util.Collections;
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
Modified: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/portlet/spi/PresentationInstanceContext.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/portlet/spi/PresentationInstanceContext.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/portlet/spi/PresentationInstanceContext.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,9 +22,9 @@
******************************************************************************/
package org.jboss.portal.presentation.portlet.spi;
+import org.jboss.portal.portlet.StateEvent;
import org.jboss.portal.portlet.spi.InstanceContext;
import org.jboss.portal.portlet.state.AccessMode;
-import org.jboss.portal.portlet.StateEvent;
import org.jboss.portal.presentation.impl.state.structural.WindowNode;
/**
Modified: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/portlet/spi/PresentationPortalContext.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/portlet/spi/PresentationPortalContext.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/portlet/spi/PresentationPortalContext.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,14 +22,14 @@
******************************************************************************/
package org.jboss.portal.presentation.portlet.spi;
-import org.jboss.portal.portlet.spi.PortalContext;
+import org.jboss.portal.Mode;
import org.jboss.portal.WindowState;
-import org.jboss.portal.Mode;
import org.jboss.portal.common.util.Tools;
+import org.jboss.portal.portlet.spi.PortalContext;
+import java.util.Collections;
+import java.util.Map;
import java.util.Set;
-import java.util.Map;
-import java.util.Collections;
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
Modified: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/portlet/spi/PresentationServerContext.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/portlet/spi/PresentationServerContext.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/portlet/spi/PresentationServerContext.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -23,10 +23,10 @@
package org.jboss.portal.presentation.portlet.spi;
import org.jboss.portal.portlet.spi.ServerContext;
+import org.jboss.portal.presentation.client.PresentationClient;
+import org.jboss.portal.web.RequestDispatchCallback;
import org.jboss.portal.web.ServletContainer;
-import org.jboss.portal.web.RequestDispatchCallback;
import org.jboss.portal.web.ServletContextDispatcher;
-import org.jboss.portal.presentation.client.PresentationClient;
import javax.servlet.ServletContext;
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client/PresentationClient.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client/PresentationClient.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client/PresentationClient.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,9 +22,9 @@
******************************************************************************/
package org.jboss.portal.presentation.client;
+import org.jboss.portal.portlet.URLFormat;
+import org.jboss.portal.presentation.protocol.ProtocolAction;
import org.jboss.portal.presentation.state.navigational.NavigationalStateContext;
-import org.jboss.portal.presentation.protocol.ProtocolAction;
-import org.jboss.portal.portlet.URLFormat;
import org.jboss.portal.web.ServletContextDispatcher;
import java.io.IOException;
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/classic/layout/FlexibleGridLayoutManager.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/classic/layout/FlexibleGridLayoutManager.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/classic/layout/FlexibleGridLayoutManager.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -24,9 +24,8 @@
import org.jboss.portal.presentation.layout.LayoutManager;
-
-import java.util.List;
import java.util.ArrayList;
+import java.util.List;
/**
* This layout manager provides a Flexible Grid for laying out the UI components (which would be Portlet Windows)
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/classic/layout/RegionLayoutManager.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/classic/layout/RegionLayoutManager.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/classic/layout/RegionLayoutManager.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,11 +22,11 @@
******************************************************************************/
package org.jboss.portal.presentation.impl.classic.layout;
+import org.jboss.portal.presentation.layout.LayoutManager;
+
+import java.util.ArrayList;
import java.util.List;
-import java.util.ArrayList;
-import org.jboss.portal.presentation.layout.LayoutManager;
-
/**
* This layout manager splits the page up into Regions. Containers which contain the Portlet Windows
* are then laid out vertically inside each Region.
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ChildrenVisit.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ChildrenVisit.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ChildrenVisit.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,8 +22,8 @@
******************************************************************************/
package org.jboss.portal.presentation.impl.model;
+import java.util.ArrayList;
import java.util.Collection;
-import java.util.ArrayList;
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/CreateDiffPhase.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/CreateDiffPhase.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/CreateDiffPhase.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -25,9 +25,9 @@
import org.jboss.portal.presentation.model.ObjectTraversalType;
import org.jboss.portal.presentation.model.ViewPortContext;
import org.jboss.portal.presentation.model.ViewPortScope;
+import org.jboss.portal.presentation.state.navigational.NavigationalStateContext;
+import org.jboss.portal.presentation.state.structural.StructuralObject;
import org.jboss.portal.presentation.state.structural.StructuralStateContext;
-import org.jboss.portal.presentation.state.structural.StructuralObject;
-import org.jboss.portal.presentation.state.navigational.NavigationalStateContext;
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/CreateUpdatePhase.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/CreateUpdatePhase.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/CreateUpdatePhase.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -24,12 +24,12 @@
import org.jboss.portal.presentation.model.ViewPortContext;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
import java.util.List;
-import java.util.ArrayList;
import java.util.Map;
-import java.util.HashMap;
import java.util.Set;
-import java.util.HashSet;
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ObjectUpdate.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ObjectUpdate.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ObjectUpdate.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -25,8 +25,8 @@
import org.jboss.portal.presentation.model.ViewPortContext;
import org.jboss.portal.presentation.state.structural.StructuralObject;
+import java.util.HashMap;
import java.util.List;
-import java.util.HashMap;
import java.util.Map;
/**
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIModelImpl.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIModelImpl.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIModelImpl.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,12 +22,12 @@
******************************************************************************/
package org.jboss.portal.presentation.impl.model;
-import org.jboss.portal.presentation.state.structural.StructuralStateContext;
-import org.jboss.portal.presentation.state.navigational.NavigationalStateContext;
import org.jboss.portal.presentation.model.UIModel;
import org.jboss.portal.presentation.model.ViewPort;
import org.jboss.portal.presentation.model.ViewPortContext;
import org.jboss.portal.presentation.model.ViewPortScope;
+import org.jboss.portal.presentation.state.navigational.NavigationalStateContext;
+import org.jboss.portal.presentation.state.structural.StructuralStateContext;
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIObjectImpl.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIObjectImpl.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIObjectImpl.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,6 +22,11 @@
******************************************************************************/
package org.jboss.portal.presentation.impl.model;
+import org.jboss.portal.common.NotYetImplemented;
+import org.jboss.portal.common.reflect.Reflection;
+import org.jboss.portal.presentation.impl.model.ui.UIContextImpl;
+import org.jboss.portal.presentation.impl.model.ui.UIPageImpl;
+import org.jboss.portal.presentation.impl.model.ui.UIWindowImpl;
import org.jboss.portal.presentation.model.UIObject;
import org.jboss.portal.presentation.model.ui.UIContext;
import org.jboss.portal.presentation.model.ui.UIPage;
@@ -30,11 +35,6 @@
import org.jboss.portal.presentation.state.StateType;
import org.jboss.portal.presentation.state.navigational.NavigationalStateContext;
import org.jboss.portal.presentation.state.structural.StructuralObject;
-import org.jboss.portal.presentation.impl.model.ui.UIContextImpl;
-import org.jboss.portal.presentation.impl.model.ui.UIPageImpl;
-import org.jboss.portal.presentation.impl.model.ui.UIWindowImpl;
-import org.jboss.portal.common.reflect.Reflection;
-import org.jboss.portal.common.NotYetImplemented;
import java.util.Map;
import java.util.Set;
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ui/UIContextImpl.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ui/UIContextImpl.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ui/UIContextImpl.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,10 +22,10 @@
******************************************************************************/
package org.jboss.portal.presentation.impl.model.ui;
+import org.jboss.portal.presentation.impl.model.UIObjectImpl;
import org.jboss.portal.presentation.model.ui.UIContext;
+import org.jboss.portal.presentation.state.navigational.NavigationalStateContext;
import org.jboss.portal.presentation.state.structural.StructuralObject;
-import org.jboss.portal.presentation.state.navigational.NavigationalStateContext;
-import org.jboss.portal.presentation.impl.model.UIObjectImpl;
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ui/UIPageImpl.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ui/UIPageImpl.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ui/UIPageImpl.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,10 +22,10 @@
******************************************************************************/
package org.jboss.portal.presentation.impl.model.ui;
+import org.jboss.portal.presentation.impl.model.UIObjectImpl;
import org.jboss.portal.presentation.model.ui.UIPage;
+import org.jboss.portal.presentation.state.navigational.NavigationalStateContext;
import org.jboss.portal.presentation.state.structural.StructuralObject;
-import org.jboss.portal.presentation.state.navigational.NavigationalStateContext;
-import org.jboss.portal.presentation.impl.model.UIObjectImpl;
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ui/UIWindowImpl.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ui/UIWindowImpl.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ui/UIWindowImpl.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,13 +22,13 @@
******************************************************************************/
package org.jboss.portal.presentation.impl.model.ui;
+import org.jboss.portal.Mode;
+import org.jboss.portal.WindowState;
+import org.jboss.portal.presentation.impl.model.UIObjectImpl;
import org.jboss.portal.presentation.model.ui.UIWindow;
-import org.jboss.portal.presentation.state.structural.StructuralObject;
import org.jboss.portal.presentation.state.StateType;
import org.jboss.portal.presentation.state.navigational.NavigationalStateContext;
-import org.jboss.portal.presentation.impl.model.UIObjectImpl;
-import org.jboss.portal.WindowState;
-import org.jboss.portal.Mode;
+import org.jboss.portal.presentation.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/state/navigational/NavigationalStateContextImpl.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/navigational/NavigationalStateContextImpl.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/navigational/NavigationalStateContextImpl.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,12 +22,12 @@
******************************************************************************/
package org.jboss.portal.presentation.impl.state.navigational;
-import org.jboss.portal.presentation.state.navigational.NavigationalStateContext;
import org.jboss.portal.presentation.state.StateChangeVetoException;
import org.jboss.portal.presentation.state.StateException;
+import org.jboss.portal.presentation.state.navigational.NavigationalStateContext;
+import java.util.HashMap;
import java.util.Map;
-import java.util.HashMap;
import java.util.Set;
/**
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/NodeImporter.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/NodeImporter.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/NodeImporter.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,22 +22,21 @@
******************************************************************************/
package org.jboss.portal.presentation.impl.state.structural;
+import org.jboss.portal.common.io.IOTools;
+import org.jboss.portal.common.xml.XMLTools;
+import static org.jboss.portal.common.xml.XMLTools.*;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
-
-import static org.jboss.portal.common.xml.XMLTools.*;
-import org.jboss.portal.common.xml.XMLTools;
-import org.jboss.portal.common.io.IOTools;
import org.xml.sax.SAXException;
-import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.XMLConstants;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
import javax.xml.validation.Schema;
import javax.xml.validation.SchemaFactory;
-import javax.xml.XMLConstants;
-import java.io.InputStream;
import java.io.IOException;
+import java.io.InputStream;
import java.net.URL;
/**
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/StructuralNode.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/StructuralNode.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/StructuralNode.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,19 +22,19 @@
******************************************************************************/
package org.jboss.portal.presentation.impl.state.structural;
+import org.jboss.portal.presentation.model.UIObject;
+import org.jboss.portal.presentation.state.StaleStateException;
import org.jboss.portal.presentation.state.structural.StructuralObject;
-import org.jboss.portal.presentation.state.StaleStateException;
-import org.jboss.portal.presentation.model.UIObject;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
import java.util.Map;
-import java.util.HashMap;
-import java.util.Collections;
import java.util.Set;
-import java.util.HashSet;
-import java.util.Collection;
-import java.util.ArrayList;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/StructuralStateContextImpl.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/StructuralStateContextImpl.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/StructuralStateContextImpl.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,18 +22,16 @@
******************************************************************************/
package org.jboss.portal.presentation.impl.state.structural;
-import org.jboss.portal.presentation.state.structural.StructuralObject;
-import org.jboss.portal.presentation.state.structural.StructuralStateContext;
-import org.jboss.portal.presentation.state.StateException;
import org.jboss.portal.presentation.state.NoSuchStateException;
import org.jboss.portal.presentation.state.StaleStateException;
+import org.jboss.portal.presentation.state.StateException;
+import org.jboss.portal.presentation.state.structural.StructuralObject;
+import org.jboss.portal.presentation.state.structural.StructuralStateContext;
import java.util.Collection;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.concurrent.atomic.AtomicLong;
-import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+import java.util.concurrent.atomic.AtomicLong;
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/StructuralStateImpl.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/StructuralStateImpl.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/state/structural/StructuralStateImpl.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,8 +22,8 @@
******************************************************************************/
package org.jboss.portal.presentation.impl.state.structural;
+import org.jboss.portal.presentation.model.UIObject;
import org.jboss.portal.presentation.state.structural.StructuralState;
-import org.jboss.portal.presentation.model.UIObject;
import java.util.Map;
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIObject.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIObject.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIObject.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,8 +22,8 @@
******************************************************************************/
package org.jboss.portal.presentation.model;
+import org.jboss.portal.presentation.state.StateException;
import org.jboss.portal.presentation.state.StateType;
-import org.jboss.portal.presentation.state.StateException;
import java.util.Set;
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ViewPortContext.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ViewPortContext.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ViewPortContext.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,8 +22,6 @@
******************************************************************************/
package org.jboss.portal.presentation.model;
-import org.jboss.portal.presentation.model.UIObject;
-
/**
* This interface defines read-write access to the structural information of a viewport.
*
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ViewPortScope.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ViewPortScope.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ViewPortScope.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,8 +22,6 @@
******************************************************************************/
package org.jboss.portal.presentation.model;
-import org.jboss.portal.presentation.model.UIObject;
-
/**
* Defines the scope of a viewport. This interface is separated from the viewport context in order to
* really affirm the split between the concern between the scope implementation that is used by the viewport
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ui/UIWindow.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ui/UIWindow.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ui/UIWindow.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,8 +22,8 @@
******************************************************************************/
package org.jboss.portal.presentation.model.ui;
+import org.jboss.portal.Mode;
import org.jboss.portal.WindowState;
-import org.jboss.portal.Mode;
import org.jboss.portal.presentation.model.UIObject;
/**
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/GetActivation.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/GetActivation.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/GetActivation.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -23,7 +23,6 @@
package org.jboss.portal.presentation.protocol;
import java.util.Map;
-import java.util.Iterator;
/**
* @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/PostActivation.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/PostActivation.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/PostActivation.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -24,7 +24,6 @@
import org.jboss.portal.web.Body;
-import java.util.Iterator;
import java.util.Map;
/**
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/PresentationServer.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/PresentationServer.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/PresentationServer.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,10 +22,10 @@
******************************************************************************/
package org.jboss.portal.presentation.server;
-import org.jboss.portal.presentation.state.structural.StructuralStateContext;
+import org.jboss.portal.presentation.client.PresentationClient;
import org.jboss.portal.presentation.model.content.WindowContent;
-import org.jboss.portal.presentation.client.PresentationClient;
import org.jboss.portal.presentation.protocol.ProtocolAction;
+import org.jboss.portal.presentation.state.structural.StructuralStateContext;
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/state/structural/StructuralObject.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/state/structural/StructuralObject.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/state/structural/StructuralObject.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,8 +22,8 @@
******************************************************************************/
package org.jboss.portal.presentation.state.structural;
+import java.util.Map;
import java.util.Set;
-import java.util.Map;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
Modified: modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/layout/TestFlexibleGrid.java
===================================================================
--- modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/layout/TestFlexibleGrid.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/layout/TestFlexibleGrid.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -23,15 +23,8 @@
package org.jboss.portal.presentation.test.layout;
import junit.framework.TestCase;
-
import org.apache.log4j.Logger;
-import java.io.FileOutputStream;
-
-import org.jboss.portal.presentation.impl.classic.layout.FlexibleGrid;
-import org.jboss.portal.presentation.impl.classic.layout.FlexibleGridConstraints;
-import org.jboss.portal.presentation.impl.classic.layout.FlexibleGridLayoutManager;
-
/**
* @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
*
Modified: modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/layout/TestRegionLayoutManager.java
===================================================================
--- modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/layout/TestRegionLayoutManager.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/layout/TestRegionLayoutManager.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -23,14 +23,8 @@
package org.jboss.portal.presentation.test.layout;
import junit.framework.TestCase;
-
import org.apache.log4j.Logger;
-import java.io.FileOutputStream;
-
-import org.jboss.portal.presentation.impl.classic.layout.RegionConstraints;
-import org.jboss.portal.presentation.impl.classic.layout.RegionLayoutManager;
-
/**
* @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
*
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-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/AbstractModelTestCase.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -23,23 +23,22 @@
package org.jboss.portal.presentation.test.model;
import junit.framework.TestCase;
-
import org.jboss.portal.presentation.model.UIObject;
import org.jboss.portal.presentation.model.ui.UIContext;
import org.jboss.portal.presentation.model.ui.UIPage;
+import org.jboss.portal.presentation.state.NoSuchStateException;
+import org.jboss.portal.presentation.state.StaleStateException;
+import org.jboss.portal.presentation.state.StateException;
import org.jboss.portal.presentation.state.structural.StructuralObject;
import org.jboss.portal.presentation.state.structural.StructuralState;
import org.jboss.portal.presentation.state.structural.StructuralStateContext;
-import org.jboss.portal.presentation.state.StateException;
-import org.jboss.portal.presentation.state.StaleStateException;
-import org.jboss.portal.presentation.state.NoSuchStateException;
import org.jboss.portal.presentation.test.model.state.structural.MockException;
-import java.util.Set;
-import java.util.List;
-import java.util.Collections;
import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
import java.util.Map;
+import java.util.Set;
/**
* @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-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/state/structural/MockModelImpl.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -31,12 +31,12 @@
import org.jboss.portal.presentation.state.structural.StructuralStateContext;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.List;
import java.util.Map;
-import java.util.HashSet;
import java.util.Set;
-import java.util.Collection;
/**
* @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/MockObject.java
===================================================================
--- modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/state/structural/MockObject.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/state/structural/MockObject.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -23,9 +23,6 @@
package org.jboss.portal.presentation.test.model.state.structural;
import org.jboss.portal.presentation.model.UIObject;
-import org.jboss.portal.presentation.model.ui.UIContext;
-import org.jboss.portal.presentation.model.ui.UIPage;
-import org.jboss.portal.presentation.model.ui.UIWindow;
import org.jboss.portal.presentation.state.structural.StructuralObject;
import java.util.List;
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-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model/state/structural/StructuralStateImpl.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,8 +22,8 @@
******************************************************************************/
package org.jboss.portal.presentation.test.model.state.structural;
+import org.jboss.portal.presentation.model.UIObject;
import org.jboss.portal.presentation.state.structural.StructuralState;
-import org.jboss.portal.presentation.model.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-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/AbstractModelTestCase.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,15 +22,14 @@
******************************************************************************/
package org.jboss.portal.presentation.test.model3;
+import junit.framework.TestCase;
+import org.jboss.portal.presentation.impl.model.UIModelImpl;
+import org.jboss.portal.presentation.impl.state.navigational.NavigationalStateContextImpl;
import org.jboss.portal.presentation.model.UIModel;
+import org.jboss.portal.presentation.state.structural.StructuralStateContext;
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.impl.state.navigational.NavigationalStateContextImpl;
-import org.jboss.portal.presentation.state.structural.StructuralStateContext;
-import org.jboss.portal.presentation.impl.model.UIModelImpl;
-import junit.framework.TestCase;
-
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
* @version $Revision: 630 $
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-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/AddChildTestCase.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -26,7 +26,6 @@
import org.jboss.portal.presentation.model.ViewPort;
import org.jboss.portal.presentation.model.ViewPortScope;
import org.jboss.portal.presentation.model.ui.UIPage;
-import org.jboss.portal.presentation.test.model.state.structural.MockObject;
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
Modified: modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/ModelTestCase.java
===================================================================
--- modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/ModelTestCase.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/ModelTestCase.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -25,10 +25,6 @@
import org.jboss.portal.presentation.model.ObjectTraversalType;
import org.jboss.portal.presentation.model.ViewPort;
import org.jboss.portal.presentation.model.ViewPortScope;
-import org.jboss.portal.presentation.model.ui.UIContext;
-import org.jboss.portal.presentation.model.ui.UIPage;
-import org.jboss.portal.presentation.model.ui.UIWindow;
-import org.jboss.portal.presentation.test.model.state.structural.MockObject;
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
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-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/NodeDef.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,20 +22,19 @@
******************************************************************************/
package org.jboss.portal.presentation.test.model3;
+import junit.framework.Assert;
import org.jboss.portal.presentation.model.ObjectTraversalType;
import org.jboss.portal.presentation.model.UIObject;
import org.jboss.portal.presentation.model.ui.UIContext;
import org.jboss.portal.presentation.model.ui.UIPage;
-import org.jboss.portal.presentation.test.model.state.structural.MockObject;
import org.jboss.portal.presentation.test.model.state.structural.MockModel;
+import org.jboss.portal.presentation.test.model.state.structural.MockObject;
-import java.util.Map;
import java.util.HashMap;
-import java.util.Set;
import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
-import junit.framework.Assert;
-
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
* @version $Revision: 630 $
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-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/TraversalModelTestCase.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,22 +22,21 @@
******************************************************************************/
package org.jboss.portal.presentation.test.model3;
+import junit.framework.Assert;
+import junit.framework.TestCase;
+import org.jboss.portal.presentation.impl.model.UIModelImpl;
+import org.jboss.portal.presentation.impl.state.navigational.NavigationalStateContextImpl;
import org.jboss.portal.presentation.model.ObjectTraversalType;
import org.jboss.portal.presentation.model.UIModel;
+import org.jboss.portal.presentation.state.structural.StructuralStateContext;
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.impl.state.navigational.NavigationalStateContextImpl;
-import org.jboss.portal.presentation.state.structural.StructuralStateContext;
-import org.jboss.portal.presentation.impl.model.UIModelImpl;
-import java.util.Collection;
-import java.util.Collections;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
* @version $Revision: 630 $
Modified: modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/UIObjectNode.java
===================================================================
--- modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/UIObjectNode.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/UIObjectNode.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -25,8 +25,8 @@
import org.jboss.portal.presentation.model.UIObject;
import org.jboss.portal.presentation.state.StateType;
+import java.util.HashMap;
import java.util.Map;
-import java.util.HashMap;
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
Modified: modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/UIObjectTree.java
===================================================================
--- modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/UIObjectTree.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/UIObjectTree.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,16 +22,15 @@
******************************************************************************/
package org.jboss.portal.presentation.test.model3;
+import junit.framework.Assert;
import org.jboss.portal.presentation.model.UIObject;
import org.jboss.portal.presentation.model.ViewPortContext;
-import java.util.Map;
-import java.util.HashMap;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.HashSet;
+import java.util.Map;
-import junit.framework.Assert;
-
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
* @version $Revision: 630 $
Modified: modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/state/structural/StructuralStateContextTestCase.java
===================================================================
--- modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/state/structural/StructuralStateContextTestCase.java 2008-04-18 07:19:12 UTC (rev 10634)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/state/structural/StructuralStateContextTestCase.java 2008-04-18 07:24:55 UTC (rev 10635)
@@ -22,21 +22,21 @@
******************************************************************************/
package org.jboss.portal.presentation.test.state.structural;
-import org.jboss.portal.presentation.impl.state.structural.StructuralStateContextImpl;
import org.jboss.portal.presentation.impl.state.structural.ContextNode;
+import org.jboss.portal.presentation.impl.state.structural.PageNode;
import org.jboss.portal.presentation.impl.state.structural.StructuralNode;
-import org.jboss.portal.presentation.impl.state.structural.PageNode;
+import org.jboss.portal.presentation.impl.state.structural.StructuralStateContextImpl;
import org.jboss.portal.presentation.impl.state.structural.WindowNode;
-import org.jboss.portal.presentation.state.structural.StructuralStateContext;
import org.jboss.portal.presentation.model.UIObject;
import org.jboss.portal.presentation.model.ui.UIContext;
import org.jboss.portal.presentation.model.ui.UIPage;
import org.jboss.portal.presentation.model.ui.UIWindow;
+import org.jboss.portal.presentation.state.structural.StructuralStateContext;
import org.jboss.portal.presentation.test.model.AbstractModelTestCase;
import java.util.ArrayList;
+import java.util.List;
import java.util.Set;
-import java.util.List;
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
18 years
JBoss Portal SVN: r10634 - in modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation: model/ui and 1 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-04-18 03:19:12 -0400 (Fri, 18 Apr 2008)
New Revision: 10634
Removed:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/event/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/state/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ui/UIObject.java
Modified:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIObject.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ui/UIAction.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/MoveUIObjectAction.java
Log:
remove garbage stuff
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIObject.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIObject.java 2008-04-18 07:02:38 UTC (rev 10633)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/UIObject.java 2008-04-18 07:19:12 UTC (rev 10634)
@@ -22,8 +22,8 @@
******************************************************************************/
package org.jboss.portal.presentation.model;
-import org.jboss.portal.presentation.model.state.StateException;
import org.jboss.portal.presentation.state.StateType;
+import org.jboss.portal.presentation.state.StateException;
import java.util.Set;
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ui/UIAction.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ui/UIAction.java 2008-04-18 07:02:38 UTC (rev 10633)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ui/UIAction.java 2008-04-18 07:19:12 UTC (rev 10634)
@@ -22,7 +22,9 @@
******************************************************************************/
package org.jboss.portal.presentation.model.ui;
+import org.jboss.portal.presentation.model.UIObject;
+
/**
* An action that can be triggered.
*
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ui/UIObject.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ui/UIObject.java 2008-04-18 07:02:38 UTC (rev 10633)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/ui/UIObject.java 2008-04-18 07:19:12 UTC (rev 10634)
@@ -1,209 +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.model.ui;
-
-import org.jboss.portal.presentation.model.StateType;
-import org.jboss.portal.presentation.model.state.StateException;
-import org.jboss.portal.presentation.model.state.ConstraintViolationException;
-
-import java.util.Collection;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public interface UIObject
-{
-
- /**
- * The status of a user interface object.
- */
- public enum Status
- {
- /**
- * It can be used.
- */
- VALID,
-
- /**
- * It cannot be used.
- */
- INVALID,
-
- /**
- * It cannot be used as is but a recovery is possible to either become valid or invalid.
- */
- STALE
- }
-
- public interface Visitor
- {
-
- /**
- * Returns true if the provided object should be visited.
- *
- * @param object the object
- * @return true if it should be visited
- */
- boolean enterObject(UIObject object);
-
- /**
- * Callback to signal that an object visit is terminated
- *
- * @param object the object
- */
- void leaveObject(UIObject object);
-
- /**
- * Returns true if the children should be visited
- *
- * @param object the parent of the children
- * @param loaded if the relationship is already loaded
- * @return true if the children should be visited
- */
- boolean enterChildren(UIObject object, boolean loaded);
-
- }
-
- /**
- * Updates the status of the object by comparing validating it against the structural state context.
- */
- void validate();
-
- void validate(Visitor scope);
-
- /**
- * Attempt a resolution of the current conflict. The behavior of the method will change according to the
- * current status of the object:
- * <ul>
- * <li><code>STALE</code> status leads to resolve the conflict to a new status with <code>INVALID</code> or <code>VALID</code>
- * as possible values</li>
- * <li><code>VALID</code> status leads to a non operation</li>
- * <li><code>INVALID</code> status leads to throw an <code>IllegalStateException</code></li>
- * </ul>
- */
- void refresh();
-
- void refresh(Visitor scope);
-
- /**
- * Return the current status.
- *
- * @return the status
- */
- Status getStatus();
-
- /**
- * Returns the id.
- *
- * @return the id
- */
- String getId();
-
- /**
- * Returns the name.
- *
- * @return the name
- */
- String getName();
-
- /**
- * Returns the parent or null if the object does not have a parent.
- *
- * @return the parent
- */
- UIObject getParent();
-
- /**
- * Returns a named child or null if it does not exist.
- *
- * @param name the name of the child
- * @return the named child
- */
- UIObject getChild(String name);
-
- /**
- * Returns a property value or null if it does not exist.
- *
- * @param stateType the scope where to get the value from
- * @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 StateException any state exception
- */
- <T> T getProperty(StateType stateType, String propertyName, Class<T> propertyType) throws IllegalArgumentException, StateException;
-
- /**
- * Equivalent to call <code>getPropertyValue(StateScopeType,String,Class)</code> with the <code>Object.class</code>
- * literal.
- *
- * @param stateType the scope where to get the value from
- * @param propertyName the property name
- * @return the property value
- * @throws IllegalArgumentException if any argument is null or not valid
- * @throws StateException any state exception
- */
- Object getProperty(StateType stateType, String propertyName) throws IllegalArgumentException, StateException;
-
- <T> void setProperty(StateType stateType, String propertyName, T propertyValue) throws IllegalArgumentException, StateException;
-
- /**
- * Create a named child with a specified type.
- *
- * @param name the child name
- * @param type the child type
- * @return the newly created child
- * @throws IllegalArgumentException if the name is null, already exists or this kind of object does not accept children of the specified type
- * @throws StateException any state exception
- */
- <T extends UIObject> T createChild(String name, Class<T> type) throws IllegalArgumentException, StateException;
-
- /**
- * Returns the children of this object.
- *
- * @return the list of children
- */
- Collection<? extends UIObject> getChildren();
-
- /**
- * Destroy a named child.
- *
- * @param name the name of the child to destroy
- * @throws IllegalArgumentException if the name is null or the child does not exist
- * @throws StateException any state exception
- */
- void destroyChild(String name) throws IllegalArgumentException, StateException;
-
- /**
- * Move the specified object to a new parent. A constraint violation will be detected if the destination
- * is a descendant of the current object.
- *
- * @param destination the new parent
- * @throws IllegalArgumentException if the destination is null
- * @throws StateException any state exception
- * @throws ConstraintViolationException if the destination is not valid
- */
- void move(UIObject destination) throws IllegalArgumentException, StateException;
-
-}
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/MoveUIObjectAction.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/MoveUIObjectAction.java 2008-04-18 07:02:38 UTC (rev 10633)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/MoveUIObjectAction.java 2008-04-18 07:19:12 UTC (rev 10634)
@@ -22,8 +22,6 @@
******************************************************************************/
package org.jboss.portal.presentation.protocol;
-import org.jboss.portal.presentation.model.ui.UIObject;
-
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
18 years
JBoss Portal SVN: r10633 - branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/security.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2008-04-18 03:02:38 -0400 (Fri, 18 Apr 2008)
New Revision: 10633
Modified:
branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/security/AuthorizationProviderImpl.java
Log:
JBPORTAL-1990 - cache cms admin user, and use user roles cached in JACC layer
Modified: branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/security/AuthorizationProviderImpl.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/security/AuthorizationProviderImpl.java 2008-04-18 01:14:30 UTC (rev 10632)
+++ branches/JBoss_Portal_Branch_2_6/cms/src/main/org/jboss/portal/cms/security/AuthorizationProviderImpl.java 2008-04-18 07:02:38 UTC (rev 10633)
@@ -42,11 +42,16 @@
import org.jboss.portal.security.spi.provider.PermissionFactory;
import org.jboss.portal.security.spi.provider.PermissionRepository;
import org.jboss.portal.security.spi.provider.SecurityConfigurationException;
+import org.jboss.portal.security.impl.jacc.JACCPortalPrincipal;
+import javax.security.auth.Subject;
+import javax.security.jacc.PolicyContext;
+import javax.security.jacc.PolicyContextException;
import java.util.Collection;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
+import java.security.Principal;
/**
* Created on : Jan 23, 2007
@@ -64,6 +69,8 @@
private String cmsRootUserName = null;
+ private User adminUser = null;
+
/**
*
*/
@@ -213,23 +220,30 @@
*/
public User getRoot()
{
- Session session = Tools.getOpenSession();
- Transaction tx = session.beginTransaction();
- try
+
+ if (adminUser == null)
{
- User cmsRoot = this.userModule.findUserByUserName(this.cmsRootUserName);
- tx.commit();
- return cmsRoot;
+ Session session = Tools.getOpenSession();
+ Transaction tx = session.beginTransaction();
+ try
+ {
+ adminUser = this.userModule.findUserByUserName(this.cmsRootUserName);
+ tx.commit();
+ }
+ catch(Exception e)
+ {
+ tx.rollback();
+ throw new RuntimeException(e);
+ }
+ finally
+ {
+ Tools.closeSession(session);
+ }
}
- catch(Exception e)
- {
- tx.rollback();
- throw new RuntimeException(e);
- }
- finally
- {
- Tools.closeSession(session);
- }
+
+ return adminUser;
+
+
}
/**
@@ -435,17 +449,21 @@
}
else
{
+
+
// in the case of LDAP use the IdentityModule
// now find permissions for all the roles that this user belongs to
- Set belongedRoles = this.membershipModule.getRoles(this.userModule
- .findUserByUserName(userId));
+ //Set belongedRoles = this.membershipModule.getRoles(this.userModule
+ // .findUserByUserName(userId));
+
+ Set belongedRoles = getCurrentRoles();
+
if (belongedRoles != null)
{
for (Iterator itr = belongedRoles.iterator(); itr.hasNext();)
{
- Role role = (Role)itr.next();
- Collection rolePermissions = this.findPermissionsByRole(role
- .getName());
+ String role = (String)itr.next();
+ Collection rolePermissions = this.findPermissionsByRole(role);
if (rolePermissions != null && !rolePermissions.isEmpty())
{
permissions.addAll(rolePermissions);
@@ -543,4 +561,39 @@
return permissions;
}
+
+ private Set getCurrentRoles() throws PolicyContextException
+ {
+ Set<String> roles = new HashSet<String>();
+
+ // Get the current authenticated subject through the JACC contract
+ Subject subject = (Subject)PolicyContext.getContext("javax.security.auth.Subject.container");
+
+ if (subject != null)
+ {
+ Set tmp = subject.getPrincipals(JACCPortalPrincipal.class);
+ JACCPortalPrincipal pp = null;
+ for (Iterator i = tmp.iterator(); i.hasNext();)
+ {
+ pp = (JACCPortalPrincipal)i.next();
+ if (pp != null)
+ {
+ break;
+ }
+ }
+ if (pp == null)
+ {
+ pp = new JACCPortalPrincipal(subject);
+ tmp.add(pp);
+
+ // Lazy create all the permission containers for the given role names
+ for (Iterator i = pp.getRoles().iterator(); i.hasNext();)
+ {
+ Principal role = (Principal)i.next();
+ roles.add(role.getName());
+ }
+ }
+ }
+ return roles;
+ }
}
18 years
JBoss Portal SVN: r10632 - docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: mmcallis
Date: 2008-04-17 21:14:30 -0400 (Thu, 17 Apr 2008)
New Revision: 10632
Modified:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/migration.xml
Log:
4.1. Manual Upgrade
moving a sentence to a new row
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/migration.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/migration.xml 2008-04-18 01:02:30 UTC (rev 10631)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/migration.xml 2008-04-18 01:14:30 UTC (rev 10632)
@@ -492,9 +492,12 @@
</para>
<para>
Go to the <emphasis role="bold">JBP_WINDOW</emphasis> table and find a row with the same
- <emphasis role="bold">PK</emphasis> value from the <emphasis role="bold">JBP_OBJECT_NODE</emphasis> table. In such a row, replace <emphasis>CMSPortletInstance</emphasis> with a path to your CMS resource. For example, by default, JBoss Portal displays <filename>/default/index.html</filename>. Add a row containing the following to the <emphasis role="bold">JBP_PORTAL_OBJECT_PROPS</emphasis> table:
+ <emphasis role="bold">PK</emphasis> value from the <emphasis role="bold">JBP_OBJECT_NODE</emphasis> table. In such a row, replace <emphasis>CMSPortletInstance</emphasis> with a path to your CMS resource. For example, by default, JBoss Portal displays <filename>/default/index.html</filename>.
</para>
<para>
+ Add a row containing the following to the <emphasis role="bold">JBP_PORTAL_OBJECT_PROPS</emphasis> table:
+ </para>
+ <para>
<itemizedlist>
<listitem>
<para>
@@ -518,7 +521,7 @@
</para>
<para>
<note>
- <title>Portlet Content Type and Path to the CMS Resource</title>
+ <title>Portlet Content-type and the path to the CMS Resource</title>
<para>
The <guiicon>Admin</guiicon> portlet can be used to change the portlet window content-type, and configure the path to the CMS resource.
</para>
18 years
JBoss Portal SVN: r10631 - docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: mmcallis
Date: 2008-04-17 21:02:30 -0400 (Thu, 17 Apr 2008)
New Revision: 10631
Modified:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/migration.xml
Log:
4.1. Manual Upgrade
minor revisions/corrections, rephrased a few of my
silly things...
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/migration.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/migration.xml 2008-04-18 00:36:37 UTC (rev 10630)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/migration.xml 2008-04-18 01:02:30 UTC (rev 10631)
@@ -176,7 +176,7 @@
<note>
<title>Requested Resource Error</title>
<para>
- When running JBoss Portal 2.6 with a database created by JBoss Portal 2.4, a non-existing portlet will try to be displayed, resulting in a <computeroutput>404</computeroutput>, <computeroutput>The requested resource() is not available</computeroutput>, error.
+ When running JBoss Portal 2.6 with a database created by JBoss Portal 2.4, a non-existing portlet will try to be displayed, resulting in a <computeroutput>404</computeroutput>, <computeroutput>The requested resource() is not available</computeroutput> error.
</para>
</note>
</para>
@@ -481,7 +481,7 @@
</screen>
</para>
<para>
- The following example uses the MySQL Query Browser. Open the <emphasis role="bold">JBP_OBJECT_NODE</emphasis> table in your database schema. Look at the <emphasis role="bold">PATH</emphasis> column to identify any occurrences of <emphasis>>CMS</emphasis> in your JBoss Portal deployment. Identify any row referring to <emphasis>CMSPortletWindow</emphasis>, and remember the number in <emphasis role="bold">PK</emphasis> column. The <emphasis role="bold">PK</emphasis> number is needed in the following steps:
+ The following example uses the MySQL Query Browser. Open the <emphasis role="bold">JBP_OBJECT_NODE</emphasis> table in your database schema. Look at the <emphasis role="bold">PATH</emphasis> column to identify any occurrences of <emphasis>CMS</emphasis> in your JBoss Portal deployment. Identify any row referring to <emphasis>CMSPortletWindow</emphasis>, and remember the number in the <emphasis role="bold">PK</emphasis> column. The <emphasis role="bold">PK</emphasis> number is needed in the following steps:
</para>
<para>
<mediaobject>
@@ -492,9 +492,9 @@
</para>
<para>
Go to the <emphasis role="bold">JBP_WINDOW</emphasis> table and find a row with the same
- <emphasis role="bold">PK</emphasis> value from the <emphasis role="bold">JBP_OBJECT_NODE</emphasis> table. In such a row, replace <emphasis>CMSPortletInstance</emphasis> with a path to your CMS resource. For example, by default, JBoss Portal displays <filename>/default/index.html</filename>.
+ <emphasis role="bold">PK</emphasis> value from the <emphasis role="bold">JBP_OBJECT_NODE</emphasis> table. In such a row, replace <emphasis>CMSPortletInstance</emphasis> with a path to your CMS resource. For example, by default, JBoss Portal displays <filename>/default/index.html</filename>. Add a row containing the following to the <emphasis role="bold">JBP_PORTAL_OBJECT_PROPS</emphasis> table:
</para>
- <para> Go to the <emphasis role="bold">JBP_PORTAL_OBJECT_PROPS</emphasis> table and add a row containing:
+ <para>
<itemizedlist>
<listitem>
<para>
@@ -520,8 +520,7 @@
<note>
<title>Portlet Content Type and Path to the CMS Resource</title>
<para>
- You can change the portlet window content-type, and configure the path to the CMS resource
- using the <guiicon>Admin</guiicon> portlet.
+ The <guiicon>Admin</guiicon> portlet can be used to change the portlet window content-type, and configure the path to the CMS resource.
</para>
</note>
</para>
18 years
JBoss Portal SVN: r10630 - in modules/presentation/trunk: ajax/src/main/java/org/jboss/portal/presentation/impl/ajax/entry and 4 other directories.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2008-04-17 20:36:37 -0400 (Thu, 17 Apr 2008)
New Revision: 10630
Added:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/PresentationRequest.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/PresentationResponse.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/PresentationServer.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/PresentationServerException.java
Removed:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/PresentationRequest.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/PresentationResponse.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/PresentationServer.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/PresentationServerException.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server2/
Modified:
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/AjaxPresentationClient.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/impl/ajax/entry/PortalEntryPoint.java
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/PresentationServerImpl.java
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationClient.java
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationServlet.java
Log:
refactoring server2 to server
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/AjaxPresentationClient.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/AjaxPresentationClient.java 2008-04-18 00:34:17 UTC (rev 10629)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/AjaxPresentationClient.java 2008-04-18 00:36:37 UTC (rev 10630)
@@ -37,10 +37,10 @@
import org.jboss.portal.presentation.protocol.ProtocolAction;
import org.jboss.portal.presentation.protocol.ProtocolResponse;
import org.jboss.portal.presentation.protocol.ShowUIObjectResponse;
-import org.jboss.portal.presentation.server2.PresentationServer;
-import org.jboss.portal.presentation.server2.PresentationServerException;
-import org.jboss.portal.presentation.server2.PresentationRequest;
-import org.jboss.portal.presentation.server2.PresentationResponse;
+import org.jboss.portal.presentation.server.PresentationRequest;
+import org.jboss.portal.presentation.server.PresentationResponse;
+import org.jboss.portal.presentation.server.PresentationServer;
+import org.jboss.portal.presentation.server.PresentationServerException;
import org.jboss.portal.presentation.state.structural.StructuralStateContext;
import org.jboss.portal.presentation.classic.ClassicPresentationClient;
import org.jboss.portal.presentation.classic.model.ClassicUINode;
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/impl/ajax/entry/PortalEntryPoint.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/impl/ajax/entry/PortalEntryPoint.java 2008-04-18 00:34:17 UTC (rev 10629)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/impl/ajax/entry/PortalEntryPoint.java 2008-04-18 00:36:37 UTC (rev 10630)
@@ -27,7 +27,7 @@
import org.jboss.portal.presentation.ajax.AjaxPresentationClient;
import org.jboss.portal.presentation.protocol.GetActivation;
import org.jboss.portal.presentation.protocol.PostActivation;
-import org.jboss.portal.presentation.server2.PresentationServer;
+import org.jboss.portal.presentation.server.PresentationServer;
import org.jboss.portal.presentation.impl.state.structural.ContextNode;
import org.jboss.portal.presentation.impl.state.structural.NodeImporter;
import org.jboss.portal.presentation.impl.state.structural.StructuralStateContextImpl;
Modified: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/PresentationServerImpl.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/PresentationServerImpl.java 2008-04-18 00:34:17 UTC (rev 10629)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/PresentationServerImpl.java 2008-04-18 00:36:37 UTC (rev 10630)
@@ -22,10 +22,10 @@
******************************************************************************/
package org.jboss.portal.presentation;
-import org.jboss.portal.presentation.server2.PresentationServer;
-import org.jboss.portal.presentation.server2.PresentationServerException;
-import org.jboss.portal.presentation.server2.PresentationResponse;
-import org.jboss.portal.presentation.server2.PresentationRequest;
+import org.jboss.portal.presentation.server.PresentationRequest;
+import org.jboss.portal.presentation.server.PresentationResponse;
+import org.jboss.portal.presentation.server.PresentationServer;
+import org.jboss.portal.presentation.server.PresentationServerException;
import org.jboss.portal.presentation.state.structural.StructuralStateContext;
import org.jboss.portal.presentation.protocol.ProtocolAction;
import org.jboss.portal.presentation.protocol.ViewUIObjectAction;
Modified: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationClient.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationClient.java 2008-04-18 00:34:17 UTC (rev 10629)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationClient.java 2008-04-18 00:36:37 UTC (rev 10630)
@@ -31,10 +31,10 @@
import org.jboss.portal.presentation.classic.model.PageViewPortScope;
import org.jboss.portal.presentation.classic.protocol.ActionDecoder;
import org.jboss.portal.presentation.classic.protocol.ActionEncoder;
-import org.jboss.portal.presentation.server2.PresentationServer;
-import org.jboss.portal.presentation.server2.PresentationServerException;
-import org.jboss.portal.presentation.server2.PresentationRequest;
-import org.jboss.portal.presentation.server2.PresentationResponse;
+import org.jboss.portal.presentation.server.PresentationRequest;
+import org.jboss.portal.presentation.server.PresentationResponse;
+import org.jboss.portal.presentation.server.PresentationServer;
+import org.jboss.portal.presentation.server.PresentationServerException;
import org.jboss.portal.presentation.impl.model.UIModelImpl;
import org.jboss.portal.presentation.model.UIModel;
import org.jboss.portal.presentation.model.UIObject;
Modified: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationServlet.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationServlet.java 2008-04-18 00:34:17 UTC (rev 10629)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationServlet.java 2008-04-18 00:36:37 UTC (rev 10630)
@@ -25,8 +25,8 @@
import org.jboss.portal.web.WebRequest;
import org.jboss.portal.web.WebResponse;
import org.jboss.portal.web.endpoint.EndPointServlet;
-import org.jboss.portal.presentation.server2.PresentationServer;
-import org.jboss.portal.presentation.server2.PresentationServerException;
+import org.jboss.portal.presentation.server.PresentationServer;
+import org.jboss.portal.presentation.server.PresentationServerException;
import org.jboss.portal.presentation.PresentationServerImpl;
import org.jboss.portal.presentation.impl.state.structural.ContextNode;
import org.jboss.portal.presentation.impl.state.structural.NodeImporter;
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server (from rev 10628, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server2)
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/PresentationRequest.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server2/PresentationRequest.java 2008-04-18 00:31:55 UTC (rev 10628)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/PresentationRequest.java 2008-04-18 00:36:37 UTC (rev 10630)
@@ -1,52 +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.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;
- }
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/PresentationRequest.java (from rev 10629, 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/server/PresentationRequest.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/PresentationRequest.java 2008-04-18 00:36:37 UTC (rev 10630)
@@ -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.server;
+
+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;
+ }
+}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/PresentationResponse.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server2/PresentationResponse.java 2008-04-18 00:31:55 UTC (rev 10628)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/PresentationResponse.java 2008-04-18 00:36:37 UTC (rev 10630)
@@ -1,52 +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.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;
- }
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/PresentationResponse.java (from rev 10629, 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/server/PresentationResponse.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/PresentationResponse.java 2008-04-18 00:36:37 UTC (rev 10630)
@@ -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.server;
+
+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;
+ }
+}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/PresentationServer.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server2/PresentationServer.java 2008-04-18 00:31:55 UTC (rev 10628)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/PresentationServer.java 2008-04-18 00:36:37 UTC (rev 10630)
@@ -1,45 +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.server2;
-
-import org.jboss.portal.presentation.state.structural.StructuralStateContext;
-import org.jboss.portal.presentation.model.content.WindowContent;
-import org.jboss.portal.presentation.client.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;
-
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/PresentationServer.java (from rev 10629, 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/server/PresentationServer.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/PresentationServer.java 2008-04-18 00:36:37 UTC (rev 10630)
@@ -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.server;
+
+import org.jboss.portal.presentation.state.structural.StructuralStateContext;
+import org.jboss.portal.presentation.model.content.WindowContent;
+import org.jboss.portal.presentation.client.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;
+
+}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/PresentationServerException.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server2/PresentationServerException.java 2008-04-18 00:31:55 UTC (rev 10628)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/PresentationServerException.java 2008-04-18 00:36:37 UTC (rev 10630)
@@ -1,49 +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.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
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/PresentationServerException.java (from rev 10629, 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/server/PresentationServerException.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/PresentationServerException.java 2008-04-18 00:36:37 UTC (rev 10630)
@@ -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.server;
+
+/**
+ * @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
18 years
JBoss Portal SVN: r10629 - in modules/presentation/trunk: classic/src/main/java/org/jboss/portal/presentation/classic and 4 other directories.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2008-04-17 20:34:17 -0400 (Thu, 17 Apr 2008)
New Revision: 10629
Added:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ChildrenVisit.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/CreateDiffPhase.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/CreateUpdatePhase.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ObjectUpdate.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ObjectVisit.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIModelImpl.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIObjectImpl.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIObjectRef.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ViewPortImpl.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ui/
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ui/UIContextImpl.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ui/UIPageImpl.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ui/UIWindowImpl.java
Removed:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ui/UIContextImpl.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ui/UIPageImpl.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ui/UIWindowImpl.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/
Modified:
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/AjaxPresentationClient.java
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationClient.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/TraversalModelTestCase.java
Log:
refactoring model2 package to model
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/AjaxPresentationClient.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/AjaxPresentationClient.java 2008-04-18 00:31:55 UTC (rev 10628)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/AjaxPresentationClient.java 2008-04-18 00:34:17 UTC (rev 10629)
@@ -25,7 +25,7 @@
import java.io.IOException;
import java.util.Collection;
-import org.jboss.portal.presentation.impl.model2.UIModelImpl;
+import org.jboss.portal.presentation.impl.model.UIModelImpl;
import org.jboss.portal.presentation.model.UIModel;
import org.jboss.portal.presentation.model.UIObject;
import org.jboss.portal.presentation.model.ViewPort;
Modified: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationClient.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationClient.java 2008-04-18 00:31:55 UTC (rev 10628)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationClient.java 2008-04-18 00:34:17 UTC (rev 10629)
@@ -35,7 +35,7 @@
import org.jboss.portal.presentation.server2.PresentationServerException;
import org.jboss.portal.presentation.server2.PresentationRequest;
import org.jboss.portal.presentation.server2.PresentationResponse;
-import org.jboss.portal.presentation.impl.model2.UIModelImpl;
+import org.jboss.portal.presentation.impl.model.UIModelImpl;
import org.jboss.portal.presentation.model.UIModel;
import org.jboss.portal.presentation.model.UIObject;
import org.jboss.portal.presentation.model.ViewPort;
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ChildrenVisit.java (from rev 10627, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/ChildrenVisit.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ChildrenVisit.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ChildrenVisit.java 2008-04-18 00:34:17 UTC (rev 10629)
@@ -0,0 +1,70 @@
+/******************************************************************************
+ * 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.impl.model;
+
+import java.util.Collection;
+import java.util.ArrayList;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class ChildrenVisit
+{
+
+ /** . */
+ final Collection<ObjectVisit> addedObjects = new ArrayList<ObjectVisit>();
+
+ /** . */
+ final Collection<ObjectVisit> validObjects = new ArrayList<ObjectVisit>();
+
+ /** . */
+ final Collection<ObjectVisit> staleObjects = new ArrayList<ObjectVisit>();
+
+ /** . */
+ final Collection<String> removedObjects = new ArrayList<String>();
+
+ ChildrenVisit()
+ {
+ }
+
+ public Collection<ObjectVisit> getAddedObjects()
+ {
+ return addedObjects;
+ }
+
+ public Collection<String> getRemovedObjects()
+ {
+ return removedObjects;
+ }
+
+ public Collection<ObjectVisit> getValidObjects()
+ {
+ return validObjects;
+ }
+
+ public Collection<ObjectVisit> getStaleObjects()
+ {
+ return staleObjects;
+ }
+}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/CreateDiffPhase.java (from rev 10628, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/CreateDiffPhase.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/CreateDiffPhase.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/CreateDiffPhase.java 2008-04-18 00:34:17 UTC (rev 10629)
@@ -0,0 +1,193 @@
+/******************************************************************************
+ * 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.impl.model;
+
+import org.jboss.portal.presentation.model.ObjectTraversalType;
+import org.jboss.portal.presentation.model.ViewPortContext;
+import org.jboss.portal.presentation.model.ViewPortScope;
+import org.jboss.portal.presentation.state.structural.StructuralStateContext;
+import org.jboss.portal.presentation.state.structural.StructuralObject;
+import org.jboss.portal.presentation.state.navigational.NavigationalStateContext;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class CreateDiffPhase
+{
+
+ /** . */
+ private final ViewPortContext context;
+
+ /** . */
+ private final ViewPortScope scope;
+
+ /** . */
+ private final NavigationalStateContext navigationalStateContext;
+
+ /** . */
+ private final StructuralStateContext structuralStateContext;
+
+ /** . */
+ private ObjectVisit rootVisit;
+
+ public CreateDiffPhase(
+ ViewPortContext context,
+ ViewPortScope scope,
+ NavigationalStateContext navigationalStateContext,
+ StructuralStateContext structuralStateContext)
+ {
+ this.context = context;
+ this.scope = scope;
+ this.navigationalStateContext = navigationalStateContext;
+ this.structuralStateContext = structuralStateContext;
+ }
+
+ public void perform()
+ {
+ rootVisit = diff(scope.getRootId());
+ }
+
+ public ObjectVisit getRootVisit()
+ {
+ return rootVisit;
+ }
+
+ private ObjectVisit diff(String objectId)
+ {
+ UIObjectImpl object = (UIObjectImpl)context.getObject(objectId);
+
+ //
+ if (object == null)
+ {
+ StructuralObject structuralObject = structuralStateContext.load(objectId);
+
+ //
+ if (structuralObject == null)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ //
+ return load(structuralObject);
+ }
+ else
+ {
+ return diff(object);
+ }
+ }
+
+ private ObjectVisit diff(UIObjectImpl object)
+ {
+ ObjectTraversalType traversalType = scope.enterObject(object);
+
+ //
+ try
+ {
+ switch (traversalType)
+ {
+ case SKIP:
+ return new ObjectVisit(object, false);
+ case SINGLE:
+ return new ObjectVisit(object, true);
+ case RECURSIVE:
+ StructuralObject.Refresh refresh = structuralStateContext.refresh(object.structuralObject);
+ ChildrenVisit childrenVisit = new ChildrenVisit();
+
+ //
+ for (StructuralObject addedStructuralChild : refresh.getAddedChildren())
+ {
+ ObjectVisit childVisit = load(addedStructuralChild);
+ childrenVisit.addedObjects.add(childVisit);
+ }
+
+ //
+ for (StructuralObject staleStructuralChild : refresh.getStaleChildren().values())
+ {
+ ObjectVisit childVisit = diff(staleStructuralChild.getId());
+ childrenVisit.staleObjects.add(childVisit);
+ }
+
+ //
+ for (String validChildId : refresh.getValidChildren())
+ {
+ ObjectVisit childVisit = diff(validChildId);
+ childrenVisit.validObjects.add(childVisit);
+ }
+
+ //
+ childrenVisit.removedObjects.addAll(refresh.getRemovedChildren());
+
+ //
+ return new ObjectVisit(object, childrenVisit);
+ default:
+ throw new AssertionError();
+ }
+ }
+ finally
+ {
+ scope.leaveObject(object);
+ }
+ }
+
+ private ObjectVisit load(StructuralObject structuralObject)
+ {
+ UIObjectImpl object = UIObjectImpl.create(navigationalStateContext, structuralObject);
+
+ //
+ ObjectTraversalType traversalType = scope.enterObject(object);
+
+ //
+ try
+ {
+ ObjectVisit visit;
+ switch (traversalType)
+ {
+ case SKIP:
+ visit = new ObjectVisit(object, false);
+ break;
+ case SINGLE:
+ visit = new ObjectVisit(object, true);
+ break;
+ case RECURSIVE:
+ ChildrenVisit childrenVisit = new ChildrenVisit();
+ for (StructuralObject structuralChild : structuralStateContext.loadChildren(structuralObject))
+ {
+ ObjectVisit childVisit = load(structuralChild);
+ childrenVisit.addedObjects.add(childVisit);
+ }
+ visit = new ObjectVisit(object, childrenVisit);
+ break;
+ default:
+ throw new AssertionError();
+ }
+
+ //
+ return visit;
+ }
+ finally
+ {
+ scope.leaveObject(object);
+ }
+ }
+}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/CreateUpdatePhase.java (from rev 10628, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/CreateUpdatePhase.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/CreateUpdatePhase.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/CreateUpdatePhase.java 2008-04-18 00:34:17 UTC (rev 10629)
@@ -0,0 +1,300 @@
+/******************************************************************************
+ * 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.impl.model;
+
+import org.jboss.portal.presentation.model.ViewPortContext;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Set;
+import java.util.HashSet;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class CreateUpdatePhase
+{
+
+ /** . */
+ private final ViewPortContext context;
+
+ /** . */
+ private ObjectVisit rootVisit;
+
+ /** . */
+ private ObjectUpdate rootUpdate;
+
+ /** . */
+ private Map<String, ObjectUpdate.AddChild> deferredAddChildUpdates;
+
+ /** . */
+ private Set<String> removedChildren;
+
+ public CreateUpdatePhase(ViewPortContext context, ObjectVisit rootVisit)
+ {
+ this.context = context;
+ this.rootVisit = rootVisit;
+ }
+
+ public ObjectUpdate getRootUpdate()
+ {
+ return rootUpdate;
+ }
+
+ public void perform()
+ {
+ deferredAddChildUpdates = new HashMap<String, ObjectUpdate.AddChild>();
+ removedChildren = new HashSet<String>();
+
+ //
+ rootUpdate = createUpdate(rootVisit);
+
+ //
+ if (deferredAddChildUpdates.size() > 0)
+ {
+ throw new IllegalStateException("Was expecting the deferred update to be empty");
+ }
+ }
+
+ private ObjectUpdate createUpdate(ObjectVisit objectVisit)
+ {
+ UIObjectImpl object = (UIObjectImpl)context.getObject(objectVisit.getObjectId());
+
+ if (objectVisit.getLoaded())
+ {
+ ChildrenVisit childrenVisit = objectVisit.getChildrenVisit();
+
+ //
+ if (object != null)
+ {
+ if (object != objectVisit.getObject())
+ {
+ // The object is stale, we need to update the state maybe
+ }
+ }
+
+ //
+ if (childrenVisit != null)
+ {
+ Map<String, Boolean> childrenStatus = new HashMap<String, Boolean>();
+ List<ObjectUpdate.AddChild> addedChildrenUpdates = new ArrayList<ObjectUpdate.AddChild>();
+ List<ObjectUpdate.RemoveChild> removedChildrenUpdates = new ArrayList<ObjectUpdate.RemoveChild>();
+ List<ObjectUpdate.UpdateObject> updateChildrenUpdates = new ArrayList<ObjectUpdate.UpdateObject>();
+
+ //
+ for (ObjectVisit addedObjectVisit : childrenVisit.getAddedObjects())
+ {
+ ObjectUpdate childUpdate = createUpdate(addedObjectVisit);
+
+ //
+ if (childUpdate instanceof ObjectUpdate.AddObject)
+ {
+ addedChildrenUpdates.add(new ObjectUpdate.AddChild(objectVisit.getObjectId(), (ObjectUpdate.AddObject)childUpdate));
+ childrenStatus.put(addedObjectVisit.getObjectId(), true);
+ }
+ else if (childUpdate == null)
+ {
+ childrenStatus.put(addedObjectVisit.getObjectId(), false);
+ }
+ else if (childUpdate instanceof ObjectUpdate.UpdateObject)
+ {
+ // This is 'the' trick becaue this is likely a 'move' operation that we may need
+ // to handle differently as a deferred add child
+ ObjectUpdate.UpdateObject updateChildUpdate = (ObjectUpdate.UpdateObject)childUpdate;
+
+ //
+ ObjectUpdate.AddObject addObjectUpdate = new ObjectUpdate.AddObject(
+ addedObjectVisit.getObject(),
+ updateChildUpdate.childrenStatus,
+ updateChildUpdate.addedChildrenUpdates,
+ updateChildUpdate.removedChildrenUpdates,
+ updateChildUpdate.updateChildrenUpdates);
+
+ //
+ ObjectUpdate.AddChild addChildUpdate = new ObjectUpdate.AddChild(objectVisit.getObjectId(), addObjectUpdate);
+
+ //
+ if (removedChildren.contains(addedObjectVisit.getObjectId()))
+ {
+ addedChildrenUpdates.add(addChildUpdate);
+ }
+ else
+ {
+ deferredAddChildUpdates.put(addedObjectVisit.getObjectId(), addChildUpdate);
+ }
+
+ //
+ childrenStatus.put(addedObjectVisit.getObjectId(), true);
+ }
+ else
+ {
+ throw new UnsupportedOperationException("Was not expecting update of type " + childUpdate.getClass().getSimpleName());
+ }
+ }
+
+ //
+ for (String removeObjectId : childrenVisit.getRemovedObjects())
+ {
+ UIObjectImpl child = (UIObjectImpl)context.getObject(removeObjectId);
+ removedChildrenUpdates.add(new ObjectUpdate.RemoveChild(objectVisit.getObjectId(), createRemove(child)));
+ }
+
+ List<ObjectVisit> existingObjectVisits = new ArrayList<ObjectVisit>();
+ existingObjectVisits.addAll(childrenVisit.getValidObjects());
+ existingObjectVisits.addAll(childrenVisit.getStaleObjects());
+
+ //
+ for (ObjectVisit validObjectVisit : existingObjectVisits)
+ {
+ ObjectUpdate childUpdate = createUpdate(validObjectVisit);
+
+ //
+ if (childUpdate == null)
+ {
+ childrenStatus.put(validObjectVisit.getObjectId(), false);
+ }
+ else if (childUpdate instanceof ObjectUpdate.UpdateObject)
+ {
+ updateChildrenUpdates.add((ObjectUpdate.UpdateObject)childUpdate);
+ childrenStatus.put(validObjectVisit.getObjectId(), true);
+ }
+ else if (childUpdate instanceof ObjectUpdate.RemoveObject)
+ {
+ removedChildrenUpdates.add(new ObjectUpdate.RemoveChild(objectVisit.getObjectId(), (ObjectUpdate.RemoveObject)childUpdate));
+ childrenStatus.put(validObjectVisit.getObjectId(), false);
+ }
+ else if (childUpdate instanceof ObjectUpdate.AddObject)
+ {
+ addedChildrenUpdates.add(new ObjectUpdate.AddChild(objectVisit.getObjectId(), (ObjectUpdate.AddObject)childUpdate));
+ childrenStatus.put(validObjectVisit.getObjectId(), true);
+ }
+ else
+ {
+ throw new UnsupportedOperationException("Was not expecting update of type " + childUpdate.getClass().getSimpleName());
+ }
+ }
+
+ //
+ for (ObjectUpdate.RemoveChild removeChildUpdate : removedChildrenUpdates)
+ {
+ removedChildren.add(removeChildUpdate.removedObjectUpdate.objectId);
+ }
+
+ //
+ if (object != null)
+ {
+ return new ObjectUpdate.UpdateObject(
+ object.structuralObject,
+ childrenStatus,
+ addedChildrenUpdates,
+ removedChildrenUpdates,
+ updateChildrenUpdates);
+ }
+ else
+ {
+ return new ObjectUpdate.AddObject(
+ objectVisit.getObject(),
+ childrenStatus,
+ addedChildrenUpdates,
+ removedChildrenUpdates,
+ updateChildrenUpdates);
+ }
+ }
+ else
+ {
+ if (object != null)
+ {
+ List<ObjectUpdate.RemoveChild> removedChildrenUpdates = new ArrayList<ObjectUpdate.RemoveChild>();
+
+ //
+ if (object.childRefs != null)
+ {
+ for (UIObjectRef removedChildRef : object.childRefs.values())
+ {
+ if (removedChildRef.loaded)
+ {
+ UIObjectImpl child = (UIObjectImpl)context.getObject(removedChildRef.getId());
+
+ //
+ removedChildrenUpdates.add(new ObjectUpdate.RemoveChild(objectVisit.getObjectId(), createRemove(child)));
+ }
+ }
+ }
+
+ //
+ for (ObjectUpdate.RemoveChild removeChildUpdate : removedChildrenUpdates)
+ {
+ removedChildren.add(removeChildUpdate.removedObjectUpdate.objectId);
+ }
+
+ //
+ return new ObjectUpdate.UpdateObject(object.structuralObject, removedChildrenUpdates);
+ }
+ else
+ {
+ return new ObjectUpdate.AddObject(objectVisit.getObject());
+ }
+ }
+ }
+ else
+ {
+ if (object != null)
+ {
+ return createRemove(object);
+ }
+ else
+ {
+ return null;
+ }
+ }
+ }
+
+ private ObjectUpdate.RemoveObject createRemove(UIObjectImpl object)
+ {
+ List<ObjectUpdate.RemoveObject> removedChildrenUpdates = new ArrayList<ObjectUpdate.RemoveObject>();
+
+ //
+ if (object.childRefs != null)
+ {
+ for (UIObjectRef removedChildRef : object.childRefs.values())
+ {
+ if (removedChildRef.loaded)
+ {
+ UIObjectImpl removedChild = (UIObjectImpl)context.getObject(removedChildRef.getId());
+
+ //
+ removedChildrenUpdates.add(createRemove(removedChild));
+ }
+ }
+ }
+
+ //
+ ObjectUpdate.AddChild addChildUpdate = deferredAddChildUpdates.remove(object.getId());
+
+ //
+ return new ObjectUpdate.RemoveObject(object.getId(), removedChildrenUpdates, addChildUpdate);
+ }
+}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ObjectUpdate.java (from rev 10628, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/ObjectUpdate.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ObjectUpdate.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ObjectUpdate.java 2008-04-18 00:34:17 UTC (rev 10629)
@@ -0,0 +1,358 @@
+/******************************************************************************
+ * 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.impl.model;
+
+import org.jboss.portal.presentation.model.ViewPortContext;
+import org.jboss.portal.presentation.state.structural.StructuralObject;
+
+import java.util.List;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public abstract class ObjectUpdate
+{
+
+ public abstract void execute(ViewPortContext context);
+
+ /**
+ * Not really carrying any state for now... until we really implement it.
+ */
+ public static class UpdateObject extends ObjectUpdate
+ {
+
+ /** . */
+ final StructuralObject structuralObject;
+
+ /** . */
+ final Map<String, Boolean> childrenStatus;
+
+ /** . */
+ final List<AddChild> addedChildrenUpdates;
+
+ /** . */
+ final List<RemoveChild> removedChildrenUpdates;
+
+ /** . */
+ final List<UpdateObject> updateChildrenUpdates;
+
+ public UpdateObject(StructuralObject structuralObject, List<RemoveChild> removeChildrenUpdates)
+ {
+ if (structuralObject == null)
+ {
+ throw new IllegalArgumentException("No null object id accepted");
+ }
+ if (removeChildrenUpdates == null)
+ {
+ throw new IllegalArgumentException("No null removed children accepted");
+ }
+
+ //
+ this.structuralObject = structuralObject;
+ this.childrenStatus = null;
+ this.addedChildrenUpdates = null;
+ this.removedChildrenUpdates = removeChildrenUpdates;
+ this.updateChildrenUpdates = null;
+ }
+
+ public UpdateObject(
+ StructuralObject structuralObject,
+ Map<String, Boolean> childrenStatus,
+ List<AddChild> addedChildrenUpdates,
+ List<RemoveChild> removedChildrenUpdates,
+ List<UpdateObject> updateChildrenUpdates)
+ {
+ if (structuralObject == null)
+ {
+ throw new IllegalArgumentException("No null object id accepted");
+ }
+ if (addedChildrenUpdates == null)
+ {
+ throw new IllegalArgumentException("No null added children accepted");
+ }
+ if (removedChildrenUpdates == null)
+ {
+ throw new IllegalArgumentException("No null removed children accepted");
+ }
+ if (updateChildrenUpdates == null)
+ {
+ throw new IllegalArgumentException("No null update children accepted");
+ }
+
+ //
+ this.structuralObject = structuralObject;
+ this.childrenStatus = childrenStatus;
+ this.addedChildrenUpdates = addedChildrenUpdates;
+ this.removedChildrenUpdates = removedChildrenUpdates;
+ this.updateChildrenUpdates = updateChildrenUpdates;
+ }
+
+ public void execute(ViewPortContext context)
+ {
+ UIObjectImpl object = (UIObjectImpl)context.getObject(structuralObject.getId());
+
+ // Normally should be ok because if we have removed children updates it means
+ // that it was created because the existing object was referencing children
+ for (RemoveChild removedChildUpdate : removedChildrenUpdates)
+ {
+ removedChildUpdate.execute(context);
+ }
+
+ // Perform state update
+ if (object.structuralObject.equals(structuralObject))
+ {
+ object.structuralObject = structuralObject;
+ context.updateObject(structuralObject.getId());
+ }
+
+ //
+ if (childrenStatus != null)
+ {
+ if (object.childRefs == null)
+ {
+ object.childRefs = new HashMap<String, UIObjectRef>();
+ for (Map.Entry<String, Boolean> childRefEntry : childrenStatus.entrySet())
+ {
+ object.childRefs.put(childRefEntry.getKey(), new UIObjectRef(childRefEntry.getKey(), childRefEntry.getValue()));
+ }
+
+ //
+ context.createChildren(structuralObject.getId());
+ }
+
+ //
+ for (AddChild addedChildUpdate : addedChildrenUpdates)
+ {
+ addedChildUpdate.execute(context);
+ }
+
+ //
+ for (UpdateObject updateChildUpdate : updateChildrenUpdates)
+ {
+ updateChildUpdate.execute(context);
+ }
+ }
+ else
+ {
+ if (object.childRefs != null)
+ {
+ context.destroyChildren(structuralObject.getId());
+ }
+ }
+ }
+ }
+
+ public static class AddObject extends ObjectUpdate
+ {
+
+ /** . */
+ private final UIObjectImpl object;
+
+ /** . */
+ private final Map<String, Boolean> childrenStatus;
+
+ /** . */
+ private final List<AddChild> addedChildrenUpdates;
+
+ /** . */
+ private final List<RemoveChild> removedChildrenUpdates;
+
+ /** . */
+ private final List<UpdateObject> updateChildrenUpdates;
+
+ public AddObject(UIObjectImpl object)
+ {
+ if (object == null)
+ {
+ throw new IllegalArgumentException("No null object accepted");
+ }
+
+ //
+ this.object = object;
+ this.childrenStatus = null;
+ this.addedChildrenUpdates = null;
+ this.removedChildrenUpdates = null;
+ this.updateChildrenUpdates = null;
+ }
+
+ public AddObject(
+ UIObjectImpl object,
+ Map<String, Boolean> childrenStatus,
+ List<AddChild> addedChildrenUpdates,
+ List<RemoveChild> removedChildrenUpdates,
+ List<UpdateObject> updateChildrenUpdates)
+ {
+ if (object == null)
+ {
+ throw new IllegalArgumentException("No null object accepted");
+ }
+ if (addedChildrenUpdates == null)
+ {
+ throw new IllegalArgumentException("No null added children accepted");
+ }
+ if (removedChildrenUpdates == null)
+ {
+ throw new IllegalArgumentException("No null removed children accepted");
+ }
+ if (updateChildrenUpdates == null)
+ {
+ throw new IllegalArgumentException("No null update children accepted");
+ }
+
+
+ //
+ this.object = object;
+ this.childrenStatus = childrenStatus;
+ this.addedChildrenUpdates = addedChildrenUpdates;
+ this.removedChildrenUpdates = removedChildrenUpdates;
+ this.updateChildrenUpdates = updateChildrenUpdates;
+ }
+
+ public void execute(ViewPortContext context)
+ {
+ context.addObject(object);
+
+ //
+ if (childrenStatus != null)
+ {
+ object.childRefs = new HashMap<String, UIObjectRef>();
+ for (Map.Entry<String, Boolean> childRefEntry : childrenStatus.entrySet())
+ {
+ object.childRefs.put(childRefEntry.getKey(), new UIObjectRef(childRefEntry.getKey(), childRefEntry.getValue()));
+ }
+
+ //
+ context.createChildren(object.getId());
+
+ //
+ for (AddChild addedChildUpdate : addedChildrenUpdates)
+ {
+ addedChildUpdate.execute(context);
+ }
+
+ //
+ for (RemoveChild removedChildUpdate : removedChildrenUpdates)
+ {
+ removedChildUpdate.execute(context);
+ }
+
+ //
+ for (UpdateObject updateChildUpdate : updateChildrenUpdates)
+ {
+ updateChildUpdate.execute(context);
+ }
+ }
+ }
+ }
+
+ public static class RemoveObject extends ObjectUpdate
+ {
+
+ /** . */
+ final String objectId;
+
+ /** . */
+ private final List<RemoveObject> removedChildrenUpdates;
+
+ /** . */
+ private final AddChild addChildUpdate;
+
+ public RemoveObject(String objectId, List<RemoveObject> removedChildrenUpdates, AddChild addChildUpdate)
+ {
+ this.objectId = objectId;
+ this.removedChildrenUpdates = removedChildrenUpdates;
+ this.addChildUpdate = addChildUpdate;
+ }
+
+ public void execute(ViewPortContext context)
+ {
+ for (RemoveObject removedChildUpdate : removedChildrenUpdates)
+ {
+ context.removeChild(objectId, removedChildUpdate.objectId);
+
+ //
+ removedChildUpdate.execute(context);
+ }
+
+ //
+ context.removeObject(objectId);
+
+ //
+ if (addChildUpdate != null)
+ {
+ addChildUpdate.execute(context);
+ }
+ }
+ }
+
+ public static class AddChild extends ObjectUpdate
+ {
+
+ /** . */
+ private final String parentId;
+
+ /** . */
+ private final AddObject addedObjectUpdate;
+
+ public AddChild(String parentId, AddObject addedObjectUpdate)
+ {
+ this.parentId = parentId;
+ this.addedObjectUpdate = addedObjectUpdate;
+ }
+
+ public void execute(ViewPortContext context)
+ {
+ addedObjectUpdate.execute(context);
+
+ //
+ context.addChild(parentId, addedObjectUpdate.object.getId());
+ }
+ }
+
+ public static class RemoveChild extends ObjectUpdate
+ {
+
+ /** . */
+ private final String parentId;
+
+ /** . */
+ final RemoveObject removedObjectUpdate;
+
+ public RemoveChild(String parentId, RemoveObject removedObjectUpdate)
+ {
+ this.parentId = parentId;
+ this.removedObjectUpdate = removedObjectUpdate;
+ }
+
+ public void execute(ViewPortContext context)
+ {
+ context.removeChild(parentId, removedObjectUpdate.objectId);
+
+ //
+ removedObjectUpdate.execute(context);
+ }
+ }
+}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ObjectVisit.java (from rev 10627, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/ObjectVisit.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ObjectVisit.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ObjectVisit.java 2008-04-18 00:34:17 UTC (rev 10629)
@@ -0,0 +1,74 @@
+/******************************************************************************
+ * 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.impl.model;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class ObjectVisit
+{
+
+ /** . */
+ private final UIObjectImpl object;
+
+ /** . */
+ private final boolean loaded;
+
+ /** . */
+ private final ChildrenVisit children;
+
+ ObjectVisit(UIObjectImpl object, ChildrenVisit children)
+ {
+ this.object = object;
+ this.loaded = true;
+ this.children = children;
+ }
+
+ ObjectVisit(UIObjectImpl object, boolean loaded)
+ {
+ this.object = object;
+ this.loaded = loaded;
+ this.children = null;
+ }
+
+ public String getObjectId()
+ {
+ return object.getId();
+ }
+
+ public UIObjectImpl getObject()
+ {
+ return object;
+ }
+
+ public boolean getLoaded()
+ {
+ return loaded;
+ }
+
+ public ChildrenVisit getChildrenVisit()
+ {
+ return children;
+ }
+}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIModelImpl.java (from rev 10628, 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/model/UIModelImpl.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIModelImpl.java 2008-04-18 00:34:17 UTC (rev 10629)
@@ -0,0 +1,70 @@
+/******************************************************************************
+ * 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.impl.model;
+
+import org.jboss.portal.presentation.state.structural.StructuralStateContext;
+import org.jboss.portal.presentation.state.navigational.NavigationalStateContext;
+import org.jboss.portal.presentation.model.UIModel;
+import org.jboss.portal.presentation.model.ViewPort;
+import org.jboss.portal.presentation.model.ViewPortContext;
+import org.jboss.portal.presentation.model.ViewPortScope;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class UIModelImpl implements UIModel
+{
+
+ /** . */
+ final NavigationalStateContext navigationalStateContext;
+
+ /** . */
+ final StructuralStateContext structuralStateContext;
+
+ public UIModelImpl(NavigationalStateContext navigationalStateContext, StructuralStateContext structuralStateContext)
+ {
+ this.navigationalStateContext = navigationalStateContext;
+ this.structuralStateContext = structuralStateContext;
+ }
+
+ public NavigationalStateContext getNavigationalStateContext()
+ {
+ return navigationalStateContext;
+ }
+
+ public StructuralStateContext getStructuralStateContext()
+ {
+ return structuralStateContext;
+ }
+
+ public String getRootId()
+ {
+ return structuralStateContext.getRootId();
+ }
+
+ public ViewPort createViewPort(ViewPortContext context, ViewPortScope scope)
+ {
+ return new ViewPortImpl(this, context, scope);
+ }
+}
\ No newline at end of file
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIObjectImpl.java (from rev 10628, 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/model/UIObjectImpl.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIObjectImpl.java 2008-04-18 00:34:17 UTC (rev 10629)
@@ -0,0 +1,148 @@
+/******************************************************************************
+ * 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.impl.model;
+
+import org.jboss.portal.presentation.model.UIObject;
+import org.jboss.portal.presentation.model.ui.UIContext;
+import org.jboss.portal.presentation.model.ui.UIPage;
+import org.jboss.portal.presentation.model.ui.UIWindow;
+import org.jboss.portal.presentation.state.StateException;
+import org.jboss.portal.presentation.state.StateType;
+import org.jboss.portal.presentation.state.navigational.NavigationalStateContext;
+import org.jboss.portal.presentation.state.structural.StructuralObject;
+import org.jboss.portal.presentation.impl.model.ui.UIContextImpl;
+import org.jboss.portal.presentation.impl.model.ui.UIPageImpl;
+import org.jboss.portal.presentation.impl.model.ui.UIWindowImpl;
+import org.jboss.portal.common.reflect.Reflection;
+import org.jboss.portal.common.NotYetImplemented;
+
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public abstract class UIObjectImpl implements UIObject
+{
+
+ /** . */
+ private final NavigationalStateContext navigationalStateContext;
+
+ /** . */
+ StructuralObject structuralObject;
+
+ /** We keep track of what was loaded by the scope. */
+ Map<String, UIObjectRef> childRefs;
+
+ public static UIObjectImpl create(NavigationalStateContext navigationalStateContext, StructuralObject structuralObject)
+ {
+ UIObjectImpl object;
+
+ //
+ Class type = structuralObject.getState().getType();
+
+ //
+ if (type == UIWindow.class)
+ {
+ object = new UIWindowImpl(navigationalStateContext, structuralObject);
+ }
+ else if (type == UIPage.class)
+ {
+ object = new UIPageImpl(navigationalStateContext, structuralObject);
+ }
+ else if (type == UIContext.class)
+ {
+ object = new UIContextImpl(navigationalStateContext, structuralObject);
+ }
+ else
+ {
+ throw new NotYetImplemented();
+ }
+
+ //
+ return object;
+ }
+
+ public UIObjectImpl(NavigationalStateContext navigationalStateContext, StructuralObject structuralObject)
+ {
+ this.navigationalStateContext = navigationalStateContext;
+ this.structuralObject = structuralObject;
+ }
+
+ public String getId()
+ {
+ return structuralObject.getId();
+ }
+
+ public String getName()
+ {
+ return structuralObject.getState().getName();
+ }
+
+ public <T> T getProperty(StateType stateType, String propertyName, Class<T> propertyType) throws IllegalArgumentException, StateException
+ {
+ if (stateType == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ if (propertyName == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ if (propertyType == null)
+ {
+ throw new IllegalArgumentException();
+ }
+
+ //
+ switch (stateType)
+ {
+ case STRUCTURAL:
+ return Reflection.safeCast(structuralObject.getState().getProperties().get(propertyName), propertyType);
+ case NAVIGATIONAL:
+ return Reflection.safeCast(navigationalStateContext.getProperty(structuralObject.getId(), propertyName), propertyType);
+ default:
+ throw new AssertionError();
+ }
+ }
+
+ public Set<String> getPropertyNames(StateType stateType)
+ {
+ if (stateType == null)
+ {
+ throw new IllegalArgumentException();
+ }
+
+ //
+ switch (stateType)
+ {
+ case STRUCTURAL:
+ return structuralObject.getState().getProperties().keySet();
+ case NAVIGATIONAL:
+ return navigationalStateContext.getPropertyNames(structuralObject.getId());
+ default:
+ throw new AssertionError();
+ }
+ }
+}
\ No newline at end of file
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIObjectRef.java (from rev 10627, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/UIObjectRef.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIObjectRef.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/UIObjectRef.java 2008-04-18 00:34:17 UTC (rev 10629)
@@ -0,0 +1,48 @@
+/******************************************************************************
+ * 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.impl.model;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class UIObjectRef
+{
+
+ /** The child id. */
+ final String id;
+
+ /** Whether or not the child is loaded. */
+ public boolean loaded;
+
+ public UIObjectRef(String id, boolean loaded)
+ {
+ this.id = id;
+ this.loaded = loaded;
+ }
+
+ public String getId()
+ {
+ return id;
+ }
+}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ViewPortImpl.java (from rev 10628, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/ViewPortImpl.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ViewPortImpl.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ViewPortImpl.java 2008-04-18 00:34:17 UTC (rev 10629)
@@ -0,0 +1,84 @@
+/******************************************************************************
+ * 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.impl.model;
+
+import org.jboss.portal.presentation.model.ViewPort;
+import org.jboss.portal.presentation.model.ViewPortContext;
+import org.jboss.portal.presentation.model.ViewPortScope;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class ViewPortImpl implements ViewPort
+{
+
+ /** . */
+ final UIModelImpl model;
+
+ /** . */
+ final ViewPortContext context;
+
+ /** . */
+ final ViewPortScope scope;
+
+ public ViewPortImpl(UIModelImpl model, ViewPortContext context, ViewPortScope scope)
+ {
+ this.model = model;
+ this.context = context;
+ this.scope = scope;
+ }
+
+ public void refresh()
+ {
+ CreateDiffPhase createDiffPhase = new CreateDiffPhase(context, scope, model.navigationalStateContext, model.structuralStateContext);
+
+ //
+ createDiffPhase.perform();
+
+ //
+ ObjectVisit rootVisit = createDiffPhase.getRootVisit();
+
+ //
+ CreateUpdatePhase createUpdatePhase = new CreateUpdatePhase(context, rootVisit);
+
+ //
+ createUpdatePhase.perform();
+
+ //
+ ObjectUpdate rootUpdate = createUpdatePhase.getRootUpdate();
+
+ //
+ rootUpdate.execute(context);
+ }
+
+ public ViewPortContext getContext()
+ {
+ return context;
+ }
+
+ public ViewPortScope getScope()
+ {
+ return scope;
+ }
+}
\ No newline at end of file
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ui (from rev 10627, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/ui)
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ui/UIContextImpl.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/ui/UIContextImpl.java 2008-04-17 21:52:02 UTC (rev 10627)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ui/UIContextImpl.java 2008-04-18 00:34:17 UTC (rev 10629)
@@ -1,40 +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.impl.model2.ui;
-
-import org.jboss.portal.presentation.model2.ui.UIContext;
-import org.jboss.portal.presentation.state.structural.StructuralObject;
-import org.jboss.portal.presentation.state.navigational.NavigationalStateContext;
-import org.jboss.portal.presentation.impl.model2.UIObjectImpl;
-
-/**
- * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public class UIContextImpl extends UIObjectImpl implements UIContext
-{
- public UIContextImpl(NavigationalStateContext navigationalStateContext, StructuralObject structuralObject)
- {
- super(navigationalStateContext, structuralObject);
- }
-}
\ No newline at end of file
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ui/UIContextImpl.java (from rev 10628, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/ui/UIContextImpl.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ui/UIContextImpl.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ui/UIContextImpl.java 2008-04-18 00:34:17 UTC (rev 10629)
@@ -0,0 +1,40 @@
+/******************************************************************************
+ * 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.impl.model.ui;
+
+import org.jboss.portal.presentation.model.ui.UIContext;
+import org.jboss.portal.presentation.state.structural.StructuralObject;
+import org.jboss.portal.presentation.state.navigational.NavigationalStateContext;
+import org.jboss.portal.presentation.impl.model.UIObjectImpl;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class UIContextImpl extends UIObjectImpl implements UIContext
+{
+ public UIContextImpl(NavigationalStateContext navigationalStateContext, StructuralObject structuralObject)
+ {
+ super(navigationalStateContext, structuralObject);
+ }
+}
\ No newline at end of file
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ui/UIPageImpl.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/ui/UIPageImpl.java 2008-04-17 21:52:02 UTC (rev 10627)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ui/UIPageImpl.java 2008-04-18 00:34:17 UTC (rev 10629)
@@ -1,40 +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.impl.model2.ui;
-
-import org.jboss.portal.presentation.model2.ui.UIPage;
-import org.jboss.portal.presentation.state.structural.StructuralObject;
-import org.jboss.portal.presentation.state.navigational.NavigationalStateContext;
-import org.jboss.portal.presentation.impl.model2.UIObjectImpl;
-
-/**
- * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public class UIPageImpl extends UIObjectImpl implements UIPage
-{
- public UIPageImpl(NavigationalStateContext navigationalStateContext, StructuralObject structuralObject)
- {
- super(navigationalStateContext, structuralObject);
- }
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ui/UIPageImpl.java (from rev 10628, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/ui/UIPageImpl.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ui/UIPageImpl.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ui/UIPageImpl.java 2008-04-18 00:34:17 UTC (rev 10629)
@@ -0,0 +1,40 @@
+/******************************************************************************
+ * 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.impl.model.ui;
+
+import org.jboss.portal.presentation.model.ui.UIPage;
+import org.jboss.portal.presentation.state.structural.StructuralObject;
+import org.jboss.portal.presentation.state.navigational.NavigationalStateContext;
+import org.jboss.portal.presentation.impl.model.UIObjectImpl;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class UIPageImpl extends UIObjectImpl implements UIPage
+{
+ public UIPageImpl(NavigationalStateContext navigationalStateContext, StructuralObject structuralObject)
+ {
+ super(navigationalStateContext, structuralObject);
+ }
+}
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ui/UIWindowImpl.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/ui/UIWindowImpl.java 2008-04-17 21:52:02 UTC (rev 10627)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ui/UIWindowImpl.java 2008-04-18 00:34:17 UTC (rev 10629)
@@ -1,54 +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.impl.model2.ui;
-
-import org.jboss.portal.presentation.model2.ui.UIWindow;
-import org.jboss.portal.presentation.state.structural.StructuralObject;
-import org.jboss.portal.presentation.state.StateType;
-import org.jboss.portal.presentation.state.navigational.NavigationalStateContext;
-import org.jboss.portal.presentation.impl.model2.UIObjectImpl;
-import org.jboss.portal.WindowState;
-import org.jboss.portal.Mode;
-
-/**
- * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public class UIWindowImpl extends UIObjectImpl implements UIWindow
-{
-
- public UIWindowImpl(NavigationalStateContext navigationalStateContext, StructuralObject structuralObject)
- {
- super(navigationalStateContext, structuralObject);
- }
-
- public WindowState getWindowState()
- {
- return getProperty(StateType.NAVIGATIONAL, "windowstate", WindowState.class);
- }
-
- public Mode getMode()
- {
- return getProperty(StateType.NAVIGATIONAL, "mode", Mode.class);
- }
-}
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ui/UIWindowImpl.java (from rev 10628, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model2/ui/UIWindowImpl.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ui/UIWindowImpl.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model/ui/UIWindowImpl.java 2008-04-18 00:34:17 UTC (rev 10629)
@@ -0,0 +1,54 @@
+/******************************************************************************
+ * 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.impl.model.ui;
+
+import org.jboss.portal.presentation.model.ui.UIWindow;
+import org.jboss.portal.presentation.state.structural.StructuralObject;
+import org.jboss.portal.presentation.state.StateType;
+import org.jboss.portal.presentation.state.navigational.NavigationalStateContext;
+import org.jboss.portal.presentation.impl.model.UIObjectImpl;
+import org.jboss.portal.WindowState;
+import org.jboss.portal.Mode;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class UIWindowImpl extends UIObjectImpl implements UIWindow
+{
+
+ public UIWindowImpl(NavigationalStateContext navigationalStateContext, StructuralObject structuralObject)
+ {
+ super(navigationalStateContext, structuralObject);
+ }
+
+ public WindowState getWindowState()
+ {
+ return getProperty(StateType.NAVIGATIONAL, "windowstate", WindowState.class);
+ }
+
+ public Mode getMode()
+ {
+ return getProperty(StateType.NAVIGATIONAL, "mode", Mode.class);
+ }
+}
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-18 00:31:55 UTC (rev 10628)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/AbstractModelTestCase.java 2008-04-18 00:34:17 UTC (rev 10629)
@@ -27,7 +27,8 @@
import org.jboss.portal.presentation.test.model.state.structural.MockModelImpl;
import org.jboss.portal.presentation.impl.state.navigational.NavigationalStateContextImpl;
import org.jboss.portal.presentation.state.structural.StructuralStateContext;
-import org.jboss.portal.presentation.impl.model2.UIModelImpl;
+import org.jboss.portal.presentation.impl.model.UIModelImpl;
+
import junit.framework.TestCase;
/**
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-18 00:31:55 UTC (rev 10628)
+++ modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/model3/TraversalModelTestCase.java 2008-04-18 00:34:17 UTC (rev 10629)
@@ -28,7 +28,7 @@
import org.jboss.portal.presentation.test.model.state.structural.MockModelImpl;
import org.jboss.portal.presentation.impl.state.navigational.NavigationalStateContextImpl;
import org.jboss.portal.presentation.state.structural.StructuralStateContext;
-import org.jboss.portal.presentation.impl.model2.UIModelImpl;
+import org.jboss.portal.presentation.impl.model.UIModelImpl;
import java.util.Collection;
import java.util.Collections;
18 years