portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r725977 [17/48] - in /portals/jetspeed-2/portal/trunk: ./ app-servers/security/jboss/src/java/META-INF/jboss-secsvc/ app-servers/security/jboss/src/java/org/apache/jetspeed/appservers/security/jboss/ applications/jetspeed/src/main/javascrip...
Date Fri, 12 Dec 2008 12:07:04 GMT
Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/ajax-xml/userinfo.vm
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/ajax-xml/userlist.vm
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/ajax-xml/window.vm
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/ajax-xml/window.vm?rev=725977&r1=725976&r2=725977&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/ajax-xml/window.vm (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/ajax-xml/window.vm Fri Dec 12 04:06:29 2008
@@ -15,15 +15,15 @@
   limitations under the License.
 *#
 <js>
-    <status>$status</status>
-    <action>$action</action>
-    <id>$id</id> 
-#if ($state)    
-    <old_state>$!oldState</old_state>
-    <new_state>$state</new_state>
-#end
-#if ($mode)    
-    <old_mode>$!oldMode</old_mode>
-    <new_mode>$mode</new_mode>
-#end   
+    <status>$status</status>
+    <action>$action</action>
+    <id>$id</id> 
+#if ($state)    
+    <old_state>$!oldState</old_state>
+    <new_state>$state</new_state>
+#end
+#if ($mode)    
+    <old_mode>$!oldMode</old_mode>
+    <new_mode>$mode</new_mode>
+#end   
 </js>
\ No newline at end of file

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/ajax-xml/window.vm
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/ajax-xml/xmove.vm
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/ajax-xml/xmove.vm?rev=725977&r1=725976&r2=725977&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/ajax-xml/xmove.vm (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/ajax-xml/xmove.vm Fri Dec 12 04:06:29 2008
@@ -15,41 +15,41 @@
   limitations under the License.
 *#
 <js>
-    <status>$status</status>
-    <action>$action</action>
-    <id>$id</id> 
-    <old_position>
-#if ($oldx)        
-        <x>$oldx</x>
-#end
-#if ($oldy)        
-        <y>$oldy</y>
-#end        
-#if ($oldz)        
-        <y>$oldz</y>
-#end        
-#if ($oldwidth)        
-        <width>$oldwidth</width>
-#end        
-#if ($oldheight)        
-        <height>$oldheight</height>
-#end        
-    </old_position>    
-    <new_position>
-#if ($x)        
-        <x>$x</x>
-#end
-#if ($y)        
-        <y>$y</y>
-#end        
-#if ($z)        
-        <y>$z</y>
-#end        
-#if ($width)        
-        <width>$width</width>
-#end        
-#if ($height)        
-        <height>$height</height>
-#end            
-    </new_position>
+    <status>$status</status>
+    <action>$action</action>
+    <id>$id</id> 
+    <old_position>
+#if ($oldx)        
+        <x>$oldx</x>
+#end
+#if ($oldy)        
+        <y>$oldy</y>
+#end        
+#if ($oldz)        
+        <y>$oldz</y>
+#end        
+#if ($oldwidth)        
+        <width>$oldwidth</width>
+#end        
+#if ($oldheight)        
+        <height>$oldheight</height>
+#end        
+    </old_position>    
+    <new_position>
+#if ($x)        
+        <x>$x</x>
+#end
+#if ($y)        
+        <y>$y</y>
+#end        
+#if ($z)        
+        <y>$z</y>
+#end        
+#if ($width)        
+        <width>$width</width>
+#end        
+#if ($height)        
+        <height>$height</height>
+#end            
+    </new_position>
 </js>
\ No newline at end of file

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/ajax-xml/xmove.vm
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/AddPortletAction.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/BaseGetResourceAction.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/BaseGetResourceAction.java?rev=725977&r1=725976&r2=725977&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/BaseGetResourceAction.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/BaseGetResourceAction.java Fri Dec 12 04:06:29 2008
@@ -1,72 +1,72 @@
-/*
+/*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jetspeed.layout.impl;
-
-import java.util.Map;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.jetspeed.ajax.AjaxAction;
-import org.apache.jetspeed.ajax.AjaxBuilder;
-import org.apache.jetspeed.layout.PortletActionSecurityBehavior;
-import org.apache.jetspeed.om.common.SecuredResource;
-import org.apache.jetspeed.page.PageManager;
-
-/**
- * Abstract Get Resource aaction for folders, pages and links
- *
- * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
- * @version $Id: $
- */
-public abstract class BaseGetResourceAction
-    extends BasePortletAction 
-    implements AjaxAction, AjaxBuilder, Constants 
-{
-    protected static final Log log = LogFactory.getLog(BaseSiteUpdateAction.class);    
-    
-    public BaseGetResourceAction(String template, 
-            String errorTemplate, 
-            PageManager pageManager)
-    {
-        super(template, errorTemplate, pageManager);
-    }
-    
-    public BaseGetResourceAction(String template, 
-                             String errorTemplate, 
-                             PortletActionSecurityBehavior securityBehavior)
-    {
-        super(template, errorTemplate, securityBehavior);
-    }
-
-    public BaseGetResourceAction(String template, 
-                             String errorTemplate, 
-                             PageManager pageManager,
-                             PortletActionSecurityBehavior securityBehavior)
-    {
-        super(template, errorTemplate, pageManager, securityBehavior);        
-    }
-
-    protected void putSecurityInformation(Map resultMap, SecuredResource resource)
-    {
-        if (resource.getSecurityConstraints() != null)
-        {
-            resultMap.put(SECURITY_REFS, resource.getSecurityConstraints().getSecurityConstraintsRefs());
-            resultMap.put(SECURITY_DEFS, resource.getSecurityConstraints().getSecurityConstraints());
-            resultMap.put(SECURITY_OWNER, resource.getSecurityConstraints().getOwner());
-        }
-    }
-}
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.layout.impl;
+
+import java.util.Map;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.jetspeed.ajax.AjaxAction;
+import org.apache.jetspeed.ajax.AjaxBuilder;
+import org.apache.jetspeed.layout.PortletActionSecurityBehavior;
+import org.apache.jetspeed.om.common.SecuredResource;
+import org.apache.jetspeed.page.PageManager;
+
+/**
+ * Abstract Get Resource aaction for folders, pages and links
+ *
+ * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
+ * @version $Id: $
+ */
+public abstract class BaseGetResourceAction
+    extends BasePortletAction 
+    implements AjaxAction, AjaxBuilder, Constants 
+{
+    protected static final Log log = LogFactory.getLog(BaseSiteUpdateAction.class);    
+    
+    public BaseGetResourceAction(String template, 
+            String errorTemplate, 
+            PageManager pageManager)
+    {
+        super(template, errorTemplate, pageManager);
+    }
+    
+    public BaseGetResourceAction(String template, 
+                             String errorTemplate, 
+                             PortletActionSecurityBehavior securityBehavior)
+    {
+        super(template, errorTemplate, securityBehavior);
+    }
+
+    public BaseGetResourceAction(String template, 
+                             String errorTemplate, 
+                             PageManager pageManager,
+                             PortletActionSecurityBehavior securityBehavior)
+    {
+        super(template, errorTemplate, pageManager, securityBehavior);        
+    }
+
+    protected void putSecurityInformation(Map resultMap, SecuredResource resource)
+    {
+        if (resource.getSecurityConstraints() != null)
+        {
+            resultMap.put(SECURITY_REFS, resource.getSecurityConstraints().getSecurityConstraintsRefs());
+            resultMap.put(SECURITY_DEFS, resource.getSecurityConstraints().getSecurityConstraints());
+            resultMap.put(SECURITY_OWNER, resource.getSecurityConstraints().getOwner());
+        }
+    }
+}

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/BaseGetResourceAction.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/BasePortletAction.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/BasePortletAction.java?rev=725977&r1=725976&r2=725977&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/BasePortletAction.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/BasePortletAction.java Fri Dec 12 04:06:29 2008
@@ -1,191 +1,191 @@
-/*
+/*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jetspeed.layout.impl;
-
-import java.util.Iterator;
-import java.util.Map;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.jetspeed.ajax.AJAXException;
-import org.apache.jetspeed.ajax.AjaxAction;
-import org.apache.jetspeed.ajax.AjaxBuilder;
-import org.apache.jetspeed.layout.PortletActionSecurityBehavior;
-import org.apache.jetspeed.om.page.Fragment;
-import org.apache.jetspeed.om.page.Page;
-import org.apache.jetspeed.page.PageManager;
-import org.apache.jetspeed.request.RequestContext;
-
-/**
- * Abstract portlet placement action
- *
- * @author <a>David Gurney</a>
- * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
- * @version $Id: $
- */
-public abstract class BasePortletAction 
-    implements AjaxAction, AjaxBuilder, Constants 
-{
-    protected static final Log log = LogFactory.getLog(BasePortletAction.class);    
-	protected String template = null;
-    protected PageManager pageManager = null;
-    protected String errorTemplate = null;
-    protected PortletActionSecurityBehavior securityBehavior;
-    
-    public BasePortletAction(String template, 
-                             String errorTemplate, 
-                             PortletActionSecurityBehavior securityBehavior)
-    {
-        this.template = template;
-        this.errorTemplate = errorTemplate;
-        this.securityBehavior = securityBehavior;
-    }
-
-    public BasePortletAction(String template, 
-            String errorTemplate, 
-            PageManager pageManager)
-    {
-        this.template = template;
-        this.errorTemplate = errorTemplate;
-        this.pageManager = pageManager;
-        this.securityBehavior = null;
-    }
-    
-    public BasePortletAction(String template, 
-                             String errorTemplate, 
-                             PageManager pageManager,
-                             PortletActionSecurityBehavior securityBehavior)
-    {
-        this(template, errorTemplate, securityBehavior);
-        this.pageManager = pageManager;
-    }
-
-    public boolean buildContext(RequestContext requestContext, Map responseContext)
-    {
-        return true;
-    }
-
-    public boolean buildErrorContext(RequestContext requestContext,
-            Map responseContext) 
-    {
-        responseContext.put(STATUS, "failure");
-
-        // Check for the case where we don't know basic information
-        if (responseContext.get(ACTION) == null)
-        {
-            responseContext.put(ACTION, "unknown");
-        }
-
-        if (responseContext.get(PORTLETID) == null)
-        {
-            responseContext.put(PORTLETID, "unknown");
-        }
-
-        return true;
-    }
-
-    public String getErrorTemplate()
-    {
-        return errorTemplate;
-    }
-
-    public String getTemplate()
-    {
-        return template;
-    }
-
-    public boolean checkAccess(RequestContext context, String action)
-    {
-        boolean access = true;
-        if (null != securityBehavior)
-        {
-            access = securityBehavior.checkAccess(context, action);
-        }
-        return access;
-    }
-    
-    public boolean isCreateNewPageOnEditEnabled()
-    {
-    	if (securityBehavior == null)
-            return false;
-    	return securityBehavior.isCreateNewPageOnEditEnabled();
-    }
-    public boolean isPageQualifiedForCreateNewPageOnEdit(RequestContext context)
-    {
-    	if (securityBehavior == null)
-            return false;
-    	return securityBehavior.isPageQualifiedForCreateNewPageOnEdit(context);
-    }
-    public boolean createNewPageOnEdit(RequestContext context)
-    {
-        if (securityBehavior == null)
-            return false;
-        
-        return securityBehavior.createNewPageOnEdit(context);        
-    }
-    
-    public Fragment getFragmentIdFromLocation( int row, int column, Page page )
-    {
-    	return getFragmentIdFromLocation( row, column, page.getRootFragment() );
-    }
-    public Fragment getFragmentIdFromLocation( int row, int column, Fragment parentFragment )
-    {
-        Iterator fragments = parentFragment.getFragments().iterator();
-        while ( fragments.hasNext() )
-        {
-            Fragment fragment = (Fragment)fragments.next();
-            if ( fragment.getLayoutColumn() == column && fragment.getLayoutRow() == row )
-            {
-                return fragment;
-            }
-        }
-        return null;
-    }
-    
-    public boolean runBatch(RequestContext requestContext, Map resultMap) throws AJAXException
-    {
-        return run(requestContext, resultMap);
-    }
-    
-    public String getActionParameter(RequestContext requestContext, String name)
-    {
-        String parameter = requestContext.getRequestParameter(name);
-        if (parameter == null)
-        {
-            Object o = requestContext.getAttribute(name);
-            if (o != null)
-            {
-                if (o instanceof String)
-                    return (String)o;
-            }
-        }
-        return parameter;
-    }
-    
-    public String getNonNullActionParameter(RequestContext requestContext, String name)
-    {
-        String result = getActionParameter(requestContext, name);
-        if (result == null)
-            return "";
-        return result;
-    }
-    
-    public Fragment getParentFragmentById(String id, Fragment root)
-    {
-    	return NestedFragmentContext.getParentFragmentById( id, root );
-    }    
-}
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.layout.impl;
+
+import java.util.Iterator;
+import java.util.Map;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.jetspeed.ajax.AJAXException;
+import org.apache.jetspeed.ajax.AjaxAction;
+import org.apache.jetspeed.ajax.AjaxBuilder;
+import org.apache.jetspeed.layout.PortletActionSecurityBehavior;
+import org.apache.jetspeed.om.page.Fragment;
+import org.apache.jetspeed.om.page.Page;
+import org.apache.jetspeed.page.PageManager;
+import org.apache.jetspeed.request.RequestContext;
+
+/**
+ * Abstract portlet placement action
+ *
+ * @author <a>David Gurney</a>
+ * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
+ * @version $Id: $
+ */
+public abstract class BasePortletAction 
+    implements AjaxAction, AjaxBuilder, Constants 
+{
+    protected static final Log log = LogFactory.getLog(BasePortletAction.class);    
+	protected String template = null;
+    protected PageManager pageManager = null;
+    protected String errorTemplate = null;
+    protected PortletActionSecurityBehavior securityBehavior;
+    
+    public BasePortletAction(String template, 
+                             String errorTemplate, 
+                             PortletActionSecurityBehavior securityBehavior)
+    {
+        this.template = template;
+        this.errorTemplate = errorTemplate;
+        this.securityBehavior = securityBehavior;
+    }
+
+    public BasePortletAction(String template, 
+            String errorTemplate, 
+            PageManager pageManager)
+    {
+        this.template = template;
+        this.errorTemplate = errorTemplate;
+        this.pageManager = pageManager;
+        this.securityBehavior = null;
+    }
+    
+    public BasePortletAction(String template, 
+                             String errorTemplate, 
+                             PageManager pageManager,
+                             PortletActionSecurityBehavior securityBehavior)
+    {
+        this(template, errorTemplate, securityBehavior);
+        this.pageManager = pageManager;
+    }
+
+    public boolean buildContext(RequestContext requestContext, Map responseContext)
+    {
+        return true;
+    }
+
+    public boolean buildErrorContext(RequestContext requestContext,
+            Map responseContext) 
+    {
+        responseContext.put(STATUS, "failure");
+
+        // Check for the case where we don't know basic information
+        if (responseContext.get(ACTION) == null)
+        {
+            responseContext.put(ACTION, "unknown");
+        }
+
+        if (responseContext.get(PORTLETID) == null)
+        {
+            responseContext.put(PORTLETID, "unknown");
+        }
+
+        return true;
+    }
+
+    public String getErrorTemplate()
+    {
+        return errorTemplate;
+    }
+
+    public String getTemplate()
+    {
+        return template;
+    }
+
+    public boolean checkAccess(RequestContext context, String action)
+    {
+        boolean access = true;
+        if (null != securityBehavior)
+        {
+            access = securityBehavior.checkAccess(context, action);
+        }
+        return access;
+    }
+    
+    public boolean isCreateNewPageOnEditEnabled()
+    {
+    	if (securityBehavior == null)
+            return false;
+    	return securityBehavior.isCreateNewPageOnEditEnabled();
+    }
+    public boolean isPageQualifiedForCreateNewPageOnEdit(RequestContext context)
+    {
+    	if (securityBehavior == null)
+            return false;
+    	return securityBehavior.isPageQualifiedForCreateNewPageOnEdit(context);
+    }
+    public boolean createNewPageOnEdit(RequestContext context)
+    {
+        if (securityBehavior == null)
+            return false;
+        
+        return securityBehavior.createNewPageOnEdit(context);        
+    }
+    
+    public Fragment getFragmentIdFromLocation( int row, int column, Page page )
+    {
+    	return getFragmentIdFromLocation( row, column, page.getRootFragment() );
+    }
+    public Fragment getFragmentIdFromLocation( int row, int column, Fragment parentFragment )
+    {
+        Iterator fragments = parentFragment.getFragments().iterator();
+        while ( fragments.hasNext() )
+        {
+            Fragment fragment = (Fragment)fragments.next();
+            if ( fragment.getLayoutColumn() == column && fragment.getLayoutRow() == row )
+            {
+                return fragment;
+            }
+        }
+        return null;
+    }
+    
+    public boolean runBatch(RequestContext requestContext, Map resultMap) throws AJAXException
+    {
+        return run(requestContext, resultMap);
+    }
+    
+    public String getActionParameter(RequestContext requestContext, String name)
+    {
+        String parameter = requestContext.getRequestParameter(name);
+        if (parameter == null)
+        {
+            Object o = requestContext.getAttribute(name);
+            if (o != null)
+            {
+                if (o instanceof String)
+                    return (String)o;
+            }
+        }
+        return parameter;
+    }
+    
+    public String getNonNullActionParameter(RequestContext requestContext, String name)
+    {
+        String result = getActionParameter(requestContext, name);
+        if (result == null)
+            return "";
+        return result;
+    }
+    
+    public Fragment getParentFragmentById(String id, Fragment root)
+    {
+    	return NestedFragmentContext.getParentFragmentById( id, root );
+    }    
+}

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/BasePortletAction.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/BaseSiteUpdateAction.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/BaseSiteUpdateAction.java?rev=725977&r1=725976&r2=725977&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/BaseSiteUpdateAction.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/BaseSiteUpdateAction.java Fri Dec 12 04:06:29 2008
@@ -1,324 +1,324 @@
-/*
+/*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jetspeed.layout.impl;
-
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.jetspeed.ajax.AJAXException;
-import org.apache.jetspeed.ajax.AjaxAction;
-import org.apache.jetspeed.ajax.AjaxBuilder;
-import org.apache.jetspeed.layout.PortletActionSecurityBehavior;
-import org.apache.jetspeed.om.common.SecurityConstraints;
-import org.apache.jetspeed.om.portlet.LocalizedField;
-import org.apache.jetspeed.page.PageManager;
-import org.apache.jetspeed.page.document.Node;
-import org.apache.jetspeed.request.RequestContext;
-
-/**
- * Abstract Site update action for folders, pages and links
- *
- * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
- * @version $Id: $
- */
-public abstract class BaseSiteUpdateAction
-    extends BasePortletAction
-    implements AjaxAction, AjaxBuilder, Constants 
-{
-    protected static final Log log = LogFactory.getLog(BaseSiteUpdateAction.class);    
-    
-    public BaseSiteUpdateAction(String template, 
-            String errorTemplate, 
-            PageManager pageManager)
-    {
-        super(template, errorTemplate, pageManager);
-    }
-    
-    public BaseSiteUpdateAction(String template, 
-                             String errorTemplate, 
-                             PortletActionSecurityBehavior securityBehavior)
-    {
-        super(template, errorTemplate, securityBehavior);
-    }
-
-    public BaseSiteUpdateAction(String template, 
-                             String errorTemplate, 
-                             PageManager pageManager,
-                             PortletActionSecurityBehavior securityBehavior)
-    {
-        super(template, errorTemplate, pageManager, securityBehavior);        
-    }
-
-    protected abstract int updateInformation(RequestContext requestContext, Map resultMap, Node node, String path)
-    throws AJAXException;
-    
-    protected int insertMetadata(RequestContext requestContext, Map resultMap, Node node)
-    throws AJAXException
-    {
-        String name = getActionParameter(requestContext, "name");
-        String language = getActionParameter(requestContext, "lang");
-        String value = getActionParameter(requestContext, "value");
-        if (isBlank(name) || isBlank(language))
-            throw new AJAXException("Invalid Metadata: name, language invalid data.");
-        Locale locale = new Locale(language);
-        node.getMetadata().addField(locale, name, value);        
-        return 1;
-    }
-
-    protected int updateMetadata(RequestContext requestContext, Map resultMap, Node node)
-    throws AJAXException
-    {
-        String name = getActionParameter(requestContext, "name");
-        String language = getActionParameter(requestContext, "lang");
-        String value = getActionParameter(requestContext, "value");
-        String oldName = getActionParameter(requestContext, "oldname");
-        String oldLanguage = getActionParameter(requestContext, "oldlang");
-
-        if (isBlank(name) || isBlank(language) || isBlank(oldName) || isBlank(oldLanguage))
-            throw new AJAXException("Invalid Metadata: name, language invalid data.");
-                
-        Collection cfields = node.getMetadata().getFields(oldName);
-        if (cfields == null || cfields.size() == 0)
-        {
-            return insertMetadata(requestContext, resultMap, node);            
-        }
-        boolean found = false;
-        Iterator fields = cfields.iterator();
-        while (fields.hasNext())
-        {
-            LocalizedField field  = (LocalizedField)fields.next();
-            if (areFieldsSame(field.getName(), oldName) &&
-                areFieldsSame(field.getLocale().toString(), oldLanguage))
-            {
-                field.setName(name);
-                field.setLocale(new Locale(language));
-                field.setValue(value);
-                found = true;
-                break;
-            }
-        }
-        if (!found)
-            return insertMetadata(requestContext, resultMap, node);
-        return 1;
-    }
-    
-    protected int removeMetadata(RequestContext requestContext, Map resultMap, Node node)
-    throws AJAXException
-    {
-        String name = getActionParameter(requestContext, "name");
-        String language = getActionParameter(requestContext, "lang");
-        if (isBlank(name) || isBlank(language))
-            throw new AJAXException("Invalid Metadata: name, language invalid data.");
-        Collection cfields = node.getMetadata().getFields(name);
-        Collection allFields = node.getMetadata().getFields();
-        if (cfields == null || cfields.size() == 0)
-        {
-            return 0;            
-        }
-        boolean found = false;        
-        Iterator fields = cfields.iterator();
-        while (fields.hasNext())
-        {
-            LocalizedField field  = (LocalizedField)fields.next();
-            if (areFieldsSame(field.getName(), name) &&
-                areFieldsSame(field.getLocale().toString(), language))
-            {
-                cfields.remove(field);
-                if (allFields.remove(field))
-                {
-                    node.getMetadata().setFields(allFields);
-                }
-                found = true;
-                break;
-            }
-        }    
-        
-        return (found) ? 1 : 0;
-    }
-
-    protected int insertSecurityReference(RequestContext requestContext, Map resultMap, Node node)
-    throws AJAXException
-    {
-        String name = getActionParameter(requestContext, "name");
-        String kind = getActionParameter(requestContext, "kind");
-        if (isBlank(name) || isBlank(kind))
-            throw new AJAXException("Invalid Security Ref: name invalid data.");
-        if (node.getSecurityConstraints() == null)
-        {
-            SecurityConstraints cons = node.newSecurityConstraints();
-            node.setSecurityConstraints(cons);             
-        }
-        if (kind.equals("Owner"))
-        {
-            node.getSecurityConstraints().setOwner(name);
-        }
-        else
-        {
-            List refs = node.getSecurityConstraints().getSecurityConstraintsRefs();
-            if (refs.contains(name))
-                return 0; // do nothing
-            refs.add(name);
-        }
-        return 1;        
-    }
-
-    protected int updateSecurityReference(RequestContext requestContext, Map resultMap, Node node)
-    throws AJAXException
-    {
-        String name = getActionParameter(requestContext, "name");
-        String oldName = getActionParameter(requestContext, "oldname");
-        String kind = getActionParameter(requestContext, "kind");
-        if (isBlank(name) || isBlank(oldName) || isBlank(kind))
-            throw new AJAXException("Invalid Security Ref: name invalid data.");
-        if (node.getSecurityConstraints() == null)
-        {
-            SecurityConstraints cons = node.newSecurityConstraints();
-            node.setSecurityConstraints(cons);             
-        }                
-        List refs = node.getSecurityConstraints().getSecurityConstraintsRefs();        
-        if (refs == null || refs.size() == 0)
-        {
-            return insertSecurityReference(requestContext, resultMap, node);            
-        }
-        boolean found = false;
-        if (kind.equals("Owner"))
-        {
-            node.getSecurityConstraints().setOwner(name);
-            found = true;
-        }
-        else
-        {            
-            for (int ix = 0; ix < refs.size(); ix++)
-            {
-                String ref = (String)refs.get(ix);  
-                if (areFieldsSame(ref, oldName))
-                {
-                    refs.set(ix, name);
-                    found = true;
-                    break;
-                }
-            }
-        }
-        if (!found)
-            return insertSecurityReference(requestContext, resultMap, node);
-        return 1;
-    }
-    
-    protected int removeSecurityReference(RequestContext requestContext, Map resultMap, Node node)
-    throws AJAXException
-    {
-        String name = getActionParameter(requestContext, "name");
-        String kind = getActionParameter(requestContext, "kind");
-        if (isBlank(name) || isBlank(kind))
-            throw new AJAXException("Invalid Security Ref: name invalid data.");
-        if (node.getSecurityConstraints() == null)
-        {
-            return 0;
-        }
-        if (kind.equals("Owner"))
-        {
-            node.getSecurityConstraints().setOwner(null);
-        }
-        else
-        {
-            List refs = node.getSecurityConstraints().getSecurityConstraintsRefs();
-            if (!refs.contains(name))
-                return 0; // nothing to do
-            refs.remove(name);
-        }
-        return 1;
-    }
-
-    protected int removeSecurityDef(RequestContext requestContext, Map resultMap, Node node)
-    throws AJAXException
-    {
-        String id = getActionParameter(requestContext, "id");
-        if (isBlank(id))
-            throw new AJAXException("Invalid Security Ref: id invalid data.");
-        if (node.getSecurityConstraints() == null)
-        {
-            return 0;
-        }
-        List defs = node.getSecurityConstraints().getSecurityConstraints();
-        if (defs == null || defs.size() == 0)
-        {
-            return 0;
-        }
-        if (id.length() == 1)
-            return 0;
-        id = id.substring(1);
-        int index = Integer.parseInt(id) - 1;
-        if (index < 0)
-        {
-            return 0;
-        }
-        defs.remove(index);
-        return 1;
-    }
-    
-    protected boolean isBlank(String field)
-    {
-        if (field == null || field.trim().length() == 0)
-            return true;
-        return false;
-    }
-    protected boolean isFieldModified(String paramValue, String prevValue)
-    {
-        if (paramValue == null)
-        {
-            if (prevValue == null)
-                return false;
-            else
-                return true;
-        }
-        else
-        {
-            if (prevValue == null)
-                return true;
-            if (prevValue.equals(paramValue))
-                return false;
-            else
-                return true;
-        }
-    }
-    protected boolean areFieldsSame(String f1, String f2)
-    {
-        return !isFieldModified(f1, f2);
-    }
-    protected boolean isBooleanModified(String paramValue, boolean prevValue)
-    {
-        if (paramValue == null)
-        {
-            if (prevValue == false)
-                return false;
-            else
-                return true;
-        }
-        else
-        {
-            if (prevValue == false)
-                return true;
-            else
-                return false;
-        }
-    }        
-}
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.layout.impl;
+
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.jetspeed.ajax.AJAXException;
+import org.apache.jetspeed.ajax.AjaxAction;
+import org.apache.jetspeed.ajax.AjaxBuilder;
+import org.apache.jetspeed.layout.PortletActionSecurityBehavior;
+import org.apache.jetspeed.om.common.SecurityConstraints;
+import org.apache.jetspeed.om.portlet.LocalizedField;
+import org.apache.jetspeed.page.PageManager;
+import org.apache.jetspeed.page.document.Node;
+import org.apache.jetspeed.request.RequestContext;
+
+/**
+ * Abstract Site update action for folders, pages and links
+ *
+ * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
+ * @version $Id: $
+ */
+public abstract class BaseSiteUpdateAction
+    extends BasePortletAction
+    implements AjaxAction, AjaxBuilder, Constants 
+{
+    protected static final Log log = LogFactory.getLog(BaseSiteUpdateAction.class);    
+    
+    public BaseSiteUpdateAction(String template, 
+            String errorTemplate, 
+            PageManager pageManager)
+    {
+        super(template, errorTemplate, pageManager);
+    }
+    
+    public BaseSiteUpdateAction(String template, 
+                             String errorTemplate, 
+                             PortletActionSecurityBehavior securityBehavior)
+    {
+        super(template, errorTemplate, securityBehavior);
+    }
+
+    public BaseSiteUpdateAction(String template, 
+                             String errorTemplate, 
+                             PageManager pageManager,
+                             PortletActionSecurityBehavior securityBehavior)
+    {
+        super(template, errorTemplate, pageManager, securityBehavior);        
+    }
+
+    protected abstract int updateInformation(RequestContext requestContext, Map resultMap, Node node, String path)
+    throws AJAXException;
+    
+    protected int insertMetadata(RequestContext requestContext, Map resultMap, Node node)
+    throws AJAXException
+    {
+        String name = getActionParameter(requestContext, "name");
+        String language = getActionParameter(requestContext, "lang");
+        String value = getActionParameter(requestContext, "value");
+        if (isBlank(name) || isBlank(language))
+            throw new AJAXException("Invalid Metadata: name, language invalid data.");
+        Locale locale = new Locale(language);
+        node.getMetadata().addField(locale, name, value);        
+        return 1;
+    }
+
+    protected int updateMetadata(RequestContext requestContext, Map resultMap, Node node)
+    throws AJAXException
+    {
+        String name = getActionParameter(requestContext, "name");
+        String language = getActionParameter(requestContext, "lang");
+        String value = getActionParameter(requestContext, "value");
+        String oldName = getActionParameter(requestContext, "oldname");
+        String oldLanguage = getActionParameter(requestContext, "oldlang");
+
+        if (isBlank(name) || isBlank(language) || isBlank(oldName) || isBlank(oldLanguage))
+            throw new AJAXException("Invalid Metadata: name, language invalid data.");
+                
+        Collection cfields = node.getMetadata().getFields(oldName);
+        if (cfields == null || cfields.size() == 0)
+        {
+            return insertMetadata(requestContext, resultMap, node);            
+        }
+        boolean found = false;
+        Iterator fields = cfields.iterator();
+        while (fields.hasNext())
+        {
+            LocalizedField field  = (LocalizedField)fields.next();
+            if (areFieldsSame(field.getName(), oldName) &&
+                areFieldsSame(field.getLocale().toString(), oldLanguage))
+            {
+                field.setName(name);
+                field.setLocale(new Locale(language));
+                field.setValue(value);
+                found = true;
+                break;
+            }
+        }
+        if (!found)
+            return insertMetadata(requestContext, resultMap, node);
+        return 1;
+    }
+    
+    protected int removeMetadata(RequestContext requestContext, Map resultMap, Node node)
+    throws AJAXException
+    {
+        String name = getActionParameter(requestContext, "name");
+        String language = getActionParameter(requestContext, "lang");
+        if (isBlank(name) || isBlank(language))
+            throw new AJAXException("Invalid Metadata: name, language invalid data.");
+        Collection cfields = node.getMetadata().getFields(name);
+        Collection allFields = node.getMetadata().getFields();
+        if (cfields == null || cfields.size() == 0)
+        {
+            return 0;            
+        }
+        boolean found = false;        
+        Iterator fields = cfields.iterator();
+        while (fields.hasNext())
+        {
+            LocalizedField field  = (LocalizedField)fields.next();
+            if (areFieldsSame(field.getName(), name) &&
+                areFieldsSame(field.getLocale().toString(), language))
+            {
+                cfields.remove(field);
+                if (allFields.remove(field))
+                {
+                    node.getMetadata().setFields(allFields);
+                }
+                found = true;
+                break;
+            }
+        }    
+        
+        return (found) ? 1 : 0;
+    }
+
+    protected int insertSecurityReference(RequestContext requestContext, Map resultMap, Node node)
+    throws AJAXException
+    {
+        String name = getActionParameter(requestContext, "name");
+        String kind = getActionParameter(requestContext, "kind");
+        if (isBlank(name) || isBlank(kind))
+            throw new AJAXException("Invalid Security Ref: name invalid data.");
+        if (node.getSecurityConstraints() == null)
+        {
+            SecurityConstraints cons = node.newSecurityConstraints();
+            node.setSecurityConstraints(cons);             
+        }
+        if (kind.equals("Owner"))
+        {
+            node.getSecurityConstraints().setOwner(name);
+        }
+        else
+        {
+            List refs = node.getSecurityConstraints().getSecurityConstraintsRefs();
+            if (refs.contains(name))
+                return 0; // do nothing
+            refs.add(name);
+        }
+        return 1;        
+    }
+
+    protected int updateSecurityReference(RequestContext requestContext, Map resultMap, Node node)
+    throws AJAXException
+    {
+        String name = getActionParameter(requestContext, "name");
+        String oldName = getActionParameter(requestContext, "oldname");
+        String kind = getActionParameter(requestContext, "kind");
+        if (isBlank(name) || isBlank(oldName) || isBlank(kind))
+            throw new AJAXException("Invalid Security Ref: name invalid data.");
+        if (node.getSecurityConstraints() == null)
+        {
+            SecurityConstraints cons = node.newSecurityConstraints();
+            node.setSecurityConstraints(cons);             
+        }                
+        List refs = node.getSecurityConstraints().getSecurityConstraintsRefs();        
+        if (refs == null || refs.size() == 0)
+        {
+            return insertSecurityReference(requestContext, resultMap, node);            
+        }
+        boolean found = false;
+        if (kind.equals("Owner"))
+        {
+            node.getSecurityConstraints().setOwner(name);
+            found = true;
+        }
+        else
+        {            
+            for (int ix = 0; ix < refs.size(); ix++)
+            {
+                String ref = (String)refs.get(ix);  
+                if (areFieldsSame(ref, oldName))
+                {
+                    refs.set(ix, name);
+                    found = true;
+                    break;
+                }
+            }
+        }
+        if (!found)
+            return insertSecurityReference(requestContext, resultMap, node);
+        return 1;
+    }
+    
+    protected int removeSecurityReference(RequestContext requestContext, Map resultMap, Node node)
+    throws AJAXException
+    {
+        String name = getActionParameter(requestContext, "name");
+        String kind = getActionParameter(requestContext, "kind");
+        if (isBlank(name) || isBlank(kind))
+            throw new AJAXException("Invalid Security Ref: name invalid data.");
+        if (node.getSecurityConstraints() == null)
+        {
+            return 0;
+        }
+        if (kind.equals("Owner"))
+        {
+            node.getSecurityConstraints().setOwner(null);
+        }
+        else
+        {
+            List refs = node.getSecurityConstraints().getSecurityConstraintsRefs();
+            if (!refs.contains(name))
+                return 0; // nothing to do
+            refs.remove(name);
+        }
+        return 1;
+    }
+
+    protected int removeSecurityDef(RequestContext requestContext, Map resultMap, Node node)
+    throws AJAXException
+    {
+        String id = getActionParameter(requestContext, "id");
+        if (isBlank(id))
+            throw new AJAXException("Invalid Security Ref: id invalid data.");
+        if (node.getSecurityConstraints() == null)
+        {
+            return 0;
+        }
+        List defs = node.getSecurityConstraints().getSecurityConstraints();
+        if (defs == null || defs.size() == 0)
+        {
+            return 0;
+        }
+        if (id.length() == 1)
+            return 0;
+        id = id.substring(1);
+        int index = Integer.parseInt(id) - 1;
+        if (index < 0)
+        {
+            return 0;
+        }
+        defs.remove(index);
+        return 1;
+    }
+    
+    protected boolean isBlank(String field)
+    {
+        if (field == null || field.trim().length() == 0)
+            return true;
+        return false;
+    }
+    protected boolean isFieldModified(String paramValue, String prevValue)
+    {
+        if (paramValue == null)
+        {
+            if (prevValue == null)
+                return false;
+            else
+                return true;
+        }
+        else
+        {
+            if (prevValue == null)
+                return true;
+            if (prevValue.equals(paramValue))
+                return false;
+            else
+                return true;
+        }
+    }
+    protected boolean areFieldsSame(String f1, String f2)
+    {
+        return !isFieldModified(f1, f2);
+    }
+    protected boolean isBooleanModified(String paramValue, boolean prevValue)
+    {
+        if (paramValue == null)
+        {
+            if (prevValue == false)
+                return false;
+            else
+                return true;
+        }
+        else
+        {
+            if (prevValue == false)
+                return true;
+            else
+                return false;
+        }
+    }        
+}

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/BaseSiteUpdateAction.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/BaseUserAction.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/ChangePortletAction.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/ChangePortletAction.java?rev=725977&r1=725976&r2=725977&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/ChangePortletAction.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/ChangePortletAction.java Fri Dec 12 04:06:29 2008
@@ -1,305 +1,305 @@
-/*
+/*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jetspeed.layout.impl;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import javax.portlet.PortletMode;
-import javax.portlet.WindowState;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.jetspeed.JetspeedActions;
-import org.apache.jetspeed.PortalReservedParameters;
-import org.apache.jetspeed.ajax.AJAXException;
-import org.apache.jetspeed.ajax.AjaxAction;
-import org.apache.jetspeed.ajax.AjaxBuilder;
-import org.apache.jetspeed.container.state.MutableNavigationalState;
-import org.apache.jetspeed.container.window.PortletWindowAccessor;
-import org.apache.jetspeed.decoration.PageActionAccess;
-import org.apache.jetspeed.layout.PortletActionSecurityBehavior;
-import org.apache.jetspeed.om.page.ContentFragment;
-import org.apache.jetspeed.om.page.ContentPage;
-import org.apache.jetspeed.page.PageManager;
-import org.apache.jetspeed.request.RequestContext;
-import org.apache.jetspeed.container.PortletWindow;
-
-/**
- * Changes the window state or portlet mode for a given portlet window
- *
- * AJAX Parameters: 
- *    id = the fragment id of the portlet to move
- *    page = (implied in the URL)
- *    state = the new window state
- *    mode = the new portlet mode
- *    
- * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
- * @version $Id: $
- */
-public class ChangePortletAction 
-    extends BasePortletAction 
-    implements AjaxAction, AjaxBuilder, Constants
-{
-    protected static final Log log = LogFactory.getLog(ChangePortletAction.class);
-    protected String action;
-    protected Map validWindowStates = new HashMap();
-    protected Map validPortletModes = new HashMap();
-    protected PortletWindowAccessor windowAccessor;
-    
-    public ChangePortletAction(String template, 
-            String errorTemplate, 
-            String action,
-            PortletWindowAccessor windowAccessor)            
-    throws AJAXException    
-    {
-        this(template, errorTemplate, action, null, windowAccessor, null);
-    }
-    
-    public ChangePortletAction(String template, 
-                             String errorTemplate, 
-                             String action,
-                             PageManager pageManager,
-                             PortletWindowAccessor windowAccessor,                             
-                             PortletActionSecurityBehavior securityBehavior)
-    throws AJAXException
-    {
-        super(template, errorTemplate, pageManager, securityBehavior);
-        this.action = action;
-        this.windowAccessor = windowAccessor;
-        
-        // Build the maps of allowed (internal) modes and states
-        Iterator modes = JetspeedActions.getStandardPortletModes().iterator();        
-        while (modes.hasNext())
-        {
-            String mode = modes.next().toString();
-            this.validPortletModes.put(mode, mode);
-        }
-        modes = JetspeedActions.getExtendedPortletModes().iterator();
-        while (modes.hasNext())
-        {
-            String mode = modes.next().toString();
-            this.validPortletModes.put(mode, mode);
-        }
-        Iterator states = JetspeedActions.getStandardWindowStates().iterator();        
-        while (states.hasNext())
-        {
-            String state = states.next().toString();
-            this.validWindowStates.put(state, state);
-        }        
-        states = JetspeedActions.getExtendedWindowStates().iterator();        
-        while (states.hasNext())
-        {
-            String state = states.next().toString();
-            this.validWindowStates.put(state, state);
-        }        
-    }
-
-    public boolean runBatch(RequestContext requestContext, Map resultMap) throws AJAXException
-    {
-        return runAction(requestContext, resultMap, true);
-    }    
-    
-    public boolean run(RequestContext requestContext, Map resultMap)
-            throws AJAXException
-    {
-        return runAction(requestContext, resultMap, false);
-    }
-    
-    public boolean runAction(RequestContext requestContext, Map resultMap, boolean batch)
-    {
-        boolean success = true;
-        String status = "success";
-        try
-        {
-            resultMap.put(ACTION, action);
-            // Get the necessary parameters off of the request
-            String fragmentId = getActionParameter(requestContext, FRAGMENTID);
-            if (fragmentId == null) 
-            { 
-                throw new Exception("fragment id not provided"); 
-            }
-            resultMap.put(FRAGMENTID, fragmentId);
-            
-            ContentPage page = requestContext.getPage();            
-            ContentFragment fragment = page.getContentFragmentById(fragmentId);
-            
-            if ( fragment == null )
-            {
-            	throw new Exception( "fragment specified by id cannot be found" );
-            }
-            String requestedState = getActionParameter(requestContext, WINDOW_STATE);
-            String requestedMode = getActionParameter(requestContext, PORTLET_MODE);    
-            if ( "layout".equals( fragment.getType() ) )
-            {
-            	if ( ! fragment.getId().equals( page.getRootFragment().getId() ) )
-            	{
-            		throw new Exception( "for layout fragments, change action applies to only to the root layout fragment (i.e. it does not apply to nested layout fragments)" );
-            	}
-            	PageActionAccess pageActionAccess = (PageActionAccess)requestContext.getAttribute( PortalReservedParameters.PAGE_EDIT_ACCESS_ATTRIBUTE );
-            	if ( pageActionAccess == null )
-            	{
-            		throw new Exception( "cannot change action for root layout fragment due to null PageActionAccess object" );
-            	}
-            	//pageActionAccess.
-            	PortletWindow window = windowAccessor.getPortletWindow(fragment);
-            	PortletMode currentMode = requestContext.getPortalURL().getNavigationalState().getMode( window );
-            	WindowState currentState = requestContext.getPortalURL().getNavigationalState().getState( window );
-            	
-            	boolean requestedModeAlreadySet = false;
-            	if ( requestedMode == null )
-            		requestedModeAlreadySet = true;
-            	else
-            	{
-            		if ( requestedMode.equals( PortletMode.EDIT.toString() ) )
-            		{
-            			if( pageActionAccess.isEditing() )
-            				requestedModeAlreadySet = true;
-            			else
-            			{
-            				if ( pageActionAccess.isEditAllowed())
-            				{
-            					pageActionAccess.setEditing( true );
-            					resultMap.put(STATUS, status);
-            					resultMap.put(OLD_PORTLET_MODE, currentMode.toString());
-            					resultMap.put(PORTLET_MODE, requestedMode);
-            				}
-            				else
-            				{
-            					throw new Exception( "permissions do no allow page edit" );
-            				}
-            			}
-            		}
-            		else if ( requestedMode.equals( PortletMode.VIEW.toString() ) )
-            		{
-            			pageActionAccess.setEditing( false );
-            			//if ( currentMode.equals( PortletMode.HELP ) )
-            			resultMap.put(STATUS, status);
-            			resultMap.put(OLD_PORTLET_MODE, currentMode.toString());
-            			resultMap.put(PORTLET_MODE, requestedMode);
-            		}
-            		else
-            		{
-            			requestedModeAlreadySet = true;
-            		}
-            	}
-            	if ( requestedModeAlreadySet )
-            	{
-           			resultMap.put(STATUS, status);
-           			resultMap.put(OLD_PORTLET_MODE, currentMode.toString());
-           			resultMap.put(PORTLET_MODE, currentMode.toString());
-           		}
-            }
-            else
-            {
-	            if (requestedState == null && requestedMode == null) 
-	            { 
-	                throw new Exception("portlet window state or mode not provided"); 
-	            }           
-	            if (requestedState != null && !isValidWindowState(requestedState))
-	            {
-	                throw new Exception("portlet window state " + requestedState + " is not supported");
-	            }
-	            if (requestedMode != null && !isValidPortletMode(requestedMode))
-	            {
-	                throw new Exception("portlet mode " + requestedMode + " is not supported");
-	            }
-	
-	            
-	            String oldState = fragment.getState();
-	            String oldMode = fragment.getMode();
-	            
-	            // Now Change the transient navigational state
-	            MutableNavigationalState navState = (MutableNavigationalState)requestContext.getPortalURL().getNavigationalState();
-	            PortletWindow portletWindow = windowAccessor.getPortletWindow(fragment);
-	            if (portletWindow != null)
-	            {
-	                oldState = navState.getState(portletWindow).toString();
-	                oldMode =  navState.getMode(portletWindow).toString();
-	                if (requestedState != null)
-	                {
-	                    navState.setState(portletWindow, new WindowState(requestedState));
-	                }
-	                if (requestedMode != null)
-	                {
-	                    navState.setMode(portletWindow, new PortletMode(requestedMode));
-	                }
-	                navState.sync(requestContext);                                
-	            }
-	            
-	
-	            if (checkAccess(requestContext, JetspeedActions.EDIT))
-	            {
-	                if (requestedState != null)
-	                    fragment.setState(requestedState);
-	                if (requestedMode != null)
-	                    fragment.setMode(requestedMode);
-	                
-	                if (pageManager != null && !batch)
-	                {
-	                    pageManager.updatePage(page);
-	                }
-	            }
-	            
-	            //requestContext.getPortalURL().getNavigationalState().
-	            resultMap.put(STATUS, status);
-	            
-	            if (requestedState != null)
-	            {
-	                resultMap.put(OLD_WINDOW_STATE, oldState);
-	                resultMap.put(WINDOW_STATE, requestedState);
-	            }
-	
-	            if (requestedMode != null)
-	            {
-	                resultMap.put(OLD_PORTLET_MODE, oldMode);
-	                resultMap.put(PORTLET_MODE, requestedMode);
-	            }
-            }
-        } 
-        catch (Exception e)
-        {
-            // Log the exception
-            log.error("exception while changing portlet/page action", e);
-            resultMap.put(REASON, e.toString());
-            // Return a failure indicator
-            success = false;
-        }
-
-        return success;
-    }
-    
-    // TODO: The validWindowStates and validPortletModes maps only contain 
-    //       internal (portal level) valid modes and states.
-    //       *if* a pa defines a custom mode/state with a different name but
-    //       mapped onto a internal (portal) mode/state 
-    //       *then* first the real internal mode/state needs to be retrieved from the 
-    //       targetted portlet its application:
-    //       o.a.j.om.common.portlet.PortletApplication.getMappedMode(customMode) and
-    //       o.a.j.om.common.portlet.PortletApplication.getMappedState(customState)        
-    
-    protected boolean isValidWindowState(String windowState)
-    {
-        return this.validWindowStates.containsKey(windowState);
-    }
-    protected boolean isValidPortletMode(String portletMode)
-    {
-        return this.validPortletModes.containsKey(portletMode);
-    }
-    
-}
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.layout.impl;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import javax.portlet.PortletMode;
+import javax.portlet.WindowState;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.jetspeed.JetspeedActions;
+import org.apache.jetspeed.PortalReservedParameters;
+import org.apache.jetspeed.ajax.AJAXException;
+import org.apache.jetspeed.ajax.AjaxAction;
+import org.apache.jetspeed.ajax.AjaxBuilder;
+import org.apache.jetspeed.container.state.MutableNavigationalState;
+import org.apache.jetspeed.container.window.PortletWindowAccessor;
+import org.apache.jetspeed.decoration.PageActionAccess;
+import org.apache.jetspeed.layout.PortletActionSecurityBehavior;
+import org.apache.jetspeed.om.page.ContentFragment;
+import org.apache.jetspeed.om.page.ContentPage;
+import org.apache.jetspeed.page.PageManager;
+import org.apache.jetspeed.request.RequestContext;
+import org.apache.jetspeed.container.PortletWindow;
+
+/**
+ * Changes the window state or portlet mode for a given portlet window
+ *
+ * AJAX Parameters: 
+ *    id = the fragment id of the portlet to move
+ *    page = (implied in the URL)
+ *    state = the new window state
+ *    mode = the new portlet mode
+ *    
+ * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
+ * @version $Id: $
+ */
+public class ChangePortletAction 
+    extends BasePortletAction 
+    implements AjaxAction, AjaxBuilder, Constants
+{
+    protected static final Log log = LogFactory.getLog(ChangePortletAction.class);
+    protected String action;
+    protected Map validWindowStates = new HashMap();
+    protected Map validPortletModes = new HashMap();
+    protected PortletWindowAccessor windowAccessor;
+    
+    public ChangePortletAction(String template, 
+            String errorTemplate, 
+            String action,
+            PortletWindowAccessor windowAccessor)            
+    throws AJAXException    
+    {
+        this(template, errorTemplate, action, null, windowAccessor, null);
+    }
+    
+    public ChangePortletAction(String template, 
+                             String errorTemplate, 
+                             String action,
+                             PageManager pageManager,
+                             PortletWindowAccessor windowAccessor,                             
+                             PortletActionSecurityBehavior securityBehavior)
+    throws AJAXException
+    {
+        super(template, errorTemplate, pageManager, securityBehavior);
+        this.action = action;
+        this.windowAccessor = windowAccessor;
+        
+        // Build the maps of allowed (internal) modes and states
+        Iterator modes = JetspeedActions.getStandardPortletModes().iterator();        
+        while (modes.hasNext())
+        {
+            String mode = modes.next().toString();
+            this.validPortletModes.put(mode, mode);
+        }
+        modes = JetspeedActions.getExtendedPortletModes().iterator();
+        while (modes.hasNext())
+        {
+            String mode = modes.next().toString();
+            this.validPortletModes.put(mode, mode);
+        }
+        Iterator states = JetspeedActions.getStandardWindowStates().iterator();        
+        while (states.hasNext())
+        {
+            String state = states.next().toString();
+            this.validWindowStates.put(state, state);
+        }        
+        states = JetspeedActions.getExtendedWindowStates().iterator();        
+        while (states.hasNext())
+        {
+            String state = states.next().toString();
+            this.validWindowStates.put(state, state);
+        }        
+    }
+
+    public boolean runBatch(RequestContext requestContext, Map resultMap) throws AJAXException
+    {
+        return runAction(requestContext, resultMap, true);
+    }    
+    
+    public boolean run(RequestContext requestContext, Map resultMap)
+            throws AJAXException
+    {
+        return runAction(requestContext, resultMap, false);
+    }
+    
+    public boolean runAction(RequestContext requestContext, Map resultMap, boolean batch)
+    {
+        boolean success = true;
+        String status = "success";
+        try
+        {
+            resultMap.put(ACTION, action);
+            // Get the necessary parameters off of the request
+            String fragmentId = getActionParameter(requestContext, FRAGMENTID);
+            if (fragmentId == null) 
+            { 
+                throw new Exception("fragment id not provided"); 
+            }
+            resultMap.put(FRAGMENTID, fragmentId);
+            
+            ContentPage page = requestContext.getPage();            
+            ContentFragment fragment = page.getContentFragmentById(fragmentId);
+            
+            if ( fragment == null )
+            {
+            	throw new Exception( "fragment specified by id cannot be found" );
+            }
+            String requestedState = getActionParameter(requestContext, WINDOW_STATE);
+            String requestedMode = getActionParameter(requestContext, PORTLET_MODE);    
+            if ( "layout".equals( fragment.getType() ) )
+            {
+            	if ( ! fragment.getId().equals( page.getRootFragment().getId() ) )
+            	{
+            		throw new Exception( "for layout fragments, change action applies to only to the root layout fragment (i.e. it does not apply to nested layout fragments)" );
+            	}
+            	PageActionAccess pageActionAccess = (PageActionAccess)requestContext.getAttribute( PortalReservedParameters.PAGE_EDIT_ACCESS_ATTRIBUTE );
+            	if ( pageActionAccess == null )
+            	{
+            		throw new Exception( "cannot change action for root layout fragment due to null PageActionAccess object" );
+            	}
+            	//pageActionAccess.
+            	PortletWindow window = windowAccessor.getPortletWindow(fragment);
+            	PortletMode currentMode = requestContext.getPortalURL().getNavigationalState().getMode( window );
+            	WindowState currentState = requestContext.getPortalURL().getNavigationalState().getState( window );
+            	
+            	boolean requestedModeAlreadySet = false;
+            	if ( requestedMode == null )
+            		requestedModeAlreadySet = true;
+            	else
+            	{
+            		if ( requestedMode.equals( PortletMode.EDIT.toString() ) )
+            		{
+            			if( pageActionAccess.isEditing() )
+            				requestedModeAlreadySet = true;
+            			else
+            			{
+            				if ( pageActionAccess.isEditAllowed())
+            				{
+            					pageActionAccess.setEditing( true );
+            					resultMap.put(STATUS, status);
+            					resultMap.put(OLD_PORTLET_MODE, currentMode.toString());
+            					resultMap.put(PORTLET_MODE, requestedMode);
+            				}
+            				else
+            				{
+            					throw new Exception( "permissions do no allow page edit" );
+            				}
+            			}
+            		}
+            		else if ( requestedMode.equals( PortletMode.VIEW.toString() ) )
+            		{
+            			pageActionAccess.setEditing( false );
+            			//if ( currentMode.equals( PortletMode.HELP ) )
+            			resultMap.put(STATUS, status);
+            			resultMap.put(OLD_PORTLET_MODE, currentMode.toString());
+            			resultMap.put(PORTLET_MODE, requestedMode);
+            		}
+            		else
+            		{
+            			requestedModeAlreadySet = true;
+            		}
+            	}
+            	if ( requestedModeAlreadySet )
+            	{
+           			resultMap.put(STATUS, status);
+           			resultMap.put(OLD_PORTLET_MODE, currentMode.toString());
+           			resultMap.put(PORTLET_MODE, currentMode.toString());
+           		}
+            }
+            else
+            {
+	            if (requestedState == null && requestedMode == null) 
+	            { 
+	                throw new Exception("portlet window state or mode not provided"); 
+	            }           
+	            if (requestedState != null && !isValidWindowState(requestedState))
+	            {
+	                throw new Exception("portlet window state " + requestedState + " is not supported");
+	            }
+	            if (requestedMode != null && !isValidPortletMode(requestedMode))
+	            {
+	                throw new Exception("portlet mode " + requestedMode + " is not supported");
+	            }
+	
+	            
+	            String oldState = fragment.getState();
+	            String oldMode = fragment.getMode();
+	            
+	            // Now Change the transient navigational state
+	            MutableNavigationalState navState = (MutableNavigationalState)requestContext.getPortalURL().getNavigationalState();
+	            PortletWindow portletWindow = windowAccessor.getPortletWindow(fragment);
+	            if (portletWindow != null)
+	            {
+	                oldState = navState.getState(portletWindow).toString();
+	                oldMode =  navState.getMode(portletWindow).toString();
+	                if (requestedState != null)
+	                {
+	                    navState.setState(portletWindow, new WindowState(requestedState));
+	                }
+	                if (requestedMode != null)
+	                {
+	                    navState.setMode(portletWindow, new PortletMode(requestedMode));
+	                }
+	                navState.sync(requestContext);                                
+	            }
+	            
+	
+	            if (checkAccess(requestContext, JetspeedActions.EDIT))
+	            {
+	                if (requestedState != null)
+	                    fragment.setState(requestedState);
+	                if (requestedMode != null)
+	                    fragment.setMode(requestedMode);
+	                
+	                if (pageManager != null && !batch)
+	                {
+	                    pageManager.updatePage(page);
+	                }
+	            }
+	            
+	            //requestContext.getPortalURL().getNavigationalState().
+	            resultMap.put(STATUS, status);
+	            
+	            if (requestedState != null)
+	            {
+	                resultMap.put(OLD_WINDOW_STATE, oldState);
+	                resultMap.put(WINDOW_STATE, requestedState);
+	            }
+	
+	            if (requestedMode != null)
+	            {
+	                resultMap.put(OLD_PORTLET_MODE, oldMode);
+	                resultMap.put(PORTLET_MODE, requestedMode);
+	            }
+            }
+        } 
+        catch (Exception e)
+        {
+            // Log the exception
+            log.error("exception while changing portlet/page action", e);
+            resultMap.put(REASON, e.toString());
+            // Return a failure indicator
+            success = false;
+        }
+
+        return success;
+    }
+    
+    // TODO: The validWindowStates and validPortletModes maps only contain 
+    //       internal (portal level) valid modes and states.
+    //       *if* a pa defines a custom mode/state with a different name but
+    //       mapped onto a internal (portal) mode/state 
+    //       *then* first the real internal mode/state needs to be retrieved from the 
+    //       targetted portlet its application:
+    //       o.a.j.om.common.portlet.PortletApplication.getMappedMode(customMode) and
+    //       o.a.j.om.common.portlet.PortletApplication.getMappedState(customState)        
+    
+    protected boolean isValidWindowState(String windowState)
+    {
+        return this.validWindowStates.containsKey(windowState);
+    }
+    protected boolean isValidPortletMode(String portletMode)
+    {
+        return this.validPortletModes.containsKey(portletMode);
+    }
+    
+}

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/ChangePortletAction.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/Constants.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/CoordinateImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/CoordinateImpl.java?rev=725977&r1=725976&r2=725977&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/CoordinateImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/CoordinateImpl.java Fri Dec 12 04:06:29 2008
@@ -1,79 +1,79 @@
-/*
+/*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jetspeed.layout.impl;
-
-import org.apache.jetspeed.layout.Coordinate;
-
-/**
- * 
- * CoordinateImpl
- * 
- * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
- * @author <a>David Gurney</a>
- * @version $Id: $
- */
-public class CoordinateImpl implements Coordinate
-{
-
-    private int m_iOldCol = -1;
-
-    private int m_iOldRow = -1;
-
-    private int m_iNewCol = -1;
-
-    private int m_iNewRow = -1;
-
-    public CoordinateImpl()
-    {
-    }
-
-    public CoordinateImpl(int p_iOldCol, int p_iOldRow)
-    {
-        m_iOldCol = p_iOldCol;
-        m_iOldRow = p_iOldRow;
-    }
-
-    public CoordinateImpl(int p_iOldCol, int p_iOldRow, int p_iNewCol,
-            int p_iNewRow)
-    {
-        m_iOldCol = p_iOldCol;
-        m_iOldRow = p_iOldRow;
-        m_iNewCol = p_iNewCol;
-        m_iNewRow = p_iNewRow;
-    }
-
-    public int getNewCol()
-    {
-        return m_iNewCol;
-    }
-
-    public int getNewRow()
-    {
-        return m_iNewRow;
-    }
-
-    public int getOldCol()
-    {
-        return m_iOldCol;
-    }
-
-    public int getOldRow()
-    {
-        return m_iOldRow;
-    }
-
-}
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.layout.impl;
+
+import org.apache.jetspeed.layout.Coordinate;
+
+/**
+ * 
+ * CoordinateImpl
+ * 
+ * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
+ * @author <a>David Gurney</a>
+ * @version $Id: $
+ */
+public class CoordinateImpl implements Coordinate
+{
+
+    private int m_iOldCol = -1;
+
+    private int m_iOldRow = -1;
+
+    private int m_iNewCol = -1;
+
+    private int m_iNewRow = -1;
+
+    public CoordinateImpl()
+    {
+    }
+
+    public CoordinateImpl(int p_iOldCol, int p_iOldRow)
+    {
+        m_iOldCol = p_iOldCol;
+        m_iOldRow = p_iOldRow;
+    }
+
+    public CoordinateImpl(int p_iOldCol, int p_iOldRow, int p_iNewCol,
+            int p_iNewRow)
+    {
+        m_iOldCol = p_iOldCol;
+        m_iOldRow = p_iOldRow;
+        m_iNewCol = p_iNewCol;
+        m_iNewRow = p_iNewRow;
+    }
+
+    public int getNewCol()
+    {
+        return m_iNewCol;
+    }
+
+    public int getNewRow()
+    {
+        return m_iNewRow;
+    }
+
+    public int getOldCol()
+    {
+        return m_iOldCol;
+    }
+
+    public int getOldRow()
+    {
+        return m_iOldRow;
+    }
+
+}

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/CoordinateImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/ExportJetspeedSchema.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/ExportObject.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetFolderAction.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetFolderAction.java?rev=725977&r1=725976&r2=725977&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetFolderAction.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetFolderAction.java Fri Dec 12 04:06:29 2008
@@ -1,97 +1,97 @@
-/*
+/*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jetspeed.layout.impl;
-
-import java.util.Map;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.jetspeed.JetspeedActions;
-import org.apache.jetspeed.ajax.AjaxAction;
-import org.apache.jetspeed.ajax.AjaxBuilder;
-import org.apache.jetspeed.layout.PortletActionSecurityBehavior;
-import org.apache.jetspeed.om.folder.Folder;
-import org.apache.jetspeed.page.PageManager;
-import org.apache.jetspeed.request.RequestContext;
-
-/**
- * Retrieve a single page
- *
- * AJAX Parameters: 
- *    folder = the path of the folder to retrieve information on 
- *    
- * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
- * @version $Id: $
- */
-public class GetFolderAction 
-    extends BaseGetResourceAction 
-    implements AjaxAction, AjaxBuilder, Constants
-{
-    protected Log log = LogFactory.getLog(GetFolderAction.class);
-    
-    public GetFolderAction(String template, 
-                             String errorTemplate,
-                             PageManager pageManager,
-                             PortletActionSecurityBehavior securityBehavior)
-    {
-        super(template, errorTemplate, pageManager, securityBehavior);
-    }
-
-    public boolean run(RequestContext requestContext, Map resultMap)
-    {
-        boolean success = true;
-        String status = "success";
-        try
-        {
-            resultMap.put(ACTION, "getfolder");
-            if (false == checkAccess(requestContext, JetspeedActions.VIEW))
-            {
-                    success = false;
-                    resultMap.put(REASON, "Insufficient access to get portlets");
-                    return success;
-            }                                    
-            Folder folder = retrieveFolder(requestContext);            
-            resultMap.put(STATUS, status);
-            resultMap.put(FOLDER, folder);
-            putSecurityInformation(resultMap, folder);
-        } 
-        catch (Exception e)
-        {
-            // Log the exception
-            log.error("exception while getting folder info", e);
-
-            // Return a failure indicator
-            success = false;
-        }
-
-        return success;
-	}
-    
-    protected Folder retrieveFolder(RequestContext requestContext)
-    throws Exception
-    {        
-        String folderName = getActionParameter(requestContext, FOLDER);
-        if (folderName == null)
-        {
-            folderName = "/";
-        }
-        Folder folder = pageManager.getFolder(folderName);
-        return folder;
-    }
-    
-    
-}
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.layout.impl;
+
+import java.util.Map;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.jetspeed.JetspeedActions;
+import org.apache.jetspeed.ajax.AjaxAction;
+import org.apache.jetspeed.ajax.AjaxBuilder;
+import org.apache.jetspeed.layout.PortletActionSecurityBehavior;
+import org.apache.jetspeed.om.folder.Folder;
+import org.apache.jetspeed.page.PageManager;
+import org.apache.jetspeed.request.RequestContext;
+
+/**
+ * Retrieve a single page
+ *
+ * AJAX Parameters: 
+ *    folder = the path of the folder to retrieve information on 
+ *    
+ * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
+ * @version $Id: $
+ */
+public class GetFolderAction 
+    extends BaseGetResourceAction 
+    implements AjaxAction, AjaxBuilder, Constants
+{
+    protected Log log = LogFactory.getLog(GetFolderAction.class);
+    
+    public GetFolderAction(String template, 
+                             String errorTemplate,
+                             PageManager pageManager,
+                             PortletActionSecurityBehavior securityBehavior)
+    {
+        super(template, errorTemplate, pageManager, securityBehavior);
+    }
+
+    public boolean run(RequestContext requestContext, Map resultMap)
+    {
+        boolean success = true;
+        String status = "success";
+        try
+        {
+            resultMap.put(ACTION, "getfolder");
+            if (false == checkAccess(requestContext, JetspeedActions.VIEW))
+            {
+                    success = false;
+                    resultMap.put(REASON, "Insufficient access to get portlets");
+                    return success;
+            }                                    
+            Folder folder = retrieveFolder(requestContext);            
+            resultMap.put(STATUS, status);
+            resultMap.put(FOLDER, folder);
+            putSecurityInformation(resultMap, folder);
+        } 
+        catch (Exception e)
+        {
+            // Log the exception
+            log.error("exception while getting folder info", e);
+
+            // Return a failure indicator
+            success = false;
+        }
+
+        return success;
+	}
+    
+    protected Folder retrieveFolder(RequestContext requestContext)
+    throws Exception
+    {        
+        String folderName = getActionParameter(requestContext, FOLDER);
+        if (folderName == null)
+        {
+            folderName = "/";
+        }
+        Folder folder = pageManager.getFolder(folderName);
+        return folder;
+    }
+    
+    
+}

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetFolderAction.java
------------------------------------------------------------------------------
    svn:eol-style = native



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message