You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by at...@apache.org on 2008/12/12 14:05:40 UTC
svn commit: r725991 [2/32] - in
/portals/jetspeed-2/applications/j2-admin/trunk: src/main/java/
src/main/java/org/apache/jetspeed/portlets/
src/main/java/org/apache/jetspeed/portlets/admin/
src/main/java/org/apache/jetspeed/portlets/custom/ src/main/ja...
Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/PortletInfo.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/PortletInfo.java?rev=725991&r1=725990&r2=725991&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/PortletInfo.java (original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/PortletInfo.java Fri Dec 12 05:05:25 2008
@@ -4,118 +4,118 @@
* 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.portlets;
-
-import java.io.Serializable;
-
-/**
- * Portlet Info
- *
- * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
- * @version $Id: $
- */
-public class PortletInfo implements Serializable
-{
- /**
- *
- */
- String name;
- String displayName;
- String description;
- String image;
- int count;
-
- public PortletInfo(String name, String displayName, String description)
- {
- this.name = name;
- this.displayName = displayName;
- this.description = description;
- }
-
- public PortletInfo(String name, String displayName, String description, String image)
- {
- this.name = name;
- this.displayName = displayName;
- this.description = description;
- this.image = image;
- }
-
- public PortletInfo(String name, String displayName, String description, String image,int count)
- {
- this.name = name;
- this.displayName = displayName;
- this.description = description;
- this.image = image;
- this.count = count;
- }
-
-
- /**
- * @return Returns the description.
- */
- public String getDescription()
- {
- return description;
- }
- /**
- * @return Returns the displayName.
- */
- public String getDisplayName()
- {
- return displayName;
- }
- /**
- * @return Returns the name.
- */
- public String getName()
- {
- return name;
- }
-
-
- /**
- * @return Returns the image.
- */
- public String getImage()
- {
- return image;
- }
-
-
- /**
- * @param image The image to set.
- */
- public void setImage(String image)
- {
- this.image = image;
- }
- /**
- * @return the count
- */
- public int getCount() {
- return count;
- }
-
- /**
- * @param count the count to set
- */
- public void setCount(int count) {
- this.count = count;
- }
-
- public Object clone() throws CloneNotSupportedException {
- return new PortletInfo(this.name,this.displayName,this.description,this.image,this.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.portlets;
+
+import java.io.Serializable;
+
+/**
+ * Portlet Info
+ *
+ * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
+ * @version $Id: $
+ */
+public class PortletInfo implements Serializable
+{
+ /**
+ *
+ */
+ String name;
+ String displayName;
+ String description;
+ String image;
+ int count;
+
+ public PortletInfo(String name, String displayName, String description)
+ {
+ this.name = name;
+ this.displayName = displayName;
+ this.description = description;
+ }
+
+ public PortletInfo(String name, String displayName, String description, String image)
+ {
+ this.name = name;
+ this.displayName = displayName;
+ this.description = description;
+ this.image = image;
+ }
+
+ public PortletInfo(String name, String displayName, String description, String image,int count)
+ {
+ this.name = name;
+ this.displayName = displayName;
+ this.description = description;
+ this.image = image;
+ this.count = count;
+ }
+
+
+ /**
+ * @return Returns the description.
+ */
+ public String getDescription()
+ {
+ return description;
+ }
+ /**
+ * @return Returns the displayName.
+ */
+ public String getDisplayName()
+ {
+ return displayName;
+ }
+ /**
+ * @return Returns the name.
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+
+ /**
+ * @return Returns the image.
+ */
+ public String getImage()
+ {
+ return image;
+ }
+
+
+ /**
+ * @param image The image to set.
+ */
+ public void setImage(String image)
+ {
+ this.image = image;
+ }
+ /**
+ * @return the count
+ */
+ public int getCount() {
+ return count;
+ }
+
+ /**
+ * @param count the count to set
+ */
+ public void setCount(int count) {
+ this.count = count;
+ }
+
+ public Object clone() throws CloneNotSupportedException {
+ return new PortletInfo(this.name,this.displayName,this.description,this.image,this.count);
+ }
+
+
}
\ No newline at end of file
Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/PortletInfo.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/admin/JetspeedDataImporter.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/custom/CustomConfigModePortlet.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/custom/CustomConfigModePortlet.java?rev=725991&r1=725990&r2=725991&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/custom/CustomConfigModePortlet.java (original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/custom/CustomConfigModePortlet.java Fri Dec 12 05:05:25 2008
@@ -1,338 +1,338 @@
-/*
- * 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.portlets.custom;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import javax.portlet.ActionRequest;
-import javax.portlet.ActionResponse;
-import javax.portlet.PortletConfig;
-import javax.portlet.PortletContext;
-import javax.portlet.PortletException;
-import javax.portlet.PortletMode;
-import javax.portlet.RenderRequest;
-import javax.portlet.RenderResponse;
-import javax.portlet.WindowState;
-
-import org.apache.jetspeed.CommonPortletServices;
-import org.apache.jetspeed.om.common.SecurityConstraint;
-import org.apache.jetspeed.om.common.SecurityConstraints;
-import org.apache.jetspeed.om.page.Fragment;
-import org.apache.jetspeed.om.page.Page;
-import org.apache.jetspeed.page.PageManager;
-import org.apache.portals.bridges.velocity.GenericVelocityPortlet;
-import org.springframework.util.StringUtils;
-
-/**
- * Common Custom Config Mode Portlet
- *
- * @author <a href="mailto:woonsan@apache.org">Woonsan Ko</a>
- * @version $Id: $
- */
-public class CustomConfigModePortlet extends GenericVelocityPortlet
-{
- private static final PortletMode CONFIG_MODE = new PortletMode("config");
- private static final String DELIMITERS = "[],; ";
-
- private PageManager pageManager;
- private String configPage;
-
- public void init(PortletConfig config) throws PortletException
- {
- super.init(config);
-
- this.configPage = config.getInitParameter("ConfigPage");
-
- PortletContext context = getPortletContext();
- this.pageManager = (PageManager) context.getAttribute(CommonPortletServices.CPS_PAGE_MANAGER_COMPONENT);
-
- if (this.pageManager == null)
- {
- throw new PortletException("Could not get instance of pageManager component");
- }
- }
-
- protected void doDispatch(RenderRequest request, RenderResponse response) throws PortletException, IOException
- {
- if ( !request.getWindowState().equals(WindowState.MINIMIZED))
- {
- PortletMode curMode = request.getPortletMode();
-
- if (CONFIG_MODE.equals(curMode))
- {
- List securityContraintRefList = null;
-
- try
- {
- securityContraintRefList = this.pageManager.getPageSecurity().getSecurityConstraintsDefs();
- }
- catch (Exception e)
- {
- throw new PortletException("Cannot find page security constraint definitions.", e);
- }
-
- if (securityContraintRefList != null)
- {
- request.setAttribute("securityContraintRefList", securityContraintRefList);
- }
-
- request.setAttribute(PARAM_EDIT_PAGE, this.configPage);
- doEdit(request, response);
- }
- else
- {
- super.doDispatch(request, response);
- }
- }
- }
-
- public void processAction(ActionRequest request, ActionResponse response) throws PortletException, IOException
- {
- String action = request.getParameter("action");
-
- if ("addConstraint".equals(action))
- {
- addSecurityConstraint(request, response);
- }
- else if ("removeConstraint".equals(action))
- {
- removeSecurityConstraint(request, response);
- }
- else if ("updateConstraintRefs".equals(action))
- {
- updateSecurityConstraintRefs(request, response);
- }
- }
-
- private void addSecurityConstraint(ActionRequest request, ActionResponse response) throws PortletException, IOException
- {
- try
- {
- String path = request.getParameter("path");
- String fragmentId = request.getParameter("fragment");
- String type = request.getParameter("type");
- String roles = request.getParameter("roles");
- String groups = request.getParameter("groups");
- String users = request.getParameter("users");
- String permissions = request.getParameter("permissions");
-
- Page page = this.pageManager.getPage(path);
- Fragment fragment = page.getFragmentById(fragmentId);
-
- if (fragment == null)
- {
- throw new IllegalStateException("Cannot find fragment: " + fragmentId);
- }
-
- SecurityConstraints constraints = fragment.getSecurityConstraints();
-
- if (constraints == null)
- {
- constraints = fragment.newSecurityConstraints();
- }
-
- SecurityConstraint constraint = fragment.newSecurityConstraint();
- Set roleSet = convertToSet(roles, DELIMITERS);
- Set groupSet = convertToSet(groups, DELIMITERS);
- Set userSet = convertToSet(users, DELIMITERS);
-
- if (!roleSet.isEmpty())
- {
- constraint.setRoles(new ArrayList(roleSet));
- }
- if (!groupSet.isEmpty())
- {
- constraint.setGroups(new ArrayList(groupSet));
- }
- if (!userSet.isEmpty())
- {
- constraint.setUsers(new ArrayList(userSet));
- }
-
- Set permissionSet = convertToSet(permissions, DELIMITERS);
-
- constraint.setPermissions(new ArrayList(permissionSet));
- List constraintList = constraints.getSecurityConstraints();
-
- if (constraintList == null)
- {
- constraintList = new ArrayList();
- }
-
- constraintList.add(constraint);
-
- constraints.setSecurityConstraints(constraintList);
- fragment.setSecurityConstraints(constraints);
- this.pageManager.updatePage(page);
- }
- catch (Exception e)
- {
- throw new PortletException("Failed to add security constraint.", e);
- }
- }
-
- private void removeSecurityConstraint(ActionRequest request, ActionResponse response) throws PortletException, IOException
- {
- try
- {
- String path = request.getParameter("path");
- String fragmentId = request.getParameter("fragment");
- String roles = request.getParameter("roles");
- String groups = request.getParameter("groups");
- String users = request.getParameter("users");
- String permissions = request.getParameter("permissions");
-
- Page page = this.pageManager.getPage(path);
- Fragment fragment = page.getFragmentById(fragmentId);
-
- if (fragment == null)
- {
- throw new IllegalStateException("Cannot find fragment: " + fragmentId);
- }
-
- SecurityConstraints constraints = fragment.getSecurityConstraints();
-
- List constraintList = null;
-
- if (constraints != null)
- {
- constraintList = constraints.getSecurityConstraints();
-
- if (constraintList != null)
- {
- for (Iterator it = constraintList.iterator(); it.hasNext(); )
- {
- SecurityConstraint constraint = (SecurityConstraint) it.next();
-
- Set removeRoleSet = convertToSet(roles, DELIMITERS);
- Set removeGroupSet = convertToSet(groups, DELIMITERS);
- Set removeUserSet = convertToSet(users, DELIMITERS);
-
- List roleList = constraint.getRoles();
- List groupList = constraint.getGroups();
- List userList = constraint.getUsers();
-
- if (equalsSetAndList(removeRoleSet, roleList) &&
- equalsSetAndList(removeGroupSet, groupList) &&
- equalsSetAndList(removeUserSet, userList))
- {
- it.remove();
- break;
- }
- }
- }
- }
-
- if (constraints != null && constraintList != null)
- {
- constraints.setSecurityConstraints(constraintList);
- }
-
- fragment.setSecurityConstraints(constraints.isEmpty() ? null : constraints);
- this.pageManager.updatePage(page);
- }
- catch (Exception e)
- {
- throw new PortletException("Failed to remove security constraint.", e);
- }
- }
-
- private void updateSecurityConstraintRefs(ActionRequest request, ActionResponse response) throws PortletException, IOException
- {
- try
- {
- String path = request.getParameter("path");
- String fragmentId = request.getParameter("fragment");
- String [] securityConstraintRefs = request.getParameterValues("securityConstraintRef");
-
- Page page = this.pageManager.getPage(path);
- Fragment fragment = page.getFragmentById(fragmentId);
-
- if (fragment == null)
- {
- throw new IllegalStateException("Cannot find fragment: " + fragmentId);
- }
-
- SecurityConstraints constraints = fragment.getSecurityConstraints();
-
- if (constraints == null)
- {
- constraints = fragment.newSecurityConstraints();
- }
-
- Set constraintRefSet = new HashSet();
-
- if (securityConstraintRefs != null)
- {
- for (int i = 0; i < securityConstraintRefs.length; i++)
- {
- if (!"".equals(securityConstraintRefs[i]))
- {
- constraintRefSet.add(securityConstraintRefs[i]);
- }
- }
- }
-
- constraints.setSecurityConstraintsRefs(constraintRefSet.isEmpty() ? null : new ArrayList(constraintRefSet));
- fragment.setSecurityConstraints(constraints.isEmpty() ? null : constraints);
- this.pageManager.updatePage(page);
- }
- catch (Exception e)
- {
- throw new PortletException("Failed to remove security constraint.", e);
- }
- }
-
- private Set convertToSet(String s, String delimiters)
- {
- Set set = new HashSet();
-
- String [] tokens = StringUtils.tokenizeToStringArray(s, delimiters, true, true);
-
- if (tokens != null)
- {
- for (int i = 0; i < tokens.length; i++)
- {
- set.add(tokens[i]);
- }
- }
-
- return set;
- }
-
- private boolean equalsSetAndList(Set set, List list)
- {
- if (set == null)
- {
- return (list == null || list.isEmpty());
- }
- else if (list == null)
- {
- return set.isEmpty();
- }
- else
- {
- return set.equals(new HashSet(list));
- }
- }
-
+/*
+ * 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.portlets.custom;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.PortletConfig;
+import javax.portlet.PortletContext;
+import javax.portlet.PortletException;
+import javax.portlet.PortletMode;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.WindowState;
+
+import org.apache.jetspeed.CommonPortletServices;
+import org.apache.jetspeed.om.common.SecurityConstraint;
+import org.apache.jetspeed.om.common.SecurityConstraints;
+import org.apache.jetspeed.om.page.Fragment;
+import org.apache.jetspeed.om.page.Page;
+import org.apache.jetspeed.page.PageManager;
+import org.apache.portals.bridges.velocity.GenericVelocityPortlet;
+import org.springframework.util.StringUtils;
+
+/**
+ * Common Custom Config Mode Portlet
+ *
+ * @author <a href="mailto:woonsan@apache.org">Woonsan Ko</a>
+ * @version $Id: $
+ */
+public class CustomConfigModePortlet extends GenericVelocityPortlet
+{
+ private static final PortletMode CONFIG_MODE = new PortletMode("config");
+ private static final String DELIMITERS = "[],; ";
+
+ private PageManager pageManager;
+ private String configPage;
+
+ public void init(PortletConfig config) throws PortletException
+ {
+ super.init(config);
+
+ this.configPage = config.getInitParameter("ConfigPage");
+
+ PortletContext context = getPortletContext();
+ this.pageManager = (PageManager) context.getAttribute(CommonPortletServices.CPS_PAGE_MANAGER_COMPONENT);
+
+ if (this.pageManager == null)
+ {
+ throw new PortletException("Could not get instance of pageManager component");
+ }
+ }
+
+ protected void doDispatch(RenderRequest request, RenderResponse response) throws PortletException, IOException
+ {
+ if ( !request.getWindowState().equals(WindowState.MINIMIZED))
+ {
+ PortletMode curMode = request.getPortletMode();
+
+ if (CONFIG_MODE.equals(curMode))
+ {
+ List securityContraintRefList = null;
+
+ try
+ {
+ securityContraintRefList = this.pageManager.getPageSecurity().getSecurityConstraintsDefs();
+ }
+ catch (Exception e)
+ {
+ throw new PortletException("Cannot find page security constraint definitions.", e);
+ }
+
+ if (securityContraintRefList != null)
+ {
+ request.setAttribute("securityContraintRefList", securityContraintRefList);
+ }
+
+ request.setAttribute(PARAM_EDIT_PAGE, this.configPage);
+ doEdit(request, response);
+ }
+ else
+ {
+ super.doDispatch(request, response);
+ }
+ }
+ }
+
+ public void processAction(ActionRequest request, ActionResponse response) throws PortletException, IOException
+ {
+ String action = request.getParameter("action");
+
+ if ("addConstraint".equals(action))
+ {
+ addSecurityConstraint(request, response);
+ }
+ else if ("removeConstraint".equals(action))
+ {
+ removeSecurityConstraint(request, response);
+ }
+ else if ("updateConstraintRefs".equals(action))
+ {
+ updateSecurityConstraintRefs(request, response);
+ }
+ }
+
+ private void addSecurityConstraint(ActionRequest request, ActionResponse response) throws PortletException, IOException
+ {
+ try
+ {
+ String path = request.getParameter("path");
+ String fragmentId = request.getParameter("fragment");
+ String type = request.getParameter("type");
+ String roles = request.getParameter("roles");
+ String groups = request.getParameter("groups");
+ String users = request.getParameter("users");
+ String permissions = request.getParameter("permissions");
+
+ Page page = this.pageManager.getPage(path);
+ Fragment fragment = page.getFragmentById(fragmentId);
+
+ if (fragment == null)
+ {
+ throw new IllegalStateException("Cannot find fragment: " + fragmentId);
+ }
+
+ SecurityConstraints constraints = fragment.getSecurityConstraints();
+
+ if (constraints == null)
+ {
+ constraints = fragment.newSecurityConstraints();
+ }
+
+ SecurityConstraint constraint = fragment.newSecurityConstraint();
+ Set roleSet = convertToSet(roles, DELIMITERS);
+ Set groupSet = convertToSet(groups, DELIMITERS);
+ Set userSet = convertToSet(users, DELIMITERS);
+
+ if (!roleSet.isEmpty())
+ {
+ constraint.setRoles(new ArrayList(roleSet));
+ }
+ if (!groupSet.isEmpty())
+ {
+ constraint.setGroups(new ArrayList(groupSet));
+ }
+ if (!userSet.isEmpty())
+ {
+ constraint.setUsers(new ArrayList(userSet));
+ }
+
+ Set permissionSet = convertToSet(permissions, DELIMITERS);
+
+ constraint.setPermissions(new ArrayList(permissionSet));
+ List constraintList = constraints.getSecurityConstraints();
+
+ if (constraintList == null)
+ {
+ constraintList = new ArrayList();
+ }
+
+ constraintList.add(constraint);
+
+ constraints.setSecurityConstraints(constraintList);
+ fragment.setSecurityConstraints(constraints);
+ this.pageManager.updatePage(page);
+ }
+ catch (Exception e)
+ {
+ throw new PortletException("Failed to add security constraint.", e);
+ }
+ }
+
+ private void removeSecurityConstraint(ActionRequest request, ActionResponse response) throws PortletException, IOException
+ {
+ try
+ {
+ String path = request.getParameter("path");
+ String fragmentId = request.getParameter("fragment");
+ String roles = request.getParameter("roles");
+ String groups = request.getParameter("groups");
+ String users = request.getParameter("users");
+ String permissions = request.getParameter("permissions");
+
+ Page page = this.pageManager.getPage(path);
+ Fragment fragment = page.getFragmentById(fragmentId);
+
+ if (fragment == null)
+ {
+ throw new IllegalStateException("Cannot find fragment: " + fragmentId);
+ }
+
+ SecurityConstraints constraints = fragment.getSecurityConstraints();
+
+ List constraintList = null;
+
+ if (constraints != null)
+ {
+ constraintList = constraints.getSecurityConstraints();
+
+ if (constraintList != null)
+ {
+ for (Iterator it = constraintList.iterator(); it.hasNext(); )
+ {
+ SecurityConstraint constraint = (SecurityConstraint) it.next();
+
+ Set removeRoleSet = convertToSet(roles, DELIMITERS);
+ Set removeGroupSet = convertToSet(groups, DELIMITERS);
+ Set removeUserSet = convertToSet(users, DELIMITERS);
+
+ List roleList = constraint.getRoles();
+ List groupList = constraint.getGroups();
+ List userList = constraint.getUsers();
+
+ if (equalsSetAndList(removeRoleSet, roleList) &&
+ equalsSetAndList(removeGroupSet, groupList) &&
+ equalsSetAndList(removeUserSet, userList))
+ {
+ it.remove();
+ break;
+ }
+ }
+ }
+ }
+
+ if (constraints != null && constraintList != null)
+ {
+ constraints.setSecurityConstraints(constraintList);
+ }
+
+ fragment.setSecurityConstraints(constraints.isEmpty() ? null : constraints);
+ this.pageManager.updatePage(page);
+ }
+ catch (Exception e)
+ {
+ throw new PortletException("Failed to remove security constraint.", e);
+ }
+ }
+
+ private void updateSecurityConstraintRefs(ActionRequest request, ActionResponse response) throws PortletException, IOException
+ {
+ try
+ {
+ String path = request.getParameter("path");
+ String fragmentId = request.getParameter("fragment");
+ String [] securityConstraintRefs = request.getParameterValues("securityConstraintRef");
+
+ Page page = this.pageManager.getPage(path);
+ Fragment fragment = page.getFragmentById(fragmentId);
+
+ if (fragment == null)
+ {
+ throw new IllegalStateException("Cannot find fragment: " + fragmentId);
+ }
+
+ SecurityConstraints constraints = fragment.getSecurityConstraints();
+
+ if (constraints == null)
+ {
+ constraints = fragment.newSecurityConstraints();
+ }
+
+ Set constraintRefSet = new HashSet();
+
+ if (securityConstraintRefs != null)
+ {
+ for (int i = 0; i < securityConstraintRefs.length; i++)
+ {
+ if (!"".equals(securityConstraintRefs[i]))
+ {
+ constraintRefSet.add(securityConstraintRefs[i]);
+ }
+ }
+ }
+
+ constraints.setSecurityConstraintsRefs(constraintRefSet.isEmpty() ? null : new ArrayList(constraintRefSet));
+ fragment.setSecurityConstraints(constraints.isEmpty() ? null : constraints);
+ this.pageManager.updatePage(page);
+ }
+ catch (Exception e)
+ {
+ throw new PortletException("Failed to remove security constraint.", e);
+ }
+ }
+
+ private Set convertToSet(String s, String delimiters)
+ {
+ Set set = new HashSet();
+
+ String [] tokens = StringUtils.tokenizeToStringArray(s, delimiters, true, true);
+
+ if (tokens != null)
+ {
+ for (int i = 0; i < tokens.length; i++)
+ {
+ set.add(tokens[i]);
+ }
+ }
+
+ return set;
+ }
+
+ private boolean equalsSetAndList(Set set, List list)
+ {
+ if (set == null)
+ {
+ return (list == null || list.isEmpty());
+ }
+ else if (list == null)
+ {
+ return set.isEmpty();
+ }
+ else
+ {
+ return set.equals(new HashSet(list));
+ }
+ }
+
}
\ No newline at end of file
Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/custom/CustomConfigModePortlet.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/custom/resources/CustomConfigModeResources.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/custom/resources/CustomConfigModeResources_ko.properties
------------------------------------------------------------------------------
svn:eol-style = native
Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/entityeditor/PortletEntityBrowserPortlet.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/entityeditor/PortletEntityBrowserPortlet.java?rev=725991&r1=725990&r2=725991&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/entityeditor/PortletEntityBrowserPortlet.java (original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/entityeditor/PortletEntityBrowserPortlet.java Fri Dec 12 05:05:25 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.portlets.entityeditor;
-
-import java.io.IOException;
-import java.util.Collection;
-
-import javax.portlet.ActionRequest;
-import javax.portlet.ActionResponse;
-import javax.portlet.PortletConfig;
-import javax.portlet.PortletContext;
-import javax.portlet.PortletException;
-import javax.portlet.RenderRequest;
-import javax.portlet.RenderResponse;
-
-import org.apache.jetspeed.CommonPortletServices;
-import org.apache.jetspeed.PortalReservedParameters;
-import org.apache.jetspeed.components.portletentity.PortletEntityAccessComponent;
-import org.apache.jetspeed.components.portletregistry.PortletRegistry;
-import org.apache.jetspeed.request.RequestContext;
-import org.apache.pluto.om.portlet.PortletDefinition;
-import org.apache.portals.bridges.velocity.GenericVelocityPortlet;
-import org.apache.velocity.context.Context;
-
-public class PortletEntityBrowserPortlet extends GenericVelocityPortlet
-{
-
- private PortletEntityAccessComponent entityAccess;
- private PortletRegistry registry;
-
-
- /* (non-Javadoc)
- * @see org.apache.portals.bridges.velocity.GenericVelocityPortlet#init(javax.portlet.PortletConfig)
- */
- public void init(PortletConfig config) throws PortletException
- {
- super.init(config);
- PortletContext context = getPortletContext();
- entityAccess = (PortletEntityAccessComponent)context.getAttribute(CommonPortletServices.CPS_ENTITY_ACCESS_COMPONENT);
- registry = (PortletRegistry)context.getAttribute(CommonPortletServices.CPS_REGISTRY_COMPONENT);
- }
-
- public void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException
- {
- Collection portletApps = registry.getPortletApplications();
- Context context = getContext(request);
- context.put("portletApps", portletApps);
- context.put("entityAccess", entityAccess);
- context.put("portletContext", getPortletContext());
- RequestContext requestContext = (RequestContext) request.getAttribute(PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE);
- context.put("jetspeedContextPath", requestContext.getRequest().getContextPath());
- super.doView(request, response);
- }
-
- protected final void doCreate(ActionRequest request, ActionResponse response) throws PortletException
- {/*
- try
- {
- PortletDefinition pd = getPortletDefintion(request);
- String newId = request.getParameter("newEntityId");
- //PortletEntity entity = null;
-
- if(newId != null)
- {
- // entity = entityAccess.newPortletEntityInstance(pd, newId);
- }
- else
- {
- // entity = entityAccess.newPortletEntityInstance(pd);
- }
-
- //entityAccess.storePortletEntity(entity);
- }
- catch (PortletEntityNotStoredException e)
- {
- throw new PortletException(e.getMessage(), e);
- }
- catch (PortletException e)
- {
- throw new PortletException(e.getMessage(), e);
- }*/
- }
-
- protected final PortletDefinition getPortletDefintion(ActionRequest request) throws PortletException
- {
- String portletUniqueName = request.getParameter("selectedPortlet");
- if(portletUniqueName == null)
- {
- throw new PortletException("There was no 'portletUniqueName' parameter specified in the request.");
- }
- else
- {
- return registry.getPortletDefinitionByUniqueName(portletUniqueName);
- }
- }
-
- public void processAction(ActionRequest request, ActionResponse actionResponse) throws PortletException, IOException
- {
- String action = request.getParameter("action");
-
- if(action == null)
- {
- throw new PortletException("Requires that action either be 'edit' or 'create'");
- }
- else if(action.equals("create"))
- {
- doCreate(request, actionResponse);
- }
- else
- {
- throw new PortletException("Requires that action to be 'create'");
- }
- }
-
-
-
-}
+ * 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.portlets.entityeditor;
+
+import java.io.IOException;
+import java.util.Collection;
+
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.PortletConfig;
+import javax.portlet.PortletContext;
+import javax.portlet.PortletException;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+
+import org.apache.jetspeed.CommonPortletServices;
+import org.apache.jetspeed.PortalReservedParameters;
+import org.apache.jetspeed.components.portletentity.PortletEntityAccessComponent;
+import org.apache.jetspeed.components.portletregistry.PortletRegistry;
+import org.apache.jetspeed.request.RequestContext;
+import org.apache.pluto.om.portlet.PortletDefinition;
+import org.apache.portals.bridges.velocity.GenericVelocityPortlet;
+import org.apache.velocity.context.Context;
+
+public class PortletEntityBrowserPortlet extends GenericVelocityPortlet
+{
+
+ private PortletEntityAccessComponent entityAccess;
+ private PortletRegistry registry;
+
+
+ /* (non-Javadoc)
+ * @see org.apache.portals.bridges.velocity.GenericVelocityPortlet#init(javax.portlet.PortletConfig)
+ */
+ public void init(PortletConfig config) throws PortletException
+ {
+ super.init(config);
+ PortletContext context = getPortletContext();
+ entityAccess = (PortletEntityAccessComponent)context.getAttribute(CommonPortletServices.CPS_ENTITY_ACCESS_COMPONENT);
+ registry = (PortletRegistry)context.getAttribute(CommonPortletServices.CPS_REGISTRY_COMPONENT);
+ }
+
+ public void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException
+ {
+ Collection portletApps = registry.getPortletApplications();
+ Context context = getContext(request);
+ context.put("portletApps", portletApps);
+ context.put("entityAccess", entityAccess);
+ context.put("portletContext", getPortletContext());
+ RequestContext requestContext = (RequestContext) request.getAttribute(PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE);
+ context.put("jetspeedContextPath", requestContext.getRequest().getContextPath());
+ super.doView(request, response);
+ }
+
+ protected final void doCreate(ActionRequest request, ActionResponse response) throws PortletException
+ {/*
+ try
+ {
+ PortletDefinition pd = getPortletDefintion(request);
+ String newId = request.getParameter("newEntityId");
+ //PortletEntity entity = null;
+
+ if(newId != null)
+ {
+ // entity = entityAccess.newPortletEntityInstance(pd, newId);
+ }
+ else
+ {
+ // entity = entityAccess.newPortletEntityInstance(pd);
+ }
+
+ //entityAccess.storePortletEntity(entity);
+ }
+ catch (PortletEntityNotStoredException e)
+ {
+ throw new PortletException(e.getMessage(), e);
+ }
+ catch (PortletException e)
+ {
+ throw new PortletException(e.getMessage(), e);
+ }*/
+ }
+
+ protected final PortletDefinition getPortletDefintion(ActionRequest request) throws PortletException
+ {
+ String portletUniqueName = request.getParameter("selectedPortlet");
+ if(portletUniqueName == null)
+ {
+ throw new PortletException("There was no 'portletUniqueName' parameter specified in the request.");
+ }
+ else
+ {
+ return registry.getPortletDefinitionByUniqueName(portletUniqueName);
+ }
+ }
+
+ public void processAction(ActionRequest request, ActionResponse actionResponse) throws PortletException, IOException
+ {
+ String action = request.getParameter("action");
+
+ if(action == null)
+ {
+ throw new PortletException("Requires that action either be 'edit' or 'create'");
+ }
+ else if(action.equals("create"))
+ {
+ doCreate(request, actionResponse);
+ }
+ else
+ {
+ throw new PortletException("Requires that action to be 'create'");
+ }
+ }
+
+
+
+}
Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/entityeditor/PortletEntityBrowserPortlet.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/entityeditor/PortletEntityEditorPortlet.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/entityeditor/PortletEntityEditorPortlet.java?rev=725991&r1=725990&r2=725991&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/entityeditor/PortletEntityEditorPortlet.java (original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/entityeditor/PortletEntityEditorPortlet.java Fri Dec 12 05:05:25 2008
@@ -14,8 +14,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.jetspeed.portlets.entityeditor;
-
+package org.apache.jetspeed.portlets.entityeditor;
+
import java.io.IOException;
import java.util.List;
@@ -31,149 +31,149 @@
import org.apache.jetspeed.container.PortletEntity;
import org.apache.jetspeed.om.portlet.Preference;
import org.apache.portals.bridges.velocity.GenericVelocityPortlet;
-
-public class PortletEntityEditorPortlet extends GenericVelocityPortlet
-{
-
- private PortletEntityAccessComponent entityAccess;
- /* (non-Javadoc)
- * @see org.apache.portals.bridges.velocity.GenericVelocityPortlet#init(javax.portlet.PortletConfig)
- */
- public void init(PortletConfig config) throws PortletException
- {
- super.init(config);
- PortletContext context = getPortletContext();
- entityAccess = (PortletEntityAccessComponent)context.getAttribute(CommonPortletServices.CPS_ENTITY_ACCESS_COMPONENT);
- }
-
- /* (non-Javadoc)
- * @see org.apache.portals.bridges.velocity.GenericVelocityPortlet#processAction(javax.portlet.ActionRequest, javax.portlet.ActionResponse)
- */
- public void processAction(ActionRequest request, ActionResponse response) throws PortletException, IOException
- {
- String action = request.getParameter("action");
-
- if(action == null)
- {
- throw new PortletException("This editor requires an action parameter");
- }
- else if(action.equals("updateValue"))
- {
- doUpdateValue(request, response);
- }
- else if(action.equals("addValue"))
- {
- doAddValue(request, response);
- }
- else if(action.equals("removeValue"))
- {
- doRemoveValue(request, response);
- }
- else if(action.equals("addPref"))
- {
- doAddPref(request, response);
- }
- else if(action.equals("removePref"))
- {
- doRemovePref(request, response);
- }
- else
- {
- throw new PortletException("'"+action+"' is not a valid editor action.");
- }
- }
-
- protected final void doAddPref(ActionRequest request, ActionResponse response) throws PortletException
- {
- PortletEntity entity = getPortletEntity(request);
- String newName = request.getParameter("newPreferenceName");
- if(newName == null || newName.length() < 1)
- {
- throw new PortletException("You must specify a name for a new preference.");
- }
-
- String[] newValues = request.getParameterValues("newPreferenceValue");
- if(newValues == null || newValues.length == 0)
- {
- throw new PortletException("You must specfiy a value for the new preference "+newName);
- }
-
+
+public class PortletEntityEditorPortlet extends GenericVelocityPortlet
+{
+
+ private PortletEntityAccessComponent entityAccess;
+ /* (non-Javadoc)
+ * @see org.apache.portals.bridges.velocity.GenericVelocityPortlet#init(javax.portlet.PortletConfig)
+ */
+ public void init(PortletConfig config) throws PortletException
+ {
+ super.init(config);
+ PortletContext context = getPortletContext();
+ entityAccess = (PortletEntityAccessComponent)context.getAttribute(CommonPortletServices.CPS_ENTITY_ACCESS_COMPONENT);
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.portals.bridges.velocity.GenericVelocityPortlet#processAction(javax.portlet.ActionRequest, javax.portlet.ActionResponse)
+ */
+ public void processAction(ActionRequest request, ActionResponse response) throws PortletException, IOException
+ {
+ String action = request.getParameter("action");
+
+ if(action == null)
+ {
+ throw new PortletException("This editor requires an action parameter");
+ }
+ else if(action.equals("updateValue"))
+ {
+ doUpdateValue(request, response);
+ }
+ else if(action.equals("addValue"))
+ {
+ doAddValue(request, response);
+ }
+ else if(action.equals("removeValue"))
+ {
+ doRemoveValue(request, response);
+ }
+ else if(action.equals("addPref"))
+ {
+ doAddPref(request, response);
+ }
+ else if(action.equals("removePref"))
+ {
+ doRemovePref(request, response);
+ }
+ else
+ {
+ throw new PortletException("'"+action+"' is not a valid editor action.");
+ }
+ }
+
+ protected final void doAddPref(ActionRequest request, ActionResponse response) throws PortletException
+ {
+ PortletEntity entity = getPortletEntity(request);
+ String newName = request.getParameter("newPreferenceName");
+ if(newName == null || newName.length() < 1)
+ {
+ throw new PortletException("You must specify a name for a new preference.");
+ }
+
+ String[] newValues = request.getParameterValues("newPreferenceValue");
+ if(newValues == null || newValues.length == 0)
+ {
+ throw new PortletException("You must specfiy a value for the new preference "+newName);
+ }
+
List<Preference> prefList = null;
if (entity.getFragment() != null)
prefList = entity.getFragment().getPreferences();
//prefLis.add(newName, Arrays.asList(newValues));
-
- try
- {
- entityAccess.storePortletEntity(entity);
- }
- catch (PortletEntityNotStoredException e)
- {
- throw new PortletException(e.getMessage(), e);
- }
- }
-
- protected final void doAddValue(ActionRequest request, ActionResponse response) throws PortletException
- {
- PortletEntity entity = getPortletEntity(request);
- String prefString= request.getParameter("selectedPref");
- String newValue = request.getParameter("newPrefValue");
- String prefName = prefString.split("::")[1];
- //Preference pref = (Preference) entity.getPreferenceSet().get(prefName);
- //pref.addValue(newValue);
- }
-
- protected final void doRemovePref(ActionRequest request, ActionResponse response) throws PortletException
- {
- PortletEntity entity = getPortletEntity(request);
- String prefString= request.getParameter("selectedPref");
- String prefName = prefString.split("::")[1];
- //((PreferenceSet)entity.getPreferenceSet()).remove(prefName);
-
- }
-
- protected final void doUpdateValue(ActionRequest request, ActionResponse response) throws PortletException
- {
- PortletEntity entity = getPortletEntity(request);
- String prefString= request.getParameter("selectedPref");
- String updatedValue = request.getParameter("selectedPrefValue");
- if(updatedValue.trim().length() == 0)
- {
- throw new PortletException("Preference values cannot be empty.");
- }
- String[] info = prefString.split("::");
- String prefName = info[1];
- int valueIndex = Integer.parseInt(info[2]);
+
+ try
+ {
+ entityAccess.storePortletEntity(entity);
+ }
+ catch (PortletEntityNotStoredException e)
+ {
+ throw new PortletException(e.getMessage(), e);
+ }
+ }
+
+ protected final void doAddValue(ActionRequest request, ActionResponse response) throws PortletException
+ {
+ PortletEntity entity = getPortletEntity(request);
+ String prefString= request.getParameter("selectedPref");
+ String newValue = request.getParameter("newPrefValue");
+ String prefName = prefString.split("::")[1];
+ //Preference pref = (Preference) entity.getPreferenceSet().get(prefName);
+ //pref.addValue(newValue);
+ }
+
+ protected final void doRemovePref(ActionRequest request, ActionResponse response) throws PortletException
+ {
+ PortletEntity entity = getPortletEntity(request);
+ String prefString= request.getParameter("selectedPref");
+ String prefName = prefString.split("::")[1];
+ //((PreferenceSet)entity.getPreferenceSet()).remove(prefName);
+
+ }
+
+ protected final void doUpdateValue(ActionRequest request, ActionResponse response) throws PortletException
+ {
+ PortletEntity entity = getPortletEntity(request);
+ String prefString= request.getParameter("selectedPref");
+ String updatedValue = request.getParameter("selectedPrefValue");
+ if(updatedValue.trim().length() == 0)
+ {
+ throw new PortletException("Preference values cannot be empty.");
+ }
+ String[] info = prefString.split("::");
+ String prefName = info[1];
+ int valueIndex = Integer.parseInt(info[2]);
// Preference pref = (Preference) entity.getPreferenceSet().get(prefName);
//<String> values = pref.getValuesList();
// values.set(valueIndex, updatedValue);
- //pref.setValues(values);
- }
-
- protected final void doRemoveValue(ActionRequest request, ActionResponse response) throws PortletException
- {
- PortletEntity entity = getPortletEntity(request);
- String prefString= request.getParameter("selectedPref");
- String[] info = prefString.split("::");
- String prefName = info[1];
- int valueIndex = Integer.parseInt(info[2]);
+ //pref.setValues(values);
+ }
+
+ protected final void doRemoveValue(ActionRequest request, ActionResponse response) throws PortletException
+ {
+ PortletEntity entity = getPortletEntity(request);
+ String prefString= request.getParameter("selectedPref");
+ String[] info = prefString.split("::");
+ String prefName = info[1];
+ int valueIndex = Integer.parseInt(info[2]);
//Preference pref = (Preference) entity.getPreferenceSet().get(prefName);
//List<String> values = pref.getValuesList();
- // values.remove(valueIndex);
+ // values.remove(valueIndex);
//pref.setValues(values);
- }
-
-
- protected final PortletEntity getPortletEntity(ActionRequest request) throws PortletException
- {
- String entityId = request.getParameter("portletEntityId");
- if(entityId == null)
- {
- throw new PortletException("There was no 'entityId' parameter specified in the request.");
- }
- else
- {
- return entityAccess.getPortletEntity(entityId);
- }
- }
-}
+ }
+
+
+ protected final PortletEntity getPortletEntity(ActionRequest request) throws PortletException
+ {
+ String entityId = request.getParameter("portletEntityId");
+ if(entityId == null)
+ {
+ throw new PortletException("There was no 'entityId' parameter specified in the request.");
+ }
+ else
+ {
+ return entityAccess.getPortletEntity(entityId);
+ }
+ }
+}
Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/entityeditor/PortletEntityEditorPortlet.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/localeselector/LocaleSelectorPortlet.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/localeselector/LocaleSelectorPortlet.java?rev=725991&r1=725990&r2=725991&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/localeselector/LocaleSelectorPortlet.java (original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/localeselector/LocaleSelectorPortlet.java Fri Dec 12 05:05:25 2008
@@ -1,145 +1,145 @@
-/*
+/*
* 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.portlets.localeselector;
-
-import java.io.IOException;
-import java.util.Locale;
-
-import javax.portlet.ActionRequest;
-import javax.portlet.ActionResponse;
-import javax.portlet.GenericPortlet;
-import javax.portlet.PortletConfig;
-import javax.portlet.PortletContext;
-import javax.portlet.PortletException;
-import javax.portlet.PortletRequestDispatcher;
-import javax.portlet.PortletSession;
-import javax.portlet.RenderRequest;
-import javax.portlet.RenderResponse;
-
-import org.apache.jetspeed.CommonPortletServices;
-import org.apache.jetspeed.PortalReservedParameters;
-import org.apache.jetspeed.request.RequestContext;
-import org.apache.jetspeed.security.SecurityAttributes;
-import org.apache.jetspeed.security.SecurityException;
-import org.apache.jetspeed.security.User;
-import org.apache.jetspeed.security.UserManager;
-import org.apache.jetspeed.util.JetspeedLocale;
-
-/**
- * This is the portlet to select user's preferred locale.
- *
- * @author <a href="mailto:shinsuke@yahoo.co.jp">Shinsuke Sugaya</a>
- * @version $Id: LocaleSelectorPortlet.java 348264 2005-11-22 22:06:45Z taylor $
- */
-public class LocaleSelectorPortlet extends GenericPortlet
-{
- public static final String PREFERED_LOCALE_SESSION_KEY = "prefered_locale";
-
- private UserManager userManager;
-
- /* (non-Javadoc)
- * @see javax.portlet.Portlet#init(javax.portlet.PortletConfig)
- */
- public void init(PortletConfig config) throws PortletException
- {
- super.init(config);
- userManager = (UserManager)getPortletContext().getAttribute(CommonPortletServices.CPS_USER_MANAGER_COMPONENT);
- if (null == userManager)
- {
- throw new PortletException("Failed to find the User Manager on portlet initialization");
- }
- }
-
- /* (non-Javadoc)
- * @see javax.portlet.GenericPortlet#doView(javax.portlet.RenderRequest, javax.portlet.RenderResponse)
- */
- protected void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException
- {
- PortletContext context = getPortletContext();
-
- Locale locale = request.getLocale();
- if (locale == null)
- {
- locale = Locale.getDefault();
- }
- request.setAttribute("currentLocale", locale.toString());
-
- PortletRequestDispatcher rd = context.getRequestDispatcher("/WEB-INF/view/locale-list.jsp");
- rd.include(request, response);
- }
-
- /* (non-Javadoc)
- * @see javax.portlet.Portlet#processAction(javax.portlet.ActionRequest, javax.portlet.ActionResponse)
- */
- public void processAction(ActionRequest request, ActionResponse response) throws PortletException, IOException
- {
-
- PortletSession session = request.getPortletSession();
- String language = request.getParameter(PREFERED_LOCALE_SESSION_KEY);
-
- if (language != null)
- {
- String[] localeArray = language.split("[-|_]");
- String country = "";
- String variant = "";
- for (int i = 0; i < localeArray.length; i++)
- {
- if (i == 0)
- {
- language = localeArray[i];
- }
- else if (i == 1)
- {
- country = localeArray[i];
- }
- else if (i == 2)
- {
- variant = localeArray[i];
- }
- }
-
- Locale preferedLocale = new Locale(language, country, variant);
-
- if (request.getRemoteUser() != null)
- {
- // Set the prefered locale to user's perferences(persistent storage) if not anon user
- try
- {
- User user = userManager.getUser(request.getRemoteUser());
- // TODO if preferred lang or locale is defined in PLT.D, it's better to use it
- SecurityAttributes secAttrs = user.getSecurityAttributes();
- secAttrs.getAttribute(PortalReservedParameters.PREFERED_LOCALE_ATTRIBUTE, true).setStringValue(JetspeedLocale.convertLocaleToString(preferedLocale));
- }
- catch (SecurityException e)
- {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
-
- session.setAttribute(PortalReservedParameters.PREFERED_LOCALE_ATTRIBUTE, preferedLocale,
- PortletSession.APPLICATION_SCOPE);
- RequestContext requestContext = (RequestContext) request
- .getAttribute(PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE);
- requestContext.setLocale(preferedLocale);
- requestContext.setSessionAttribute(PortalReservedParameters.PREFERED_LOCALE_ATTRIBUTE, preferedLocale);
- }
-
- return;
- }
-
-}
+ * 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.portlets.localeselector;
+
+import java.io.IOException;
+import java.util.Locale;
+
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.GenericPortlet;
+import javax.portlet.PortletConfig;
+import javax.portlet.PortletContext;
+import javax.portlet.PortletException;
+import javax.portlet.PortletRequestDispatcher;
+import javax.portlet.PortletSession;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+
+import org.apache.jetspeed.CommonPortletServices;
+import org.apache.jetspeed.PortalReservedParameters;
+import org.apache.jetspeed.request.RequestContext;
+import org.apache.jetspeed.security.SecurityAttributes;
+import org.apache.jetspeed.security.SecurityException;
+import org.apache.jetspeed.security.User;
+import org.apache.jetspeed.security.UserManager;
+import org.apache.jetspeed.util.JetspeedLocale;
+
+/**
+ * This is the portlet to select user's preferred locale.
+ *
+ * @author <a href="mailto:shinsuke@yahoo.co.jp">Shinsuke Sugaya</a>
+ * @version $Id: LocaleSelectorPortlet.java 348264 2005-11-22 22:06:45Z taylor $
+ */
+public class LocaleSelectorPortlet extends GenericPortlet
+{
+ public static final String PREFERED_LOCALE_SESSION_KEY = "prefered_locale";
+
+ private UserManager userManager;
+
+ /* (non-Javadoc)
+ * @see javax.portlet.Portlet#init(javax.portlet.PortletConfig)
+ */
+ public void init(PortletConfig config) throws PortletException
+ {
+ super.init(config);
+ userManager = (UserManager)getPortletContext().getAttribute(CommonPortletServices.CPS_USER_MANAGER_COMPONENT);
+ if (null == userManager)
+ {
+ throw new PortletException("Failed to find the User Manager on portlet initialization");
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see javax.portlet.GenericPortlet#doView(javax.portlet.RenderRequest, javax.portlet.RenderResponse)
+ */
+ protected void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException
+ {
+ PortletContext context = getPortletContext();
+
+ Locale locale = request.getLocale();
+ if (locale == null)
+ {
+ locale = Locale.getDefault();
+ }
+ request.setAttribute("currentLocale", locale.toString());
+
+ PortletRequestDispatcher rd = context.getRequestDispatcher("/WEB-INF/view/locale-list.jsp");
+ rd.include(request, response);
+ }
+
+ /* (non-Javadoc)
+ * @see javax.portlet.Portlet#processAction(javax.portlet.ActionRequest, javax.portlet.ActionResponse)
+ */
+ public void processAction(ActionRequest request, ActionResponse response) throws PortletException, IOException
+ {
+
+ PortletSession session = request.getPortletSession();
+ String language = request.getParameter(PREFERED_LOCALE_SESSION_KEY);
+
+ if (language != null)
+ {
+ String[] localeArray = language.split("[-|_]");
+ String country = "";
+ String variant = "";
+ for (int i = 0; i < localeArray.length; i++)
+ {
+ if (i == 0)
+ {
+ language = localeArray[i];
+ }
+ else if (i == 1)
+ {
+ country = localeArray[i];
+ }
+ else if (i == 2)
+ {
+ variant = localeArray[i];
+ }
+ }
+
+ Locale preferedLocale = new Locale(language, country, variant);
+
+ if (request.getRemoteUser() != null)
+ {
+ // Set the prefered locale to user's perferences(persistent storage) if not anon user
+ try
+ {
+ User user = userManager.getUser(request.getRemoteUser());
+ // TODO if preferred lang or locale is defined in PLT.D, it's better to use it
+ SecurityAttributes secAttrs = user.getSecurityAttributes();
+ secAttrs.getAttribute(PortalReservedParameters.PREFERED_LOCALE_ATTRIBUTE, true).setStringValue(JetspeedLocale.convertLocaleToString(preferedLocale));
+ }
+ catch (SecurityException e)
+ {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+
+ session.setAttribute(PortalReservedParameters.PREFERED_LOCALE_ATTRIBUTE, preferedLocale,
+ PortletSession.APPLICATION_SCOPE);
+ RequestContext requestContext = (RequestContext) request
+ .getAttribute(PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE);
+ requestContext.setLocale(preferedLocale);
+ requestContext.setSessionAttribute(PortalReservedParameters.PREFERED_LOCALE_ATTRIBUTE, preferedLocale);
+ }
+
+ return;
+ }
+
+}
Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/localeselector/LocaleSelectorPortlet.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/localeselector/resources/LocaleSelectorResources.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/localeselector/resources/LocaleSelectorResources.properties?rev=725991&r1=725990&r2=725991&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/localeselector/resources/LocaleSelectorResources.properties (original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/localeselector/resources/LocaleSelectorResources.properties Fri Dec 12 05:05:25 2008
@@ -3,40 +3,40 @@
# 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: LocaleSelectorResources.properties 348264 2005-11-22 22:06:45Z taylor $
-#
-
-# Base Locales
-# DO NOT TRANSLATE & DO NOT INCLUDE IN L10N PROPERTIES FILE
-localeselector.locales=hu,de,en,es,fr,hu,it,ja,ko,nl,pl,pt,ru,sv,zh,zh_TW
-
-# Label
-localeselector.label.language=Language:
-localeselector.label.change=Change
-
-# Locale Name
-localeselector.locale.hu=Hungarian
-localeselector.locale.de=German
-localeselector.locale.en=English
-localeselector.locale.es=Spanish
-localeselector.locale.fr=French
-localeselector.locale.it=Italian
-localeselector.locale.ja=Japanese
-localeselector.locale.ko=Korean
-localeselector.locale.nl=Dutch
-localeselector.locale.pl=Polish
-localeselector.locale.pt=Portuguese
-localeselector.locale.ru=Russian
-localeselector.locale.sv=Swedish
-localeselector.locale.zh=Simplified Chinese
-localeselector.locale.zh_TW=Traditional Chinese
+# 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: LocaleSelectorResources.properties 348264 2005-11-22 22:06:45Z taylor $
+#
+
+# Base Locales
+# DO NOT TRANSLATE & DO NOT INCLUDE IN L10N PROPERTIES FILE
+localeselector.locales=hu,de,en,es,fr,hu,it,ja,ko,nl,pl,pt,ru,sv,zh,zh_TW
+
+# Label
+localeselector.label.language=Language:
+localeselector.label.change=Change
+
+# Locale Name
+localeselector.locale.hu=Hungarian
+localeselector.locale.de=German
+localeselector.locale.en=English
+localeselector.locale.es=Spanish
+localeselector.locale.fr=French
+localeselector.locale.it=Italian
+localeselector.locale.ja=Japanese
+localeselector.locale.ko=Korean
+localeselector.locale.nl=Dutch
+localeselector.locale.pl=Polish
+localeselector.locale.pt=Portuguese
+localeselector.locale.ru=Russian
+localeselector.locale.sv=Swedish
+localeselector.locale.zh=Simplified Chinese
+localeselector.locale.zh_TW=Traditional Chinese
Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/localeselector/resources/LocaleSelectorResources.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/localeselector/resources/LocaleSelectorResources_ca.properties
------------------------------------------------------------------------------
svn:eol-style = native
Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/localeselector/resources/LocaleSelectorResources_de.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/localeselector/resources/LocaleSelectorResources_de.properties?rev=725991&r1=725990&r2=725991&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/localeselector/resources/LocaleSelectorResources_de.properties (original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/localeselector/resources/LocaleSelectorResources_de.properties Fri Dec 12 05:05:25 2008
@@ -3,43 +3,43 @@
# 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: j2-german_translations.txt,v 1.3 2005/09/25 19:02:56 thorsten Exp $
-#
-# LOCALIZATION MAINTAINER:
-# Thorsten Berger <je...@thorsten-berger.net>
-
-# portlet info
-javax.portlet.title=Sprachauswahl
-javax.portlet.short-title=Mit diesem Portlet k\u00f6nnen Sie Ihre bevorzugte Sprache ausw\u00e4hlen
-javax.portlet.keywords=Locale,Language,Sprache
-
-# Label
-localeselector.label.language=Sprache:
-localeselector.label.change=\u00c4ndern
-
-# Locale Name
-localeselector.locale.de=Deutsch
-localeselector.locale.en=Englisch
-localeselector.locale.es=Spanisch
-localeselector.locale.fr=Franz\u00f6sisch
-localeselector.locale.it=Italienisch
-localeselector.locale.ja=Japanisch
-localeselector.locale.ko=Koreanisch
-localeselector.locale.nl=Niederl\u00e4ndisch
-localeselector.locale.sv=Schwedisch
-localeselector.locale.zh=Vereinfachtes Chinesisch
-localeselector.locale.zh_TW=Traditionelles Chinesisch
-localeselector.locale.ru=Russisch
-localeselector.locale.pt=Portugiesisch
-
-
+# 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: j2-german_translations.txt,v 1.3 2005/09/25 19:02:56 thorsten Exp $
+#
+# LOCALIZATION MAINTAINER:
+# Thorsten Berger <je...@thorsten-berger.net>
+
+# portlet info
+javax.portlet.title=Sprachauswahl
+javax.portlet.short-title=Mit diesem Portlet k\u00f6nnen Sie Ihre bevorzugte Sprache ausw\u00e4hlen
+javax.portlet.keywords=Locale,Language,Sprache
+
+# Label
+localeselector.label.language=Sprache:
+localeselector.label.change=\u00c4ndern
+
+# Locale Name
+localeselector.locale.de=Deutsch
+localeselector.locale.en=Englisch
+localeselector.locale.es=Spanisch
+localeselector.locale.fr=Franz\u00f6sisch
+localeselector.locale.it=Italienisch
+localeselector.locale.ja=Japanisch
+localeselector.locale.ko=Koreanisch
+localeselector.locale.nl=Niederl\u00e4ndisch
+localeselector.locale.sv=Schwedisch
+localeselector.locale.zh=Vereinfachtes Chinesisch
+localeselector.locale.zh_TW=Traditionelles Chinesisch
+localeselector.locale.ru=Russisch
+localeselector.locale.pt=Portugiesisch
+
+
Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/localeselector/resources/LocaleSelectorResources_de.properties
------------------------------------------------------------------------------
svn:eol-style = native
Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/localeselector/resources/LocaleSelectorResources_el.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/localeselector/resources/LocaleSelectorResources_el.properties?rev=725991&r1=725990&r2=725991&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/localeselector/resources/LocaleSelectorResources_el.properties (original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/localeselector/resources/LocaleSelectorResources_el.properties Fri Dec 12 05:05:25 2008
@@ -3,44 +3,44 @@
# 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: LocaleSelectorResources_el.properties 348264 2005-11-22 22:06:45Z taylor $
-# native2ascii LocaleSelectorResources_el.properties.orig LocaleSelectorResources_el.properties
-# LOCALIZATION MAINTAINER:
-# Jetspeed Development Team
-
-# portlet info
-javax.portlet.title=\u0395\u03c0\u03b9\u03bb\u03bf\u03b3\u03ae \u0393\u03bb\u03ce\u03c3\u03c3\u03b1\u03c2
-javax.portlet.short-title=\u0395\u03c0\u03b9\u03bb\u03bf\u03b3\u03ae \u0393\u03bb\u03ce\u03c3\u03c3\u03b1\u03c2
-javax.portlet.keywords=Locale,Language
-
-# Label
-localeselector.label.language=\u0393\u03bb\u03ce\u03c3\u03c3\u03b1:
-localeselector.label.change=\u0391\u03bb\u03bb\u03b1\u03b3\u03ae
-
-# Locale Name
-localeselector.locale.el=\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac
-localeselector.locale.de=\u0393\u03b5\u03c1\u03bc\u03b1\u03bd\u03b9\u03ba\u03ac
-localeselector.locale.en=\u0391\u03b3\u03b3\u03bb\u03b9\u03ba\u03ac
-localeselector.locale.es=\u0399\u03c3\u03c0\u03b1\u03bd\u03b9\u03ba\u03ac
-localeselector.locale.fr=\u0393\u03b1\u03bb\u03bb\u03b9\u03ba\u03ac
-localeselector.locale.it=\u0399\u03c4\u03b1\u03bb\u03b9\u03ba\u03ac
-localeselector.locale.ja=\u0399\u03b1\u03c0\u03c9\u03bd\u03b9\u03ba\u03ac
-localeselector.locale.ko=\u039a\u03bf\u03c1\u03b5\u03ac\u03c4\u03b9\u03ba\u03b1
-localeselector.locale.nl=\u039f\u03bb\u03bb\u03b1\u03bd\u03b4\u03b9\u03ba\u03ac
-localeselector.locale.sv=\u03a3\u03bf\u03c5\u03b7\u03b4\u03b9\u03ba\u03ac
-localeselector.locale.zh=\u0391\u03c0\u03bb\u03ac \u039a\u03b9\u03bd\u03ad\u03b6\u03b9\u03ba\u03b1
-localeselector.locale.zh_TW=\u03a0\u03b1\u03c1\u03b1\u03b4\u03bf\u03c3\u03b9\u03b1\u03ba\u03ac \u039a\u03b9\u03bd\u03ad\u03b6\u03b9\u03ba\u03b1
-localeselector.locale.ru=\u03a1\u03ce\u03c3\u03b9\u03ba\u03b1
-localeselector.locale.pt=\u03a0\u03bf\u03c1\u03c4\u03bf\u03b3\u03b1\u03bb\u03bb\u03b9\u03ba\u03ac
-
-
+# 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: LocaleSelectorResources_el.properties 348264 2005-11-22 22:06:45Z taylor $
+# native2ascii LocaleSelectorResources_el.properties.orig LocaleSelectorResources_el.properties
+# LOCALIZATION MAINTAINER:
+# Jetspeed Development Team
+
+# portlet info
+javax.portlet.title=\u0395\u03c0\u03b9\u03bb\u03bf\u03b3\u03ae \u0393\u03bb\u03ce\u03c3\u03c3\u03b1\u03c2
+javax.portlet.short-title=\u0395\u03c0\u03b9\u03bb\u03bf\u03b3\u03ae \u0393\u03bb\u03ce\u03c3\u03c3\u03b1\u03c2
+javax.portlet.keywords=Locale,Language
+
+# Label
+localeselector.label.language=\u0393\u03bb\u03ce\u03c3\u03c3\u03b1:
+localeselector.label.change=\u0391\u03bb\u03bb\u03b1\u03b3\u03ae
+
+# Locale Name
+localeselector.locale.el=\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac
+localeselector.locale.de=\u0393\u03b5\u03c1\u03bc\u03b1\u03bd\u03b9\u03ba\u03ac
+localeselector.locale.en=\u0391\u03b3\u03b3\u03bb\u03b9\u03ba\u03ac
+localeselector.locale.es=\u0399\u03c3\u03c0\u03b1\u03bd\u03b9\u03ba\u03ac
+localeselector.locale.fr=\u0393\u03b1\u03bb\u03bb\u03b9\u03ba\u03ac
+localeselector.locale.it=\u0399\u03c4\u03b1\u03bb\u03b9\u03ba\u03ac
+localeselector.locale.ja=\u0399\u03b1\u03c0\u03c9\u03bd\u03b9\u03ba\u03ac
+localeselector.locale.ko=\u039a\u03bf\u03c1\u03b5\u03ac\u03c4\u03b9\u03ba\u03b1
+localeselector.locale.nl=\u039f\u03bb\u03bb\u03b1\u03bd\u03b4\u03b9\u03ba\u03ac
+localeselector.locale.sv=\u03a3\u03bf\u03c5\u03b7\u03b4\u03b9\u03ba\u03ac
+localeselector.locale.zh=\u0391\u03c0\u03bb\u03ac \u039a\u03b9\u03bd\u03ad\u03b6\u03b9\u03ba\u03b1
+localeselector.locale.zh_TW=\u03a0\u03b1\u03c1\u03b1\u03b4\u03bf\u03c3\u03b9\u03b1\u03ba\u03ac \u039a\u03b9\u03bd\u03ad\u03b6\u03b9\u03ba\u03b1
+localeselector.locale.ru=\u03a1\u03ce\u03c3\u03b9\u03ba\u03b1
+localeselector.locale.pt=\u03a0\u03bf\u03c1\u03c4\u03bf\u03b3\u03b1\u03bb\u03bb\u03b9\u03ba\u03ac
+
+
Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/localeselector/resources/LocaleSelectorResources_el.properties
------------------------------------------------------------------------------
svn:eol-style = native
Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/localeselector/resources/LocaleSelectorResources_en.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/localeselector/resources/LocaleSelectorResources_en.properties?rev=725991&r1=725990&r2=725991&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/localeselector/resources/LocaleSelectorResources_en.properties (original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/localeselector/resources/LocaleSelectorResources_en.properties Fri Dec 12 05:05:25 2008
@@ -3,43 +3,43 @@
# 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: LocaleSelectorResources_en.properties 348264 2005-11-22 22:06:45Z taylor $
-#
-# LOCALIZATION MAINTAINER:
-# Jetspeed Development Team
-
-# portlet info
-javax.portlet.title=Locale Selector
-javax.portlet.short-title=This is a portlet to select your preferred locale
-javax.portlet.keywords=Locale,Language
-
-# Label
-localeselector.label.language=Language:
-localeselector.label.change=Change
-
-# Locale Name
-localeselector.locale.de=German
-localeselector.locale.en=English
-localeselector.locale.es=Spanish
-localeselector.locale.fr=French
-localeselector.locale.it=Italian
-localeselector.locale.ja=Japanese
-localeselector.locale.ko=Korean
-localeselector.locale.nl=Dutch
-localeselector.locale.sv=Swedish
-localeselector.locale.zh=Simplified Chinese
-localeselector.locale.zh_TW=Traditional Chinese
-localeselector.locale.ru=Russian
-localeselector.locale.pt=Portuguese
-
-
+# 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: LocaleSelectorResources_en.properties 348264 2005-11-22 22:06:45Z taylor $
+#
+# LOCALIZATION MAINTAINER:
+# Jetspeed Development Team
+
+# portlet info
+javax.portlet.title=Locale Selector
+javax.portlet.short-title=This is a portlet to select your preferred locale
+javax.portlet.keywords=Locale,Language
+
+# Label
+localeselector.label.language=Language:
+localeselector.label.change=Change
+
+# Locale Name
+localeselector.locale.de=German
+localeselector.locale.en=English
+localeselector.locale.es=Spanish
+localeselector.locale.fr=French
+localeselector.locale.it=Italian
+localeselector.locale.ja=Japanese
+localeselector.locale.ko=Korean
+localeselector.locale.nl=Dutch
+localeselector.locale.sv=Swedish
+localeselector.locale.zh=Simplified Chinese
+localeselector.locale.zh_TW=Traditional Chinese
+localeselector.locale.ru=Russian
+localeselector.locale.pt=Portuguese
+
+
Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/localeselector/resources/LocaleSelectorResources_en.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