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 [20/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
Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/SecurityConstraintsAction.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/SecurityConstraintsAction.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/SecurityConstraintsAction.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/SecurityConstraintsAction.java Fri Dec 12 04:06:29 2008
@@ -1,356 +1,356 @@
-/*
+/*
  * 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.io.ByteArrayInputStream;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.StringTokenizer;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.jetspeed.JetspeedActions;
-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.SecurityConstraint;
-import org.apache.jetspeed.om.page.PageSecurity;
-import org.apache.jetspeed.om.page.SecurityConstraintsDef;
-import org.apache.jetspeed.page.PageManager;
-import org.apache.jetspeed.request.RequestContext;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
-
-/**
- * Security Permission action
- * 
- * AJAX Parameters: 
- *    action = constraints
- *    method = add-def | update-def | remove-def | add-global | remove-global   
- *    name = name of constraint definition or global definition
- *    xml = the constraints payload, same format as PSML constraint defs
- *    
- * @author <a href="mailto:taylor@apache.org">David Sean Taylor </a>
- * @version $Id: $
- */
-public class SecurityConstraintsAction 
-    extends BasePortletAction 
-    implements AjaxAction, AjaxBuilder, Constants
-{
-    protected static final Log log = LogFactory.getLog(SecurityConstraintsAction.class);
-
-    public SecurityConstraintsAction(String template, 
-                                     String errorTemplate, 
-                                     PageManager pm,
-                                     PortletActionSecurityBehavior securityBehavior)                                     
-    {
-        super(template, errorTemplate, pm, securityBehavior); 
-    }
-
-    public SecurityConstraintsAction(String template, 
-            String errorTemplate, 
-            PageManager pm)
-    {
-        this(template, errorTemplate, pm, null); 
-    }
-    
-    public boolean run(RequestContext requestContext, Map resultMap)
-            throws AJAXException
-    {
-    	System.out.println( "SecurityConstraintsAction run" );
-        boolean success = true;
-        String status = "success";
-        try
-        {
-            resultMap.put(ACTION, "constraints");
-            // Get the necessary parameters off of the request
-            String method = getActionParameter(requestContext, "method");
-            if (method == null) 
-            { 
-                throw new RuntimeException("Method not provided"); 
-            }            
-            resultMap.put("method", method);
-            if (false == checkAccess(requestContext, JetspeedActions.EDIT))
-            {
-                success = false;
-                resultMap.put(REASON, "Insufficient access to administer portal permissions");                
-                return success;
-            }           
-            int count = 0;
-            if (method.equals("add-def") || method.equals("update-def"))
-            {
-                count = updateConstraintDefinition(requestContext, resultMap);
-            }
-            else if (method.equals("remove-def"))
-            {
-                count = removeConstraintDefinition(requestContext, resultMap);
-            }
-            else if (method.equals("add-global"))
-            {
-                count = addGlobal(requestContext, resultMap);
-            }
-            else if (method.equals("remove-global"))
-            {
-                count = removeGlobal(requestContext, resultMap);
-            }
-            else
-            {
-                success = false;
-                resultMap.put(REASON, "Unsupported portal constraints method: " + method);                
-                return success;                
-            }
-            resultMap.put("count", Integer.toString(count));
-            resultMap.put(STATUS, status);
-        } 
-        catch (Exception e)
-        {
-        	System.out.println( "SecurityConstraintsAction run failure caused by " + e.getClass().getName() + " " + e.getMessage() );
-        	e.printStackTrace();
-            log.error("exception administering portal permissions", e);
-            resultMap.put(REASON, e.toString());
-            success = false;
-        }
-        System.out.println( "SecurityConstraintsAction complete " + resultMap.toString() );
-        return success;
-    }
-    
-    protected int removeConstraintDefinition(RequestContext requestContext, Map resultMap)
-    throws AJAXException
-    {
-        String name = getActionParameter(requestContext, "name");
-        if (name == null)
-            throw new AJAXException("Missing 'name' parameter");
-        
-        try
-        {
-            PageSecurity pageSecurity = pageManager.getPageSecurity();        
-            SecurityConstraintsDef def = pageSecurity.getSecurityConstraintsDef(name);
-            if (def == null)
-            {
-                return 0;
-            }
-            List defs = pageSecurity.getSecurityConstraintsDefs();
-            defs.remove(def);
-            pageSecurity.setSecurityConstraintsDefs(defs);
-            pageManager.updatePageSecurity(pageSecurity);
-        }
-        catch (Exception e)
-        {
-            throw new AJAXException(e);
-        }        
-        return 1;
-    }
-    
-    protected int updateConstraintDefinition(RequestContext requestContext, Map resultMap)
-    throws AJAXException
-    {
-    	System.out.println( "SecurityConstraintsAction updateConstraintDefinition started" );
-        	
-        int count = 0;
-        boolean added = false;
-        String xml = getActionParameter(requestContext, "xml");
-        if (xml == null)
-            throw new AJAXException("Missing 'xml' parameter");
-        try
-        {
-            DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
-            DocumentBuilder builder = domFactory.newDocumentBuilder();
-            String charset = requestContext.getCharacterEncoding();
-            byte [] bytes = (charset != null ? xml.getBytes(charset) : xml.getBytes());
-            Document document = builder.parse(new ByteArrayInputStream(bytes));
-            
-            Element root = document.getDocumentElement();
-            String name = root.getAttribute("name");
-            PageSecurity pageSecurity = pageManager.getPageSecurity();
-            SecurityConstraintsDef def = pageSecurity.getSecurityConstraintsDef(name);
-            int defsSize = 0;
-            if (def == null)
-            {
-                def = pageManager.newSecurityConstraintsDef();
-                def.setName(name);
-                added = true;
-            }
-            NodeList xmlConstraints = root.getElementsByTagName("security-constraint");
-            int xmlSize = xmlConstraints.getLength();
-            if (added == false)
-            {
-                defsSize = def.getSecurityConstraints().size();
-            }
-            int min = (xmlSize < defsSize) ? xmlSize : defsSize;
-            List constraints = def.getSecurityConstraints();
-            NodeList owners = root.getElementsByTagName("owner");
-            if (owners.getLength() == 1)
-            {
-            }
-            for (int ix = 0; ix < min; ix++)
-            {
-                Element xmlConstraint = (Element)xmlConstraints.item(ix);
-                SecurityConstraint constraint =  (SecurityConstraint)constraints.get(ix);                
-                updateConstraintValues(xmlConstraint, constraint);
-                count++;                
-            }
-            if (xmlSize < defsSize)
-            {
-                // remove constraints
-                List deletes = new ArrayList(defsSize - xmlSize);
-                for (int ix = min; ix < defsSize; ix++)
-                {
-                    deletes.add(constraints.get(ix));
-                }
-                for (int ix = 0; ix < deletes.size(); ix++)
-                {
-                    constraints.remove(deletes.get(ix));
-                    count++;                    
-                }                
-            }
-            else if (xmlSize > defsSize)
-            {
-                // add new constraints
-                for (int ix = min; ix < xmlSize; ix++)
-                {
-                    Element xmlConstraint = (Element)xmlConstraints.item(ix);
-                    SecurityConstraint constraint =  pageManager.newPageSecuritySecurityConstraint();                    
-                    updateConstraintValues(xmlConstraint, constraint);
-                    constraints.add(constraint);                    
-                    count++;
-                }                
-            }
-            if (added)
-            {                
-                pageSecurity.getSecurityConstraintsDefs().add(def);
-                pageSecurity.setSecurityConstraintsDefs(pageSecurity.getSecurityConstraintsDefs());
-            }
-            pageManager.updatePageSecurity(pageSecurity);
-        }
-        catch (Exception e)
-        {
-        	System.out.println( "SecurityConstraintsAction updateConstraintDefinition failure caused by " + e.getClass().getName() + " " + e.getMessage() );
-        	e.printStackTrace();
-        	log.error( "SecurityConstraintsAction updateConstraintDefinition failure caused by " + e.getClass().getName() + " " + e.getMessage(), e );
-            throw new AJAXException(e);
-        }
-        return count;
-    }
-    
-    protected void updateConstraintValues(Element xmlConstraint, SecurityConstraint constraint)
-    {
-        constraint.setRoles(parseCSVList(getChildText(xmlConstraint, "roles")));
-        constraint.setGroups(parseCSVList(getChildText(xmlConstraint, "groups")));
-        constraint.setPermissions(parseCSVList(getChildText(xmlConstraint, "permissions")));
-        constraint.setUsers(parseCSVList(getChildText(xmlConstraint, "users")));        
-    }
-    
-    protected String getChildText(Element parent, String childName)
-    {
-        NodeList children = parent.getElementsByTagName(childName);
-        if (children.getLength() > 0)
-        {
-            return ((Element)children.item(0)).getTextContent();
-        }
-        return null;
-    }
-    
-    protected List parseCSVList(String csv)
-    {
-        if (csv != null)
-        {
-            List csvList = new ArrayList(4);
-            if (csv.indexOf(',') != -1)
-            {
-                StringTokenizer csvTokens = new StringTokenizer(csv, ",");
-                while (csvTokens.hasMoreTokens())
-                {
-                    csvList.add(csvTokens.nextToken().trim());
-                }
-            }
-            else
-            {
-                csvList.add(csv);
-            }
-            return csvList;
-        }
-        return null;
-    }
-    
-    protected int removeGlobal(RequestContext requestContext, Map resultMap)
-    throws AJAXException
-    {
-        int count = 0;
-        String name = getActionParameter(requestContext, "name");
-        if (name == null)
-            throw new AJAXException("Missing 'name' parameter");
-        
-        try
-        {
-            PageSecurity pageSecurity = pageManager.getPageSecurity();        
-            List globals = pageSecurity.getGlobalSecurityConstraintsRefs();
-            if (!globals.contains(name))
-            {
-                return 0;
-            }
-            globals.remove(name);
-            pageSecurity.setGlobalSecurityConstraintsRefs(globals);
-            pageManager.updatePageSecurity(pageSecurity);
-            count++;
-        }
-        catch (Exception e)
-        {
-            throw new AJAXException(e);
-        }        
-        return count;
-    }
-       
-    protected int addGlobal(RequestContext requestContext, Map resultMap)
-    throws AJAXException
-    {
-        int count = 0;
-        String name = getActionParameter(requestContext, "name");
-        if (name == null)
-            throw new AJAXException("Missing 'name' parameter");
-        
-        try
-        {
-            PageSecurity pageSecurity = pageManager.getPageSecurity();        
-            List globals = pageSecurity.getGlobalSecurityConstraintsRefs();
-            if (pageSecurity.getSecurityConstraintsDef(name) == null)
-            {
-                throw new AJAXException("global name doesnt exist in definitions");
-            }
-            if (globals.contains(name))
-            {
-                // already exist;
-                return count;
-            }
-            globals.add(name);
-            pageSecurity.setGlobalSecurityConstraintsRefs(globals);
-            pageManager.updatePageSecurity(pageSecurity);
-            count++;
-        }
-        catch (Exception e)
-        {
-            throw new AJAXException(e);
-        }        
-        return count;
-    }
-    
-}
+ * 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.io.ByteArrayInputStream;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.StringTokenizer;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.jetspeed.JetspeedActions;
+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.SecurityConstraint;
+import org.apache.jetspeed.om.page.PageSecurity;
+import org.apache.jetspeed.om.page.SecurityConstraintsDef;
+import org.apache.jetspeed.page.PageManager;
+import org.apache.jetspeed.request.RequestContext;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+
+/**
+ * Security Permission action
+ * 
+ * AJAX Parameters: 
+ *    action = constraints
+ *    method = add-def | update-def | remove-def | add-global | remove-global   
+ *    name = name of constraint definition or global definition
+ *    xml = the constraints payload, same format as PSML constraint defs
+ *    
+ * @author <a href="mailto:taylor@apache.org">David Sean Taylor </a>
+ * @version $Id: $
+ */
+public class SecurityConstraintsAction 
+    extends BasePortletAction 
+    implements AjaxAction, AjaxBuilder, Constants
+{
+    protected static final Log log = LogFactory.getLog(SecurityConstraintsAction.class);
+
+    public SecurityConstraintsAction(String template, 
+                                     String errorTemplate, 
+                                     PageManager pm,
+                                     PortletActionSecurityBehavior securityBehavior)                                     
+    {
+        super(template, errorTemplate, pm, securityBehavior); 
+    }
+
+    public SecurityConstraintsAction(String template, 
+            String errorTemplate, 
+            PageManager pm)
+    {
+        this(template, errorTemplate, pm, null); 
+    }
+    
+    public boolean run(RequestContext requestContext, Map resultMap)
+            throws AJAXException
+    {
+    	System.out.println( "SecurityConstraintsAction run" );
+        boolean success = true;
+        String status = "success";
+        try
+        {
+            resultMap.put(ACTION, "constraints");
+            // Get the necessary parameters off of the request
+            String method = getActionParameter(requestContext, "method");
+            if (method == null) 
+            { 
+                throw new RuntimeException("Method not provided"); 
+            }            
+            resultMap.put("method", method);
+            if (false == checkAccess(requestContext, JetspeedActions.EDIT))
+            {
+                success = false;
+                resultMap.put(REASON, "Insufficient access to administer portal permissions");                
+                return success;
+            }           
+            int count = 0;
+            if (method.equals("add-def") || method.equals("update-def"))
+            {
+                count = updateConstraintDefinition(requestContext, resultMap);
+            }
+            else if (method.equals("remove-def"))
+            {
+                count = removeConstraintDefinition(requestContext, resultMap);
+            }
+            else if (method.equals("add-global"))
+            {
+                count = addGlobal(requestContext, resultMap);
+            }
+            else if (method.equals("remove-global"))
+            {
+                count = removeGlobal(requestContext, resultMap);
+            }
+            else
+            {
+                success = false;
+                resultMap.put(REASON, "Unsupported portal constraints method: " + method);                
+                return success;                
+            }
+            resultMap.put("count", Integer.toString(count));
+            resultMap.put(STATUS, status);
+        } 
+        catch (Exception e)
+        {
+        	System.out.println( "SecurityConstraintsAction run failure caused by " + e.getClass().getName() + " " + e.getMessage() );
+        	e.printStackTrace();
+            log.error("exception administering portal permissions", e);
+            resultMap.put(REASON, e.toString());
+            success = false;
+        }
+        System.out.println( "SecurityConstraintsAction complete " + resultMap.toString() );
+        return success;
+    }
+    
+    protected int removeConstraintDefinition(RequestContext requestContext, Map resultMap)
+    throws AJAXException
+    {
+        String name = getActionParameter(requestContext, "name");
+        if (name == null)
+            throw new AJAXException("Missing 'name' parameter");
+        
+        try
+        {
+            PageSecurity pageSecurity = pageManager.getPageSecurity();        
+            SecurityConstraintsDef def = pageSecurity.getSecurityConstraintsDef(name);
+            if (def == null)
+            {
+                return 0;
+            }
+            List defs = pageSecurity.getSecurityConstraintsDefs();
+            defs.remove(def);
+            pageSecurity.setSecurityConstraintsDefs(defs);
+            pageManager.updatePageSecurity(pageSecurity);
+        }
+        catch (Exception e)
+        {
+            throw new AJAXException(e);
+        }        
+        return 1;
+    }
+    
+    protected int updateConstraintDefinition(RequestContext requestContext, Map resultMap)
+    throws AJAXException
+    {
+    	System.out.println( "SecurityConstraintsAction updateConstraintDefinition started" );
+        	
+        int count = 0;
+        boolean added = false;
+        String xml = getActionParameter(requestContext, "xml");
+        if (xml == null)
+            throw new AJAXException("Missing 'xml' parameter");
+        try
+        {
+            DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
+            DocumentBuilder builder = domFactory.newDocumentBuilder();
+            String charset = requestContext.getCharacterEncoding();
+            byte [] bytes = (charset != null ? xml.getBytes(charset) : xml.getBytes());
+            Document document = builder.parse(new ByteArrayInputStream(bytes));
+            
+            Element root = document.getDocumentElement();
+            String name = root.getAttribute("name");
+            PageSecurity pageSecurity = pageManager.getPageSecurity();
+            SecurityConstraintsDef def = pageSecurity.getSecurityConstraintsDef(name);
+            int defsSize = 0;
+            if (def == null)
+            {
+                def = pageManager.newSecurityConstraintsDef();
+                def.setName(name);
+                added = true;
+            }
+            NodeList xmlConstraints = root.getElementsByTagName("security-constraint");
+            int xmlSize = xmlConstraints.getLength();
+            if (added == false)
+            {
+                defsSize = def.getSecurityConstraints().size();
+            }
+            int min = (xmlSize < defsSize) ? xmlSize : defsSize;
+            List constraints = def.getSecurityConstraints();
+            NodeList owners = root.getElementsByTagName("owner");
+            if (owners.getLength() == 1)
+            {
+            }
+            for (int ix = 0; ix < min; ix++)
+            {
+                Element xmlConstraint = (Element)xmlConstraints.item(ix);
+                SecurityConstraint constraint =  (SecurityConstraint)constraints.get(ix);                
+                updateConstraintValues(xmlConstraint, constraint);
+                count++;                
+            }
+            if (xmlSize < defsSize)
+            {
+                // remove constraints
+                List deletes = new ArrayList(defsSize - xmlSize);
+                for (int ix = min; ix < defsSize; ix++)
+                {
+                    deletes.add(constraints.get(ix));
+                }
+                for (int ix = 0; ix < deletes.size(); ix++)
+                {
+                    constraints.remove(deletes.get(ix));
+                    count++;                    
+                }                
+            }
+            else if (xmlSize > defsSize)
+            {
+                // add new constraints
+                for (int ix = min; ix < xmlSize; ix++)
+                {
+                    Element xmlConstraint = (Element)xmlConstraints.item(ix);
+                    SecurityConstraint constraint =  pageManager.newPageSecuritySecurityConstraint();                    
+                    updateConstraintValues(xmlConstraint, constraint);
+                    constraints.add(constraint);                    
+                    count++;
+                }                
+            }
+            if (added)
+            {                
+                pageSecurity.getSecurityConstraintsDefs().add(def);
+                pageSecurity.setSecurityConstraintsDefs(pageSecurity.getSecurityConstraintsDefs());
+            }
+            pageManager.updatePageSecurity(pageSecurity);
+        }
+        catch (Exception e)
+        {
+        	System.out.println( "SecurityConstraintsAction updateConstraintDefinition failure caused by " + e.getClass().getName() + " " + e.getMessage() );
+        	e.printStackTrace();
+        	log.error( "SecurityConstraintsAction updateConstraintDefinition failure caused by " + e.getClass().getName() + " " + e.getMessage(), e );
+            throw new AJAXException(e);
+        }
+        return count;
+    }
+    
+    protected void updateConstraintValues(Element xmlConstraint, SecurityConstraint constraint)
+    {
+        constraint.setRoles(parseCSVList(getChildText(xmlConstraint, "roles")));
+        constraint.setGroups(parseCSVList(getChildText(xmlConstraint, "groups")));
+        constraint.setPermissions(parseCSVList(getChildText(xmlConstraint, "permissions")));
+        constraint.setUsers(parseCSVList(getChildText(xmlConstraint, "users")));        
+    }
+    
+    protected String getChildText(Element parent, String childName)
+    {
+        NodeList children = parent.getElementsByTagName(childName);
+        if (children.getLength() > 0)
+        {
+            return ((Element)children.item(0)).getTextContent();
+        }
+        return null;
+    }
+    
+    protected List parseCSVList(String csv)
+    {
+        if (csv != null)
+        {
+            List csvList = new ArrayList(4);
+            if (csv.indexOf(',') != -1)
+            {
+                StringTokenizer csvTokens = new StringTokenizer(csv, ",");
+                while (csvTokens.hasMoreTokens())
+                {
+                    csvList.add(csvTokens.nextToken().trim());
+                }
+            }
+            else
+            {
+                csvList.add(csv);
+            }
+            return csvList;
+        }
+        return null;
+    }
+    
+    protected int removeGlobal(RequestContext requestContext, Map resultMap)
+    throws AJAXException
+    {
+        int count = 0;
+        String name = getActionParameter(requestContext, "name");
+        if (name == null)
+            throw new AJAXException("Missing 'name' parameter");
+        
+        try
+        {
+            PageSecurity pageSecurity = pageManager.getPageSecurity();        
+            List globals = pageSecurity.getGlobalSecurityConstraintsRefs();
+            if (!globals.contains(name))
+            {
+                return 0;
+            }
+            globals.remove(name);
+            pageSecurity.setGlobalSecurityConstraintsRefs(globals);
+            pageManager.updatePageSecurity(pageSecurity);
+            count++;
+        }
+        catch (Exception e)
+        {
+            throw new AJAXException(e);
+        }        
+        return count;
+    }
+       
+    protected int addGlobal(RequestContext requestContext, Map resultMap)
+    throws AJAXException
+    {
+        int count = 0;
+        String name = getActionParameter(requestContext, "name");
+        if (name == null)
+            throw new AJAXException("Missing 'name' parameter");
+        
+        try
+        {
+            PageSecurity pageSecurity = pageManager.getPageSecurity();        
+            List globals = pageSecurity.getGlobalSecurityConstraintsRefs();
+            if (pageSecurity.getSecurityConstraintsDef(name) == null)
+            {
+                throw new AJAXException("global name doesnt exist in definitions");
+            }
+            if (globals.contains(name))
+            {
+                // already exist;
+                return count;
+            }
+            globals.add(name);
+            pageSecurity.setGlobalSecurityConstraintsRefs(globals);
+            pageManager.updatePageSecurity(pageSecurity);
+            count++;
+        }
+        catch (Exception e)
+        {
+            throw new AJAXException(e);
+        }        
+        return count;
+    }
+    
+}

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

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/SecurityPermissionAction.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/SecurityPermissionAction.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/SecurityPermissionAction.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/SecurityPermissionAction.java Fri Dec 12 04:06:29 2008
@@ -1,240 +1,240 @@
-/*
+/*
  * 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.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.StringTokenizer;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.jetspeed.JetspeedActions;
-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.request.RequestContext;
-import org.apache.jetspeed.security.JetspeedPermission;
-import org.apache.jetspeed.security.JetspeedPrincipal;
-import org.apache.jetspeed.security.JetspeedPrincipalType;
-import org.apache.jetspeed.security.PermissionManager;
-import org.apache.jetspeed.security.SecurityException;
-import org.apache.jetspeed.security.impl.TransientRole;
-
-/**
- * Security Permission action
- * 
- * AJAX Parameters: 
- *    action = permission
- *    method = add | update | delete 
- *    resource = name of the resource to modify
- *    type = portlet | page | folder
- *    roles = comma separated list of roles
- *    actions = comma separated list of actions
- *    oldactions = comma separated list of old actions
- *    
- * @author <a href="mailto:taylor@apache.org">David Sean Taylor </a>
- * @version $Id: $
- */
-public class SecurityPermissionAction 
-    extends BasePortletAction 
-    implements AjaxAction, AjaxBuilder, Constants
-{
-    protected static final Log log = LogFactory.getLog(SecurityPermissionAction.class);
-    protected PermissionManager pm = null;
-
-    public SecurityPermissionAction(String template, 
-                            String errorTemplate, 
-                            PermissionManager pm,
-                            PortletActionSecurityBehavior securityBehavior)
-    {
-        super(template, errorTemplate, securityBehavior); 
-        this.pm = pm;
-    }
-    
-    public boolean run(RequestContext requestContext, Map resultMap)
-            throws AJAXException
-    {
-        boolean success = true;
-        String status = "success";
-        try
-        {
-            resultMap.put(ACTION, "permissions");
-            // Get the necessary parameters off of the request
-            String method = getActionParameter(requestContext, "method");
-            if (method == null) 
-            { 
-                throw new RuntimeException("Method not provided"); 
-            }            
-            resultMap.put("method", method);
-            if (false == checkAccess(requestContext, JetspeedActions.EDIT))
-            {
-                success = false;
-                resultMap.put(REASON, "Insufficient access to administer portal permissions");                
-                return success;
-            }           
-            int count = 0;
-            if (method.equals("add"))
-            {
-                count = addPermission(requestContext, resultMap);
-            }
-            else if (method.equals("update"))
-            {
-                count = updatePermission(requestContext, resultMap);
-            }            
-            else if (method.equals("remove"))
-            {
-                count = removePermission(requestContext, resultMap);
-            }
-            else
-            {
-                success = false;
-                resultMap.put(REASON, "Unsupported portal permissions method: " + method);                
-                return success;                
-            }
-            resultMap.put("count", Integer.toString(count));
-            resultMap.put("resource", getActionParameter(requestContext, "resource"));
-            resultMap.put("type", getActionParameter(requestContext, "type"));
-            resultMap.put("actions", getActionParameter(requestContext, "actions"));
-            resultMap.put("roles", getActionParameter(requestContext, "roles"));
-            resultMap.put(STATUS, status);
-        } 
-        catch (Exception e)
-        {
-            log.error("exception administering portal permissions", e);
-            resultMap.put(REASON, e.toString());
-            success = false;
-        }
-        return success;
-    }
-    
-    protected int addPermission(RequestContext requestContext, Map resultMap)
-    throws AJAXException
-    {
-        try
-        {
-            String type = getActionParameter(requestContext, "type");
-            if (type == null)
-                throw new AJAXException("Missing 'type' parameter");
-            String resource = getActionParameter(requestContext, "resource");
-            if (resource == null)
-                throw new AJAXException("Missing 'resource' parameter");
-            String actions = getActionParameter(requestContext, "actions");
-            if (actions == null)
-                throw new AJAXException("Missing 'actions' parameter");
-            
-            JetspeedPermission permission = pm.newPermission(type, resource, actions);            
-            if (pm.permissionExists(permission))
-            {
-                throw new AJAXException("Permission " + resource + " already exists");
-            }   
-            
-            pm.addPermission(permission);            
-            String roleNames = getActionParameter(requestContext, "roles");
-            return updateRoles(permission, roleNames);
-        }
-        catch (SecurityException e)
-        {
-            throw new AJAXException(e.toString(), e);
-        }        
-    }
-
-    protected int updatePermission(RequestContext requestContext, Map resultMap)
-    throws AJAXException
-    {
-        try
-        {
-            String type = getActionParameter(requestContext, "type");
-            if (type == null)
-                throw new AJAXException("Missing 'type' parameter");
-            String resource = getActionParameter(requestContext, "resource");
-            if (resource == null)
-                throw new AJAXException("Missing 'resource' parameter");
-            String actions = getActionParameter(requestContext, "actions");
-            if (actions == null)
-                throw new AJAXException("Missing 'actions' parameter");
-            String oldActions = getActionParameter(requestContext, "oldactions");
-            if (oldActions == null)
-            {
-                // assume no change
-                oldActions = actions;
-            }
-            JetspeedPermission permission = pm.newPermission(type, resource, actions);
-            if (!oldActions.equals(actions))
-            {
-                pm.updatePermission(permission);
-            }   
-//            else
-//            {
-//                permission = pm.newPermission(type, resource, actions);
-//            }
-            String roleNames = getActionParameter(requestContext, "roles");
-            return updateRoles(permission, roleNames);
-        }
-        catch (SecurityException e)
-        {
-            throw new AJAXException(e.toString(), e);
-        }        
-    }
-    
-    protected int updateRoles(JetspeedPermission permission, String roleNames)
-    throws SecurityException
-    {
-        int count = 0;
-        List<JetspeedPrincipal> principals = new LinkedList<JetspeedPrincipal>();
-        if (roleNames != null)
-        {
-            StringTokenizer toke = new StringTokenizer(roleNames, ",");
-            while (toke.hasMoreTokens())
-            {
-                principals.add(new TransientRole(toke.nextToken()));
-                count++;
-            }                
-        }
-        pm.grantPermissionOnlyTo(permission, JetspeedPrincipalType.ROLE, principals);
-        return count;
-    }
-
-    protected int removePermission(RequestContext requestContext, Map resultMap)
-    throws AJAXException
-    {
-        try
-        {
-            String type = getActionParameter(requestContext, "type");
-            if (type == null)
-                throw new AJAXException("Missing 'type' parameter");
-            String resource = getActionParameter(requestContext, "resource");
-            if (resource == null)
-                throw new AJAXException("Missing 'resource' parameter");
-            String actions = getActionParameter(requestContext, "actions");
-            if (actions == null)
-                throw new AJAXException("Missing 'actions' parameter");            
-            JetspeedPermission permission = pm.newPermission(type, resource, actions);            
-            if (pm.permissionExists(permission))
-            {
-                pm.removePermission(permission);
-                return 1;
-            }
-            return 0;
-        }
-        catch (SecurityException e)
-        {
-            throw new AJAXException(e.toString(), e);
-        }
-    }
-}
+ * 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.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.StringTokenizer;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.jetspeed.JetspeedActions;
+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.request.RequestContext;
+import org.apache.jetspeed.security.JetspeedPermission;
+import org.apache.jetspeed.security.JetspeedPrincipal;
+import org.apache.jetspeed.security.JetspeedPrincipalType;
+import org.apache.jetspeed.security.PermissionManager;
+import org.apache.jetspeed.security.SecurityException;
+import org.apache.jetspeed.security.impl.TransientRole;
+
+/**
+ * Security Permission action
+ * 
+ * AJAX Parameters: 
+ *    action = permission
+ *    method = add | update | delete 
+ *    resource = name of the resource to modify
+ *    type = portlet | page | folder
+ *    roles = comma separated list of roles
+ *    actions = comma separated list of actions
+ *    oldactions = comma separated list of old actions
+ *    
+ * @author <a href="mailto:taylor@apache.org">David Sean Taylor </a>
+ * @version $Id: $
+ */
+public class SecurityPermissionAction 
+    extends BasePortletAction 
+    implements AjaxAction, AjaxBuilder, Constants
+{
+    protected static final Log log = LogFactory.getLog(SecurityPermissionAction.class);
+    protected PermissionManager pm = null;
+
+    public SecurityPermissionAction(String template, 
+                            String errorTemplate, 
+                            PermissionManager pm,
+                            PortletActionSecurityBehavior securityBehavior)
+    {
+        super(template, errorTemplate, securityBehavior); 
+        this.pm = pm;
+    }
+    
+    public boolean run(RequestContext requestContext, Map resultMap)
+            throws AJAXException
+    {
+        boolean success = true;
+        String status = "success";
+        try
+        {
+            resultMap.put(ACTION, "permissions");
+            // Get the necessary parameters off of the request
+            String method = getActionParameter(requestContext, "method");
+            if (method == null) 
+            { 
+                throw new RuntimeException("Method not provided"); 
+            }            
+            resultMap.put("method", method);
+            if (false == checkAccess(requestContext, JetspeedActions.EDIT))
+            {
+                success = false;
+                resultMap.put(REASON, "Insufficient access to administer portal permissions");                
+                return success;
+            }           
+            int count = 0;
+            if (method.equals("add"))
+            {
+                count = addPermission(requestContext, resultMap);
+            }
+            else if (method.equals("update"))
+            {
+                count = updatePermission(requestContext, resultMap);
+            }            
+            else if (method.equals("remove"))
+            {
+                count = removePermission(requestContext, resultMap);
+            }
+            else
+            {
+                success = false;
+                resultMap.put(REASON, "Unsupported portal permissions method: " + method);                
+                return success;                
+            }
+            resultMap.put("count", Integer.toString(count));
+            resultMap.put("resource", getActionParameter(requestContext, "resource"));
+            resultMap.put("type", getActionParameter(requestContext, "type"));
+            resultMap.put("actions", getActionParameter(requestContext, "actions"));
+            resultMap.put("roles", getActionParameter(requestContext, "roles"));
+            resultMap.put(STATUS, status);
+        } 
+        catch (Exception e)
+        {
+            log.error("exception administering portal permissions", e);
+            resultMap.put(REASON, e.toString());
+            success = false;
+        }
+        return success;
+    }
+    
+    protected int addPermission(RequestContext requestContext, Map resultMap)
+    throws AJAXException
+    {
+        try
+        {
+            String type = getActionParameter(requestContext, "type");
+            if (type == null)
+                throw new AJAXException("Missing 'type' parameter");
+            String resource = getActionParameter(requestContext, "resource");
+            if (resource == null)
+                throw new AJAXException("Missing 'resource' parameter");
+            String actions = getActionParameter(requestContext, "actions");
+            if (actions == null)
+                throw new AJAXException("Missing 'actions' parameter");
+            
+            JetspeedPermission permission = pm.newPermission(type, resource, actions);            
+            if (pm.permissionExists(permission))
+            {
+                throw new AJAXException("Permission " + resource + " already exists");
+            }   
+            
+            pm.addPermission(permission);            
+            String roleNames = getActionParameter(requestContext, "roles");
+            return updateRoles(permission, roleNames);
+        }
+        catch (SecurityException e)
+        {
+            throw new AJAXException(e.toString(), e);
+        }        
+    }
+
+    protected int updatePermission(RequestContext requestContext, Map resultMap)
+    throws AJAXException
+    {
+        try
+        {
+            String type = getActionParameter(requestContext, "type");
+            if (type == null)
+                throw new AJAXException("Missing 'type' parameter");
+            String resource = getActionParameter(requestContext, "resource");
+            if (resource == null)
+                throw new AJAXException("Missing 'resource' parameter");
+            String actions = getActionParameter(requestContext, "actions");
+            if (actions == null)
+                throw new AJAXException("Missing 'actions' parameter");
+            String oldActions = getActionParameter(requestContext, "oldactions");
+            if (oldActions == null)
+            {
+                // assume no change
+                oldActions = actions;
+            }
+            JetspeedPermission permission = pm.newPermission(type, resource, actions);
+            if (!oldActions.equals(actions))
+            {
+                pm.updatePermission(permission);
+            }   
+//            else
+//            {
+//                permission = pm.newPermission(type, resource, actions);
+//            }
+            String roleNames = getActionParameter(requestContext, "roles");
+            return updateRoles(permission, roleNames);
+        }
+        catch (SecurityException e)
+        {
+            throw new AJAXException(e.toString(), e);
+        }        
+    }
+    
+    protected int updateRoles(JetspeedPermission permission, String roleNames)
+    throws SecurityException
+    {
+        int count = 0;
+        List<JetspeedPrincipal> principals = new LinkedList<JetspeedPrincipal>();
+        if (roleNames != null)
+        {
+            StringTokenizer toke = new StringTokenizer(roleNames, ",");
+            while (toke.hasMoreTokens())
+            {
+                principals.add(new TransientRole(toke.nextToken()));
+                count++;
+            }                
+        }
+        pm.grantPermissionOnlyTo(permission, JetspeedPrincipalType.ROLE, principals);
+        return count;
+    }
+
+    protected int removePermission(RequestContext requestContext, Map resultMap)
+    throws AJAXException
+    {
+        try
+        {
+            String type = getActionParameter(requestContext, "type");
+            if (type == null)
+                throw new AJAXException("Missing 'type' parameter");
+            String resource = getActionParameter(requestContext, "resource");
+            if (resource == null)
+                throw new AJAXException("Missing 'resource' parameter");
+            String actions = getActionParameter(requestContext, "actions");
+            if (actions == null)
+                throw new AJAXException("Missing 'actions' parameter");            
+            JetspeedPermission permission = pm.newPermission(type, resource, actions);            
+            if (pm.permissionExists(permission))
+            {
+                pm.removePermission(permission);
+                return 1;
+            }
+            return 0;
+        }
+        catch (SecurityException e)
+        {
+            throw new AJAXException(e.toString(), e);
+        }
+    }
+}

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

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

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

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

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/localization/impl/SimplifiedLocalizationValveImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/localization/impl/SimplifiedLocalizationValveImpl.java?rev=725977&r1=725976&r2=725977&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/localization/impl/SimplifiedLocalizationValveImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/localization/impl/SimplifiedLocalizationValveImpl.java Fri Dec 12 04:06:29 2008
@@ -1,131 +1,131 @@
-/*
+/*
  * 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.localization.impl;
-
-import java.util.Enumeration;
-import java.util.Locale;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.jetspeed.PortalReservedParameters;
-import org.apache.jetspeed.i18n.CurrentLocale;
-import org.apache.jetspeed.pipeline.PipelineException;
-import org.apache.jetspeed.pipeline.valve.AbstractValve;
-import org.apache.jetspeed.pipeline.valve.LocalizationValve;
-import org.apache.jetspeed.pipeline.valve.ValveContext;
-import org.apache.jetspeed.request.RequestContext;
-
-/**
- * LocalizationValveImpl
- * 
- * @author <a href="mailto:taylor@apache.org">David Sean Taylor </a>
- * @version $Id: LocalizationValveImpl.java 378091 2006-02-15 21:12:28Z taylor $
- */
-public class SimplifiedLocalizationValveImpl extends AbstractValve implements LocalizationValve
-{
-    private static final Log log = LogFactory.getLog(LocalizationValveImpl.class);
-    private Locale defaultLocale = null;
-    
-    public SimplifiedLocalizationValveImpl() {}
-    
-    public SimplifiedLocalizationValveImpl(String defaultLanguage)
-    {
-        String language = defaultLanguage != null ? defaultLanguage.trim() : "";
-        if (language.length()>0)
-        {
-            // Code taken from LocaleSelectorPorltet
-            String country = "";
-            String variant = "";
-            int countryIndex = language.indexOf('_');
-            if (countryIndex > -1)
-            {
-                country = language.substring(countryIndex + 1).trim();
-                language = language.substring(0, countryIndex).trim();
-                int vDash = country.indexOf("_");
-                if (vDash > 0)
-                {
-                    String cTemp = country.substring(0, vDash);
-                    variant = country.substring(vDash + 1);
-                    country = cTemp;
-                }
-            }
-
-            defaultLocale = new Locale(language, country, variant);
-            if ( defaultLocale.getLanguage().length() == 0 )
-            {
-                // not a valid language
-                defaultLocale = null;
-                log.warn("Invalid or unrecognized default language: "+language);
-            }
-            else
-            {
-                log.info("Default language set: "+defaultLocale);
-            }
-                
-        }
-    }
-    
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.jetspeed.pipeline.valve.Valve#invoke(org.apache.jetspeed.request.RequestContext,
-     *      org.apache.jetspeed.pipeline.valve.ValveContext)
-     */
-    public void invoke( RequestContext request, ValveContext context ) throws PipelineException
-    {
-        Locale locale = (Locale)request.getRequest().getSession().getAttribute(PortalReservedParameters.PREFERED_LOCALE_ATTRIBUTE);
-        
-        if ( locale == null && defaultLocale != null )
-        {
-            locale = defaultLocale;
-        }
-
-        if (locale == null)
-        {
-            locale = request.getRequest().getLocale();
-        }
-        
-        if (locale == null)
-        {
-            Enumeration preferedLocales = request.getRequest().getLocales();
-            while (preferedLocales.hasMoreElements() && locale == null)
-            {
-                locale = (Locale) preferedLocales.nextElement();
-            }
-        }
-
-        if (locale == null)
-        {
-            locale = Locale.getDefault();
-        }
-
-        request.setLocale(locale);
-        request.getRequest().setAttribute(PortalReservedParameters.PREFERED_LOCALE_ATTRIBUTE, locale);
-        request.getRequest().getSession().setAttribute(PortalReservedParameters.PREFERED_LOCALE_ATTRIBUTE, locale);
-        CurrentLocale.set(locale);
-       
-        // Pass control to the next Valve in the Pipeline
-        context.invokeNext(request);
-
-    }
-
-    public String toString()
-    {
-        return "LocalizationValve";
-    }
-
+ * 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.localization.impl;
+
+import java.util.Enumeration;
+import java.util.Locale;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.jetspeed.PortalReservedParameters;
+import org.apache.jetspeed.i18n.CurrentLocale;
+import org.apache.jetspeed.pipeline.PipelineException;
+import org.apache.jetspeed.pipeline.valve.AbstractValve;
+import org.apache.jetspeed.pipeline.valve.LocalizationValve;
+import org.apache.jetspeed.pipeline.valve.ValveContext;
+import org.apache.jetspeed.request.RequestContext;
+
+/**
+ * LocalizationValveImpl
+ * 
+ * @author <a href="mailto:taylor@apache.org">David Sean Taylor </a>
+ * @version $Id: LocalizationValveImpl.java 378091 2006-02-15 21:12:28Z taylor $
+ */
+public class SimplifiedLocalizationValveImpl extends AbstractValve implements LocalizationValve
+{
+    private static final Log log = LogFactory.getLog(LocalizationValveImpl.class);
+    private Locale defaultLocale = null;
+    
+    public SimplifiedLocalizationValveImpl() {}
+    
+    public SimplifiedLocalizationValveImpl(String defaultLanguage)
+    {
+        String language = defaultLanguage != null ? defaultLanguage.trim() : "";
+        if (language.length()>0)
+        {
+            // Code taken from LocaleSelectorPorltet
+            String country = "";
+            String variant = "";
+            int countryIndex = language.indexOf('_');
+            if (countryIndex > -1)
+            {
+                country = language.substring(countryIndex + 1).trim();
+                language = language.substring(0, countryIndex).trim();
+                int vDash = country.indexOf("_");
+                if (vDash > 0)
+                {
+                    String cTemp = country.substring(0, vDash);
+                    variant = country.substring(vDash + 1);
+                    country = cTemp;
+                }
+            }
+
+            defaultLocale = new Locale(language, country, variant);
+            if ( defaultLocale.getLanguage().length() == 0 )
+            {
+                // not a valid language
+                defaultLocale = null;
+                log.warn("Invalid or unrecognized default language: "+language);
+            }
+            else
+            {
+                log.info("Default language set: "+defaultLocale);
+            }
+                
+        }
+    }
+    
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.jetspeed.pipeline.valve.Valve#invoke(org.apache.jetspeed.request.RequestContext,
+     *      org.apache.jetspeed.pipeline.valve.ValveContext)
+     */
+    public void invoke( RequestContext request, ValveContext context ) throws PipelineException
+    {
+        Locale locale = (Locale)request.getRequest().getSession().getAttribute(PortalReservedParameters.PREFERED_LOCALE_ATTRIBUTE);
+        
+        if ( locale == null && defaultLocale != null )
+        {
+            locale = defaultLocale;
+        }
+
+        if (locale == null)
+        {
+            locale = request.getRequest().getLocale();
+        }
+        
+        if (locale == null)
+        {
+            Enumeration preferedLocales = request.getRequest().getLocales();
+            while (preferedLocales.hasMoreElements() && locale == null)
+            {
+                locale = (Locale) preferedLocales.nextElement();
+            }
+        }
+
+        if (locale == null)
+        {
+            locale = Locale.getDefault();
+        }
+
+        request.setLocale(locale);
+        request.getRequest().setAttribute(PortalReservedParameters.PREFERED_LOCALE_ATTRIBUTE, locale);
+        request.getRequest().getSession().setAttribute(PortalReservedParameters.PREFERED_LOCALE_ATTRIBUTE, locale);
+        CurrentLocale.set(locale);
+       
+        // Pass control to the next Valve in the Pipeline
+        context.invokeNext(request);
+
+    }
+
+    public String toString()
+    {
+        return "LocalizationValve";
+    }
+
 }
\ No newline at end of file

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

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/filter/PortalFilter.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/filter/PortalFilter.java?rev=725977&r1=725976&r2=725977&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/filter/PortalFilter.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/filter/PortalFilter.java Fri Dec 12 04:06:29 2008
@@ -1,174 +1,174 @@
-/*
- * 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.login.filter;
-
-import java.io.IOException;
-import java.security.Principal;
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.security.auth.Subject;
-import javax.servlet.Filter;
-import javax.servlet.FilterChain;
-import javax.servlet.FilterConfig;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpSession;
-
-import org.apache.jetspeed.Jetspeed;
-import org.apache.jetspeed.PortalReservedParameters;
-import org.apache.jetspeed.administration.PortalAuthenticationConfiguration;
-import org.apache.jetspeed.administration.PortalConfiguration;
-import org.apache.jetspeed.audit.AuditActivity;
-import org.apache.jetspeed.login.LoginConstants;
-import org.apache.jetspeed.security.AuthenticatedUser;
-import org.apache.jetspeed.security.AuthenticatedUserImpl;
-import org.apache.jetspeed.security.AuthenticationProvider;
-import org.apache.jetspeed.security.JetspeedSubjectFactory;
-import org.apache.jetspeed.security.PrincipalsSet;
-import org.apache.jetspeed.security.SecurityException;
-import org.apache.jetspeed.security.SubjectHelper;
-import org.apache.jetspeed.security.User;
-import org.apache.jetspeed.security.UserManager;
-
-public class PortalFilter implements Filter
-{
-    protected String guest = "guest";
-    
-    public void init(FilterConfig filterConfig) throws ServletException
-    {
-        PortalConfiguration config = Jetspeed.getConfiguration();
-        if (config != null)
-            guest = config.getString("default.user.principal");                
-    }
-
-    public void doFilter(ServletRequest sRequest,
-            ServletResponse sResponse, FilterChain filterChain)
-            throws IOException, ServletException
-    {
-        if (sRequest instanceof HttpServletRequest)
-        {
-            HttpServletRequest request = (HttpServletRequest)sRequest;
-            String username = request.getParameter(LoginConstants.USERNAME);
-            String password = request.getParameter(LoginConstants.PASSWORD);            
-            if (username != null)
-            {
-                UserManager userManager = (UserManager)Jetspeed.getComponentManager().getComponent("org.apache.jetspeed.security.UserManager");
-                AuditActivity audit = (AuditActivity)Jetspeed.getComponentManager().getComponent("org.apache.jetspeed.audit.AuditActivity");
-                AuthenticationProvider authProvider = (AuthenticationProvider)Jetspeed.getComponentManager().getComponent("org.apache.jetspeed.security.AuthenticationProvider");
-                
-                // Commenting out for the using latest securty API's
-                //boolean success = userManager.authenticate(username, password);
-                //if (success)
-                AuthenticatedUser authUser = null;
-                try{
-                	authUser = authProvider.authenticate(username, password);	
-                }
-                catch (SecurityException e) {
-                		throw new ServletException(e);                		
-				}
-                if (authUser != null)
-                {
-                    audit.logUserActivity(username, request.getRemoteAddr(), AuditActivity.AUTHENTICATION_SUCCESS, "PortalFilter");
-                    PortalAuthenticationConfiguration authenticationConfiguration = (PortalAuthenticationConfiguration)
-                        Jetspeed.getComponentManager().getComponent("org.apache.jetspeed.administration.PortalAuthenticationConfiguration");
-                    if (authenticationConfiguration.isCreateNewSessionOnLogin())
-                    {
-                        request.getSession().invalidate();
-                    }
-                    if (authUser.getUser() == null)
-                    {
-                        try
-                        {
-                            // load the user principals (roles, groups, credentials)
-                            User user = userManager.getUser(username);
-                            if ( user != null )
-                            {
-                            	authUser = new AuthenticatedUserImpl(user, authUser.getPublicCredentials(), authUser.getPrivateCredentials() );
-                            }
-                        }
-                        catch (SecurityException sex)
-                        {
-                        	// TODO: maybe some better handling required here
-                        	throw new ServletException(sex);
-                        }       
-                    }
-                    Subject subject;
-					try
-					{
-						// default solution using the build-in UserManager
-						subject = userManager.getSubject(authUser);
-						
-						// alternate DIY solution not using the build-in UserManager:
-                    	//subject = JetspeedSubjectFactory.createSubject(authUser.getUser(),authUser.getPrivateCredentials(),authUser.getPublicCredentials(),null);
-					}
-					catch (SecurityException e)
-					{
-                    	// TODO: maybe some better handling required here
-                    	throw new ServletException(e);
-					}
-                    sRequest = wrapperRequest(request, subject, authUser.getUser());
-                    request.getSession().removeAttribute(LoginConstants.ERRORCODE);
-                    HttpSession session = request.getSession(true);
-                    session.setAttribute(PortalReservedParameters.SESSION_KEY_SUBJECT, subject);
-                    //System.out.println("*** login session = " + session);
-                }
-                else
-                {
-                    audit.logUserActivity(username, request.getRemoteAddr(), AuditActivity.AUTHENTICATION_FAILURE, "PortalFilter");                    
-                    request.getSession().setAttribute(LoginConstants.ERRORCODE, LoginConstants.ERROR_INVALID_PASSWORD);                    
-                }
-            }
-            else
-            {
-                //HttpSession session = request.getSession();
-                //System.out.println("*** session = " + session);
-                Subject subject = (Subject)request.getSession().getAttribute(PortalReservedParameters.SESSION_KEY_SUBJECT);
-                if (subject != null)
-                {
-                    Principal principal = SubjectHelper.getPrincipal(subject, User.class);
-                    if (principal != null && principal.getName().equals(this.guest))
-                    {                        
-                    }
-                    else
-                    {
-                        sRequest = wrapperRequest(request, subject, principal);
-                    }
-                }                
-            }              
-
-            sRequest.setAttribute(PortalReservedParameters.PORTAL_FILTER_ATTRIBUTE, "true");
-        }
-        
-        if (filterChain != null)
-        {
-            filterChain.doFilter(sRequest, sResponse);
-        }
-    }
-    
-    private ServletRequest wrapperRequest(HttpServletRequest request, Subject subject, Principal principal)
-    {
-        PortalRequestWrapper wrapper = new PortalRequestWrapper(request, subject, principal);
-        return wrapper;
-    }
-
-    public void destroy()
-    {
-    }
-}
+/*
+ * 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.login.filter;
+
+import java.io.IOException;
+import java.security.Principal;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.security.auth.Subject;
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+
+import org.apache.jetspeed.Jetspeed;
+import org.apache.jetspeed.PortalReservedParameters;
+import org.apache.jetspeed.administration.PortalAuthenticationConfiguration;
+import org.apache.jetspeed.administration.PortalConfiguration;
+import org.apache.jetspeed.audit.AuditActivity;
+import org.apache.jetspeed.login.LoginConstants;
+import org.apache.jetspeed.security.AuthenticatedUser;
+import org.apache.jetspeed.security.AuthenticatedUserImpl;
+import org.apache.jetspeed.security.AuthenticationProvider;
+import org.apache.jetspeed.security.JetspeedSubjectFactory;
+import org.apache.jetspeed.security.PrincipalsSet;
+import org.apache.jetspeed.security.SecurityException;
+import org.apache.jetspeed.security.SubjectHelper;
+import org.apache.jetspeed.security.User;
+import org.apache.jetspeed.security.UserManager;
+
+public class PortalFilter implements Filter
+{
+    protected String guest = "guest";
+    
+    public void init(FilterConfig filterConfig) throws ServletException
+    {
+        PortalConfiguration config = Jetspeed.getConfiguration();
+        if (config != null)
+            guest = config.getString("default.user.principal");                
+    }
+
+    public void doFilter(ServletRequest sRequest,
+            ServletResponse sResponse, FilterChain filterChain)
+            throws IOException, ServletException
+    {
+        if (sRequest instanceof HttpServletRequest)
+        {
+            HttpServletRequest request = (HttpServletRequest)sRequest;
+            String username = request.getParameter(LoginConstants.USERNAME);
+            String password = request.getParameter(LoginConstants.PASSWORD);            
+            if (username != null)
+            {
+                UserManager userManager = (UserManager)Jetspeed.getComponentManager().getComponent("org.apache.jetspeed.security.UserManager");
+                AuditActivity audit = (AuditActivity)Jetspeed.getComponentManager().getComponent("org.apache.jetspeed.audit.AuditActivity");
+                AuthenticationProvider authProvider = (AuthenticationProvider)Jetspeed.getComponentManager().getComponent("org.apache.jetspeed.security.AuthenticationProvider");
+                
+                // Commenting out for the using latest securty API's
+                //boolean success = userManager.authenticate(username, password);
+                //if (success)
+                AuthenticatedUser authUser = null;
+                try{
+                	authUser = authProvider.authenticate(username, password);	
+                }
+                catch (SecurityException e) {
+                		throw new ServletException(e);                		
+				}
+                if (authUser != null)
+                {
+                    audit.logUserActivity(username, request.getRemoteAddr(), AuditActivity.AUTHENTICATION_SUCCESS, "PortalFilter");
+                    PortalAuthenticationConfiguration authenticationConfiguration = (PortalAuthenticationConfiguration)
+                        Jetspeed.getComponentManager().getComponent("org.apache.jetspeed.administration.PortalAuthenticationConfiguration");
+                    if (authenticationConfiguration.isCreateNewSessionOnLogin())
+                    {
+                        request.getSession().invalidate();
+                    }
+                    if (authUser.getUser() == null)
+                    {
+                        try
+                        {
+                            // load the user principals (roles, groups, credentials)
+                            User user = userManager.getUser(username);
+                            if ( user != null )
+                            {
+                            	authUser = new AuthenticatedUserImpl(user, authUser.getPublicCredentials(), authUser.getPrivateCredentials() );
+                            }
+                        }
+                        catch (SecurityException sex)
+                        {
+                        	// TODO: maybe some better handling required here
+                        	throw new ServletException(sex);
+                        }       
+                    }
+                    Subject subject;
+					try
+					{
+						// default solution using the build-in UserManager
+						subject = userManager.getSubject(authUser);
+						
+						// alternate DIY solution not using the build-in UserManager:
+                    	//subject = JetspeedSubjectFactory.createSubject(authUser.getUser(),authUser.getPrivateCredentials(),authUser.getPublicCredentials(),null);
+					}
+					catch (SecurityException e)
+					{
+                    	// TODO: maybe some better handling required here
+                    	throw new ServletException(e);
+					}
+                    sRequest = wrapperRequest(request, subject, authUser.getUser());
+                    request.getSession().removeAttribute(LoginConstants.ERRORCODE);
+                    HttpSession session = request.getSession(true);
+                    session.setAttribute(PortalReservedParameters.SESSION_KEY_SUBJECT, subject);
+                    //System.out.println("*** login session = " + session);
+                }
+                else
+                {
+                    audit.logUserActivity(username, request.getRemoteAddr(), AuditActivity.AUTHENTICATION_FAILURE, "PortalFilter");                    
+                    request.getSession().setAttribute(LoginConstants.ERRORCODE, LoginConstants.ERROR_INVALID_PASSWORD);                    
+                }
+            }
+            else
+            {
+                //HttpSession session = request.getSession();
+                //System.out.println("*** session = " + session);
+                Subject subject = (Subject)request.getSession().getAttribute(PortalReservedParameters.SESSION_KEY_SUBJECT);
+                if (subject != null)
+                {
+                    Principal principal = SubjectHelper.getPrincipal(subject, User.class);
+                    if (principal != null && principal.getName().equals(this.guest))
+                    {                        
+                    }
+                    else
+                    {
+                        sRequest = wrapperRequest(request, subject, principal);
+                    }
+                }                
+            }              
+
+            sRequest.setAttribute(PortalReservedParameters.PORTAL_FILTER_ATTRIBUTE, "true");
+        }
+        
+        if (filterChain != null)
+        {
+            filterChain.doFilter(sRequest, sResponse);
+        }
+    }
+    
+    private ServletRequest wrapperRequest(HttpServletRequest request, Subject subject, Principal principal)
+    {
+        PortalRequestWrapper wrapper = new PortalRequestWrapper(request, subject, principal);
+        return wrapper;
+    }
+
+    public void destroy()
+    {
+    }
+}

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/filter/PortalFilter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/filter/PortalRequestWrapper.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/filter/PortalRequestWrapper.java?rev=725977&r1=725976&r2=725977&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/filter/PortalRequestWrapper.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/filter/PortalRequestWrapper.java Fri Dec 12 04:06:29 2008
@@ -1,76 +1,76 @@
-/*
- * 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.login.filter;
-
-import java.security.Principal;
-
-import javax.security.auth.Subject;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletRequestWrapper;
-
-import org.apache.jetspeed.security.Role;
-import org.apache.jetspeed.security.SubjectHelper;
-
-public class PortalRequestWrapper extends HttpServletRequestWrapper
-{
-    private Principal userPrincipal = null;
-    private Subject subject ;
-    
-    public PortalRequestWrapper(HttpServletRequest request, Subject subject,
-            Principal userPrincipal)
-    {
-        super(request);
-        this.subject = subject;
-        this.userPrincipal = userPrincipal;
-    }
-
-    public boolean isUserInRole(String roleName)
-    {
-        if (subject == null)
-        {
-            return false;
-        }
-        return SubjectHelper.getPrincipal(subject, Role.class, roleName) != null;
-    }
-    
-    public void setUserPrincipal(Principal userPrincipal)
-    {
-        this.userPrincipal = userPrincipal;
-    }
-
-    public Principal getUserPrincipal()
-    {
-        return userPrincipal;
-    }
-
-    /**
-     * Return the name of the remote user that has been authenticated
-     * for this Request.
-     */
-    public String getRemoteUser()
-    {
-        if (userPrincipal != null)
-        {
-            return userPrincipal.getName();
-        }
-        else
-        {
-            return null;
-        }
-    }
-
-}
+/*
+ * 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.login.filter;
+
+import java.security.Principal;
+
+import javax.security.auth.Subject;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletRequestWrapper;
+
+import org.apache.jetspeed.security.Role;
+import org.apache.jetspeed.security.SubjectHelper;
+
+public class PortalRequestWrapper extends HttpServletRequestWrapper
+{
+    private Principal userPrincipal = null;
+    private Subject subject ;
+    
+    public PortalRequestWrapper(HttpServletRequest request, Subject subject,
+            Principal userPrincipal)
+    {
+        super(request);
+        this.subject = subject;
+        this.userPrincipal = userPrincipal;
+    }
+
+    public boolean isUserInRole(String roleName)
+    {
+        if (subject == null)
+        {
+            return false;
+        }
+        return SubjectHelper.getPrincipal(subject, Role.class, roleName) != null;
+    }
+    
+    public void setUserPrincipal(Principal userPrincipal)
+    {
+        this.userPrincipal = userPrincipal;
+    }
+
+    public Principal getUserPrincipal()
+    {
+        return userPrincipal;
+    }
+
+    /**
+     * Return the name of the remote user that has been authenticated
+     * for this Request.
+     */
+    public String getRemoteUser()
+    {
+        if (userPrincipal != null)
+        {
+            return userPrincipal.getName();
+        }
+        else
+        {
+            return null;
+        }
+    }
+
+}

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/filter/PortalRequestWrapper.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/resources/LoginViewResources_it.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/resources/LoginViewResources_it.properties?rev=725977&r1=725976&r2=725977&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/resources/LoginViewResources_it.properties (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/resources/LoginViewResources_it.properties Fri Dec 12 04:06:29 2008
@@ -3,21 +3,21 @@
 # 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.
-#
-#    Please contact me if you have any questions or suggestion : desmax74@yahoo.it
-#
-#    Italian version by Dessì Massimiliano  <a href="desmax74@yahoo.it.it">desmax74@yahoo.it</a>.
-#    Vers 0.1 jetspeed 2.0   08/12/2005
-
-login.button=Login
-username.label=Username: 
+# 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.
+#
+#    Please contact me if you have any questions or suggestion : desmax74@yahoo.it
+#
+#    Italian version by Dessì Massimiliano  <a href="desmax74@yahoo.it.it">desmax74@yahoo.it</a>.
+#    Vers 0.1 jetspeed 2.0   08/12/2005
+
+login.button=Login
+username.label=Username: 
 password.label=Password: 
\ No newline at end of file

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/resources/LoginViewResources_it.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/resources/LoginViewResources_ko.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/resources/LoginViewResources_ua.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/resources/LoginViewResources_ua.properties?rev=725977&r1=725976&r2=725977&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/resources/LoginViewResources_ua.properties (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/resources/LoginViewResources_ua.properties Fri Dec 12 04:06:29 2008
@@ -3,19 +3,19 @@
 # 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.
-#
-# $Id: project.properties 187000 2004-07-11 03:32:22Z paulsp $
-#
-
-login.button=\u0412\u0445\u0456\u0434
-username.label=\u0406\u043c'\u044f \u043a\u043e\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0447\u0430: 
-password.label=\u041f\u0430\u0440\u043e\u043b\u044c: 
+# 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.
+#
+# $Id: project.properties 187000 2004-07-11 03:32:22Z paulsp $
+#
+
+login.button=\u0412\u0445\u0456\u0434
+username.label=\u0406\u043c'\u044f \u043a\u043e\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0447\u0430: 
+password.label=\u041f\u0430\u0440\u043e\u043b\u044c: 

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/resources/LoginViewResources_ua.properties
------------------------------------------------------------------------------
    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