Author: chris.laprun(a)jboss.com
Date: 2009-05-29 19:04:54 -0400 (Fri, 29 May 2009)
New Revision: 13425
Added:
branches/Enterprise_Portal_Platform_4_3/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/BaseRoleAction.java
branches/Enterprise_Portal_Platform_4_3/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/UserAttributeValidator.java
Removed:
branches/Enterprise_Portal_Platform_4_3/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/RoleValidator.java
Modified:
branches/Enterprise_Portal_Platform_4_3/build/build-thirdparty.xml
branches/Enterprise_Portal_Platform_4_3/core-admin/src/main/org/jboss/portal/core/admin/ui/ControlPropertiesBean.java
branches/Enterprise_Portal_Platform_4_3/core-admin/src/main/org/jboss/portal/core/admin/ui/ControlPropertyBean.java
branches/Enterprise_Portal_Platform_4_3/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java
branches/Enterprise_Portal_Platform_4_3/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertyBean.java
branches/Enterprise_Portal_Platform_4_3/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertyBeanContainer.java
branches/Enterprise_Portal_Platform_4_3/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/CreateInstanceAction.java
branches/Enterprise_Portal_Platform_4_3/core-admin/src/resources/portal-admin-war/WEB-INF/classes/Resource.properties
branches/Enterprise_Portal_Platform_4_3/core-admin/src/resources/portal-admin-war/WEB-INF/classes/Resource_de.properties
branches/Enterprise_Portal_Platform_4_3/core-admin/src/resources/portal-admin-war/WEB-INF/classes/Resource_it.properties
branches/Enterprise_Portal_Platform_4_3/core-admin/src/resources/portal-admin-war/WEB-INF/classes/Resource_pt_BR.properties
branches/Enterprise_Portal_Platform_4_3/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml
branches/Enterprise_Portal_Platform_4_3/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSAdminConstants.java
branches/Enterprise_Portal_Platform_4_3/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSAdminPortlet.java
branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource.properties
branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource_fr.properties
branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/create.jsp
branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/edit.jsp
branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/main.jsp
branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/pending_items.jsp
branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/viewfile.jsp
branches/Enterprise_Portal_Platform_4_3/core-identity/src/main/org/jboss/portal/core/identity/ui/DynamicUserAttribute.java
branches/Enterprise_Portal_Platform_4_3/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/CreateRoleAction.java
branches/Enterprise_Portal_Platform_4_3/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/CreateUserAction.java
branches/Enterprise_Portal_Platform_4_3/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/EditRoleAction.java
branches/Enterprise_Portal_Platform_4_3/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/UsernameValidator.java
branches/Enterprise_Portal_Platform_4_3/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity.properties
branches/Enterprise_Portal_Platform_4_3/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity_fr.properties
branches/Enterprise_Portal_Platform_4_3/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity_it.properties
branches/Enterprise_Portal_Platform_4_3/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity_ja.properties
branches/Enterprise_Portal_Platform_4_3/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity_pt_BR.properties
branches/Enterprise_Portal_Platform_4_3/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity_ru.properties
branches/Enterprise_Portal_Platform_4_3/core-identity/src/resources/portal-identity-war/WEB-INF/faces-config.xml
branches/Enterprise_Portal_Platform_4_3/core-identity/src/resources/portal-identity-war/jsf/admin/roles/createRole.xhtml
branches/Enterprise_Portal_Platform_4_3/core-identity/src/resources/portal-identity-war/jsf/admin/roles/editRole.xhtml
branches/Enterprise_Portal_Platform_4_3/core-identity/src/resources/portal-identity-war/jsf/common/editProfileInfo.xhtml
branches/Enterprise_Portal_Platform_4_3/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/Resource.properties
branches/Enterprise_Portal_Platform_4_3/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/Resource_fr.properties
branches/Enterprise_Portal_Platform_4_3/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/Resource_it.properties
branches/Enterprise_Portal_Platform_4_3/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/Resource_pt_BR.properties
branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/identity/cache/CachedLDAPRoleModuleWrapper.java
branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/identity/cache/IdentityCacheService.java
branches/Enterprise_Portal_Platform_4_3/faces/src/main/org/jboss/portal/faces/gui/BeanContext.java
branches/Enterprise_Portal_Platform_4_3/faces/src/main/org/jboss/portal/faces/gui/JSFBeanContext.java
branches/Enterprise_Portal_Platform_4_3/faces/src/main/org/jboss/portal/faces/gui/ManagedBean.java
Log:
- Merged work on XSS from 2.7 branch: JBPORTAL-2390, JBPORTAL-2391, JBEPP-84, JBEPP-83,
JBPORTAL-2393, JBEPP-86, JBEPP-90.
- We will need to cut a new version of the identity module for this (currently using
snapshot).
Modified: branches/Enterprise_Portal_Platform_4_3/build/build-thirdparty.xml
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/build/build-thirdparty.xml 2009-05-29 19:21:35
UTC (rev 13424)
+++ branches/Enterprise_Portal_Platform_4_3/build/build-thirdparty.xml 2009-05-29 23:04:54
UTC (rev 13425)
@@ -45,7 +45,7 @@
<componentref name="jboss-portal/modules/web"
version="1.2.3"/>
<componentref name="jboss-portal/modules/test"
version="1.0.4"/>
<componentref name="jboss-portal/modules/portlet"
version="trunk-SNAPSHOT"/>
- <componentref name="jboss-portal/modules/identity"
version="1.0.8"/>
+ <componentref name="jboss-portal/modules/identity"
version="trunk-SNAPSHOT"/>
<componentref name="jboss-portal/modules/cms"
version="1.2.5"/>
<componentref name="antlr" version="2.7.6-brew"/>
<componentref name="apache-ant" version="1.6.5"/>
Modified:
branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/identity/cache/CachedLDAPRoleModuleWrapper.java
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/identity/cache/CachedLDAPRoleModuleWrapper.java 2009-05-29
19:21:35 UTC (rev 13424)
+++
branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/identity/cache/CachedLDAPRoleModuleWrapper.java 2009-05-29
23:04:54 UTC (rev 13425)
@@ -1,38 +1,39 @@
-/*
-* JBoss, a division of Red Hat
-* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
package org.jboss.portal.core.identity.cache;
+import org.jboss.portal.identity.IdentityException;
+import org.jboss.portal.identity.Role;
+import org.jboss.portal.identity.RoleModule;
+import org.jboss.portal.identity.ldap.LDAPRoleImpl;
import org.jboss.portal.identity.ldap.LDAPRoleModule;
-import org.jboss.portal.identity.ldap.LDAPRoleImpl;
-import org.jboss.portal.identity.RoleModule;
-import org.jboss.portal.identity.Role;
-import org.jboss.portal.identity.IdentityException;
import javax.naming.NamingException;
import javax.naming.directory.Attributes;
+import java.util.HashSet;
+import java.util.List;
import java.util.Set;
-import java.util.List;
-import java.util.HashSet;
/**
* @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot
com">Boleslaw Dawidowicz</a>
@@ -62,6 +63,18 @@
return ldapRoleModule.findRoleByName(name);
}
+ public Role findRoleByDisplayName(String displayName) throws IdentityException,
IllegalArgumentException
+ {
+ Role role = cacheService.findRoleByDisplayName(displayName);
+
+ if (role != null)
+ {
+ return role;
+ }
+
+ return ldapRoleModule.findRoleByDisplayName(displayName);
+ }
+
public Set findRolesByNames(String[] names) throws IdentityException,
IllegalArgumentException
{
Modified:
branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/identity/cache/IdentityCacheService.java
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/identity/cache/IdentityCacheService.java 2009-05-29
19:21:35 UTC (rev 13424)
+++
branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/identity/cache/IdentityCacheService.java 2009-05-29
23:04:54 UTC (rev 13425)
@@ -1,24 +1,25 @@
-/*
-* JBoss, a division of Red Hat
-* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
package org.jboss.portal.core.identity.cache;
@@ -46,6 +47,8 @@
protected ThreadLocal<Map<String, Role>> roleNameCache = new
ThreadLocal<Map<String, Role>>();
+ protected ThreadLocal<Map<String, Role>> roleDisplayNameCache = new
ThreadLocal<Map<String, Role>>();
+
protected ThreadLocal<Map<Object, Role>> roleIdCache = new
ThreadLocal<Map<Object, Role>>();
@@ -55,6 +58,7 @@
userIdCache.set(null);
profileCache.set(null);
roleNameCache.set(null);
+ roleDisplayNameCache.set(null);
roleIdCache.set(null);
log.debug("Identity cache invalidated");
@@ -96,6 +100,15 @@
return roleNameCache.get();
}
+ private Map<String, Role> getRoleDisplayNameCache()
+ {
+ if (roleDisplayNameCache.get() == null)
+ {
+ roleDisplayNameCache.set(new HashMap<String, Role>());
+ }
+ return roleDisplayNameCache.get();
+ }
+
private Map<Object, Role> getRoleIdCache()
{
if (roleIdCache.get() == null)
@@ -171,10 +184,11 @@
{
getRoleIdCache().put(role.getId(), role);
getRoleNameCache().put(role.getName(), role);
+ getRoleDisplayNameCache().put(role.getDisplayName(), role);
if (log.isDebugEnabled())
{
- log.debug("Role cached for id=" + role.getId() + ";
name=" + role.getName());
+ log.debug("Role cached for id=" + role.getId() + ";
name=" + role.getName() + "; display name=" + role.getDisplayName());
}
}
}
@@ -186,10 +200,11 @@
{
getRoleIdCache().put(role.getId(), null);
getRoleNameCache().put(role.getName(), null);
+ getRoleDisplayNameCache().put(role.getDisplayName(), null);
if (log.isDebugEnabled())
{
- log.debug("Role invalidated in cache for id=" + role.getId() +
"; name=" + role.getName());
+ log.debug("Role invalidated in cache for id=" + role.getId() +
"; name=" + role.getName() + "; display name=" +
role.getDisplayName());
}
}
}
@@ -242,6 +257,18 @@
return role;
}
+ public Role findRoleByDisplayName(String displayName)
+ {
+ Role role = getRoleDisplayNameCache().get(displayName);
+
+ if (role != null && log.isDebugEnabled())
+ {
+ log.debug("Role retrieved from cache for display name=" +
role.getDisplayName());
+ }
+
+ return role;
+ }
+
public Role findRoleById(Object id)
{
Role role = getRoleIdCache().get(id);
Modified:
branches/Enterprise_Portal_Platform_4_3/core-admin/src/main/org/jboss/portal/core/admin/ui/ControlPropertiesBean.java
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/core-admin/src/main/org/jboss/portal/core/admin/ui/ControlPropertiesBean.java 2009-05-29
19:21:35 UTC (rev 13424)
+++
branches/Enterprise_Portal_Platform_4_3/core-admin/src/main/org/jboss/portal/core/admin/ui/ControlPropertiesBean.java 2009-05-29
23:04:54 UTC (rev 13425)
@@ -1,24 +1,25 @@
-/*
-* JBoss, a division of Red Hat
-* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
package org.jboss.portal.core.admin.ui;
@@ -32,7 +33,6 @@
import javax.faces.model.SelectItem;
import javax.portlet.PortletConfig;
import javax.portlet.PortletRequest;
-
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.HashMap;
@@ -65,7 +65,7 @@
public ControlPropertiesBean(PortalObjectManagerBean pomgr)
{
this.pomgr = pomgr;
-
+
ResourceBundleManager rbm = new ResourceBundleManager(null, new
SimpleResourceBundleFactory(BUNDLE_BASE_NAME,
PropertiesInfoBuilder.class.getClassLoader()));
// Load all supported locales
@@ -74,11 +74,11 @@
while (locales.hasMoreElements())
{
Locale locale = locales.nextElement();
- rbm.getResourceBundle(locale);
+ rbm.getResourceBundle(locale);
}
DISPLAY_THE_DEFAULT_ERROR_MESSAGE =
rbm.getLocalizedValue("DISPLAY_THE_DEFAULT_ERROR_MESSAGE", "Display the
default error message");
- REDIRECT_TO_THE_SPECIFIED_RESOURCE =
rbm.getLocalizedValue("REDIRECT_TO_THE_SPECIFIED_RESOURCE", "Redirect to
the specified resource");
- REMOVE_THE_RESOURCE_FROM_PAGE =
rbm.getLocalizedValue("REMOVE_THE_RESOURCE_FROM_PAGE", "Remove the resource
from page");
+ REDIRECT_TO_THE_SPECIFIED_RESOURCE =
rbm.getLocalizedValue("REDIRECT_TO_THE_SPECIFIED_RESOURCE", "Redirect to
the specified resource");
+ REMOVE_THE_RESOURCE_FROM_PAGE =
rbm.getLocalizedValue("REMOVE_THE_RESOURCE_FROM_PAGE", "Remove the resource
from page");
portalSelectItems = new HashMap<Locale, List<SelectItem>>();
pageSelectItems = new HashMap<Locale, List<SelectItem>>();
}
@@ -132,7 +132,9 @@
boolean inheritable = object.getType() != PortalObject.TYPE_CONTEXT;
boolean inherited = !object.getDeclaredProperties().containsKey(name);
String value = object.getProperty(name);
- return new ControlPropertyBean(this, info.getPropertyInfo(name), inherited,
inheritable, value);
+ ControlPropertyBean bean = new ControlPropertyBean(this,
info.getPropertyInfo(name), inherited, inheritable, value);
+ bean.setBeanContext(getBeanContext()); // propagate bean context to chilren beans
+ return bean;
}
public ControlPropertyBean getPageControlAccessDenied()
Modified:
branches/Enterprise_Portal_Platform_4_3/core-admin/src/main/org/jboss/portal/core/admin/ui/ControlPropertyBean.java
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/core-admin/src/main/org/jboss/portal/core/admin/ui/ControlPropertyBean.java 2009-05-29
19:21:35 UTC (rev 13424)
+++
branches/Enterprise_Portal_Platform_4_3/core-admin/src/main/org/jboss/portal/core/admin/ui/ControlPropertyBean.java 2009-05-29
23:04:54 UTC (rev 13425)
@@ -1,28 +1,31 @@
-/*
-* JBoss, a division of Red Hat
-* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
package org.jboss.portal.core.admin.ui;
import org.jboss.portal.core.model.portal.PortalObject;
+import org.jboss.portal.common.util.ParameterValidation;
+import org.jboss.portal.faces.gui.ManagedBean;
import javax.faces.event.ValueChangeEvent;
@@ -43,6 +46,20 @@
super(container, info, inherited, inheritable, value);
//
this.container = container;
+ setValidator(new DefaultPropertyValidator()
+ {
+ @Override
+ public String doSimpleChecks(String name)
+ {
+ return name; // no-op as we want to allow / and . in paths
+ }
+
+ @Override
+ public ParameterValidation.ValidationErrorHandler
getValidationErrorHandler(String name, String targetForErrorMessage)
+ {
+ return new MessageValidationHandler(null, targetForErrorMessage, name,
getObjectTypeName(), ManagedBean.INVALID_PATH);
+ }
+ });
}
public void setInherited(boolean inherited)
@@ -69,7 +86,9 @@
public void setValue(Object value)
{
- if (!inherited)
+ // it's currently quite difficult to retrieve the correct target for error
messages, send them to "status"
+ String propertyValue = checkNameValidity(value.toString(), null);
+ if (propertyValue != null && !inherited)
{
this.value = value.toString();
Modified:
branches/Enterprise_Portal_Platform_4_3/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java 2009-05-29
19:21:35 UTC (rev 13424)
+++
branches/Enterprise_Portal_Platform_4_3/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java 2009-05-29
23:04:54 UTC (rev 13425)
@@ -45,7 +45,7 @@
import org.jboss.portal.core.model.portal.PortalObjectPermission;
import org.jboss.portal.core.model.portal.Window;
import org.jboss.portal.faces.component.portlet.PortletEventEvent;
-import org.jboss.portal.faces.gui.JSFBeanContext;
+import org.jboss.portal.faces.gui.BeanContext;
import org.jboss.portal.identity.RoleModule;
import org.jboss.portal.portlet.Portlet;
import org.jboss.portal.portlet.PortletInvoker;
@@ -168,6 +168,8 @@
/** . */
private transient Boolean maximizedStateExists;
+ private transient BeanContext beanContext;
+
// Wired services
public String getNamespace()
@@ -180,6 +182,16 @@
this.namespace = namespace;
}
+ public BeanContext getBeanContext()
+ {
+ return beanContext;
+ }
+
+ public void setBeanContext(BeanContext beanContext)
+ {
+ this.beanContext = beanContext;
+ }
+
public List getAvailableContentTypes()
{
LinkedList<SelectItem> types = new LinkedList<SelectItem>();
@@ -655,20 +667,20 @@
{
if (pageManager == null)
{
- // it'd be better if propertyAction was injected in faces-config.xml so
that we can also inject the shared beanContext
pageManager = new PageManagerBean(layoutService, portletDefinitionInvoker);
- pageManager.setBeanContext(new JSFBeanContext());
+ pageManager.setBeanContext(beanContext);
}
pageManager.page = (Page)selectedObject;
}
//
selectedProperties = new PropertiesBean(this);
+ selectedProperties.setBeanContext(beanContext);
controlProperties = new ControlPropertiesBean(this);
+ controlProperties.setBeanContext(beanContext);
- // it'd be better if propertyAction was injected in faces-config.xml so that we
can also inject the shared beanContext
propertyAction = new PropertyAction(this);
- propertyAction.setBeanContext(new JSFBeanContext());
+ propertyAction.setBeanContext(beanContext);
//
theme = new ThemeBean(selectedObject);
Modified:
branches/Enterprise_Portal_Platform_4_3/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertyBean.java
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertyBean.java 2009-05-29
19:21:35 UTC (rev 13424)
+++
branches/Enterprise_Portal_Platform_4_3/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertyBean.java 2009-05-29
23:04:54 UTC (rev 13425)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
* contributors as indicated by the @authors tag. See the *
* copyright.txt in the distribution for a full listing of *
* individual contributors. *
@@ -22,17 +22,18 @@
******************************************************************************/
package org.jboss.portal.core.admin.ui;
+import org.jboss.portal.core.model.portal.PortalObject;
+import org.jboss.portal.faces.gui.ManagedBean;
+
import javax.faces.context.FacesContext;
-import org.jboss.portal.core.model.portal.PortalObject;
-
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @author <a href="mailto:theute@jboss.org">Thomas Heute</a>
* @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot
com">Boleslaw Dawidowicz</a>
* @version $Revision$
*/
-public class PropertyBean implements Comparable
+public class PropertyBean extends ManagedBean implements Comparable
{
/** . */
@@ -103,23 +104,28 @@
public void setValue(Object value)
{
- this.value = value.toString();
+ // it's currently quite difficult to retrieve the correct target for error
messages, send them to "status"
+ String propertyValue = checkNameValidity(value.toString(), null);
+ if (propertyValue != null)
+ {
+ this.value = propertyValue;
- // Need to use the container as it will contain the refreshed object
- PortalObject portalObject = container.getRelatedObject();
+ // Need to use the container as it will contain the refreshed object
+ PortalObject portalObject = container.getRelatedObject();
- //if value is inherited check if updated value is the same - if yes, don't
update to keep inheritance
- if (isInherited())
- {
- String parentValue = portalObject.getProperty(getName());
- if (value.equals(parentValue))
+ //if value is inherited check if updated value is the same - if yes, don't
update to keep inheritance
+ if (isInherited())
{
- return;
+ String parentValue = portalObject.getProperty(getName());
+ if (value.equals(parentValue))
+ {
+ return;
+ }
}
+
+ //
+ portalObject.setDeclaredProperty(getName(), propertyValue);
}
-
- //
- portalObject.setDeclaredProperty(getName(), value.toString());
}
public int compareTo(Object o)
@@ -142,4 +148,14 @@
{
return "PropertyBean[name=" + info.getName() + ",value=" +
value + "]";
}
+
+ protected String getObjectTypeName()
+ {
+ return "PROPERTY_TYPE";
+ }
+
+ public boolean isAlreadyExisting(String objectName)
+ {
+ return false; // no need to check for duplicates here
+ }
}
Modified:
branches/Enterprise_Portal_Platform_4_3/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertyBeanContainer.java
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertyBeanContainer.java 2009-05-29
19:21:35 UTC (rev 13424)
+++
branches/Enterprise_Portal_Platform_4_3/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertyBeanContainer.java 2009-05-29
23:04:54 UTC (rev 13425)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
* contributors as indicated by the @authors tag. See the *
* copyright.txt in the distribution for a full listing of *
* individual contributors. *
@@ -23,6 +23,7 @@
package org.jboss.portal.core.admin.ui;
import org.jboss.portal.core.model.portal.PortalObject;
+import org.jboss.portal.faces.gui.BeanContext;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -30,7 +31,18 @@
*/
public abstract class PropertyBeanContainer
{
+ private BeanContext beanContext;
+ public BeanContext getBeanContext()
+ {
+ return beanContext;
+ }
+
+ public void setBeanContext(BeanContext beanContext)
+ {
+ this.beanContext = beanContext;
+ }
+
public abstract PortalObject getRelatedObject();
}
Modified:
branches/Enterprise_Portal_Platform_4_3/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/CreateInstanceAction.java
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/CreateInstanceAction.java 2009-05-29
19:21:35 UTC (rev 13424)
+++
branches/Enterprise_Portal_Platform_4_3/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/CreateInstanceAction.java 2009-05-29
23:04:54 UTC (rev 13425)
@@ -42,15 +42,12 @@
*/
public class CreateInstanceAction extends ManagedBean
{
-
- /** . */
private String instanceId;
- /** . */
private PortletManagerBean portletMgr;
- /** . */
private InstanceManagerBean instanceMgr;
+
private static final String MESSAGE_TARGET =
"add_instance_form:instanceId";
protected static final String INSTANCE_TYPE = "INSTANCE_TYPE";
Modified:
branches/Enterprise_Portal_Platform_4_3/core-admin/src/resources/portal-admin-war/WEB-INF/classes/Resource.properties
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/core-admin/src/resources/portal-admin-war/WEB-INF/classes/Resource.properties 2009-05-29
19:21:35 UTC (rev 13424)
+++
branches/Enterprise_Portal_Platform_4_3/core-admin/src/resources/portal-admin-war/WEB-INF/classes/Resource.properties 2009-05-29
23:04:54 UTC (rev 13425)
@@ -325,7 +325,8 @@
COORDINATION_PARAMETER=parameter binding
COORDINATION_ALIAS=alias binding
-INVALID_NAME_ERROR=''{0}'' is an invalid {1} name: Cannot be null, empty
or contain '\\', '<', '>', '(', ')',
'=' or '%5c'
+INVALID_NAME_ERROR=''{0}'' is an invalid {1} name: Cannot be null, empty
or contain '/', '.', '\\', '<', '>',
'(', ')', '=' or '%5c'
+INVALID_PATH_ERROR=''{0}'' is an invalid {1} path: Cannot be null, empty
or contain '\\', '<', '>', '(', ')',
'=' or '%5c'
NO_SELECTED_PORTLET_ERROR=No portlet was selected!
DUPLICATE_ERROR=A {1} named ''{0}'' already exists!
bean_support_unexpected_error=Unexpected error:
Modified:
branches/Enterprise_Portal_Platform_4_3/core-admin/src/resources/portal-admin-war/WEB-INF/classes/Resource_de.properties
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/core-admin/src/resources/portal-admin-war/WEB-INF/classes/Resource_de.properties 2009-05-29
19:21:35 UTC (rev 13424)
+++
branches/Enterprise_Portal_Platform_4_3/core-admin/src/resources/portal-admin-war/WEB-INF/classes/Resource_de.properties 2009-05-29
23:04:54 UTC (rev 13425)
@@ -70,7 +70,6 @@
DESCRIPTION=Beschreibung
REMOTE=Remote
REMOTABLE=Remote-f\u00e4hig
-ACTIONS=Aktionen
CREATE_INSTANCE=Instanz erstellen
PORTLET_DEFINITIONS=Portlet-Definitionen
DETAILS=Details
Modified:
branches/Enterprise_Portal_Platform_4_3/core-admin/src/resources/portal-admin-war/WEB-INF/classes/Resource_it.properties
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/core-admin/src/resources/portal-admin-war/WEB-INF/classes/Resource_it.properties 2009-05-29
19:21:35 UTC (rev 13424)
+++
branches/Enterprise_Portal_Platform_4_3/core-admin/src/resources/portal-admin-war/WEB-INF/classes/Resource_it.properties 2009-05-29
23:04:54 UTC (rev 13425)
@@ -325,7 +325,7 @@
COORDINATION_PARAMETER=collegamento al parametro
COORDINATION_ALIAS=collegamento all'alias
-INVALID_NAME_ERROR=''{0}'' non \u00e8 un nome valido per {1}: Non
pu\u00f2 essere null, vuoto o contenere '\\', '<', '>',
'(', ')', '=' o '%5c'
+INVALID_NAME_ERROR=''{0}'' non \u00e8 un nome valido per {1}: Non
pu\u00f2 essere null, vuoto o contenere '/', '.', '\\',
'<', '>', '(', ')', '=' o '%5c'
NO_SELECTED_PORTLET_ERROR=Non \u00e8 stata selezionata nessuna portlet!
DUPLICATE_ERROR=Esiste gi\u00e0 un {1} chiamato ''{0}''!
bean_support_unexpected_error=Errore inatteso:
Modified:
branches/Enterprise_Portal_Platform_4_3/core-admin/src/resources/portal-admin-war/WEB-INF/classes/Resource_pt_BR.properties
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/core-admin/src/resources/portal-admin-war/WEB-INF/classes/Resource_pt_BR.properties 2009-05-29
19:21:35 UTC (rev 13424)
+++
branches/Enterprise_Portal_Platform_4_3/core-admin/src/resources/portal-admin-war/WEB-INF/classes/Resource_pt_BR.properties 2009-05-29
23:04:54 UTC (rev 13425)
@@ -325,7 +325,7 @@
COORDINATION_PARAMETER=parameter binding
COORDINATION_ALIAS=alias binding
-INVALID_NAME_ERROR=''{0}'' \u00e9 um nome de {1} inv\u00e1lido\: N\u00e3o
pode ser nulo, vazio, ou que contenha '\\', '<', '>',
'(', ')', '=' ou '%5c'
+INVALID_NAME_ERROR=''{0}'' \u00e9 um nome de {1} inv\u00e1lido\: N\u00e3o
pode ser nulo, vazio, ou que contenha '/', '.', '\\',
'<', '>', '(', ')', '=' ou '%5c'
NO_SELECTED_PORTLET_ERROR=Nenhum portlet foi selecionado!
DUPLICATE_ERROR=O {1} denominado ''{0}'' j\u00e1 existe\!
bean_support_unexpected_error=Erro inesperado:
Modified:
branches/Enterprise_Portal_Platform_4_3/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml 2009-05-29
19:21:35 UTC (rev 13424)
+++
branches/Enterprise_Portal_Platform_4_3/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml 2009-05-29
23:04:54 UTC (rev 13425)
@@ -103,6 +103,11 @@
<property-name>coordinationService</property-name>
<value>#{applicationScope.CoordinationService}</value>
</managed-property>
+ <managed-property>
+ <property-name>beanContext</property-name>
+
<property-class>org.jboss.portal.faces.gui.BeanContext</property-class>
+ <value>#{beanContext}</value>
+ </managed-property>
</managed-bean>
<managed-bean>
<managed-bean-name>portalAction</managed-bean-name>
@@ -128,7 +133,7 @@
</managed-property>
<managed-property>
<property-name>messageTarget</property-name>
- <value>addPageForm:pageName</value>
+ <value>create-page-form:pageName</value>
</managed-property>
<managed-property>
<property-name>listener</property-name>
@@ -182,6 +187,11 @@
<property-name>domainConfigurator</property-name>
<value>#{applicationScope.AuthorizationDomainRegistry.portalobject.configurator}</value>
</managed-property>
+ <managed-property>
+ <property-name>beanContext</property-name>
+
<property-class>org.jboss.portal.faces.gui.BeanContext</property-class>
+ <value>#{beanContext}</value>
+ </managed-property>
</managed-bean>
<!-- The instance manager managed bean -->
Modified:
branches/Enterprise_Portal_Platform_4_3/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSAdminConstants.java
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSAdminConstants.java 2009-05-29
19:21:35 UTC (rev 13424)
+++
branches/Enterprise_Portal_Platform_4_3/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSAdminConstants.java 2009-05-29
23:04:54 UTC (rev 13425)
@@ -121,4 +121,6 @@
public static final String CMS_DATE_PATTERN = "CMS_DATE_PATTERN";
public static final String DATE_FORMAT = "dateFormat";
+
+ public static final String CMS_INVALID_PARAMETER = "CMS_INVALID_PARAMETER";
}
Modified:
branches/Enterprise_Portal_Platform_4_3/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSAdminPortlet.java
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSAdminPortlet.java 2009-05-29
19:21:35 UTC (rev 13424)
+++
branches/Enterprise_Portal_Platform_4_3/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSAdminPortlet.java 2009-05-29
23:04:54 UTC (rev 13425)
@@ -48,7 +48,6 @@
import org.jboss.portal.cms.workflow.CMSWorkflowUtil;
import org.jboss.portal.common.util.ParameterValidation;
import org.jboss.portal.core.cms.command.StreamContentCommand;
-import org.jboss.portal.core.cms.ui.Util;
import org.jboss.portal.core.controller.ControllerContext;
import org.jboss.portal.identity.AnonymousRole;
import org.jboss.portal.identity.IdentityException;
@@ -62,7 +61,6 @@
import org.jboss.portal.search.impl.jcr.JCRQuery;
import org.jboss.portal.search.impl.jcr.JCRQueryConverter;
import org.jboss.portal.security.PortalPermission;
-import org.jboss.portal.server.ParameterSanitizer;
import org.jboss.portal.server.request.URLContext;
import org.jboss.portal.server.request.URLFormat;
import org.jboss.portal.workflow.WorkflowException;
@@ -108,8 +106,13 @@
private ApprovePublish approvePublish;
private AuthorizationManager authorizationManager;
private ResourceBundle resources = null;
- private static final Pattern CHECK_FOR_XSS_PATTERN =
Pattern.compile("[^<>\\(\\)=]*");
+
+ private static final Pattern CHECK_FOR_XSS_PATTERN = ParameterValidation.XSS_CHECK;
private static final String SLASH = "/";
+ private static final String INVALID_TITLE = "__INVALID_TITLE__";
+ private static final String INVALID_DESCRIPTION =
"__INVALID_DESCRIPTION__";
+ private static final String INVALID_LANG = "__INVALID_LANG__";
+ private static final String ERROR_MESSAGE = "error:message";
public void init() throws PortletException
@@ -238,13 +241,13 @@
String sPath = rReq.getParameter("path");
if (sPath != null)
{
- sPath = ParameterSanitizer.sanitizeFromPattern(sPath, CHECK_FOR_XSS_PATTERN,
SLASH);
+ sPath = ParameterValidation.sanitizeFromPattern(sPath, CHECK_FOR_XSS_PATTERN,
SLASH);
}
String sNavPath = rReq.getParameter("navpath");
if (sNavPath != null)
{
- sNavPath = ParameterSanitizer.sanitizeFromPattern(sNavPath,
CHECK_FOR_XSS_PATTERN, SLASH);
+ sNavPath = ParameterValidation.sanitizeFromPattern(sNavPath,
CHECK_FOR_XSS_PATTERN, SLASH);
}
if (op == null)
@@ -333,10 +336,10 @@
rRes.setContentType("text/html");
rReq.setAttribute("createpath", sPath);
- String parameter = rReq.getParameter("error:message");
+ String parameter = rReq.getParameter(ERROR_MESSAGE);
if (parameter != null)
{
- rReq.setAttribute("error:message", parameter);
+ rReq.setAttribute(ERROR_MESSAGE, parameter);
}
parameter = rReq.getParameter("error:newcollectionname");
if (parameter != null)
@@ -553,7 +556,7 @@
rRes.setContentType("text/html");
rReq.setAttribute("currpath", sPath);
String language = rReq.getParameter("language");
- ParameterSanitizer.sanitizeFromPattern(language, CHECK_FOR_XSS_PATTERN,
"en");
+ ParameterValidation.sanitizeFromPattern(language, CHECK_FOR_XSS_PATTERN,
"en");
rReq.setAttribute("language", language);
javax.portlet.PortletRequestDispatcher prd =
getPortletContext().getRequestDispatcher(CMSAdminConstants.CMS_JSP_PATH +
"/editbinary.jsp");
prd.include(rReq, rRes);
@@ -614,10 +617,10 @@
{
rReq.setAttribute("error:filename", parameter);
}
- parameter = rReq.getParameter("error:message");
+ parameter = rReq.getParameter(ERROR_MESSAGE);
if (parameter != null)
{
- rReq.setAttribute("error:message", parameter);
+ rReq.setAttribute(ERROR_MESSAGE, parameter);
}
javax.portlet.PortletRequestDispatcher prd =
getPortletContext().getRequestDispatcher(CMSAdminConstants.CMS_JSP_PATH +
"/create.jsp");
@@ -626,7 +629,7 @@
else if (CMSAdminConstants.OP_EDIT.equals(op))
{
String sLanguage = rReq.getParameter("language");
- ParameterSanitizer.sanitizeFromPattern(sLanguage, CHECK_FOR_XSS_PATTERN,
"en");
+ ParameterValidation.sanitizeFromPattern(sLanguage, CHECK_FOR_XSS_PATTERN,
"en");
String sVersion = rReq.getParameter("version");
@@ -677,6 +680,7 @@
rReq.setAttribute("language", sLanguage);
rReq.setAttribute("title", file.getContent().getTitle());
rReq.setAttribute("description", file.getContent().getDescription());
+ rReq.setAttribute(ERROR_MESSAGE, rReq.getParameter(ERROR_MESSAGE));
javax.portlet.PortletRequestDispatcher prd =
getPortletContext().getRequestDispatcher(CMSAdminConstants.CMS_JSP_PATH +
"/edit.jsp");
prd.include(rReq, rRes);
@@ -708,7 +712,7 @@
else if (CMSAdminConstants.OP_EXPORTARCHIVE_PICKUP.equals(op))
{
String sPickupFile = rReq.getParameter("filepath");
- ParameterSanitizer.sanitizeFromPattern(sPickupFile, CHECK_FOR_XSS_PATTERN,
SLASH);
+ ParameterValidation.sanitizeFromPattern(sPickupFile, CHECK_FOR_XSS_PATTERN,
SLASH);
rRes.setContentType("text/html");
PortletRequestDispatcher prd = null;
@@ -940,7 +944,7 @@
aRes.setRenderParameter("path",
aReq.getParameter("destination"));
//used to remember the data already submitted by the user
- aRes.setRenderParameter("error:message",
CMSAdminConstants.CMS_FOLDERNAME_INVALID);
+ aRes.setRenderParameter(ERROR_MESSAGE,
CMSAdminConstants.CMS_FOLDERNAME_INVALID);
aRes.setRenderParameter("error:newcollectionname",
aReq.getParameter("newcollectionname"));
aRes.setRenderParameter("error:newcollectiondescription",
aReq.getParameter("newcollectiondescription"));
@@ -962,7 +966,7 @@
aRes.setRenderParameter("path",
aReq.getParameter("destination"));
//used to remember the data already submitted by the user
- aRes.setRenderParameter("error:message",
CMSAdminConstants.CMS_FOLDERNAME_INVALID);
+ aRes.setRenderParameter(ERROR_MESSAGE,
CMSAdminConstants.CMS_FOLDERNAME_INVALID);
aRes.setRenderParameter("error:newcollectionname",
aReq.getParameter("newcollectionname"));
aRes.setRenderParameter("error:newcollectiondescription",
aReq.getParameter("newcollectiondescription"));
}
@@ -978,16 +982,15 @@
String sTitle = "";
String sLanguage = "";
List fileItems = upload.parseRequest(aReq);
- Iterator itr = fileItems.iterator();
- while (itr.hasNext())
+ for (Object fileItem : fileItems)
{
- FileItem item = (FileItem)itr.next();
+ FileItem item = (FileItem)fileItem;
// check if the current item is a form field or an uploaded file
if (!item.isFormField())
{
String sFilename = item.getName();
- sFilename = ParameterSanitizer.sanitizeFromPattern(sFilename,
CHECK_FOR_XSS_PATTERN, "");
+ sFilename = ParameterValidation.sanitizeFromPattern(sFilename,
CHECK_FOR_XSS_PATTERN, "");
if (!"".equals(sFilename))
{
@@ -1019,8 +1022,12 @@
String sBasePath = FileUtil.cleanDoubleSlashes(sPath + SLASH +
sFilename);
file.setBasePath(sBasePath);
+ sTitle = ParameterValidation.sanitizeFromPattern(sTitle,
CHECK_FOR_XSS_PATTERN, "");
content.setTitle(sTitle);
+
+ sDescription =
ParameterValidation.sanitizeFromPattern(sDescription, CHECK_FOR_XSS_PATTERN,
"");
content.setDescription(sDescription);
+
content.setBasePath(sBasePath + SLASH + new Locale(sLanguage));
content.setBytes(item.get());
file.setContent(new Locale(sLanguage), content);
@@ -1051,7 +1058,7 @@
{
String fieldName = item.getFieldName();
String itemValue = item.getString(aReq.getCharacterEncoding());
- itemValue = ParameterSanitizer.sanitizeFromPattern(itemValue,
CHECK_FOR_XSS_PATTERN, "");
+ itemValue = ParameterValidation.sanitizeFromPattern(itemValue,
CHECK_FOR_XSS_PATTERN, "");
if ("destination".equals(fieldName))
{
sPath = itemValue;
@@ -1079,7 +1086,8 @@
}
else if (CMSAdminConstants.OP_DOSEARCH.equals(op))
{
- String search = (String)aReq.getParameter("search");
+ String search = aReq.getParameter("search");
+ search = ParameterValidation.sanitizeFromPattern(search,
CHECK_FOR_XSS_PATTERN, "");
aRes.setRenderParameter("search", search);
aRes.setRenderParameter("op",
CMSAdminConstants.OP_VIEWSEARCHRESULTS);
@@ -1319,6 +1327,10 @@
{
content.setMimeType("");
}
+
+ sTitle = ParameterValidation.sanitizeFromPattern(sTitle,
CHECK_FOR_XSS_PATTERN, "");
+ sDescription = ParameterValidation.sanitizeFromPattern(sDescription,
CHECK_FOR_XSS_PATTERN, "");
+
content.setTitle(sTitle);
content.setDescription(sDescription);
content.setBasePath(sBasePath + SLASH + sLanguage);
@@ -1375,8 +1387,14 @@
String sDescription = aReq.getParameter("description");
String sLanguage = aReq.getParameter("language");
+ sFileName = ParameterValidation.sanitizeFromPattern(sFileName,
CHECK_FOR_XSS_PATTERN, "");
+ sDirectory = ParameterValidation.sanitizeFromPattern(sDirectory,
CHECK_FOR_XSS_PATTERN, SLASH);
+ sTitle = ParameterValidation.sanitizeFromPattern(sTitle,
CHECK_FOR_XSS_PATTERN, INVALID_TITLE);
+ sDescription = ParameterValidation.sanitizeFromPattern(sDescription,
CHECK_FOR_XSS_PATTERN, INVALID_DESCRIPTION);
+ sLanguage = ParameterValidation.sanitizeFromPattern(sLanguage,
CHECK_FOR_XSS_PATTERN, "en");
+
//Perform server side data validation
- if (sFileName == null || sFileName.trim().length() == 0)
+ if (sFileName == null || INVALID_TITLE.equals(sTitle) ||
INVALID_DESCRIPTION.equals(sDescription) || sFileName.trim().length() == 0)
{
//Validation Error occurred
//FileName should not be empty
@@ -1386,6 +1404,7 @@
aRes.setRenderParameter("path", sDirectory);
//used to remember the data already submitted by the user
+ aRes.setRenderParameter(ERROR_MESSAGE,
CMSAdminConstants.CMS_INVALID_PARAMETER);
aRes.setRenderParameter("error:content",
aReq.getParameter("elm1"));
aRes.setRenderParameter("error:description",
aReq.getParameter("description"));
aRes.setRenderParameter("error:title",
aReq.getParameter("title"));
@@ -1429,11 +1448,11 @@
Boolean bExists = null;
try
{
- if (!CHECK_FOR_XSS_PATTERN.matcher(content.getBasePath()).matches())
- {
- throw new CMSException(content.getBasePath() + " is not a legal
path element");
- }
- bExists = (Boolean)CMSService.execute(existsCMD);
+ if (!CHECK_FOR_XSS_PATTERN.matcher(content.getBasePath()).matches())
+ {
+ throw new CMSException(content.getBasePath() + " is not a legal
path element");
+ }
+ bExists = (Boolean)CMSService.execute(existsCMD);
}
catch (CMSException cme)
{
@@ -1447,7 +1466,7 @@
aRes.setRenderParameter("path", sDirectory);
//used to remember the data already submitted by the user
- aRes.setRenderParameter("error:message",
CMSAdminConstants.CMS_FILENAME_INVALID);
+ aRes.setRenderParameter(ERROR_MESSAGE,
CMSAdminConstants.CMS_FILENAME_INVALID);
aRes.setRenderParameter("error:filename",
aReq.getParameter("filename"));
aRes.setRenderParameter("error:content",
aReq.getParameter("elm1"));
aRes.setRenderParameter("error:description",
aReq.getParameter("description"));
@@ -1480,17 +1499,45 @@
else if (CMSAdminConstants.OP_SAVETEXT.equals(op))
{
String sFilePath = aReq.getParameter("savetopath");
- String sTitle = aReq.getParameter("title");
- String sDescription = aReq.getParameter("description");
- String sLanguage = aReq.getParameter("language");
- String sMakeLive = "off";
- if (aReq.getParameterValues("makelive") != null)
+ if (!"".equals(sFilePath) &&
CHECK_FOR_XSS_PATTERN.matcher(sFilePath).matches())
{
- sMakeLive = "on";
- }
+ String sTitle = aReq.getParameter("title");
+ String sDescription = aReq.getParameter("description");
+ String sLanguage = aReq.getParameter("language");
- if (!"".equals(sFilePath) &&
CHECK_FOR_XSS_PATTERN.matcher(sFilePath).matches())
- {
+ // check title and description for XSS injection... If one found,
re-display page with old values
+ sTitle = ParameterValidation.sanitizeFromPattern(sTitle,
CHECK_FOR_XSS_PATTERN, INVALID_TITLE);
+ boolean invalidTitle = INVALID_TITLE.equals(sTitle);
+
+ sDescription = ParameterValidation.sanitizeFromPattern(sDescription,
CHECK_FOR_XSS_PATTERN, INVALID_DESCRIPTION);
+ boolean invalidDesc = INVALID_DESCRIPTION.equals(sDescription);
+
+ sLanguage = ParameterValidation.sanitizeFromPattern(sLanguage,
CHECK_FOR_XSS_PATTERN, INVALID_LANG);
+ boolean invalidLang = INVALID_LANG.equals(sLanguage);
+ if(invalidLang)
+
+ if (invalidTitle || invalidDesc || invalidLang)
+ {
+ aRes.setRenderParameter("op", CMSAdminConstants.OP_EDIT);
+
+ // output error message
+ aRes.setRenderParameter(ERROR_MESSAGE,
CMSAdminConstants.CMS_INVALID_PARAMETER);
+
+ aRes.setRenderParameter("path",
aReq.getParameter("savetopath"));
+ aRes.setRenderParameter("language",
aReq.getParameter("language"));
+
+ return;
+ }
+
+ Locale locale = new Locale(sLanguage);
+
+ String sMakeLive = "off";
+ if (aReq.getParameterValues("makelive") != null)
+ {
+ sMakeLive = "on";
+ }
+
+
String sContent = aReq.getParameter("elm1");
File file = new FileImpl();
@@ -1511,9 +1558,9 @@
content.setTitle(sTitle);
content.setDescription(sDescription);
- content.setBasePath(sFilePath + SLASH + new
Locale(sLanguage).getLanguage());
+ content.setBasePath(sFilePath + SLASH + locale.getLanguage());
content.setBytes(sContent.getBytes());
- file.setContent(new Locale(sLanguage), content);
+ file.setContent(locale, content);
boolean bMakeLive = false;
if ("on".equalsIgnoreCase(sMakeLive))
@@ -1542,6 +1589,7 @@
{
String sTarget = aReq.getParameter("destination");
String sLanguage = aReq.getParameter("language");
+ sLanguage = ParameterValidation.sanitizeFromPattern(sLanguage,
CHECK_FOR_XSS_PATTERN, "en");
if (sTarget != null)
{
@@ -1721,6 +1769,7 @@
{
String path = aReq.getParameter("path");
String language = aReq.getParameter("language");
+ language = ParameterValidation.sanitizeFromPattern(language,
CHECK_FOR_XSS_PATTERN, "en");
String version = aReq.getParameter("version");
//Perform the change in live version here
Modified:
branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource.properties
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource.properties 2009-05-29
19:21:35 UTC (rev 13424)
+++
branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource.properties 2009-05-29
23:04:54 UTC (rev 13425)
@@ -143,6 +143,7 @@
CMS_FILENAME_INVALID=File Name is invalid. It may not contain illegal characters such as
'.', '/', ':', '[', ']', '*',
''', '"', '>', ,'<', '(',
')', '|' or any whitespace character.
CMS_FOLDERNAME_INVALID=Folder Name is invalid. It may not contain illegal characters such
as '.', '/', ':', '[', ']', '*',
''', '"', '>', ,'<', '(',
')', '|' or any whitespace character.
+CMS_INVALID_PARAMETER=A value below is invalid. It may not contain illegal characters
such as '\\', '<', '>', '(', ')',
'=' or '%5c'.
CMS_MSG_DESTINATION_ALREADY_EXISTS=The command was not performed, because the destination
already exists.
CMS_CANT_MOVE_SAME_DESTINATION=You cannot move a folder to the same location
Modified:
branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource_fr.properties
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource_fr.properties 2009-05-29
19:21:35 UTC (rev 13424)
+++
branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource_fr.properties 2009-05-29
23:04:54 UTC (rev 13425)
@@ -32,23 +32,23 @@
CMS_CANCEL = Annuler
-CMS_CONTENT_DIR = R\u00E9pertoire de contenu
+CMS_CONTENT_DIR = R\u00e9pertoire de contenu
-CMS_CONTENT_DIR_USE = Utilisez l'arborescence des dossiers afin de parcourir la
structure du r\u00E9pertoire.
+CMS_CONTENT_DIR_USE = Utilisez l'arborescence des dossiers afin de parcourir la
structure du r\u00e9pertoire.
CMS_COPY = Copier
-CMS_CREATE = Cr\u00E9er
+CMS_CREATE = Cr\u00e9er
-CMS_CREATED = Cr\u00E9\u00E9
+CMS_CREATED = Cr\u00e9\u00e9
-CMS_CREATED_BY = Cr\u00E9\u00E9 par
+CMS_CREATED_BY = Cr\u00e9\u00e9 par
-CMS_CREATEFILE = Cr\u00E9er un fichier
+CMS_CREATEFILE = Cr\u00e9er un fichier
-CMS_CREATEFILEINDIR = Cr\u00E9er un fichier dans le dossier
+CMS_CREATEFILEINDIR = Cr\u00e9er un fichier dans le dossier
-CMS_CREATEFOLDER = Cr\u00E9er un dossier
+CMS_CREATEFOLDER = Cr\u00e9er un dossier
CMS_DELETE = Supprimer
@@ -56,7 +56,7 @@
CMS_DELETEWARN1 = ATTENTION ! Vous ne pourrez pas annuler cette action.
-CMS_DELETEWARN2 = \u00CAtes vous certain de vouloir supprimer cette ressource ?
+CMS_DELETEWARN2 = \u00cates vous certain de vouloir supprimer cette ressource ?
CMS_DENY = Refuser
@@ -78,35 +78,35 @@
CMS_LANGUAGE = Langue
-CMS_LIVE = Diffusion imm\u00E9diate
+CMS_LIVE = Diffusion imm\u00e9diate
CMS_LIVEVERSION = Version en ligne
-CMS_MAIN_USE = Utilisez le portlet d'administration du CMS afin de modifier le
contenu de votre r\u00E9pertoire.
+CMS_MAIN_USE = Utilisez le portlet d'administration du CMS afin de modifier le
contenu de votre r\u00e9pertoire.
-CMS_MANAGE = G\u00E9rer le contenu
+CMS_MANAGE = G\u00e9rer le contenu
CMS_MENU = Menu action
-CMS_MODIFIED = Derni\u00E8re modification
+CMS_MODIFIED = Derni\u00e8re modification
CMS_MODIFY = Modifier
-CMS_MOVE = D\u00E9placer
+CMS_MOVE = D\u00e9placer
CMS_NAME = Nom
CMS_PATH = Emplacement
-CMS_PREVIEW = Pr\u00E9visualiser
+CMS_PREVIEW = Pr\u00e9visualiser
-CMS_RESET = R\u00E9initialiser
+CMS_RESET = R\u00e9initialiser
CMS_SEARCH = Rechercher
-CMS_SEARCHNORESULT = Aucun r\u00E9sultat pour cette recherche
+CMS_SEARCHNORESULT = Aucun r\u00e9sultat pour cette recherche
-CMS_SECURE = S\u00E9curiser
+CMS_SECURE = S\u00e9curiser
CMS_SIZE = Taille
@@ -118,23 +118,23 @@
CMS_TYPE = Type
-CMS_UPLOAD = T\u00E9l\u00E9d\u00E9verser
+CMS_UPLOAD = T\u00e9l\u00e9d\u00e9verser
-CMS_UPLOADARCHIVE = T\u00E9l\u00E9d\u00E9verser une archive
+CMS_UPLOADARCHIVE = T\u00e9l\u00e9d\u00e9verser une archive
CMS_VERSION = Version
CMS_VIEW = Visualiser
-CMS_WYSIWYG = \u00C9diteur visuel WYSIWYG
+CMS_WYSIWYG = \u00c9diteur visuel WYSIWYG
TITLE_BROWSE = Navigateur de dossiers
TITLE_COPYCONFIRM = Confirmer la copie
-TITLE_CREATE = Cr\u00E9er un fichier
+TITLE_CREATE = Cr\u00e9er un fichier
-TITLE_CREATECOLLCONFIRM = Confirmer la cr\u00E9ation d'un r\u00E9pertoire
+TITLE_CREATECOLLCONFIRM = Confirmer la cr\u00e9ation d'un r\u00e9pertoire
TITLE_DELETECONFIRM = Confirmer la suppression
@@ -145,17 +145,19 @@
## CMS ADMIN PORTLET
TITLE_HEAD = Administration du CMS
-TITLE_MOVECONFIRM = Confirmer le d\u00E9placement
+TITLE_MOVECONFIRM = Confirmer le d\u00e9placement
-TITLE_SECURECONFIRM = S\u00E9curiser le noeud
+TITLE_SECURECONFIRM = S\u00e9curiser le noeud
-TITLE_UPLOAD = T\u00E9l\u00E9d\u00E9verser un fichier
+TITLE_UPLOAD = T\u00e9l\u00e9d\u00e9verser un fichier
-TITLE_VIEWFILE = Propri\u00E9t\u00E9s du fichier
+TITLE_VIEWFILE = Propri\u00e9t\u00e9s du fichier
-CMS_ACCESS_DENIED=Acc\u00E9s interdit
-CMS_ACCESS_DENIED_DESCRIPTION=Vous n'\u00eates pas autoris\u00E9 \u00e0 acc\u00e9der
a ce document
-CMS_ACCESS_DENIED_DESCRIPTION_PATH=Vous n'\u00eates pas autoris\u00E9 \u00e0
acc\u00e9der au document
+CMS_ACCESS_DENIED=Acc\u00e9s interdit
+CMS_ACCESS_DENIED_DESCRIPTION=Vous n'\u00eates pas autoris\u00e9 \u00e0 acc\u00e9der
a ce document
+CMS_ACCESS_DENIED_DESCRIPTION_PATH=Vous n'\u00eates pas autoris\u00e9 \u00e0
acc\u00e9der au document
-CMS_MISSING_DOCUMENT=404 - Page non trouv\u00E9e
-CMS_MISSING_DOCUMENT_DESCRIPTION=Le document auquel vous avez tent\u00E9
d'acc\u00E9der est introuvable
+CMS_MISSING_DOCUMENT=404 - Page non trouv\u00e9e
+CMS_MISSING_DOCUMENT_DESCRIPTION=Le document auquel vous avez tent\u00e9
d'acc\u00e9der est introuvable
+
+CMS_INVALID_PARAMETER=Une valeur ci-dessous est invalide car elle contient des
caract\u00e8rs invalides '\\', '<', '>', '(',
')', '=' ou '%5c'.
\ No newline at end of file
Modified:
branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/create.jsp
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/create.jsp 2009-05-29
19:21:35 UTC (rev 13424)
+++
branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/create.jsp 2009-05-29
23:04:54 UTC (rev 13425)
@@ -116,9 +116,7 @@
<%if(errorMessage != null){%>
<tr>
- <td colspan="2">
- <font
color="red">${n:i18n("CMS_FILENAME_INVALID")}</font>
- </td>
+ <td><span style="color:
red">${n:i18n("CMS_INVALID_PARAMETER")}></span></td>
</tr>
<%}%>
Modified:
branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/edit.jsp
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/edit.jsp 2009-05-29
19:21:35 UTC (rev 13424)
+++
branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/edit.jsp 2009-05-29
23:04:54 UTC (rev 13425)
@@ -21,6 +21,9 @@
String sVersion = (String)request.getAttribute("version");
String sTitle = (String)request.getAttribute("title");
String sDescription = (String)request.getAttribute("description");
+
+ // for error handling
+ String errorMessage = (String)request.getAttribute("error:message");
%>
<!-- tinyMCE -->
@@ -74,8 +77,20 @@
<tr>
<td height="10"></td>
</tr>
+
+ <%
+ if(errorMessage != null)
+ {
+ %>
+ <tr>
+ <td><span style="color:
red">${n:i18n("CMS_INVALID_PARAMETER")}></span></td>
+ </tr>
+ <%
+ }
+ %>
<tr>
- <td>
+ <td></td>
+</tr>
<tr>
<td>
<table>
Modified:
branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/main.jsp
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/main.jsp 2009-05-29
19:21:35 UTC (rev 13424)
+++
branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/main.jsp 2009-05-29
23:04:54 UTC (rev 13425)
@@ -75,7 +75,7 @@
if (parser.hasMoreTokens())
{
%>
- <li class="pathSeperator"><img
src="/portal-admin/img/pathSeparator.png" alt=">"></li>
+ <li class="pathSeparator"><img
src="/portal-admin/img/pathSeparator.png" alt=">"></li>
<li class="pathItem"><a href="
<portlet:renderURL>
<portlet:param name="op" value="<%= CMSAdminConstants.OP_MAIN
%>"/>
@@ -89,7 +89,7 @@
else
{
%>
- <li class="pathSeperator"><img
src="/portal-admin/img/pathSeparator.png" alt=">"></li>
+ <li class="pathSeparator"><img
src="/portal-admin/img/pathSeparator.png" alt=">"></li>
<li class="selected"><%= EntityEncoder.FULL.encode(sPathChunk)
%>
</li>
<%
Modified:
branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/pending_items.jsp
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/pending_items.jsp 2009-05-29
19:21:35 UTC (rev 13424)
+++
branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/pending_items.jsp 2009-05-29
23:04:54 UTC (rev 13425)
@@ -43,7 +43,7 @@
if (parser.hasMoreTokens())
{
%>
- <li class="pathSeperator"><img
src="/portal-admin/img/pathSeparator.png" alt=">"></li>
+ <li class="pathSeparator"><img
src="/portal-admin/img/pathSeparator.png" alt=">"></li>
<li class="pathItem"><a href="
<portlet:renderURL>
<portlet:param name="op" value="<%= CMSAdminConstants.OP_MAIN
%>"/>
@@ -57,7 +57,7 @@
else
{
%>
- <li class="pathSeperator"><img
src="/portal-admin/img/pathSeparator.png" alt=">"></li>
+ <li class="pathSeparator"><img
src="/portal-admin/img/pathSeparator.png" alt=">"></li>
<li class="selected"><%= sPathChunk %>
</li>
<%
Modified:
branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/viewfile.jsp
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/viewfile.jsp 2009-05-29
19:21:35 UTC (rev 13424)
+++
branches/Enterprise_Portal_Platform_4_3/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/viewfile.jsp 2009-05-29
23:04:54 UTC (rev 13425)
@@ -72,7 +72,7 @@
if (parser.hasMoreTokens())
{
%>
- <li class="pathSeperator"><img
src="/portal-admin/img/pathSeparator.png" alt=">"></li>
+ <li class="pathSeparator"><img
src="/portal-admin/img/pathSeparator.png" alt=">"></li>
<li class="pathItem"><a href="
<portlet:renderURL>
<portlet:param name="op" value="<%= CMSAdminConstants.OP_MAIN
%>"/>
@@ -86,7 +86,7 @@
else
{
%>
- <li class="pathSeperator"><img
src="/portal-admin/img/pathSeparator.png" alt=">"></li>
+ <li class="pathSeparator"><img
src="/portal-admin/img/pathSeparator.png" alt=">"></li>
<li class="selected"><%= EntityEncoder.FULL.encode(sPathChunk)
%>
</li>
<%
Modified:
branches/Enterprise_Portal_Platform_4_3/core-identity/src/main/org/jboss/portal/core/identity/ui/DynamicUserAttribute.java
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/core-identity/src/main/org/jboss/portal/core/identity/ui/DynamicUserAttribute.java 2009-05-29
19:21:35 UTC (rev 13424)
+++
branches/Enterprise_Portal_Platform_4_3/core-identity/src/main/org/jboss/portal/core/identity/ui/DynamicUserAttribute.java 2009-05-29
23:04:54 UTC (rev 13425)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
* contributors as indicated by the @authors tag. See the *
* copyright.txt in the distribution for a full listing of *
* individual contributors. *
@@ -22,14 +22,13 @@
******************************************************************************/
package org.jboss.portal.core.identity.ui;
-import java.util.HashMap;
-
-import javax.faces.context.FacesContext;
-
import org.jboss.portal.core.identity.ui.common.IdentityUserBean;
import org.jboss.portal.faces.el.PropertyValue;
import org.jboss.portal.faces.el.dynamic.DynamicBean;
+import javax.faces.context.FacesContext;
+import java.util.HashMap;
+
/**
* @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
* @version $Revision$
@@ -42,16 +41,16 @@
/** The managed user bean */
private IdentityUserBean identityUserBean;
-
+
/** The hash map contains all the user attributes */
private HashMap map;
-
+
public DynamicUserAttribute()
{
this.map = new HashMap();
FacesContext ctx = FacesContext.getCurrentInstance();
- this.identityUserBean = (IdentityUserBean)
ctx.getApplication().createValueBinding(("#{identityusermgr}"))
- .getValue(ctx);
+ this.identityUserBean =
(IdentityUserBean)ctx.getApplication().createValueBinding(("#{identityusermgr}"))
+ .getValue(ctx);
}
public DynamicUserAttribute(String username)
@@ -64,7 +63,7 @@
{
try
{
- return identityUserBean.getPropertyType((String) propertyName);
+ return identityUserBean.getPropertyType((String)propertyName);
}
catch (Exception e)
{
@@ -75,30 +74,34 @@
public PropertyValue getValue(Object propertyName)
{
- Object propertyValue = map.get((String) propertyName);
+ Object propertyValue = map.get(propertyName);
// Trying to fetch user property
if (propertyValue == null)
{
try
{
- propertyValue = identityUserBean.getUserProperty(this.username, (String)
propertyName);
+ propertyValue = identityUserBean.getUserProperty(this.username,
(String)propertyName);
}
catch (Exception e)
{
// ok on user register
}
}
-
+
return new PropertyValue(identityUserBean.getLocalizedValue((String)propertyName,
propertyValue));
}
public boolean setValue(Object propertyName, Object value) throws
IllegalArgumentException
{
if (value != null && value instanceof String &&
((String)value).trim().length() == 0)
- map.put((String) propertyName, null);
+ {
+ map.put(propertyName, null);
+ }
else
- map.put((String)propertyName, value);
+ {
+ map.put(propertyName, value);
+ }
return true;
}
Copied:
branches/Enterprise_Portal_Platform_4_3/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/BaseRoleAction.java
(from rev 13376,
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/BaseRoleAction.java)
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/BaseRoleAction.java
(rev 0)
+++
branches/Enterprise_Portal_Platform_4_3/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/BaseRoleAction.java 2009-05-29
23:04:54 UTC (rev 13425)
@@ -0,0 +1,119 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.core.identity.ui.actions;
+
+import org.jboss.portal.core.identity.ui.UIRole;
+import org.jboss.portal.core.identity.ui.common.IdentityRoleBean;
+import org.jboss.portal.faces.gui.ManagedBean;
+import org.jboss.portal.identity.IdentityException;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a>
+ * @version $Revision$
+ */
+public class BaseRoleAction extends ManagedBean
+{
+ /** . */
+ protected UIRole uiRole;
+ /** . */
+ protected IdentityRoleBean identityRoleBean;
+
+ protected final PropertyValidator displayNameValidator = new DisplayNameValidator();
+ private static final String ROLE_DISPLAY_TYPE = "ROLE_DISPLAY_TYPE";
+ private static final String ROLE_TYPE = "ROLE_TYPE";
+
+ protected String getObjectTypeName()
+ {
+ return ROLE_TYPE;
+ }
+
+ public boolean isAlreadyExisting(String objectName)
+ {
+ return isAlreadyExisting(objectName, false);
+ }
+
+ protected boolean isAlreadyExisting(String objectName, boolean isDisplay)
+ {
+ try
+ {
+ if (isDisplay)
+ {
+ return identityRoleBean.getRoleModule().findRoleByDisplayName(objectName) !=
null;
+ }
+ else
+ {
+ return identityRoleBean.getRoleModule().findRoleByName(objectName) != null;
+ }
+ }
+ catch (IdentityException e)
+ {
+ // due to current design of identity module, findRoleByName throws an exception
if the role is not found
+ // instead of returning null as would be traditionally expected... Pb is
IdentityException is also used to
+ // wrap HibernateExceptions...
+ if (e.getMessage().contains("No such role"))
+ {
+ // ignore
+ }
+ else
+ {
+ log.error("Error validation rolename", e);
+ beanContext.createErrorMessageFrom(e);
+ }
+ return false;
+ }
+ }
+
+ private class DisplayNameValidator extends DefaultPropertyValidator
+ {
+ public String getObjectTypeName()
+ {
+ return ROLE_DISPLAY_TYPE;
+ }
+
+ public boolean isAlreadyExisting(String propertyName)
+ {
+ return BaseRoleAction.this.isAlreadyExisting(propertyName, true);
+ }
+ }
+
+ public UIRole getUiRole()
+ {
+ return uiRole;
+ }
+
+ public void setUiRole(UIRole uiRole)
+ {
+ this.uiRole = uiRole;
+ }
+
+ public IdentityRoleBean getIdentityRoleBean()
+ {
+ return identityRoleBean;
+ }
+
+ public void setIdentityRoleBean(IdentityRoleBean identityRoleBean)
+ {
+ this.identityRoleBean = identityRoleBean;
+ }
+}
Modified:
branches/Enterprise_Portal_Platform_4_3/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/CreateRoleAction.java
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/CreateRoleAction.java 2009-05-29
19:21:35 UTC (rev 13424)
+++
branches/Enterprise_Portal_Platform_4_3/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/CreateRoleAction.java 2009-05-29
23:04:54 UTC (rev 13425)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
* contributors as indicated by the @authors tag. See the *
* copyright.txt in the distribution for a full listing of *
* individual contributors. *
@@ -23,52 +23,41 @@
package org.jboss.portal.core.identity.ui.actions;
import org.jboss.portal.core.identity.ui.UIRole;
-import org.jboss.portal.core.identity.ui.common.IdentityRoleBean;
/**
* @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
* @version $Revision$
*/
-public class CreateRoleAction
+public class CreateRoleAction extends BaseRoleAction
{
-
- /** .*/
- private UIRole uiRole = new UIRole();
-
- /** .*/
- private IdentityRoleBean identityRoleBean;
-
- public UIRole getUiRole()
+ public CreateRoleAction()
{
- return uiRole;
+ uiRole = new UIRole();
}
- public void setUiRole(UIRole uiRole)
+ public String createRole()
{
- this.uiRole = uiRole;
- }
+ String name = this.uiRole.getName();
+ String displayName = this.uiRole.getDisplayName();
+ name = checkNameValidity(name, "create-role-form:rolename");
- public IdentityRoleBean getIdentityRoleBean()
- {
- return identityRoleBean;
- }
+ // check display name validity for XSS injection but check duplicate separately due
to limitation to how ManagedBean works
+ displayName = checkNameValidity(displayName,
"create-role-form:roledisplayname", displayNameValidator);
- public void setIdentityRoleBean(IdentityRoleBean identityRoleBean)
- {
- this.identityRoleBean = identityRoleBean;
- }
-
- public String createRole()
- {
- try
+ if (name != null && displayName != null)
{
- identityRoleBean.getRoleModule().createRole(this.uiRole.getName(),
this.uiRole.getDisplayName());
+ try
+ {
+ identityRoleBean.getRoleModule().createRole(name, displayName);
+ return "roleAdmin";
+ }
+ catch (Exception e)
+ {
+ log.error("An error occurred during role creation", e);
+ beanContext.createErrorMessageFrom(e);
+ }
}
- catch (Exception e)
- {
- e.printStackTrace();
- }
- return "roleAdmin";
- }
+ return null;
+ }
}
Modified:
branches/Enterprise_Portal_Platform_4_3/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/CreateUserAction.java
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/CreateUserAction.java 2009-05-29
19:21:35 UTC (rev 13424)
+++
branches/Enterprise_Portal_Platform_4_3/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/CreateUserAction.java 2009-05-29
23:04:54 UTC (rev 13425)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
* contributors as indicated by the @authors tag. See the *
* copyright.txt in the distribution for a full listing of *
* individual contributors. *
@@ -22,18 +22,6 @@
******************************************************************************/
package org.jboss.portal.core.identity.ui.actions;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import java.util.ResourceBundle;
-
-import javax.faces.application.FacesMessage;
-import javax.faces.context.ExternalContext;
-import javax.faces.context.FacesContext;
-import javax.faces.event.ActionEvent;
-
import org.jboss.logging.Logger;
import org.jboss.portal.api.node.PortalNode;
import org.jboss.portal.api.node.PortalNodeURL;
@@ -48,6 +36,17 @@
import org.jboss.portlet.JBossActionRequest;
import org.jboss.portlet.JBossActionResponse;
+import javax.faces.application.FacesMessage;
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.ResourceBundle;
+
/**
* @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
* @version $Revision$
@@ -57,7 +56,7 @@
/** . */
private List roles = new ArrayList();
-
+
/** . */
private List defaultRoles = null;
@@ -131,7 +130,7 @@
{
this.metaDataService = metaDataService;
}
-
+
public String cancelRegistration()
{
this.uiUser = new IdentityUIUser();
@@ -143,9 +142,11 @@
{
String registrationStatus = "failed";
FacesContext ctx = FacesContext.getCurrentInstance();
- String adminSubscription = (String) ev.getComponent().getId();
+ String adminSubscription = ev.getComponent().getId();
ResourceBundle bundle = ResourceBundle.getBundle("conf.bundles.Identity",
ctx.getViewRoot().getLocale());
- if (uiUser.getUsername() != null && uiUser.getPassword() != null)
+ String wUsername = uiUser.getUsername();
+ String wPassword = uiUser.getPassword();
+ if (wUsername != null && wPassword != null)
{
try
{
@@ -162,12 +163,10 @@
else
{
log.warn(User.INFO_USER_REGISTRATION_DATE + " property is mapped in
not supported type: "
- + registrationDateClass.toString());
+ + registrationDateClass.toString());
}
// Variables for RegisterService
- String wUsername = uiUser.getUsername();
- String wPassword = uiUser.getPassword();
List wRoles = roles;
Map wProfileMap =
this.identityUserBean.getProfileMap(uiUser.getAttribute().getProfileAttributes());
Locale wLocale =
FacesContext.getCurrentInstance().getViewRoot().getLocale();
@@ -177,16 +176,16 @@
if (adminSubscription != null &&
adminSubscription.equals("admin"))
{
registrationStatus = this.registrationService.registerUser(wURL,
wUsername, wPassword, wProfileMap, wRoles,
- wLocale, true);
+ wLocale, true);
}
else
{
registrationStatus = this.registrationService.registerUser(wURL,
wUsername, wPassword, wProfileMap, wRoles,
- wLocale, false);
+ wLocale, false);
}
}
- catch(CoreIdentityConfigurationException e)
+ catch (CoreIdentityConfigurationException e)
{
registrationStatus = IdentityConstants.REGISTRATION_FAILED;
log.error("", e);
@@ -195,32 +194,32 @@
// cleaning up the user
this.uiUser = new IdentityUIUser();
-
+
if (IdentityConstants.REGISTRATION_PENDING.equals(registrationStatus) &&
!adminSubscription.equals("admin"))
{
FacesContext.getCurrentInstance().addMessage(null, new
FacesMessage(bundle.getString("IDENTITY_REGISTER_PENDING_TITLE")));
}
else if (IdentityConstants.REGISTRATION_REGISTERED.equals(registrationStatus)
&& !adminSubscription.equals("admin"))
{
- FacesContext.getCurrentInstance().addMessage(null, new
FacesMessage(bundle.getString("IDENTITY_REGISTER_SUCCESS_TITLE")));
+ FacesContext.getCurrentInstance().addMessage(null, new
FacesMessage(bundle.getString("IDENTITY_REGISTER_SUCCESS_TITLE")));
}
- else if (adminSubscription.equals("admin") && !
IdentityConstants.REGISTRATION_FAILED.equals(registrationStatus))
+ else if (adminSubscription.equals("admin") &&
!IdentityConstants.REGISTRATION_FAILED.equals(registrationStatus))
{
FacesContext.getCurrentInstance().addMessage(null, new
FacesMessage(bundle.getString("IDENTITY_MANAGEMENT_CREATE_USER_CREATED")));
}
else
{
FacesContext.getCurrentInstance().addMessage("status", new
FacesMessage(FacesMessage.SEVERITY_ERROR,
- bundle.getString("IDENTITY_VALIDATION_ERROR_REGISTRATION"),
- bundle.getString("IDENTITY_VALIDATION_ERROR_REGISTRATION")));
+ bundle.getString("IDENTITY_VALIDATION_ERROR_REGISTRATION"),
+ bundle.getString("IDENTITY_VALIDATION_ERROR_REGISTRATION")));
}
}
private String getPortalURL()
{
ExternalContext ectx = FacesContext.getCurrentInstance().getExternalContext();
- JBossActionRequest request = (JBossActionRequest) ectx.getRequest();
- JBossActionResponse response = (JBossActionResponse) ectx.getResponse();
+ JBossActionRequest request = (JBossActionRequest)ectx.getRequest();
+ JBossActionResponse response = (JBossActionResponse)ectx.getResponse();
ServerInvocationContext invocationContext =
request.getControllerContext().getServerInvocation().getServerContext();
PortalNode n = request.getPortalNode();
PortalNodeURL url = response.createRenderURL(n);
Modified:
branches/Enterprise_Portal_Platform_4_3/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/EditRoleAction.java
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/EditRoleAction.java 2009-05-29
19:21:35 UTC (rev 13424)
+++
branches/Enterprise_Portal_Platform_4_3/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/EditRoleAction.java 2009-05-29
23:04:54 UTC (rev 13425)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
* contributors as indicated by the @authors tag. See the *
* copyright.txt in the distribution for a full listing of *
* individual contributors. *
@@ -22,83 +22,70 @@
******************************************************************************/
package org.jboss.portal.core.identity.ui.actions;
-import java.util.Map;
-
-import javax.faces.context.ExternalContext;
-import javax.faces.context.FacesContext;
-
import org.jboss.portal.common.text.FastURLDecoder;
import org.jboss.portal.core.identity.ui.UIRole;
-import org.jboss.portal.core.identity.ui.common.IdentityRoleBean;
+import org.jboss.portal.identity.IdentityException;
/**
* @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
* @version $Revision$
*/
-public class EditRoleAction
+public class EditRoleAction extends BaseRoleAction
{
- /** .*/
- private String currentRole;
-
- /** .*/
- private UIRole uiRole;
-
- /** .*/
- private IdentityRoleBean identityRoleBean;
-
/** . */
private static final FastURLDecoder decoder = FastURLDecoder.getUTF8Instance();
- public UIRole getUiRole()
- {
- return uiRole;
- }
-
- public void setUiRole(UIRole uiRole)
- {
- this.uiRole = uiRole;
- }
-
- public IdentityRoleBean getIdentityRoleBean()
- {
- return identityRoleBean;
- }
-
- public void setIdentityRoleBean(IdentityRoleBean identityRoleBean)
- {
- this.identityRoleBean = identityRoleBean;
- }
-
public String editRole()
{
- FacesContext ctx = FacesContext.getCurrentInstance();
- ExternalContext ectx = ctx.getExternalContext();
- Map params = ectx.getRequestParameterMap();
- this.currentRole = params.get("currentRole") != null ?
decoder.encode((String) params.get("currentRole")) : null;
+ String currentRole = beanContext.getParameter("currentRole");
+ currentRole = (currentRole != null ? decoder.encode(currentRole) : null);
try
{
- this.uiRole = identityRoleBean.getUIRole(this.currentRole);
+ this.uiRole = identityRoleBean.getUIRole(currentRole);
return "editRole";
}
catch (Exception e)
{
- e.printStackTrace();
+ log.error("Couldn't edit role " + currentRole, e);
+ beanContext.createErrorMessageFrom(e);
}
return "roleAdmin";
}
public String updateRole()
{
+ String roleDisplayName = this.uiRole.getDisplayName();
+
+ // Check that the new role is different from the old one
try
{
- identityRoleBean.updateRoleDisplayName(this.uiRole.getName(),
this.uiRole.getDisplayName());
+ String roleName = uiRole.getName();
+ UIRole current = identityRoleBean.getUIRole(roleName);
+ if (!isOldAndNewDifferent(current.getDisplayName(), roleDisplayName))
+ {
+ // if the new and old display names are the same, just return
+ return "roleAdmin";
+ }
}
- catch (Exception e)
+ catch (IdentityException e)
{
- e.printStackTrace();
+ log.error("Couldn't get current role " + roleDisplayName);
}
- return "roleAdmin";
- }
+ roleDisplayName = checkNameValidity(roleDisplayName,
"edit-role-link:display-name", displayNameValidator); // display names are
unique as well
+ if (roleDisplayName != null)
+ {
+ try
+ {
+ identityRoleBean.updateRoleDisplayName(this.uiRole.getName(),
roleDisplayName);
+ return "roleAdmin";
+ }
+ catch (Exception e)
+ {
+ beanContext.createErrorMessageFrom(e);
+ }
+ }
+ return null;
+ }
}
Deleted:
branches/Enterprise_Portal_Platform_4_3/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/RoleValidator.java
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/RoleValidator.java 2009-05-29
19:21:35 UTC (rev 13424)
+++
branches/Enterprise_Portal_Platform_4_3/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/RoleValidator.java 2009-05-29
23:04:54 UTC (rev 13425)
@@ -1,88 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.core.identity.ui.validators;
-
-import java.util.ResourceBundle;
-
-import javax.faces.application.FacesMessage;
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-import javax.faces.validator.Validator;
-import javax.faces.validator.ValidatorException;
-import javax.portlet.PortletContext;
-
-import org.jboss.portal.identity.IdentityException;
-import org.jboss.portal.identity.Role;
-import org.jboss.portal.identity.RoleModule;
-
-/**
- * @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
- * @version $Revision$
- */
-
-public class RoleValidator implements Validator
-{
- /** The role module */
- private RoleModule roleModule;
-
- /** The logger */
- private static final org.jboss.logging.Logger log =
org.jboss.logging.Logger.getLogger(RoleValidator.class);
-
- public void validate(FacesContext context, UIComponent component, Object value) throws
ValidatorException
- {
- String rolename = (String) value;
- ResourceBundle bundle = ResourceBundle.getBundle("conf.bundles.Identity",
context.getViewRoot().getLocale());
- PortletContext portletContext = (PortletContext)
context.getExternalContext().getContext();
- roleModule = (RoleModule) portletContext.getAttribute("RoleModule");
-
- try
- {
- @SuppressWarnings("unused")
- Role u = roleModule.findRoleByName(rolename);
- throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR,
- bundle.getString("IDENTITY_VALIDATION_ERROR_ROLENAME_TAKEN"),
- bundle.getString("IDENTITY_VALIDATION_ERROR_ROLENAME_TAKEN")));
- }
- catch (IllegalArgumentException e)
- {
- throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR,
- bundle.getString("IDENTITY_VALIDATION_ERROR_ROLENAME_ERROR"),
- bundle.getString("IDENTITY_VALIDATION_ERROR_ROLENAME_ERROR")));
- }
- catch (IdentityException e)
- {
- // TODO: Throw a catchable error
- if (e.getMessage().contains("No such role"))
- {
- // ignore
- }
- else
- {
- log.error("Error validation rolename", e);
- throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR,
- bundle.getString("IDENTITY_VALIDATION_ERROR_ROLENAME_ERROR"),
- bundle.getString("IDENTITY_VALIDATION_ERROR_ROLENAME_ERROR")));
- }
- }
- }
-}
Copied:
branches/Enterprise_Portal_Platform_4_3/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/UserAttributeValidator.java
(from rev 13413,
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/UserAttributeValidator.java)
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/UserAttributeValidator.java
(rev 0)
+++
branches/Enterprise_Portal_Platform_4_3/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/UserAttributeValidator.java 2009-05-29
23:04:54 UTC (rev 13425)
@@ -0,0 +1,66 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.core.identity.ui.validators;
+
+import org.jboss.portal.common.util.ParameterValidation;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.validator.Validator;
+import javax.faces.validator.ValidatorException;
+import java.text.MessageFormat;
+import java.util.ResourceBundle;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a>
+ * @version $Revision$
+ */
+public class UserAttributeValidator implements Validator
+{
+ public void validate(FacesContext context, UIComponent component, Object value) throws
ValidatorException
+ {
+ ResourceBundle bundle = ResourceBundle.getBundle("conf.bundles.Identity",
context.getViewRoot().getLocale());
+ ParameterValidation.sanitizeFromPatternWithHandler((String)value,
ParameterValidation.XSS_CHECK,
+ new ValidatorExceptionErrorHandler("", bundle));
+ }
+
+ private class ValidatorExceptionErrorHandler extends
ParameterValidation.ValidationErrorHandler
+ {
+ private ResourceBundle bundle;
+
+ ValidatorExceptionErrorHandler(String defaultValue, ResourceBundle bundle)
+ {
+ super(defaultValue);
+ this.bundle = bundle;
+ }
+
+ protected String internalValidationErrorHandling(String value)
+ {
+ String message = bundle.getString("INVALID_VALUE_ERROR");
+ message = MessageFormat.format(message, value);
+ throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR,
message, message));
+ }
+ }
+}
Modified:
branches/Enterprise_Portal_Platform_4_3/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/UsernameValidator.java
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/UsernameValidator.java 2009-05-29
19:21:35 UTC (rev 13424)
+++
branches/Enterprise_Portal_Platform_4_3/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/UsernameValidator.java 2009-05-29
23:04:54 UTC (rev 13425)
@@ -22,21 +22,24 @@
******************************************************************************/
package org.jboss.portal.core.identity.ui.validators;
-import java.util.ResourceBundle;
+import org.jboss.portal.common.util.ParameterValidation;
+import
org.jboss.portal.core.identity.services.metadata.CoreIdentityConfigurationException;
+import org.jboss.portal.core.identity.services.workflow.RegistrationService;
+import org.jboss.portal.identity.IdentityException;
+import org.jboss.portal.identity.NoSuchUserException;
+import org.jboss.portal.identity.User;
+import org.jboss.portal.identity.UserModule;
+
import javax.faces.application.FacesMessage;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.validator.Validator;
import javax.faces.validator.ValidatorException;
import javax.portlet.PortletContext;
+import java.text.MessageFormat;
+import java.util.ResourceBundle;
+import java.util.regex.Pattern;
-import
org.jboss.portal.core.identity.services.metadata.CoreIdentityConfigurationException;
-import org.jboss.portal.core.identity.services.workflow.RegistrationService;
-import org.jboss.portal.identity.IdentityException;
-import org.jboss.portal.identity.NoSuchUserException;
-import org.jboss.portal.identity.User;
-import org.jboss.portal.identity.UserModule;
-
/**
* @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
* @version $Revision$
@@ -46,7 +49,7 @@
{
/** The username regex */
// private static final String NICKNAME_VALIDATION =
"^[a-zA-Z]([a-zA-Z0-9]+(([\\.\\-\\_]?[a-zA-Z0-9]+)+)?)";
-
+
/** The user module */
private UserModule userModule;
@@ -56,14 +59,20 @@
/** The logger */
private static final org.jboss.logging.Logger log =
org.jboss.logging.Logger.getLogger(UsernameValidator.class);
+ // same as ParameterValidation.XSS_CHECK but with \ allowed for directory access...
+ private final Pattern USER_NAME_XSS_CHECK =
Pattern.compile("([^<>(\\)=\\\\](?<!%5C))*",
Pattern.CASE_INSENSITIVE);
+
public void validate(FacesContext context, UIComponent component, Object value) throws
ValidatorException
{
- String username = (String) value;
ResourceBundle bundle = ResourceBundle.getBundle("conf.bundles.Identity",
context.getViewRoot().getLocale());
- PortletContext portletContext = (PortletContext)
context.getExternalContext().getContext();
- userModule = (UserModule) portletContext.getAttribute("UserModule");
- registrationService = (RegistrationService)
portletContext.getAttribute("RegistrationService");
+ String username = ParameterValidation.sanitizeFromPatternWithHandler((String)value,
USER_NAME_XSS_CHECK,
+ new ValidatorExceptionErrorHandler("", bundle));
+ PortletContext portletContext =
(PortletContext)context.getExternalContext().getContext();
+ userModule = (UserModule)portletContext.getAttribute("UserModule");
+ registrationService =
(RegistrationService)portletContext.getAttribute("RegistrationService");
+
+
// if (username.length() >= 5 && (Pattern.matches(NICKNAME_VALIDATION,
username)))
if (username.contains("<") || username.contains(">") ||
username.contains("\"") || username.contains("\'"))
{
@@ -77,15 +86,15 @@
if (registrationService.checkUsername(username))
{
throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR,
-
bundle.getString("IDENTITY_VALIDATION_ERROR_USERNAME_TAKEN"),
-
bundle.getString("IDENTITY_VALIDATION_ERROR_USERNAME_TAKEN")));
+ bundle.getString("IDENTITY_VALIDATION_ERROR_USERNAME_TAKEN"),
+ bundle.getString("IDENTITY_VALIDATION_ERROR_USERNAME_TAKEN")));
}
User u = userModule.findUserByUserName(username);
// User found so this nickname is already taken
throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR,
- bundle.getString("IDENTITY_VALIDATION_ERROR_USERNAME_TAKEN"),
- bundle.getString("IDENTITY_VALIDATION_ERROR_USERNAME_TAKEN")));
+ bundle.getString("IDENTITY_VALIDATION_ERROR_USERNAME_TAKEN"),
+ bundle.getString("IDENTITY_VALIDATION_ERROR_USERNAME_TAKEN")));
}
catch (NoSuchUserException e)
{
@@ -94,22 +103,41 @@
catch (IllegalArgumentException e)
{
throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR,
- bundle.getString("IDENTITY_VALIDATION_ERROR_USERNAME_ERROR"),
- bundle.getString("IDENTITY_VALIDATION_ERROR_USERNAME_ERROR")));
+ bundle.getString("IDENTITY_VALIDATION_ERROR_USERNAME_ERROR"),
+ bundle.getString("IDENTITY_VALIDATION_ERROR_USERNAME_ERROR")));
}
catch (IdentityException e)
{
log.error("Error validation username", e);
throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR,
- bundle.getString("IDENTITY_VALIDATION_ERROR_USERNAME_ERROR"),
- bundle.getString("IDENTITY_VALIDATION_ERROR_USERNAME_ERROR")));
+ bundle.getString("IDENTITY_VALIDATION_ERROR_USERNAME_ERROR"),
+ bundle.getString("IDENTITY_VALIDATION_ERROR_USERNAME_ERROR")));
}
catch (CoreIdentityConfigurationException e)
{
log.error("Error validation username", e);
throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR,
- bundle.getString("IDENTITY_VALIDATION_ERROR_USERNAME_ERROR"),
- bundle.getString("IDENTITY_VALIDATION_ERROR_USERNAME_ERROR")));
+ bundle.getString("IDENTITY_VALIDATION_ERROR_USERNAME_ERROR"),
+ bundle.getString("IDENTITY_VALIDATION_ERROR_USERNAME_ERROR")));
}
}
+
+ private class ValidatorExceptionErrorHandler extends
ParameterValidation.ValidationErrorHandler
+ {
+ private ResourceBundle bundle;
+
+ ValidatorExceptionErrorHandler(String defaultValue, ResourceBundle bundle)
+ {
+ super(defaultValue);
+ this.bundle = bundle;
+ }
+
+ protected String internalValidationErrorHandling(String s)
+ {
+ String message =
bundle.getString("IDENTITY_VALIDATION_ERROR_INVALID_USERNAME");
+ message = MessageFormat.format(message, s);
+ throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR,
message, message));
+ }
+ }
+
}
Modified:
branches/Enterprise_Portal_Platform_4_3/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity.properties
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity.properties 2009-05-29
19:21:35 UTC (rev 13424)
+++
branches/Enterprise_Portal_Platform_4_3/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity.properties 2009-05-29
23:04:54 UTC (rev 13425)
@@ -116,7 +116,6 @@
IDENTITY_MANAGEMENT_ROLE_ASSIGNED=Assigned roles
IDENTITY_MANAGEMENT_CREATE_ROLE=Create new role
IDENTITY_MANAGEMENT_EDIT_ROLE=Edit role
-IDENTITY_MANAGEMENT_CREATE_ROLE=Create role
IDENTITY_MANAGEMENT_DISABLE=Disable
IDENTITY_MANAGEMENT_DISABLE_USER_DISABLED=User disabled
IDENTITY_MANAGEMENT_ENABLE=Enable
@@ -171,14 +170,19 @@
IDENTITY_VALIDATION_ERROR_REGISTRATION=Failed to register user.
IDENTITY_VALIDATION_ERROR_USERNAME_TAKEN=This username is already taken.
IDENTITY_VALIDATION_ERROR_USERNAME_ERROR=Error while validating the username.
-IDENTITY_VALIDATION_ERROR_ROLENAME_TAKEN=This role name is already taken.
-IDENTITY_VALIDATION_ERROR_ROLENAME_ERROR=Error while validating the role name.
+IDENTITY_VALIDATION_ERROR_INVALID_USERNAME=''{0}'' is an invalid
username: Cannot be null, empty or contain '<', '>', '(',
')', '=' or '%5c'
IDENTITY_VALIDATION_ERROR_PASSWORD_DOESNT_MATCH=The passwords doesn't match.
IDENTITY_VALIDATION_ERROR_PASSWORD_ERROR=Error while validating password.
IDENTITY_VALIDATION_ERROR_INVALID_EMAIL=Invalid E-Mail address.
IDENTITY_VALIDATION_ERROR_INVALID_PASSWORD=Invalid password
IDENTITY_VALIDATION_ERROR_CAPTCHA_INCORRECT=Captcha incorrect
+ROLE_TYPE=role
+ROLE_DISPLAY_TYPE=role display
+INVALID_NAME_ERROR=''{0}'' is an invalid {1} name: Cannot be null, empty
or contain '/', '.', '\\', '<', '>',
'(', ')', '=' or '%5c'
+INVALID_VALUE_ERROR=''{0}'' is an invalid value: Cannot be null, empty or
contain '\\', '<', '>', '(', ')',
'=' or '%5c'
+DUPLICATE_ERROR=A {1} named ''{0}'' already exists!
+
# Example usage for dynamic values
IDENTITY_DYNAMIC_VALUE_TEST=test label
IDENTITY_DYNAMIC_VALUE_TEST2=test label2
Modified:
branches/Enterprise_Portal_Platform_4_3/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity_fr.properties
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity_fr.properties 2009-05-29
19:21:35 UTC (rev 13424)
+++
branches/Enterprise_Portal_Platform_4_3/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity_fr.properties 2009-05-29
23:04:54 UTC (rev 13425)
@@ -24,7 +24,7 @@
IDENTITY_AIM = Identifiant AIM
-IDENTITY_APPLICATION_NOT_AVAILABLE = Portlet non disponible. V\u00E9rifiez votre
configuration et les journaux syst\u00E8me pour plus d'information.
+IDENTITY_APPLICATION_NOT_AVAILABLE = Portlet non disponible. V\u00e9rifiez votre
configuration et les journaux syst\u00e8me pour plus d'information.
IDENTITY_BUTTON_CANCEL = Annuler
@@ -32,19 +32,19 @@
IDENTITY_BUTTON_SUBMIT = Soumettre
-IDENTITY_CATEGORY_ADDITIONAL = Information compl\u00E9mentaire
+IDENTITY_CATEGORY_ADDITIONAL = Information compl\u00e9mentaire
-IDENTITY_CATEGORY_ADDITIONAL_EXTRA = (255 caract\u00E8res max.)
+IDENTITY_CATEGORY_ADDITIONAL_EXTRA = (255 caract\u00e8res max.)
-IDENTITY_CATEGORY_ADDITIONAL_SIGNATURE = (Signature de 255 caract\u00E8res max)
+IDENTITY_CATEGORY_ADDITIONAL_SIGNATURE = (Signature de 255 caract\u00e8res max)
-IDENTITY_CATEGORY_GENERAL = Pr\u00E9f\u00E9rences g\u00E9n\u00E9rales
+IDENTITY_CATEGORY_GENERAL = Pr\u00e9f\u00e9rences g\u00e9n\u00e9rales
-IDENTITY_CATEGORY_INSTANT = Comptes de messagerie instantan\u00E9e
+IDENTITY_CATEGORY_INSTANT = Comptes de messagerie instantan\u00e9e
IDENTITY_CATEGORY_PERSONAL = Informations personnelles
-IDENTITY_CREATE_ACCOUNT = Vous pouvez cr\u00E9er un compte.
+IDENTITY_CREATE_ACCOUNT = Vous pouvez cr\u00e9er un compte.
# Example usage for dynamic values
IDENTITY_DYNAMIC_VALUE_TEST = test label
@@ -55,15 +55,15 @@
IDENTITY_EDIT_CHANGE_EMAIL_ERROR = Impossible de changer l'adresse de courriel.
-IDENTITY_EDIT_CHANGE_EMAIL_STATUS_CHANGED = Votre adresse de courriel a \u00E9t\u00E9
mise \u00E0 jour.
+IDENTITY_EDIT_CHANGE_EMAIL_STATUS_CHANGED = Votre adresse de courriel a \u00e9t\u00e9
mise \u00e0 jour.
-IDENTITY_EDIT_CHANGE_EMAIL_STATUS_PENDING = Un courriel a \u00E9t\u00E9 envoy\u00E9
\u00E0 l'adresse indiqu\u00E9e afin d'en confirmer la validit\u00E9.
+IDENTITY_EDIT_CHANGE_EMAIL_STATUS_PENDING = Un courriel a \u00e9t\u00e9 envoy\u00e9
\u00e0 l'adresse indiqu\u00e9e afin d'en confirmer la validit\u00e9.
IDENTITY_EDIT_CHANGE_PASSWORD = Changer mon mot de passe
IDENTITY_EDIT_CHANGE_PASSWORD_ERROR = Impossible de changer votre mot de passe.
-IDENTITY_EDIT_CHANGE_PASSWOR_STATUS = Votre mot de passe a \u00E9t\u00E9 modifi\u00E9.
+IDENTITY_EDIT_CHANGE_PASSWOR_STATUS = Votre mot de passe a \u00e9t\u00e9 modifi\u00e9.
IDENTITY_EDIT_EMAIL_NEW = Nouvelle adresse courriel
@@ -73,39 +73,39 @@
IDENTITY_EDIT_PASSWORD_TITLE = Changer mon mot de passe
-IDENTITY_EDIT_PROFILE_ERROR = Erreur lors de la mise \u00E0 jour de votre profil.
+IDENTITY_EDIT_PROFILE_ERROR = Erreur lors de la mise \u00e0 jour de votre profil.
IDENTITY_EDIT_PROFILE_TITLE = Modifier mon profil
IDENTITY_EMAIL = Courriel
-IDENTITY_ENABLED = Activ\u00E9
+IDENTITY_ENABLED = Activ\u00e9
IDENTITY_EXTRA = Extra
IDENTITY_FAMILYNAME = Nom
-IDENTITY_GIVENNAME = Pr\u00E9nom
+IDENTITY_GIVENNAME = Pr\u00e9nom
IDENTITY_HOMEPAGE = Page web
-IDENTITY_ICQ = Num\u00E9ro Icq
+IDENTITY_ICQ = Num\u00e9ro Icq
-IDENTITY_INTERESTS = Centres d'int\u00E9r\u00EAts
+IDENTITY_INTERESTS = Centres d'int\u00e9r\u00eats
-IDENTITY_LAST_LOGIN = Derni\u00E8re visite
+IDENTITY_LAST_LOGIN = Derni\u00e8re visite
IDENTITY_LOCALE = Langue
-IDENTITY_LOCATION = Lieu de r\u00E9sidence
+IDENTITY_LOCATION = Lieu de r\u00e9sidence
IDENTITY_LOST_PASSWORD = Mot de passe perdu
-IDENTITY_LOST_PASSWORD_DESCRIPTION = Veuillez entrer votre identifiant afin de
r\u00E9initialiser votre mot de passe.
+IDENTITY_LOST_PASSWORD_DESCRIPTION = Veuillez entrer votre identifiant afin de
r\u00e9initialiser votre mot de passe.
-IDENTITY_LOST_PASSWORD_ERROR = \u00C9chec de r\u00E9initialisation de votre mot de
passe.
+IDENTITY_LOST_PASSWORD_ERROR = \u00c9chec de r\u00e9initialisation de votre mot de
passe.
-IDENTITY_LOST_PASSWORD_STATUS_404 = Aucun compte trouv\u00E9.
+IDENTITY_LOST_PASSWORD_STATUS_404 = Aucun compte trouv\u00e9.
IDENTITY_LOST_PASSWORD_STATUS_SUCCESSFUL = Vous receverez sous peu via courriel votre
nouveau mot de passe.
@@ -115,7 +115,7 @@
IDENTITY_MAIL_SUBJECT_CHANGE_EMAIL = Confirmer l'adresse de courriel
-IDENTITY_MAIL_SUBJECT_LOST_PASSWORD = R\u00E9initialiser mon mot de passe
+IDENTITY_MAIL_SUBJECT_LOST_PASSWORD = R\u00e9initialiser mon mot de passe
IDENTITY_MAIL_SUBJECT_REGISTER = Confirmer mon enregistrement
@@ -125,39 +125,39 @@
IDENTITY_MANAGEMENT_ACTION_EDIT_PROFILE = Modifier
-IDENTITY_MANAGEMENT_ACTION_ROLES = R\u00F4les
+IDENTITY_MANAGEMENT_ACTION_ROLES = R\u00f4les
-IDENTITY_MANAGEMENT_APPROVE_ALL = Approuver la s\u00E9lection
+IDENTITY_MANAGEMENT_APPROVE_ALL = Approuver la s\u00e9lection
-IDENTITY_MANAGEMENT_ASSIGN_ROLES = Assigner un r\u00F4le
+IDENTITY_MANAGEMENT_ASSIGN_ROLES = Assigner un r\u00f4le
IDENTITY_MANAGEMENT_COUNT_PENDING_USERS = Comptes en attente d'approbation
-IDENTITY_MANAGEMENT_COUNT_REGISTERED_USERS = Utilisateurs enregistr\u00E9s
+IDENTITY_MANAGEMENT_COUNT_REGISTERED_USERS = Utilisateurs enregistr\u00e9s
-IDENTITY_MANAGEMENT_CREATE_ROLE = Cr\u00E9er un nouveau r\u00F4le
+IDENTITY_MANAGEMENT_CREATE_ROLE = Cr\u00e9er un nouveau r\u00f4le
-IDENTITY_MANAGEMENT_CREATE_USER = Cr\u00E9er un nouveau compte utilisateur
+IDENTITY_MANAGEMENT_CREATE_USER = Cr\u00e9er un nouveau compte utilisateur
-IDENTITY_MANAGEMENT_CREATE_USER_CREATED = Compte cr\u00E9\u00E9
+IDENTITY_MANAGEMENT_CREATE_USER_CREATED = Compte cr\u00e9\u00e9
IDENTITY_MANAGEMENT_DESCRIPTION_SUBSCRIPTION_AUTOMATIC = Automatique - pas de validation
par courriel et pas d'approbation
-IDENTITY_MANAGEMENT_DESCRIPTION_SUBSCRIPTION_CUSTOM = Mode d'abonnement
personnalis\u00E9
+IDENTITY_MANAGEMENT_DESCRIPTION_SUBSCRIPTION_CUSTOM = Mode d'abonnement
personnalis\u00e9
IDENTITY_MANAGEMENT_DESCRIPTION_SUBSCRIPTION_EMAIL = Validation par courriel et pas
d'approbation
IDENTITY_MANAGEMENT_DESCRIPTION_SUBSCRIPTION_EMAIL_ADMIN = Validation par courriel et
approbation par un administrateur
-IDENTITY_MANAGEMENT_DISABLE = D\u00E9sactiver
+IDENTITY_MANAGEMENT_DISABLE = D\u00e9sactiver
-IDENTITY_MANAGEMENT_EDIT_ROLE = Modifier le r\u00F4le
+IDENTITY_MANAGEMENT_EDIT_ROLE = Modifier le r\u00f4le
IDENTITY_MANAGEMENT_ENABLE = Activer
-IDENTITY_MANAGEMENT_ERROR_ACTION_ROLE = Impossible d'effectuer l'op\u00E9ration
demand\u00E9e sur ce r\u00F4le. Consultez le journal syst\u00E8me pour plus de
d\u00E9tails.
+IDENTITY_MANAGEMENT_ERROR_ACTION_ROLE = Impossible d'effectuer l'op\u00e9ration
demand\u00e9e sur ce r\u00f4le. Consultez le journal syst\u00e8me pour plus de
d\u00e9tails.
-IDENTITY_MANAGEMENT_ERROR_ACTION_USER = Impossible d'effectuer l'op\u00E9ration
demand\u00E9e sur ce compte. Consultez le journal syst\u00E8me pour plus de d\u00E9tails.
+IDENTITY_MANAGEMENT_ERROR_ACTION_USER = Impossible d'effectuer l'op\u00e9ration
demand\u00e9e sur ce compte. Consultez le journal syst\u00e8me pour plus de d\u00e9tails.
IDENTITY_MANAGEMENT_MATRIX = Matrice
@@ -169,27 +169,27 @@
IDENTITY_MANAGEMENT_PENDING_REJECT = rejeter
-IDENTITY_MANAGEMENT_REJECT_ALL = Rejeter la s\u00E9lection
+IDENTITY_MANAGEMENT_REJECT_ALL = Rejeter la s\u00e9lection
-IDENTITY_MANAGEMENT_RESET_PASSWORD = R\u00E9initialiser le mot de passe
+IDENTITY_MANAGEMENT_RESET_PASSWORD = R\u00e9initialiser le mot de passe
-IDENTITY_MANAGEMENT_RESET_PASSWORD_DESCRIPTION = L'utilisateur recevera un nouveau
mot de passe al\u00E9atoire envoy\u00E9 via courriel.
+IDENTITY_MANAGEMENT_RESET_PASSWORD_DESCRIPTION = L'utilisateur recevera un nouveau
mot de passe al\u00e9atoire envoy\u00e9 via courriel.
-IDENTITY_MANAGEMENT_RESET_PASSWORD_FOR_USER = R\u00E9initialiser le mot de passe pour
l'usager
+IDENTITY_MANAGEMENT_RESET_PASSWORD_FOR_USER = R\u00e9initialiser le mot de passe pour
l'usager
-IDENTITY_MANAGEMENT_ROLE = R\u00F4le
+IDENTITY_MANAGEMENT_ROLE = R\u00f4le
-IDENTITY_MANAGEMENT_ROLE_ASSIGNED = R\u00F4les assign\u00E9s
+IDENTITY_MANAGEMENT_ROLE_ASSIGNED = R\u00f4les assign\u00e9s
IDENTITY_MANAGEMENT_ROLE_DISPLAY = Nom courant
-IDENTITY_MANAGEMENT_ROLE_MANAGEMENT = Gestion des r\u00F4les
+IDENTITY_MANAGEMENT_ROLE_MANAGEMENT = Gestion des r\u00f4les
IDENTITY_MANAGEMENT_ROLE_MEMBERS = Membres
IDENTITY_MANAGEMENT_SEARCH_USER = Rechercher
-IDENTITY_MANAGEMENT_SELECT_ALL = Tout s\u00E9lectionner
+IDENTITY_MANAGEMENT_SELECT_ALL = Tout s\u00e9lectionner
IDENTITY_MANAGEMENT_SUBSCRIPTION_ADMIN_MODE = Administrer les modes d'abonnement
@@ -197,17 +197,17 @@
IDENTITY_MANAGEMENT_SUBSCRIPTION_MODES = Modes d'abonnement
-IDENTITY_MANAGEMENT_UNSELECT_ALL = Tout d\u00E9s\u00E9lectionner
+IDENTITY_MANAGEMENT_UNSELECT_ALL = Tout d\u00e9s\u00e9lectionner
-IDENTITY_MANAGEMENT_USER_DELETED = Compte supprim\u00E9
+IDENTITY_MANAGEMENT_USER_DELETED = Compte supprim\u00e9
IDENTITY_MANAGEMENT_USER_MANAGEMENT = Gestion des utilisateurs
IDENTITY_MSNM = Identifiant MSN
-IDENTITY_NOT_LOGGED_IN = Vous n'\u00EAtes pas connect\u00E9.
+IDENTITY_NOT_LOGGED_IN = Vous n'\u00eates pas connect\u00e9.
-IDENTITY_OCCUPATION = M\u00E9tier
+IDENTITY_OCCUPATION = M\u00e9tier
IDENTITY_PASSWORD = Mot de passe
@@ -217,33 +217,33 @@
IDENTITY_REGISTER_PASSWORD_CONFIRM = Confirmation de mot de passe
-IDENTITY_REGISTER_PENDING_TITLE = Un courriel a \u00E9t\u00E9 envoy\u00E9 \u00E0
l'adresse indiqu\u00E9e afin de confirmer votre enregistrement.
+IDENTITY_REGISTER_PENDING_TITLE = Un courriel a \u00e9t\u00e9 envoy\u00e9 \u00e0
l'adresse indiqu\u00e9e afin de confirmer votre enregistrement.
IDENTITY_REGISTER_REQUIRED_INFORMATION = indique un champ obligatoire
IDENTITY_REGISTER_STATUS_TITLE = Statut d'enregistrement
-IDENTITY_REGISTER_SUCCESS_TITLE = Votre compte a \u00E9t\u00E9 cr\u00E9\u00E9 avec
succ\u00E8s. Vous pouvez vous connecter.
+IDENTITY_REGISTER_SUCCESS_TITLE = Votre compte a \u00e9t\u00e9 cr\u00e9\u00e9 avec
succ\u00e8s. Vous pouvez vous connecter.
-IDENTITY_REGISTER_TITLE = Informations g\u00E9n\u00E9rales
+IDENTITY_REGISTER_TITLE = Informations g\u00e9n\u00e9rales
IDENTITY_REGISTER_TITLE_CONFIRM = Confirmation
IDENTITY_REGISTER_TITLE_CONFIRM_DELETE = Confirmation : supprimer
-IDENTITY_REGISTER_VERIFY_CAPTCHA = V\u00E9rification visuelle
+IDENTITY_REGISTER_VERIFY_CAPTCHA = V\u00e9rification visuelle
-IDENTITY_REGISTRATION_DATE = Enregistr\u00E9 le
+IDENTITY_REGISTRATION_DATE = Enregistr\u00e9 le
-IDENTITY_SECURITY_ANSWER = R\u00E9ponse \u00E0 votre question de s\u00E9curit\u00E9
+IDENTITY_SECURITY_ANSWER = R\u00e9ponse \u00e0 votre question de s\u00e9curit\u00e9
-IDENTITY_SECURITY_QUESTION = Question de s\u00E9curit\u00E9
+IDENTITY_SECURITY_QUESTION = Question de s\u00e9curit\u00e9
IDENTITY_SIGNATURE = Signature
-IDENTITY_SKYPE = Num\u00E9ro Skype
+IDENTITY_SKYPE = Num\u00e9ro Skype
-IDENTITY_THEME = Th\u00E8me
+IDENTITY_THEME = Th\u00e8me
IDENTITY_TIMEZONE = Fuseau horaire
@@ -253,7 +253,7 @@
IDENTITY_VALIDATION_ERROR_INVALID_EMAIL = Adresse de courriel invalide.
-IDENTITY_VALIDATION_ERROR_INVALID_PASSWORD = Mot de passe erron\u00E9.
+IDENTITY_VALIDATION_ERROR_INVALID_PASSWORD = Mot de passe erron\u00e9.
IDENTITY_VALIDATION_ERROR_PASSWORD_DOESNT_MATCH = Vos mots de passe ne correspondent
pas.
@@ -262,8 +262,9 @@
IDENTITY_VALIDATION_ERROR_REGISTRATION = Erreur lors de l'enregistrement du compte.
IDENTITY_VALIDATION_ERROR_USERNAME_ERROR = Erreur lors de la validation du nom
d'utilisateur.
+IDENTITY_VALIDATION_ERROR_INVALID_USERNAME=''{0}'' est un nom
d'utilisateur invalide : Ne peut pas \u00eatre null, vide ou contenir '<',
'>', '(', ')', '=' ou '%5c'
-IDENTITY_VALIDATION_ERROR_USERNAME_TAKEN = Ce nom d'utilisateur est d\u00E9j\u00E0
utilis\u00E9.
+IDENTITY_VALIDATION_ERROR_USERNAME_TAKEN = Ce nom d'utilisateur est d\u00e9j\u00e0
utilis\u00e9.
IDENTITY_VERIFICATION_LOGIN = Connexion
@@ -273,17 +274,17 @@
IDENTITY_VERIFICATION_STATUS_FAILED = Impossible de valider cette adresse de courriel.
-IDENTITY_VERIFICATION_STATUS_REGISTER_APPROVAL = Votre adresse de courriel a
\u00E9t\u00E9 v\u00E9rifi\u00E9e, mais votre compte doit \u00EAtre approuv\u00E9 par un
administrateur.
+IDENTITY_VERIFICATION_STATUS_REGISTER_APPROVAL = Votre adresse de courriel a
\u00e9t\u00e9 v\u00e9rifi\u00e9e, mais votre compte doit \u00eatre approuv\u00e9 par un
administrateur.
-IDENTITY_VERIFICATION_STATUS_REGISTER_CUSTOM = Votre compte a \u00E9t\u00E9 activ\u00E9.
Vous pouvez vous connecter.
+IDENTITY_VERIFICATION_STATUS_REGISTER_CUSTOM = Votre compte a \u00e9t\u00e9 activ\u00e9.
Vous pouvez vous connecter.
-IDENTITY_VERIFICATION_STATUS_REGISTER_SUCCESS = Votre compte a \u00E9t\u00E9 activ\u00E9.
Vous pouvez vous connecter.
+IDENTITY_VERIFICATION_STATUS_REGISTER_SUCCESS = Votre compte a \u00e9t\u00e9 activ\u00e9.
Vous pouvez vous connecter.
-IDENTITY_VERIFICATION_STATUS_VALIDATED = Adresse de courriel valid\u00E9e.
+IDENTITY_VERIFICATION_STATUS_VALIDATED = Adresse de courriel valid\u00e9e.
IDENTITY_VIEW_PROFILE_TITLE = Voir mon profil
-IDENTITY_WARNING_CONFIRM_DELETE_ROLE = Attention ! Vous allez supprimer le r\u00F4le
+IDENTITY_WARNING_CONFIRM_DELETE_ROLE = Attention ! Vous allez supprimer le r\u00f4le
IDENTITY_WARNING_CONFIRM_DELETE_USER = Attention ! Vous allez supprimer le compte
@@ -295,3 +296,9 @@
javax.portlet.title=Utilisateur
javax.faces.component.UIInput.REQUIRED=Valeur requise
+
+ROLE_TYPE=r\u00f4le
+ROLE_DISPLAY_TYPE=affichage r\u00f4le
+DUPLICATE_ERROR=Un {1} nomm\u00e9 ''{0}'' existe d\u00e9j\u00e0!
+INVALID_NAME_ERROR=''{0}'' est un nom invalide pour un {1} : Ne peut pas
\u00eatre null, vide ou contenir '/', '.', '\\', '<',
'>', '(', ')', '=' ou '%5c'
+INVALID_VALUE_ERROR=''{0}'' est une valeut invalide : Ne peut pas
\u00eatre null, vide ou contenir '\\', '<', '>',
'(', ')', '=' ou '%5c'
Modified:
branches/Enterprise_Portal_Platform_4_3/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity_it.properties
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity_it.properties 2009-05-29
19:21:35 UTC (rev 13424)
+++
branches/Enterprise_Portal_Platform_4_3/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity_it.properties 2009-05-29
23:04:54 UTC (rev 13425)
@@ -116,7 +116,6 @@
IDENTITY_MANAGEMENT_ROLE_ASSIGNED=Ruoli assegnati
IDENTITY_MANAGEMENT_CREATE_ROLE=Crea un nuovo ruolo
IDENTITY_MANAGEMENT_EDIT_ROLE=Modifica il ruolo
-IDENTITY_MANAGEMENT_CREATE_ROLE=Crea il ruolo
IDENTITY_MANAGEMENT_DISABLE=Disabilita
IDENTITY_MANAGEMENT_DISABLE_USER_DISABLED=Utente disabilitato
IDENTITY_MANAGEMENT_ENABLE=Abilita
@@ -171,8 +170,7 @@
IDENTITY_VALIDATION_ERROR_REGISTRATION=Fallita la registrazione dell'utente.
IDENTITY_VALIDATION_ERROR_USERNAME_TAKEN=Il nome utente esiste gi\u00e0.
IDENTITY_VALIDATION_ERROR_USERNAME_ERROR=Errore durante la validazione del nome utente.
-IDENTITY_VALIDATION_ERROR_ROLENAME_TAKEN=Il nome del ruolo esiste gi\u00e0.
-IDENTITY_VALIDATION_ERROR_ROLENAME_ERROR=Errore durante la validazione del nome del
ruolo.
+IDENTITY_VALIDATION_ERROR_INVALID_USERNAME=''{0}'' non \u00e8 un nome
utente valido : Non \u00f2 essere null, vuoto o contenere '<', '>',
'(', ')', '=' o '%5c'
IDENTITY_VALIDATION_ERROR_PASSWORD_DOESNT_MATCH=Le passwords non coincidono.
IDENTITY_VALIDATION_ERROR_PASSWORD_ERROR=Errore durante la validazione della password.
IDENTITY_VALIDATION_ERROR_INVALID_EMAIL=Indirizzo e-mail non valido.
@@ -187,3 +185,8 @@
javax.portlet.keywords=amministrazione,utente
javax.faces.component.UIInput.REQUIRED=Il valore \u00e8 richiesto
+
+ROLE_TYPE=ruolo
+INVALID_NAME_ERROR=''{0}'' non \u00e8 un nome valido di {1} : Non \u00f2
essere null, vuoto o contenere '/', '.', '\\', '<',
'>', '(', ')', '=' o '%5c'
+INVALID_VALUE_ERROR=''{0}'' non \u00e8 un nome valido : Non \u00f2 essere
null, vuoto o contenere '\\', '<', '>', '(',
')', '=' o '%5c'
+DUPLICATE_ERROR=Un valore {1} con nome ''{0}'' esiste gi\u00e0!
\ No newline at end of file
Modified:
branches/Enterprise_Portal_Platform_4_3/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity_ja.properties
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity_ja.properties 2009-05-29
19:21:35 UTC (rev 13424)
+++
branches/Enterprise_Portal_Platform_4_3/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity_ja.properties 2009-05-29
23:04:54 UTC (rev 13425)
@@ -114,7 +114,6 @@
IDENTITY_MANAGEMENT_ROLE_ASSIGNED=\u30a2\u30b5\u30a4\u30f3\u30ed\u30fc\u30eb
IDENTITY_MANAGEMENT_CREATE_ROLE=\u65b0\u3057\u3044\u30ed\u30fc\u30eb\u306e\u4f5c\u6210
IDENTITY_MANAGEMENT_EDIT_ROLE=\u30ed\u30fc\u30eb\u306e\u7de8\u96c6
-IDENTITY_MANAGEMENT_CREATE_ROLE=\u30ed\u30fc\u30eb\u306e\u4f5c\u6210
IDENTITY_MANAGEMENT_DISABLE=\u7121\u52b9
IDENTITY_MANAGEMENT_DISABLE_USER_DISABLED=\u7121\u52b9\u306b\u306a\u3063\u305f\u30e6\u30fc\u30b6
IDENTITY_MANAGEMENT_ENABLE=\u6709\u52b9
@@ -169,8 +168,6 @@
IDENTITY_VALIDATION_ERROR_REGISTRATION=\u30e6\u30fc\u30b6\u306e\u767b\u9332\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002
IDENTITY_VALIDATION_ERROR_USERNAME_TAKEN=\u3053\u306e\u30e6\u30fc\u30b6\u540d\u306f\u65e2\u306b\u4f7f\u308f\u308c\u3066\u3044\u307e\u3059\u3002
IDENTITY_VALIDATION_ERROR_USERNAME_ERROR=\u30e6\u30fc\u30b6\u540d\u306e\u30a8\u30e9\u30fc\u3002
-IDENTITY_VALIDATION_ERROR_ROLENAME_TAKEN=\u3053\u306e\u30ed\u30fc\u30eb\u540d\u306f\u65e2\u306b\u4f7f\u308f\u308c\u3066\u3044\u307e\u3059.
-IDENTITY_VALIDATION_ERROR_ROLENAME_ERROR=\u30ed\u30fc\u30eb\u59ea\u306e\u30a8\u30e9\u30fc\u3002
IDENTITY_VALIDATION_ERROR_PASSWORD_DOESNT_MATCH=\u30d1\u30b9\u30ef\u30fc\u30c9\u304c\u4e00\u81f4\u3057\u307e\u305b\u3093\u3002
IDENTITY_VALIDATION_ERROR_PASSWORD_ERROR=\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u30a8\u30e9\u30fc\u3002
IDENTITY_VALIDATION_ERROR_INVALID_EMAIL=\u7121\u52b9\u306aE\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3067\u3059\u3002
@@ -185,3 +182,6 @@
javax.portlet.keywords=\u7ba1\u7406,\u30e6\u30fc\u30b6
javax.faces.component.UIInput.REQUIRED=\u5fc5\u9808\u5024\u3067\u3059
+
+ROLE_TYPE=\u30ed\u30fc\u30eb\u306e
+INVALID_VALUE_ERROR=''{0}'' is an invalid value: Cannot be null, empty or
contain '\\', '<', '>', '(', ')',
'=' or '%5c'
\ No newline at end of file
Modified:
branches/Enterprise_Portal_Platform_4_3/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity_pt_BR.properties
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity_pt_BR.properties 2009-05-29
19:21:35 UTC (rev 13424)
+++
branches/Enterprise_Portal_Platform_4_3/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity_pt_BR.properties 2009-05-29
23:04:54 UTC (rev 13425)
@@ -21,31 +21,31 @@
# 02110-1301 USA, or see the FSF site:
http://www.fsf.org. #
################################################################################
-javax.faces.validator.LengthValidator.MINIMUM= Entrada \u00E9 muito curta (m\u00EDnimo de
{0} caracteres).
+javax.faces.validator.LengthValidator.MINIMUM= Entrada \u00e9 muito curta (m\u00ednimo de
{0} caracteres).
-IDENTITY_APPLICATION_NOT_AVAILABLE=Porlet n\u00E3o dispon\u00EDvel. Verifique sua
configura\u00E7\u00E3o e log de erro para mais informa\u00E7\u00F5es.
+IDENTITY_APPLICATION_NOT_AVAILABLE=Porlet n\u00e3o dispon\u00edvel. Verifique sua
configura\u00e7\u00e3o e log de erro para mais informa\u00e7\u00f5es.
IDENTITY_WELCOME=Bem-vindo
IDENTITY_REGISTER=Registrar-se
IDENTITY_LOST_PASSWORD=Esqueceu Senha
-IDENTITY_NOT_LOGGED_IN=Voc\u00EA n\u00E3o est\u00E1 autenticado no portal.
-IDENTITY_CREATE_ACCOUNT=Voc\u00EA pode criar uma conta.
+IDENTITY_NOT_LOGGED_IN=Voc\u00ea n\u00e3o est\u00e1 autenticado no portal.
+IDENTITY_CREATE_ACCOUNT=Voc\u00ea pode criar uma conta.
IDENTITY_BUTTON_SUBMIT=Enviar
IDENTITY_BUTTON_EDIT=Editar
IDENTITY_BUTTON_CANCEL=Cancelar
-IDENTITY_REGISTER_TITLE=Informa\u00E7\u00F5es b\u00E1sicas do usu\u00E1rio
-IDENTITY_REGISTER_TITLE_CONFIRM=Confirma\u00E7\u00E3o
+IDENTITY_REGISTER_TITLE=Informa\u00e7\u00f5es b\u00e1sicas do usu\u00e1rio
+IDENTITY_REGISTER_TITLE_CONFIRM=Confirma\u00e7\u00e3o
IDENTITY_REGISTER_PASSWORD_CONFIRM=Confirme a Senha
IDENTITY_REGISTER_STATUS_TITLE=Status do registro
-IDENTITY_REGISTER_SUCCESS_TITLE=Sua conta foi criada com \u00EAxito. Voc\u00EA pode
autenticar-se agora.
-IDENTITY_REGISTER_PENDING_TITLE=Um e-mail foi enviado ao seu endere\u00E7o de e-mail para
confirmar o seu registro.
-IDENTITY_REGISTER_REQUIRED_INFORMATION=indica um campo obrigat\u00F3rio.
+IDENTITY_REGISTER_SUCCESS_TITLE=Sua conta foi criada com \u00eaxito. Voc\u00ea pode
autenticar-se agora.
+IDENTITY_REGISTER_PENDING_TITLE=Um e-mail foi enviado ao seu endere\u00e7o de e-mail para
confirmar o seu registro.
+IDENTITY_REGISTER_REQUIRED_INFORMATION=indica um campo obrigat\u00f3rio.
IDENTITY_LOST_PASSWORD_TITLE=Esqueceu seu dados de login?
-IDENTITY_LOST_PASSWORD_DESCRIPTION=Digite seu usu\u00E1rio para redefinir sua senha.
-IDENTITY_LOST_PASSWORD_ERROR=Falha na redefini\u00E7\u00E3o de senha.
-IDENTITY_LOST_PASSWORD_STATUS_SUCCESSFUL=Voc\u00EA receber\u00E1 um e-mail com sua nova
senha.
+IDENTITY_LOST_PASSWORD_DESCRIPTION=Digite seu usu\u00e1rio para redefinir sua senha.
+IDENTITY_LOST_PASSWORD_ERROR=Falha na redefini\u00e7\u00e3o de senha.
+IDENTITY_LOST_PASSWORD_STATUS_SUCCESSFUL=Voc\u00ea receber\u00e1 um e-mail com sua nova
senha.
IDENTITY_LOST_PASSWORD_STATUS_404=Nenhuma conta encontrada.
IDENTITY_LOST_PASSWORD_STATUS_TITLE=Esqueceu senha
@@ -53,27 +53,27 @@
IDENTITY_EDIT_PASSWORD_TITLE=Altere a sua senha
IDENTITY_EDIT_PASSWORD_CURRENT=Senha atual
IDENTITY_EDIT_CHANGE_PASSWORD=Alterar senha
-IDENTITY_EDIT_CHANGE_PASSWORD_ERROR=N\u00E3o foi poss\u00EDvel alterar a senha.
+IDENTITY_EDIT_CHANGE_PASSWORD_ERROR=N\u00e3o foi poss\u00edvel alterar a senha.
IDENTITY_EDIT_CHANGE_PASSWOR_STATUS=A senha foi atualizada.
-IDENTITY_EDIT_EMAIL_TITLE=Alterar o seu endere\u00E7o de e-mail
-IDENTITY_EDIT_EMAIL_NEW=Novo endere\u00E7o de e-mail
+IDENTITY_EDIT_EMAIL_TITLE=Alterar o seu endere\u00e7o de e-mail
+IDENTITY_EDIT_EMAIL_NEW=Novo endere\u00e7o de e-mail
IDENTITY_EDIT_CHANGE_EMAIL=Alterar e-mail
-IDENTITY_EDIT_CHANGE_EMAIL_ERROR=N\u00E3o foi poss\u00EDvel alterar o endere\u00E7o de
e-mail
-IDENTITY_EDIT_CHANGE_EMAIL_STATUS_PENDING=Uma valida\u00E7\u00E3o de e-mail foi enviada
ao seu endere\u00E7o.
-IDENTITY_EDIT_CHANGE_EMAIL_STATUS_CHANGED=Seu endere\u00E7o de e-mail foi alterado.
+IDENTITY_EDIT_CHANGE_EMAIL_ERROR=N\u00e3o foi poss\u00edvel alterar o endere\u00e7o de
e-mail
+IDENTITY_EDIT_CHANGE_EMAIL_STATUS_PENDING=Uma valida\u00e7\u00e3o de e-mail foi enviada
ao seu endere\u00e7o.
+IDENTITY_EDIT_CHANGE_EMAIL_STATUS_CHANGED=Seu endere\u00e7o de e-mail foi alterado.
IDENTITY_EDIT_PROFILE_TITLE=Editar perfil
IDENTITY_VIEW_PROFILE_TITLE=Visualizar perfil
-IDENTITY_USERNAME=Usu\u00E1rio
+IDENTITY_USERNAME=Usu\u00e1rio
IDENTITY_PASSWORD=Senha
IDENTITY_EMAIL=E-Mail
IDENTITY_GIVENNAME=Primeiro nome
-IDENTITY_FAMILYNAME=\u00DAltimo nome
+IDENTITY_FAMILYNAME=\u00daltimo nome
IDENTITY_SKYPE=Identificador Skype
IDENTITY_LOCATION=Local
-IDENTITY_OCCUPATION=Ocupa\u00E7\u00E3o
+IDENTITY_OCCUPATION=Ocupa\u00e7\u00e3o
IDENTITY_EXTRA=Adicional
IDENTITY_SIGNATURE=Assinatura
IDENTITY_INTERESTS=Interesses
@@ -83,49 +83,49 @@
IDENTITY_MSNM=Identificador MSN messenger
IDENTITY_YIM=Identificador Yahoo
IDENTITY_XMMP=Identificador Xmmp
-IDENTITY_HOMEPAGE=P\u00E1gina inicial
-IDENTITY_TIMEZONE=Fuso hor\u00E1rio
+IDENTITY_HOMEPAGE=P\u00e1gina inicial
+IDENTITY_TIMEZONE=Fuso hor\u00e1rio
IDENTITY_THEME=Tema
-IDENTITY_SECURITY_QUESTION=Pergunta de seguran\u00E7a
-IDENTITY_SECURITY_ANSWER=Resposta de seguran\u00E7a
-IDENTITY_LAST_LOGIN=\u00DAltimo acesso
+IDENTITY_SECURITY_QUESTION=Pergunta de seguran\u00e7a
+IDENTITY_SECURITY_ANSWER=Resposta de seguran\u00e7a
+IDENTITY_LAST_LOGIN=\u00daltimo acesso
IDENTITY_REIGSTRATION_DATE=Data de Registro
IDENTITY_ENABLED=Ativado
-IDENTITY_CATEGORY_GENERAL=Prefer\u00EAncias Gerais
-IDENTITY_CATEGORY_PERSONAL=Informa\u00E7\u00F5es Pessoais
-IDENTITY_CATEGORY_INSTANT=Identidades de Mensagens Instant\u00E2neas
-IDENTITY_CATEGORY_ADDITIONAL=Informa\u00E7\u00F5es Adicionais
+IDENTITY_CATEGORY_GENERAL=Prefer\u00eancias Gerais
+IDENTITY_CATEGORY_PERSONAL=Informa\u00e7\u00f5es Pessoais
+IDENTITY_CATEGORY_INSTANT=Identidades de Mensagens Instant\u00e2neas
+IDENTITY_CATEGORY_ADDITIONAL=Informa\u00e7\u00f5es Adicionais
-IDENTITY_CATEGORY_ADDITIONAL_SIGNATURE=(Assinatura de ,no m\u00E1ximo, 255 caracteres)
-IDENTITY_CATEGORY_ADDITIONAL_EXTRA=(m\u00E1ximo de 255 caracteres)
+IDENTITY_CATEGORY_ADDITIONAL_SIGNATURE=(Assinatura de ,no m\u00e1ximo, 255 caracteres)
+IDENTITY_CATEGORY_ADDITIONAL_EXTRA=(m\u00e1ximo de 255 caracteres)
-IDENTITY_MANAGEMENT_ACTION=A\u00E7\u00F5es
-IDENTITY_MANAGEMENT_ACTION_EDIT_PROFILE=Editar usu\u00E1rio
+IDENTITY_MANAGEMENT_ACTION=A\u00e7\u00f5es
+IDENTITY_MANAGEMENT_ACTION_EDIT_PROFILE=Editar usu\u00e1rio
IDENTITY_MANAGEMENT_ACTION_ROLES=Perfis
IDENTITY_MANAGEMENT_ACTION_DELETE=Excluir
-IDENTITY_MANAGEMENT_USER_MANAGEMENT=Gerenciamento de usu\u00E1rios
+IDENTITY_MANAGEMENT_USER_MANAGEMENT=Gerenciamento de usu\u00e1rios
IDENTITY_MANAGEMENT_ROLE_MANAGEMENT=Gerenciamento de perfis
-IDENTITY_MANAGEMENT_SEARCH_USER=Pesquisar usu\u00E1rios
-IDENTITY_MANAGEMENT_CREATE_USER=Criar uma nova conta de usu\u00E1rio
-IDENTITY_MANAGEMENT_CREATE_USER_CREATED=Usu\u00E1rio criado
-IDENTITY_MANAGEMENT_USER_DELETED=Usu\u00E1rio exclu\u00EDdo
+IDENTITY_MANAGEMENT_SEARCH_USER=Pesquisar usu\u00e1rios
+IDENTITY_MANAGEMENT_CREATE_USER=Criar uma nova conta de usu\u00e1rio
+IDENTITY_MANAGEMENT_CREATE_USER_CREATED=Usu\u00e1rio criado
+IDENTITY_MANAGEMENT_USER_DELETED=Usu\u00e1rio exclu\u00eddo
IDENTITY_MANAGEMENT_ROLE=Perfil
-IDENTITY_MANAGEMENT_ROLE_DISPLAY=Nome de exibi\u00E7\u00E3o
-IDENTITY_MANAGEMENT_ROLE_MEMBERS=Usu\u00E1rios
-IDENTITY_MANAGEMENT_ROLE_ASSIGNED=Perfis atribu\u00EDdos
+IDENTITY_MANAGEMENT_ROLE_DISPLAY=Nome de exibi\u00e7\u00e3o
+IDENTITY_MANAGEMENT_ROLE_MEMBERS=Usu\u00e1rios
+IDENTITY_MANAGEMENT_ROLE_ASSIGNED=Perfis atribu\u00eddos
IDENTITY_MANAGEMENT_CREATE_ROLE=Criar perfil
IDENTITY_MANAGEMENT_EDIT_ROLE=Editar perfil
IDENTITY_MANAGEMENT_DISABLE=Desabilitar
IDENTITY_MANAGEMENT_DISABLE_USER_DISABLED=Usua\u0155io desabilitado
IDENTITY_MANAGEMENT_ENABLE=Habilitar
-IDENTITY_MANAGEMENT_ENABLE_USER_ENABLED=Usu\u00E1rio habilitado
+IDENTITY_MANAGEMENT_ENABLE_USER_ENABLED=Usu\u00e1rio habilitado
IDENTITY_MANAGEMENT_RESET_PASSWORD=Redefinir senha
-IDENTITY_MANAGEMENT_RESET_PASSWORD_FOR_USER=Redefinir senha para o usu\u00E1rio
-IDENTITY_MANAGEMENT_RESET_PASSWORD_DESCRIPTION=O usu\u00E1rio receber\u00E1 uma senha
aleat\u00F3ria enviada ao seu endere\u00E7o de e-mail.
+IDENTITY_MANAGEMENT_RESET_PASSWORD_FOR_USER=Redefinir senha para o usu\u00e1rio
+IDENTITY_MANAGEMENT_RESET_PASSWORD_DESCRIPTION=O usu\u00e1rio receber\u00e1 uma senha
aleat\u00f3ria enviada ao seu endere\u00e7o de e-mail.
IDENTITY_MANAGEMENT_ASSIGN_ROLES=Atribuir perfis
-IDENTITY_MANAGEMENT_COUNT_PENDING_USERS=Usu\u00E1rios pendentes
-IDENTITY_MANAGEMENT_COUNT_REGISTERED_USERS=Usu\u00E1rios registrados
+IDENTITY_MANAGEMENT_COUNT_PENDING_USERS=Usu\u00e1rios pendentes
+IDENTITY_MANAGEMENT_COUNT_REGISTERED_USERS=Usu\u00e1rios registrados
IDENTITY_MANAGEMENT_APPROVE_ALL=Aprovar selecionados
IDENTITY_MANAGEMENT_REJECT_ALL=Rejeitar selecionados
IDENTITY_MANAGEMENT_SELECT_ALL=Selecionar todos
@@ -141,48 +141,52 @@
IDENTITY_MANAGEMENT_SUBSCRIPTION_MODE=Modo de assinatura
IDENTITY_MANAGEMENT_SUBSCRIPTION_ADMIN_MODE=Administrador Modo de assinatura
IDENTITY_MANAGEMENT_DESCRIPTION_SUBSCRIPTION_CUSTOM=Modo de assinatura personalizado.
-IDENTITY_MANAGEMENT_DESCRIPTION_SUBSCRIPTION_AUTOMATIC=Autom\u00E1tica - nenhuma
valida\u00E7\u00E3o de e-mail, nenhuma aprova\u00E7\u00E3o do administrador.
-IDENTITY_MANAGEMENT_DESCRIPTION_SUBSCRIPTION_EMAIL=Valida\u00E7\u00E3o de e-mail, nenhuma
aprova\u00E7\u00E3o do administrador.
-IDENTITY_MANAGEMENT_DESCRIPTION_SUBSCRIPTION_EMAIL_ADMIN=Valida\u00E7\u00E3o de e-mail, e
aprova\u00E7\u00E3o do administrador.
+IDENTITY_MANAGEMENT_DESCRIPTION_SUBSCRIPTION_AUTOMATIC=Autom\u00e1tica - nenhuma
valida\u00e7\u00e3o de e-mail, nenhuma aprova\u00e7\u00e3o do administrador.
+IDENTITY_MANAGEMENT_DESCRIPTION_SUBSCRIPTION_EMAIL=Valida\u00e7\u00e3o de e-mail, nenhuma
aprova\u00e7\u00e3o do administrador.
+IDENTITY_MANAGEMENT_DESCRIPTION_SUBSCRIPTION_EMAIL_ADMIN=Valida\u00e7\u00e3o de e-mail, e
aprova\u00e7\u00e3o do administrador.
-IDENTITY_REGISTER_VERIFY_CAPTCHA=Digite a imagem de seguran\u00E7a
-IDENTITY_REGISTER_TITLE_CONFIRM_DELETE=Confirma\u00E7\u00E3o\: Excluir
-IDENTITY_WARNING_CONFIRM_DELETE_USER=Aten\u00E7\u00E3o\! Deseja excluir o usu\u00E1rio
-IDENTITY_WARNING_CONFIRM_DELETE_ROLE=Aten\u00E7\u00E3o\! Deseja excluir o perfil
-IDENTITY_REGISTER_CONFIRMATIONEMAIL=Confirme a sua inscri\u00E7\u00E3o
+IDENTITY_REGISTER_VERIFY_CAPTCHA=Digite a imagem de seguran\u00e7a
+IDENTITY_REGISTER_TITLE_CONFIRM_DELETE=Confirma\u00e7\u00e3o\: Excluir
+IDENTITY_WARNING_CONFIRM_DELETE_USER=Aten\u00e7\u00e3o\! Deseja excluir o usu\u00e1rio
+IDENTITY_WARNING_CONFIRM_DELETE_ROLE=Aten\u00e7\u00e3o\! Deseja excluir o perfil
+IDENTITY_REGISTER_CONFIRMATIONEMAIL=Confirme a sua inscri\u00e7\u00e3o
IDENTITY_MAIL_SUBJECT_LOST_PASSWORD=Redefinir a sua senha
-IDENTITY_MAIL_SUBJECT_REGISTER=Confirmar inscri\u00E7\u00E3o
-IDENTITY_MAIL_SUBJECT_CHANGE_EMAIL=Confirmar endere\u00E7o de e-mail
+IDENTITY_MAIL_SUBJECT_REGISTER=Confirmar inscri\u00e7\u00e3o
+IDENTITY_MAIL_SUBJECT_CHANGE_EMAIL=Confirmar endere\u00e7o de e-mail
-IDENTITY_MANAGEMENT_ERROR_ACTION_ROLE=N\u00E3o foi poss\u00EDvel executar a
a\u00E7\u00E3o nesse perfil. Por favor, verifique o arquivo de log para mais
informa\u00E7\u00F5es.
-IDENTITY_MANAGEMENT_ERROR_ACTION_USER=N\u00E3o foi poss\u00EDvel executar a
a\u00E7\u00E3o nesse usu\u00E1rio. Por favor, verifique o arquivo de log para mais
informa\u00E7\u00F5es.
+IDENTITY_MANAGEMENT_ERROR_ACTION_ROLE=N\u00e3o foi poss\u00edvel executar a
a\u00e7\u00e3o nesse perfil. Por favor, verifique o arquivo de log para mais
informa\u00e7\u00f5es.
+IDENTITY_MANAGEMENT_ERROR_ACTION_USER=N\u00e3o foi poss\u00edvel executar a
a\u00e7\u00e3o nesse usu\u00e1rio. Por favor, verifique o arquivo de log para mais
informa\u00e7\u00f5es.
IDENTITY_VERIFICATION_RETURN=Voltar ao portal
IDENTITY_VERIFICATION_LOGIN=Entrar
-IDENTITY_VERIFICATION_STATUS_EROOR=Erro durante a valida\u00E7\u00E3o de endere\u00E7o de
e-mail.
-IDENTITY_VERIFICATION_STATUS_FAILED=N\u00E3o \u00E9 poss\u00EDvel validar o endere\u00E7o
de e-mail.
+IDENTITY_VERIFICATION_STATUS_EROOR=Erro durante a valida\u00e7\u00e3o de endere\u00e7o de
e-mail.
+IDENTITY_VERIFICATION_STATUS_FAILED=N\u00e3o \u00e9 poss\u00edvel validar o endere\u00e7o
de e-mail.
IDENTITY_VERIFICATION_STATUS_VALIDATED=E-mail validado.
-IDENTITY_VERIFICATION_STATUS_REGISTER_SUCCESS=Sua conta foi ativada. Voc\u00EA
poder\u00E1 entrar agora.
-IDENTITY_VERIFICATION_STATUS_REGISTER_APPROVAL=Seu endere\u00E7o de e-mail foi validado,
mas sua conta precisa ser aprovada pelo administrador.
-IDENTITY_VERIFICATION_STATUS_REGISTER_CUSTOM=Sua conta foi ativada. Voc\u00EA poder\u00E1
entrar agora.
+IDENTITY_VERIFICATION_STATUS_REGISTER_SUCCESS=Sua conta foi ativada. Voc\u00ea
poder\u00e1 entrar agora.
+IDENTITY_VERIFICATION_STATUS_REGISTER_APPROVAL=Seu endere\u00e7o de e-mail foi validado,
mas sua conta precisa ser aprovada pelo administrador.
+IDENTITY_VERIFICATION_STATUS_REGISTER_CUSTOM=Sua conta foi ativada. Voc\u00ea poder\u00e1
entrar agora.
-IDENTITY_VALIDATION_ERROR_REGISTRATION=Falha no registro do usu\u00E1rio.
-IDENTITY_VALIDATION_ERROR_USERNAME_TAKEN=Esse usu\u00E1rio j\u00E1 est\u00E1 em uso.
-IDENTITY_VALIDATION_ERROR_USERNAME_ERROR=Erro ao validar o usu\u00E1rio.
-IDENTITY_VALIDATION_ERROR_ROLENAME_TAKEN=Esse perfil j\u00E1 est\u00E1 em uso.
-IDENTITY_VALIDATION_ERROR_ROLENAME_ERROR=Erro ao validar o nome do perfil.
-IDENTITY_VALIDATION_ERROR_PASSWORD_DOESNT_MATCH=As senhas n\u00E3o conferem.
-IDENTITY_VALIDATION_ERROR_PASSWORD_ERROR=Erro durante a valida\u00E7\u00E3o de senha.
-IDENTITY_VALIDATION_ERROR_INVALID_EMAIL=E-mail inv\u00E1lido.
-IDENTITY_VALIDATION_ERROR_INVALID_PASSWORD=Senha inv\u00E1lida
-IDENTITY_VALIDATION_ERROR_CAPTCHA_INCORRECT=Imagem de seguran\u00E7a inv\u00E1lida
+IDENTITY_VALIDATION_ERROR_REGISTRATION=Falha no registro do usu\u00e1rio.
+IDENTITY_VALIDATION_ERROR_USERNAME_TAKEN=Esse usu\u00e1rio j\u00e1 est\u00e1 em uso.
+IDENTITY_VALIDATION_ERROR_USERNAME_ERROR=Erro ao validar o usu\u00e1rio.
+IDENTITY_VALIDATION_ERROR_INVALID_USERNAME=''{0}'' \u00e9 um nome do
usu\u00e1rio inv\u00e1lido\: n\u00e3o deve ser nulo, vazio ou conter os caracteres
'<', '>', '(', ')', '=' ou '%5c'
+IDENTITY_VALIDATION_ERROR_PASSWORD_DOESNT_MATCH=As senhas n\u00e3o conferem.
+IDENTITY_VALIDATION_ERROR_PASSWORD_ERROR=Erro durante a valida\u00e7\u00e3o de senha.
+IDENTITY_VALIDATION_ERROR_INVALID_EMAIL=E-mail inv\u00e1lido.
+IDENTITY_VALIDATION_ERROR_INVALID_PASSWORD=Senha inv\u00e1lida
+IDENTITY_VALIDATION_ERROR_CAPTCHA_INCORRECT=Imagem de seguran\u00e7a inv\u00e1lida
# Example usage for dynamic values
IDENTITY_DYNAMIC_VALUE_TEST=test label
IDENTITY_DYNAMIC_VALUE_TEST2=test label2
-javax.portlet.title=Perfil do Usu\u00E1rio
+javax.portlet.title=Perfil do Usu\u00e1rio
javax.portlet.keywords=management,user
-javax.faces.component.UIInput.REQUIRED=Valor obrigat\u00F3rio
\ No newline at end of file
+javax.faces.component.UIInput.REQUIRED=Valor obrigat\u00f3rio
+
+ROLE_TYPE=perfil
+INVALID_NAME_ERROR=''{0}'' \u00e9 um nome inv\u00e1lido para {1}\:
n\u00e3o deve ser nulo, vazio ou conter os caracteres '/', '.',
'\\', '<', '>', '(', ')', '=' ou
'%5c'
+INVALID_VALUE_ERROR=''{0}'' \u00e9 um nome inv\u00e1lido\: n\u00e3o deve
ser nulo, vazio ou conter os caracteres '\\', '<', '>',
'(', ')', '=' ou '%5c'
+DUPLICATE_ERROR=Um {1} denominado ''{0}'' j\u00e1 existe\!
\ No newline at end of file
Modified:
branches/Enterprise_Portal_Platform_4_3/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity_ru.properties
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity_ru.properties 2009-05-29
19:21:35 UTC (rev 13424)
+++
branches/Enterprise_Portal_Platform_4_3/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity_ru.properties 2009-05-29
23:04:54 UTC (rev 13425)
@@ -114,7 +114,6 @@
IDENTITY_MANAGEMENT_ROLE_ASSIGNED=\u041d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0435
\u0440\u043e\u043b\u0438
IDENTITY_MANAGEMENT_CREATE_ROLE=\u0421\u043e\u0437\u0434\u0430\u0442\u044c
\u043d\u043e\u0432\u0443\u044e \u0440\u043e\u043b\u044c
IDENTITY_MANAGEMENT_EDIT_ROLE=\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c
\u0440\u043e\u043b\u044c
-IDENTITY_MANAGEMENT_CREATE_ROLE=\u0421\u043e\u0437\u0434\u0430\u0442\u044c
\u0440\u043e\u043b\u044c
IDENTITY_MANAGEMENT_DISABLE=\u0417\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c
IDENTITY_MANAGEMENT_ENABLE=\u0410\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c
IDENTITY_MANAGEMENT_RESET_PASSWORD=\u0421\u0431\u0440\u043e\u0441\u0438\u0442\u044c
\u043f\u0430\u0440\u043e\u043b\u044c
@@ -176,3 +175,6 @@
# Example usage for dynamic values
IDENTITY_DYNAMIC_VALUE_TEST=test label
IDENTITY_DYNAMIC_VALUE_TEST2=test label2
+
+ROLE_TYPE=\u0440\u043e\u043b\u044c
+INVALID_VALUE_ERROR=''{0}'' is an invalid value: Cannot be null, empty or
contain '\\', '<', '>', '(', ')',
'=' or '%5c'
\ No newline at end of file
Modified:
branches/Enterprise_Portal_Platform_4_3/core-identity/src/resources/portal-identity-war/WEB-INF/faces-config.xml
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/core-identity/src/resources/portal-identity-war/WEB-INF/faces-config.xml 2009-05-29
19:21:35 UTC (rev 13424)
+++
branches/Enterprise_Portal_Platform_4_3/core-identity/src/resources/portal-identity-war/WEB-INF/faces-config.xml 2009-05-29
23:04:54 UTC (rev 13425)
@@ -30,9 +30,9 @@
<application>
<variable-resolver>org.jboss.portal.core.identity.ui.faces.PortletVariableResolver</variable-resolver>
- <property-resolver>org.jboss.portal.core.identity.ui.faces.PortletDelegatingPropertyResolver</property-resolver>
+
<property-resolver>org.jboss.portal.core.identity.ui.faces.PortletDelegatingPropertyResolver</property-resolver>
<view-handler>
- org.jboss.portletbridge.application.PortletViewHandler
+ org.jboss.portletbridge.application.PortletViewHandler
</view-handler>
<state-manager>org.jboss.portletbridge.application.PortletStateManager</state-manager>
<locale-config>
@@ -43,459 +43,480 @@
</locale-config>
<message-bundle>conf.bundles.Identity</message-bundle>
</application>
-
- <managed-bean>
- <managed-bean-name>configurationbean</managed-bean-name>
- <managed-bean-class>org.jboss.portal.core.identity.ui.common.ConfigurationBean</managed-bean-class>
- <managed-bean-scope>application</managed-bean-scope>
- <managed-property>
- <property-name>identityUIConfigurationService</property-name>
- <value>#{applicationScope.IdentityUIConfigurationService}</value>
- </managed-property>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>metadataservice</managed-bean-name>
- <managed-bean-class>org.jboss.portal.core.identity.ui.common.MetaDataServiceBean</managed-bean-class>
- <managed-bean-scope>application</managed-bean-scope>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>identityrolemgr</managed-bean-name>
- <managed-bean-class>org.jboss.portal.core.identity.ui.common.IdentityRoleBean</managed-bean-class>
- <managed-bean-scope>application</managed-bean-scope>
- <managed-property>
- <property-name>roleModule</property-name>
- <value>#{applicationScope.RoleModule}</value>
- </managed-property>
- <managed-property>
- <property-name>membershipModule</property-name>
- <value>#{applicationScope.MembershipModule}</value>
- </managed-property>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>identityusermgr</managed-bean-name>
- <managed-bean-class>org.jboss.portal.core.identity.ui.common.IdentityUserBean</managed-bean-class>
- <managed-bean-scope>application</managed-bean-scope>
- <managed-property>
- <property-name>userModule</property-name>
- <value>#{applicationScope.UserModule}</value>
- </managed-property>
- <managed-property>
- <property-name>userProfileModule</property-name>
- <value>#{applicationScope.UserProfileModule}</value>
- </managed-property>
- <managed-property>
- <property-name>metaDataService</property-name>
- <value>#{metadataservice}</value>
- </managed-property>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>editprofilemgr</managed-bean-name>
- <managed-bean-class>org.jboss.portal.core.identity.ui.actions.EditProfileAction</managed-bean-class>
- <managed-bean-scope>session</managed-bean-scope>
- <managed-property>
- <property-name>identityUserBean</property-name>
- <value>#{identityusermgr}</value>
- </managed-property>
- <managed-property>
- <property-name>validateEmailService</property-name>
- <value>#{applicationScope.ValidateEmailService}</value>
- </managed-property>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>userregistermgr</managed-bean-name>
- <managed-bean-class>org.jboss.portal.core.identity.ui.actions.CreateUserAction</managed-bean-class>
- <managed-bean-scope>session</managed-bean-scope>
- <managed-property>
- <property-name>identityUserBean</property-name>
- <value>#{identityusermgr}</value>
- </managed-property>
- <managed-property>
- <property-name>defaultRoles</property-name>
- <value>#{configurationbean.configuration.defaultRoles}</value>
- </managed-property>
- <managed-property>
- <property-name>registrationService</property-name>
- <value>#{applicationScope.RegistrationService}</value>
- </managed-property>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>assignrolemgr</managed-bean-name>
- <managed-bean-class>org.jboss.portal.core.identity.ui.actions.AssignRoleAction</managed-bean-class>
- <managed-bean-scope>session</managed-bean-scope>
- <managed-property>
- <property-name>identityUserBean</property-name>
- <value>#{identityusermgr}</value>
- </managed-property>
- <managed-property>
- <property-name>identityRoleBean</property-name>
- <value>#{identityrolemgr}</value>
- </managed-property>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>useradministrationbean</managed-bean-name>
- <managed-bean-class>org.jboss.portal.core.identity.ui.admin.UserAdministrationBean</managed-bean-class>
- <managed-bean-scope>session</managed-bean-scope>
- <managed-property>
- <property-name>subscriptionMode</property-name>
- <value>#{configurationbean.configuration.subscriptionMode}</value>
- </managed-property>
- <managed-property>
- <property-name>adminSubscriptionMode</property-name>
- <value>#{configurationbean.configuration.adminSubscriptionMode}</value>
- </managed-property>
- <managed-property>
- <property-name>identityUserBean</property-name>
- <value>#{identityusermgr}</value>
- </managed-property>
- <managed-property>
- <property-name>identityRoleBean</property-name>
- <value>#{identityrolemgr}</value>
- </managed-property>
- <managed-property>
- <property-name>registrationService</property-name>
- <value>#{applicationScope.RegistrationService}</value>
- </managed-property>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>rolemanagementbean</managed-bean-name>
- <managed-bean-class>org.jboss.portal.core.identity.ui.admin.RoleManagementBean</managed-bean-class>
- <managed-bean-scope>session</managed-bean-scope>
- <managed-property>
- <property-name>identityRoleBean</property-name>
- <value>#{identityrolemgr}</value>
- </managed-property>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>editrolemgr</managed-bean-name>
- <managed-bean-class>org.jboss.portal.core.identity.ui.actions.EditRoleAction</managed-bean-class>
- <managed-bean-scope>session</managed-bean-scope>
- <managed-property>
- <property-name>identityRoleBean</property-name>
- <value>#{identityrolemgr}</value>
- </managed-property>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>lostpasswordmgr</managed-bean-name>
- <managed-bean-class>org.jboss.portal.core.identity.ui.actions.LostPasswordAction</managed-bean-class>
- <managed-bean-scope>request</managed-bean-scope>
- <managed-property>
- <property-name>passwordCharacters</property-name>
- <value>#{configurationbean.configuration.passwordGenerationCharacters}</value>
- </managed-property>
- <managed-property>
- <property-name>identityUserBean</property-name>
- <value>#{identityusermgr}</value>
- </managed-property>
- <managed-property>
- <property-name>identityMailService</property-name>
- <value>#{applicationScope.IdentityMailService}</value>
- </managed-property>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>createrolemgr</managed-bean-name>
- <managed-bean-class>org.jboss.portal.core.identity.ui.actions.CreateRoleAction</managed-bean-class>
- <managed-bean-scope>request</managed-bean-scope>
- <managed-property>
- <property-name>identityRoleBean</property-name>
- <value>#{identityrolemgr}</value>
- </managed-property>
- </managed-bean>
-
- <validator>
- <validator-id>EmailValidator</validator-id>
- <validator-class>org.jboss.portal.core.identity.ui.validators.EmailValidator</validator-class>
- </validator>
- <validator>
- <validator-id>UsernameValidator</validator-id>
- <validator-class>org.jboss.portal.core.identity.ui.validators.UsernameValidator</validator-class>
- </validator>
+ <!-- bean context for managed beans -->
+ <managed-bean>
+ <managed-bean-name>beanContext</managed-bean-name>
+
<managed-bean-class>org.jboss.portal.faces.gui.JSFBeanContext</managed-bean-class>
+ <managed-bean-scope>application</managed-bean-scope>
+ <managed-property>
+ <property-name>resourceName</property-name>
+ <value>conf.bundles.Identity</value>
+ </managed-property>
+ </managed-bean>
+
+ <managed-bean>
+ <managed-bean-name>configurationbean</managed-bean-name>
+
<managed-bean-class>org.jboss.portal.core.identity.ui.common.ConfigurationBean</managed-bean-class>
+ <managed-bean-scope>application</managed-bean-scope>
+ <managed-property>
+ <property-name>identityUIConfigurationService</property-name>
+ <value>#{applicationScope.IdentityUIConfigurationService}</value>
+ </managed-property>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>metadataservice</managed-bean-name>
+
<managed-bean-class>org.jboss.portal.core.identity.ui.common.MetaDataServiceBean</managed-bean-class>
+ <managed-bean-scope>application</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>identityrolemgr</managed-bean-name>
+
<managed-bean-class>org.jboss.portal.core.identity.ui.common.IdentityRoleBean</managed-bean-class>
+ <managed-bean-scope>application</managed-bean-scope>
+ <managed-property>
+ <property-name>roleModule</property-name>
+ <value>#{applicationScope.RoleModule}</value>
+ </managed-property>
+ <managed-property>
+ <property-name>membershipModule</property-name>
+ <value>#{applicationScope.MembershipModule}</value>
+ </managed-property>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>identityusermgr</managed-bean-name>
+
<managed-bean-class>org.jboss.portal.core.identity.ui.common.IdentityUserBean</managed-bean-class>
+ <managed-bean-scope>application</managed-bean-scope>
+ <managed-property>
+ <property-name>userModule</property-name>
+ <value>#{applicationScope.UserModule}</value>
+ </managed-property>
+ <managed-property>
+ <property-name>userProfileModule</property-name>
+ <value>#{applicationScope.UserProfileModule}</value>
+ </managed-property>
+ <managed-property>
+ <property-name>metaDataService</property-name>
+ <value>#{metadataservice}</value>
+ </managed-property>
+ </managed-bean>
+
+ <managed-bean>
+ <managed-bean-name>editprofilemgr</managed-bean-name>
+
<managed-bean-class>org.jboss.portal.core.identity.ui.actions.EditProfileAction</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ <managed-property>
+ <property-name>identityUserBean</property-name>
+ <value>#{identityusermgr}</value>
+ </managed-property>
+ <managed-property>
+ <property-name>validateEmailService</property-name>
+ <value>#{applicationScope.ValidateEmailService}</value>
+ </managed-property>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>userregistermgr</managed-bean-name>
+
<managed-bean-class>org.jboss.portal.core.identity.ui.actions.CreateUserAction</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ <managed-property>
+ <property-name>identityUserBean</property-name>
+ <value>#{identityusermgr}</value>
+ </managed-property>
+ <managed-property>
+ <property-name>defaultRoles</property-name>
+ <value>#{configurationbean.configuration.defaultRoles}</value>
+ </managed-property>
+ <managed-property>
+ <property-name>registrationService</property-name>
+ <value>#{applicationScope.RegistrationService}</value>
+ </managed-property>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>assignrolemgr</managed-bean-name>
+
<managed-bean-class>org.jboss.portal.core.identity.ui.actions.AssignRoleAction</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ <managed-property>
+ <property-name>identityUserBean</property-name>
+ <value>#{identityusermgr}</value>
+ </managed-property>
+ <managed-property>
+ <property-name>identityRoleBean</property-name>
+ <value>#{identityrolemgr}</value>
+ </managed-property>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>useradministrationbean</managed-bean-name>
+
<managed-bean-class>org.jboss.portal.core.identity.ui.admin.UserAdministrationBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ <managed-property>
+ <property-name>subscriptionMode</property-name>
+ <value>#{configurationbean.configuration.subscriptionMode}</value>
+ </managed-property>
+ <managed-property>
+ <property-name>adminSubscriptionMode</property-name>
+
<value>#{configurationbean.configuration.adminSubscriptionMode}</value>
+ </managed-property>
+ <managed-property>
+ <property-name>identityUserBean</property-name>
+ <value>#{identityusermgr}</value>
+ </managed-property>
+ <managed-property>
+ <property-name>identityRoleBean</property-name>
+ <value>#{identityrolemgr}</value>
+ </managed-property>
+ <managed-property>
+ <property-name>registrationService</property-name>
+ <value>#{applicationScope.RegistrationService}</value>
+ </managed-property>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>rolemanagementbean</managed-bean-name>
+
<managed-bean-class>org.jboss.portal.core.identity.ui.admin.RoleManagementBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ <managed-property>
+ <property-name>identityRoleBean</property-name>
+ <value>#{identityrolemgr}</value>
+ </managed-property>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>editrolemgr</managed-bean-name>
+
<managed-bean-class>org.jboss.portal.core.identity.ui.actions.EditRoleAction</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ <managed-property>
+ <property-name>identityRoleBean</property-name>
+ <value>#{identityrolemgr}</value>
+ </managed-property>
+ <managed-property>
+ <property-name>beanContext</property-name>
+
<property-class>org.jboss.portal.faces.gui.BeanContext</property-class>
+ <value>#{beanContext}</value>
+ </managed-property>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>lostpasswordmgr</managed-bean-name>
+
<managed-bean-class>org.jboss.portal.core.identity.ui.actions.LostPasswordAction</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ <managed-property>
+ <property-name>passwordCharacters</property-name>
+
<value>#{configurationbean.configuration.passwordGenerationCharacters}</value>
+ </managed-property>
+ <managed-property>
+ <property-name>identityUserBean</property-name>
+ <value>#{identityusermgr}</value>
+ </managed-property>
+ <managed-property>
+ <property-name>identityMailService</property-name>
+ <value>#{applicationScope.IdentityMailService}</value>
+ </managed-property>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>createrolemgr</managed-bean-name>
+
<managed-bean-class>org.jboss.portal.core.identity.ui.actions.CreateRoleAction</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ <managed-property>
+ <property-name>identityRoleBean</property-name>
+ <value>#{identityrolemgr}</value>
+ </managed-property>
+ <managed-property>
+ <property-name>beanContext</property-name>
+
<property-class>org.jboss.portal.faces.gui.BeanContext</property-class>
+ <value>#{beanContext}</value>
+ </managed-property>
+ </managed-bean>
+
<validator>
- <validator-id>RoleValidator</validator-id>
-
<validator-class>org.jboss.portal.core.identity.ui.validators.RoleValidator</validator-class>
+ <validator-id>EmailValidator</validator-id>
+
<validator-class>org.jboss.portal.core.identity.ui.validators.EmailValidator</validator-class>
</validator>
- <validator>
- <validator-id>PasswordValidator</validator-id>
- <validator-class>org.jboss.portal.core.identity.ui.validators.PasswordValidator</validator-class>
- </validator>
- <validator>
- <validator-id>CurrentPasswordValidator</validator-id>
- <validator-class>org.jboss.portal.core.identity.ui.validators.CurrentPasswordValidator</validator-class>
- </validator>
- <validator>
- <validator-id>CaptchaValidator</validator-id>
- <validator-class>org.jboss.portal.core.identity.ui.validators.CaptchaValidator</validator-class>
- </validator>
-
- <navigation-rule>
- <navigation-case>
- <from-outcome>start</from-outcome>
- <to-view-id>/jsf/index.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <navigation-case>
- <from-outcome>lostPassword</from-outcome>
- <to-view-id>/jsf/lostPassword/lost.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/lostPassword/lost.xhtml</from-view-id>
- <navigation-case>
- <from-outcome>status</from-outcome>
- <to-view-id>/jsf/lostPassword/status.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <navigation-case>
- <from-outcome>register</from-outcome>
- <to-view-id>/jsf/register/register.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/register/register.xhtml</from-view-id>
- <navigation-case>
- <from-outcome>register</from-outcome>
- <to-view-id>/jsf/register/confirm.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/register/confirm.xhtml</from-view-id>
- <navigation-case>
- <from-outcome>revise</from-outcome>
- <to-view-id>/jsf/register/register.xhtml</to-view-id>
- </navigation-case>
- <navigation-case>
- <from-outcome>registered</from-outcome>
- <to-view-id>/jsf/register/success.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <navigation-case>
- <from-outcome>changePassword</from-outcome>
- <to-view-id>/jsf/profile/changePassword.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/profile/changePassword.xhtml</from-view-id>
- <navigation-case>
- <from-outcome>status</from-outcome>
- <to-view-id>/jsf/profile/viewProfile.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <navigation-case>
- <from-outcome>changeEmail</from-outcome>
- <to-view-id>/jsf/profile/changeEmail.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/profile/changeEmail.xhtml</from-view-id>
- <navigation-case>
- <from-outcome>status</from-outcome>
- <to-view-id>/jsf/profile/viewProfile.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/index.xhtml</from-view-id>
- <navigation-case>
- <from-outcome>editProfile</from-outcome>
- <to-view-id>/jsf/profile/editProfileRedirect.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/profile/*</from-view-id>
- <navigation-case>
- <from-outcome>editProfile</from-outcome>
- <to-view-id>/jsf/profile/editProfileRedirect.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
-
- <navigation-rule>
- <from-view-id>/jsf/admin/*</from-view-id>
- <navigation-case>
- <from-outcome>userAdmin</from-outcome>
- <to-view-id>/jsf/admin/index.xhtml</to-view-id>
- </navigation-case>
- <navigation-case>
- <from-outcome>start</from-outcome>
- <to-view-id>/jsf/admin/index.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/admin/*</from-view-id>
- <navigation-case>
- <from-outcome>roleAdmin</from-outcome>
- <to-view-id>/jsf/admin/roles.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/admin/index.xhtml</from-view-id>
- <navigation-case>
- <from-outcome>createUser</from-outcome>
- <to-view-id>/jsf/admin/user/createUser.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/admin/*</from-view-id>
- <navigation-case>
- <from-outcome>searchUsers</from-outcome>
- <to-view-id>/jsf/admin/user/searchUsers.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/admin/index.xhtml</from-view-id>
- <navigation-case>
- <from-outcome>showPendingUsers</from-outcome>
- <to-view-id>/jsf/admin/user/pendingUsers.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/admin/user/pendingUsers.xhtml</from-view-id>
- <navigation-case>
- <from-outcome>confirmPendingAction</from-outcome>
- <to-view-id>/jsf/admin/user/confirmPendingAction.xhtml</to-view-id>
- </navigation-case>
- <navigation-case>
- <from-outcome>cancel</from-outcome>
- <to-view-id>/jsf/admin/index.xthml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/admin/user/confirmPendingAction.xhtml</from-view-id>
- <navigation-case>
- <from-outcome>revise</from-outcome>
- <to-view-id>/jsf/admin/user/pendingUsers.xhtml</to-view-id>
- </navigation-case>
- <navigation-case>
- <from-outcome>success</from-outcome>
- <to-view-id>/jsf/admin/index.xthml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/admin/user/searchUsers.xhtml</from-view-id>
- <navigation-case>
- <from-outcome>deleteUser</from-outcome>
- <to-view-id>/jsf/admin/user/deleteUser.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/admin/editProfile.xhtml</from-view-id>
- <navigation-case>
- <from-outcome>adminChangePassword</from-outcome>
- <to-view-id>/jsf/admin/user/changePassword.xhtml</to-view-id>
- </navigation-case>
- <navigation-case>
- <from-outcome>start</from-outcome>
- <to-view-id>/jsf/admin/user/searchUsers.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/admin/*</from-view-id>
- <navigation-case>
- <from-outcome>start</from-outcome>
- <to-view-id>/jsf/admin/user/searchUsers.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/admin/*</from-view-id>
- <navigation-case>
- <from-action>#{editprofilemgr.adminEditProfile}</from-action>
- <from-outcome>editProfile</from-outcome>
- <to-view-id>/jsf/admin/editProfile.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/admin/*</from-view-id>
- <navigation-case>
- <from-action>#{assignrolemgr.assignRoles}</from-action>
- <from-outcome>assignRoles</from-outcome>
- <to-view-id>/jsf/admin/assignRoles.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/admin/user/createUser.xhtml</from-view-id>
- <navigation-case>
- <from-outcome>register</from-outcome>
- <to-view-id>/jsf/admin/user/registerRoles.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/admin/user/registerRoles.xhtml</from-view-id>
- <navigation-case>
- <from-outcome>register</from-outcome>
- <to-view-id>/jsf/admin/user/registerConfirm.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/admin/user/registerConfirm.xhtml</from-view-id>
- <navigation-case>
- <from-outcome>revise</from-outcome>
- <to-view-id>/jsf/admin/user/createUser.xhtml</to-view-id>
- </navigation-case>
- <navigation-case>
- <from-outcome>registered</from-outcome>
- <to-view-id>/jsf/admin/index.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/admin/roles.xhtml</from-view-id>
- <navigation-case>
- <from-outcome>createRole</from-outcome>
- <to-view-id>/jsf/admin/roles/createRole.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/admin/roles.xhtml</from-view-id>
- <navigation-case>
- <from-outcome>editRole</from-outcome>
- <to-view-id>/jsf/admin/roles/editRole.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/admin/roles.xhtml</from-view-id>
- <navigation-case>
- <from-outcome>viewMembers</from-outcome>
- <to-view-id>/jsf/admin/roles/roleMembers.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/admin/roles.xhtml</from-view-id>
- <navigation-case>
- <from-outcome>deleteRole</from-outcome>
- <to-view-id>/jsf/admin/roles/deleteRole.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/admin/editProfile.xhtml</from-view-id>
- <navigation-case>
- <from-outcome>resetPassword</from-outcome>
- <to-view-id>/jsf/admin/user/resetPassword.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/admin/user/resetPassword.xhtml</from-view-id>
- <navigation-case>
- <from-action>#{lostpasswordmgr.doomed}</from-action>
- <from-outcome>status</from-outcome>
- <to-view-id>/jsf/admin/user/searchUsers.xhtml</to-view-id>
- </navigation-case>
- <navigation-case>
- <from-action>#{lostpasswordmgr.doomed}</from-action>
- <from-outcome>lostPassword</from-outcome>
- <to-view-id>/jsf/admin/editProfile.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/admin/user/changePassword.xhtml</from-view-id>
- <navigation-case>
- <from-outcome>status</from-outcome>
- <to-view-id>/jsf/admin/user/searchUsers.xhtml</to-view-id>
- </navigation-case>
- <navigation-case>
- <from-outcome>searchUsers</from-outcome>
- <to-view-id>/jsf/admin/user/searchUsers.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
-
+ <validator>
+ <validator-id>AttributeValidator</validator-id>
+
<validator-class>org.jboss.portal.core.identity.ui.validators.UserAttributeValidator</validator-class>
+ </validator>
+ <validator>
+ <validator-id>UsernameValidator</validator-id>
+
<validator-class>org.jboss.portal.core.identity.ui.validators.UsernameValidator</validator-class>
+ </validator>
+ <validator>
+ <validator-id>PasswordValidator</validator-id>
+
<validator-class>org.jboss.portal.core.identity.ui.validators.PasswordValidator</validator-class>
+ </validator>
+ <validator>
+ <validator-id>CurrentPasswordValidator</validator-id>
+
<validator-class>org.jboss.portal.core.identity.ui.validators.CurrentPasswordValidator</validator-class>
+ </validator>
+ <validator>
+ <validator-id>CaptchaValidator</validator-id>
+
<validator-class>org.jboss.portal.core.identity.ui.validators.CaptchaValidator</validator-class>
+ </validator>
+
+ <navigation-rule>
+ <navigation-case>
+ <from-outcome>start</from-outcome>
+ <to-view-id>/jsf/index.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <navigation-case>
+ <from-outcome>lostPassword</from-outcome>
+ <to-view-id>/jsf/lostPassword/lost.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/lostPassword/lost.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>status</from-outcome>
+ <to-view-id>/jsf/lostPassword/status.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <navigation-case>
+ <from-outcome>register</from-outcome>
+ <to-view-id>/jsf/register/register.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/register/register.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>register</from-outcome>
+ <to-view-id>/jsf/register/confirm.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/register/confirm.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>revise</from-outcome>
+ <to-view-id>/jsf/register/register.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>registered</from-outcome>
+ <to-view-id>/jsf/register/success.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <navigation-case>
+ <from-outcome>changePassword</from-outcome>
+ <to-view-id>/jsf/profile/changePassword.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/profile/changePassword.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>status</from-outcome>
+ <to-view-id>/jsf/profile/viewProfile.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <navigation-case>
+ <from-outcome>changeEmail</from-outcome>
+ <to-view-id>/jsf/profile/changeEmail.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/profile/changeEmail.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>status</from-outcome>
+ <to-view-id>/jsf/profile/viewProfile.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/index.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>editProfile</from-outcome>
+ <to-view-id>/jsf/profile/editProfileRedirect.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/profile/*</from-view-id>
+ <navigation-case>
+ <from-outcome>editProfile</from-outcome>
+ <to-view-id>/jsf/profile/editProfileRedirect.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+
+ <navigation-rule>
+ <from-view-id>/jsf/admin/*</from-view-id>
+ <navigation-case>
+ <from-outcome>userAdmin</from-outcome>
+ <to-view-id>/jsf/admin/index.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>start</from-outcome>
+ <to-view-id>/jsf/admin/index.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/admin/*</from-view-id>
+ <navigation-case>
+ <from-outcome>roleAdmin</from-outcome>
+ <to-view-id>/jsf/admin/roles.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/admin/index.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>createUser</from-outcome>
+ <to-view-id>/jsf/admin/user/createUser.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/admin/*</from-view-id>
+ <navigation-case>
+ <from-outcome>searchUsers</from-outcome>
+ <to-view-id>/jsf/admin/user/searchUsers.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/admin/index.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>showPendingUsers</from-outcome>
+ <to-view-id>/jsf/admin/user/pendingUsers.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/admin/user/pendingUsers.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>confirmPendingAction</from-outcome>
+ <to-view-id>/jsf/admin/user/confirmPendingAction.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>cancel</from-outcome>
+ <to-view-id>/jsf/admin/index.xthml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+
<from-view-id>/jsf/admin/user/confirmPendingAction.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>revise</from-outcome>
+ <to-view-id>/jsf/admin/user/pendingUsers.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>success</from-outcome>
+ <to-view-id>/jsf/admin/index.xthml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/admin/user/searchUsers.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>deleteUser</from-outcome>
+ <to-view-id>/jsf/admin/user/deleteUser.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/admin/editProfile.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>adminChangePassword</from-outcome>
+ <to-view-id>/jsf/admin/user/changePassword.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>start</from-outcome>
+ <to-view-id>/jsf/admin/user/searchUsers.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/admin/*</from-view-id>
+ <navigation-case>
+ <from-outcome>start</from-outcome>
+ <to-view-id>/jsf/admin/user/searchUsers.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/admin/*</from-view-id>
+ <navigation-case>
+ <from-action>#{editprofilemgr.adminEditProfile}</from-action>
+ <from-outcome>editProfile</from-outcome>
+ <to-view-id>/jsf/admin/editProfile.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/admin/*</from-view-id>
+ <navigation-case>
+ <from-action>#{assignrolemgr.assignRoles}</from-action>
+ <from-outcome>assignRoles</from-outcome>
+ <to-view-id>/jsf/admin/assignRoles.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/admin/user/createUser.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>register</from-outcome>
+ <to-view-id>/jsf/admin/user/registerRoles.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/admin/user/registerRoles.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>register</from-outcome>
+ <to-view-id>/jsf/admin/user/registerConfirm.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/admin/user/registerConfirm.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>revise</from-outcome>
+ <to-view-id>/jsf/admin/user/createUser.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>registered</from-outcome>
+ <to-view-id>/jsf/admin/index.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/admin/roles.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>createRole</from-outcome>
+ <to-view-id>/jsf/admin/roles/createRole.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/admin/roles.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>editRole</from-outcome>
+ <to-view-id>/jsf/admin/roles/editRole.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/admin/roles.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>viewMembers</from-outcome>
+ <to-view-id>/jsf/admin/roles/roleMembers.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/admin/roles.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>deleteRole</from-outcome>
+ <to-view-id>/jsf/admin/roles/deleteRole.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/admin/editProfile.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>resetPassword</from-outcome>
+ <to-view-id>/jsf/admin/user/resetPassword.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/admin/user/resetPassword.xhtml</from-view-id>
+ <navigation-case>
+ <from-action>#{lostpasswordmgr.doomed}</from-action>
+ <from-outcome>status</from-outcome>
+ <to-view-id>/jsf/admin/user/searchUsers.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-action>#{lostpasswordmgr.doomed}</from-action>
+ <from-outcome>lostPassword</from-outcome>
+ <to-view-id>/jsf/admin/editProfile.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/admin/user/changePassword.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>status</from-outcome>
+ <to-view-id>/jsf/admin/user/searchUsers.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>searchUsers</from-outcome>
+ <to-view-id>/jsf/admin/user/searchUsers.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+
</faces-config>
Modified:
branches/Enterprise_Portal_Platform_4_3/core-identity/src/resources/portal-identity-war/jsf/admin/roles/createRole.xhtml
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/core-identity/src/resources/portal-identity-war/jsf/admin/roles/createRole.xhtml 2009-05-29
19:21:35 UTC (rev 13424)
+++
branches/Enterprise_Portal_Platform_4_3/core-identity/src/resources/portal-identity-war/jsf/admin/roles/createRole.xhtml 2009-05-29
23:04:54 UTC (rev 13425)
@@ -22,9 +22,7 @@
<h:form id="create-role-form">
<h:panelGrid columns="3">
<h:outputText value="#{bundle.IDENTITY_MANAGEMENT_ROLE}"/>
- <h:inputText id="rolename" value="#{createrolemgr.uiRole.name}"
required="true">
- <f:validator validatorId="RoleValidator"/>
- </h:inputText>
+ <h:inputText id="rolename" value="#{createrolemgr.uiRole.name}"
required="true"/>
<h:message for="rolename" infoClass="portlet-msg-success"
errorClass="portlet-msg-error" fatalClass="portlet-msg-error"
warnClass="portlet-msg-alert"/>
<h:outputText value="#{bundle.IDENTITY_MANAGEMENT_ROLE_DISPLAY}"/>
Modified:
branches/Enterprise_Portal_Platform_4_3/core-identity/src/resources/portal-identity-war/jsf/admin/roles/editRole.xhtml
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/core-identity/src/resources/portal-identity-war/jsf/admin/roles/editRole.xhtml 2009-05-29
19:21:35 UTC (rev 13424)
+++
branches/Enterprise_Portal_Platform_4_3/core-identity/src/resources/portal-identity-war/jsf/admin/roles/editRole.xhtml 2009-05-29
23:04:54 UTC (rev 13425)
@@ -18,18 +18,22 @@
<li class="pathSeparator"><h:graphicImage
url="/img/pathSeparator.png" alt=">"/></li>
<li class="selected">
<h:outputText id="rolename" value="#{editrolemgr.uiRole.name}"
/>
- </li>
+ </li>
</ui:define>
<ui:define name="content">
<h3><h:outputText
value="#{bundle.IDENTITY_MANAGEMENT_EDIT_ROLE}"/></h3>
<h:form id="edit-role-link">
- <h:panelGrid columns="2">
+ <h:panelGrid columns="3">
<h:outputText value="#{bundle.IDENTITY_MANAGEMENT_ROLE}"/>
<h:outputText id="rolename" value="#{editrolemgr.uiRole.name}"
/>
-
+ <h:message for="rolename" infoClass="portlet-msg-success"
errorClass="portlet-msg-error"
+ fatalClass="portlet-msg-error"
warnClass="portlet-msg-alert"/>
+
<h:outputText value="#{bundle.IDENTITY_MANAGEMENT_ROLE_DISPLAY}"/>
- <h:inputText id="display-name"
value="#{editrolemgr.uiRole.displayName}"/>
+ <h:inputText id="display-name"
value="#{editrolemgr.uiRole.displayName}" required="true"/>
+ <h:message for="display-name" infoClass="portlet-msg-success"
errorClass="portlet-msg-error"
+ fatalClass="portlet-msg-error"
warnClass="portlet-msg-alert"/>
</h:panelGrid>
<hr/>
<p style="text-align: right;">
Modified:
branches/Enterprise_Portal_Platform_4_3/core-identity/src/resources/portal-identity-war/jsf/common/editProfileInfo.xhtml
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/core-identity/src/resources/portal-identity-war/jsf/common/editProfileInfo.xhtml 2009-05-29
19:21:35 UTC (rev 13424)
+++
branches/Enterprise_Portal_Platform_4_3/core-identity/src/resources/portal-identity-war/jsf/common/editProfileInfo.xhtml 2009-05-29
23:04:54 UTC (rev 13425)
@@ -5,199 +5,253 @@
xmlns:c="http://java.sun.com/jstl/core"
class="identity-ui">
- <!-- User Profile -->
- <h:panelGrid columns="2" cellpadding="3">
- <h:panelGroup/>
- <h:panelGroup>
- <ul class="topnav">
- <li id="currentTab">
- <h:outputText value="#{bundle.IDENTITY_CATEGORY_GENERAL}" />
- </li>
- </ul>
- </h:panelGroup>
-
- <h:panelGroup>
- <h:outputText value="#{bundle.IDENTITY_TIMEZONE}"/>
- <h:outputText value=" *"
rendered="#{metadataservice.timezone.required}" />
- </h:panelGroup>
- <h:selectOneMenu id="timezone"
value="#{manager.uiUser.attribute.timezone}"
required="#{metadataservice.timezone.required}">
- <f:selectItems value="#{metadataservice.timezone.values}" />
- </h:selectOneMenu>
- <h:panelGroup />
- <h:message for="timezone" infoClass="portlet-msg-success"
errorClass="portlet-msg-error" fatalClass="portlet-msg-error"
warnClass="portlet-msg-alert"/>
+<!-- User Profile -->
+<h:panelGrid columns="2" cellpadding="3">
+<h:panelGroup/>
+<h:panelGroup>
+ <ul class="topnav">
+ <li id="currentTab">
+ <h:outputText value="#{bundle.IDENTITY_CATEGORY_GENERAL}"/>
+ </li>
+ </ul>
+</h:panelGroup>
- <h:panelGroup>
- <h:outputText value="#{bundle.IDENTITY_THEME}"/>
- <h:outputText value=" *"
rendered="#{metadataservice.theme.required}" />
- </h:panelGroup>
- <h:selectOneMenu id="theme"
value="#{manager.uiUser.attribute.theme}"
required="#{metadataservice.theme.required}">
- <f:selectItems value="#{metadataservice.theme.values}" />
- </h:selectOneMenu>
- <h:panelGroup />
- <h:message for="theme" infoClass="portlet-msg-success"
errorClass="portlet-msg-error" fatalClass="portlet-msg-error"
warnClass="portlet-msg-alert"/>
+<h:panelGroup>
+ <h:outputText value="#{bundle.IDENTITY_TIMEZONE}"/>
+ <h:outputText value=" *"
rendered="#{metadataservice.timezone.required}"/>
+</h:panelGroup>
+<h:selectOneMenu id="timezone"
value="#{manager.uiUser.attribute.timezone}"
+ required="#{metadataservice.timezone.required}">
+ <f:selectItems value="#{metadataservice.timezone.values}"/>
+</h:selectOneMenu>
+<h:panelGroup/>
+<h:message for="timezone" infoClass="portlet-msg-success"
errorClass="portlet-msg-error"
+ fatalClass="portlet-msg-error"
warnClass="portlet-msg-alert"/>
+<h:panelGroup>
+ <h:outputText value="#{bundle.IDENTITY_THEME}"/>
+ <h:outputText value=" *"
rendered="#{metadataservice.theme.required}"/>
+</h:panelGroup>
+<h:selectOneMenu id="theme"
value="#{manager.uiUser.attribute.theme}"
required="#{metadataservice.theme.required}">
+ <f:selectItems value="#{metadataservice.theme.values}"/>
+</h:selectOneMenu>
+<h:panelGroup/>
+<h:message for="theme" infoClass="portlet-msg-success"
errorClass="portlet-msg-error" fatalClass="portlet-msg-error"
+ warnClass="portlet-msg-alert"/>
- <h:panelGroup>
- <h:outputText value="#{bundle.IDENTITY_LOCALE}"/>
- <h:outputText value=" *"
rendered="#{metadataservice.locale.required}" />
- </h:panelGroup>
- <h:selectOneMenu id="locale"
value="#{manager.uiUser.attribute.locale}"
required="#{metadataservice.locale.required}">
- <f:selectItems value="#{metadataservice.locale.values}" />
- </h:selectOneMenu>
- <h:panelGroup />
- <h:message for="locale" infoClass="portlet-msg-success"
errorClass="portlet-msg-error" fatalClass="portlet-msg-error"
warnClass="portlet-msg-alert"/>
- <h:panelGroup/>
- <h:panelGroup>
- <ul class="topnav">
- <li id="currentTab">
- <h:outputText value="#{bundle.IDENTITY_CATEGORY_PERSONAL}" />
- </li>
- </ul>
- </h:panelGroup>
-
-
- <h:panelGroup>
- <h:outputText value="#{bundle.IDENTITY_GIVENNAME}"/>
- <h:outputText value=" *"
rendered="#{metadataservice.givenname.required}" />
- </h:panelGroup>
- <h:inputText id="givenname"
value="#{manager.uiUser.attribute.givenname}"
required="#{metadataservice.givenname.required}"/>
- <h:panelGroup />
- <h:message for="givenname" infoClass="portlet-msg-success"
errorClass="portlet-msg-error" fatalClass="portlet-msg-error"
warnClass="portlet-msg-alert"/>
+<h:panelGroup>
+ <h:outputText value="#{bundle.IDENTITY_LOCALE}"/>
+ <h:outputText value=" *"
rendered="#{metadataservice.locale.required}"/>
+</h:panelGroup>
+<h:selectOneMenu id="locale"
value="#{manager.uiUser.attribute.locale}"
+ required="#{metadataservice.locale.required}">
+ <f:selectItems value="#{metadataservice.locale.values}"/>
+</h:selectOneMenu>
+<h:panelGroup/>
+<h:message for="locale" infoClass="portlet-msg-success"
errorClass="portlet-msg-error" fatalClass="portlet-msg-error"
+ warnClass="portlet-msg-alert"/>
- <h:panelGroup>
- <h:outputText value="#{bundle.IDENTITY_FAMILYNAME}"/>
- <h:outputText value=" *"
rendered="#{metadataservice.familyname.required}" />
- </h:panelGroup>
- <h:inputText id="lastname"
value="#{manager.uiUser.attribute.familyname}"
required="#{metadataservice.familyname.required}"/>
- <h:panelGroup />
- <h:message for="lastname" infoClass="portlet-msg-success"
errorClass="portlet-msg-error" fatalClass="portlet-msg-error"
warnClass="portlet-msg-alert"/>
+<h:panelGroup/>
+<h:panelGroup>
+ <ul class="topnav">
+ <li id="currentTab">
+ <h:outputText value="#{bundle.IDENTITY_CATEGORY_PERSONAL}"/>
+ </li>
+ </ul>
+</h:panelGroup>
- <h:panelGroup>
- <h:outputText value="#{bundle.IDENTITY_LOCATION}"/>
- <h:outputText value=" *"
rendered="#{metadataservice.location.required}" />
- </h:panelGroup>
- <h:inputText id="location"
value="#{manager.uiUser.attribute.location}"
required="#{metadataservice.location.required}"/>
- <h:panelGroup />
- <h:message for="location" infoClass="portlet-msg-success"
errorClass="portlet-msg-error" fatalClass="portlet-msg-error"
warnClass="portlet-msg-alert"/>
- <h:panelGroup/>
- <h:panelGroup>
- <ul class="topnav">
- <li id="currentTab">
- <h:outputText value="#{bundle.IDENTITY_CATEGORY_INSTANT}" />
- </li>
- </ul>
- </h:panelGroup>
+<h:panelGroup>
+ <h:outputText value="#{bundle.IDENTITY_GIVENNAME}"/>
+ <h:outputText value=" *"
rendered="#{metadataservice.givenname.required}"/>
+</h:panelGroup>
+<h:inputText id="givenname"
value="#{manager.uiUser.attribute.givenname}"
+ required="#{metadataservice.givenname.required}">
+ <f:validator validatorId="AttributeValidator"/>
+</h:inputText>
+<h:panelGroup/>
+<h:message for="givenname" infoClass="portlet-msg-success"
errorClass="portlet-msg-error"
+ fatalClass="portlet-msg-error"
warnClass="portlet-msg-alert"/>
-
- <h:panelGroup>
- <h:outputText value="#{bundle.IDENTITY_SKYPE}"/>
- <h:outputText value=" *"
rendered="#{metadataservice.skype.required}" />
- </h:panelGroup>
- <h:inputText id="skype"
value="#{manager.uiUser.attribute.skype}"
required="#{metadataservice.skype.required}"/>
- <h:panelGroup />
- <h:message for="skype" infoClass="portlet-msg-success"
errorClass="portlet-msg-error" fatalClass="portlet-msg-error"
warnClass="portlet-msg-alert"/>
+<h:panelGroup>
+ <h:outputText value="#{bundle.IDENTITY_FAMILYNAME}"/>
+ <h:outputText value=" *"
rendered="#{metadataservice.familyname.required}"/>
+</h:panelGroup>
+<h:inputText id="familyname"
value="#{manager.uiUser.attribute.familyname}"
+ required="#{metadataservice.familyname.required}">
+ <f:validator validatorId="AttributeValidator"/>
+</h:inputText>
+<h:panelGroup/>
+<h:message for="familyname" infoClass="portlet-msg-success"
errorClass="portlet-msg-error"
+ fatalClass="portlet-msg-error"
warnClass="portlet-msg-alert"/>
- <h:panelGroup>
- <h:outputText value="#{bundle.IDENTITY_ICQ}"/>
- <h:outputText value=" *"
rendered="#{metadataservice.icq.required}" />
- </h:panelGroup>
- <h:inputText id="icq" value="#{manager.uiUser.attribute.icq}"
required="#{metadataservice.icq.required}"/>
- <h:panelGroup />
- <h:message for="icq" infoClass="portlet-msg-success"
errorClass="portlet-msg-error" fatalClass="portlet-msg-error"
warnClass="portlet-msg-alert"/>
-
- <h:panelGroup>
- <h:outputText value="#{bundle.IDENTITY_AIM}"/>
- <h:outputText value=" *"
rendered="#{metadataservice.aim.required}" />
- </h:panelGroup>
- <h:inputText id="aim" value="#{manager.uiUser.attribute.aim}"
required="#{metadataservice.aim.required}"/>
- <h:panelGroup />
- <h:message for="aim" infoClass="portlet-msg-success"
errorClass="portlet-msg-error" fatalClass="portlet-msg-error"
warnClass="portlet-msg-alert"/>
-
- <h:panelGroup>
- <h:outputText value="#{bundle.IDENTITY_MSNM}"/>
- <h:outputText value=" *"
rendered="#{metadataservice.msnm.required}" />
- </h:panelGroup>
- <h:inputText id="msnm"
value="#{manager.uiUser.attribute.msnm}"
required="#{metadataservice.msnm.required}"/>
- <h:panelGroup />
- <h:message for="msnm" infoClass="portlet-msg-success"
errorClass="portlet-msg-error" fatalClass="portlet-msg-error"
warnClass="portlet-msg-alert"/>
+<h:panelGroup>
+ <h:outputText value="#{bundle.IDENTITY_LOCATION}"/>
+ <h:outputText value=" *"
rendered="#{metadataservice.location.required}"/>
+</h:panelGroup>
+<h:inputText id="location"
value="#{manager.uiUser.attribute.location}"
required="#{metadataservice.location.required}">
+ <f:validator validatorId="AttributeValidator"/>
+</h:inputText>
+<h:panelGroup/>
+<h:message for="location" infoClass="portlet-msg-success"
errorClass="portlet-msg-error"
+ fatalClass="portlet-msg-error"
warnClass="portlet-msg-alert"/>
- <h:panelGroup>
- <h:outputText value="#{bundle.IDENTITY_YIM}"/>
- <h:outputText value=" *"
rendered="#{metadataservice.yim.required}" />
- </h:panelGroup>
- <h:inputText id="yim" value="#{manager.uiUser.attribute.yim}"
required="#{metadataservice.yim.required}"/>
- <h:panelGroup />
- <h:message for="yim" infoClass="portlet-msg-success"
errorClass="portlet-msg-error" fatalClass="portlet-msg-error"
warnClass="portlet-msg-alert"/>
+<h:panelGroup/>
+<h:panelGroup>
+ <ul class="topnav">
+ <li id="currentTab">
+ <h:outputText value="#{bundle.IDENTITY_CATEGORY_INSTANT}"/>
+ </li>
+ </ul>
+</h:panelGroup>
- <h:panelGroup>
- <h:outputText value="#{bundle.IDENTITY_XMMP}"/>
- <h:outputText value=" *"
rendered="#{metadataservice.xmmp.required}" />
- </h:panelGroup>
- <h:inputText id="xmmp"
value="#{manager.uiUser.attribute.xmmp}"
required="#{metadataservice.xmmp.required}"/>
- <h:panelGroup />
- <h:message for="xmmp" infoClass="portlet-msg-success"
errorClass="portlet-msg-error" fatalClass="portlet-msg-error"
warnClass="portlet-msg-alert"/>
- <h:panelGroup/>
- <h:panelGroup>
- <ul class="topnav">
- <li id="currentTab">
- <h:outputText value="#{bundle.IDENTITY_CATEGORY_ADDITIONAL}" />
- </li>
- </ul>
- </h:panelGroup>
-
- <h:panelGroup>
- <h:outputText value="#{bundle.IDENTITY_HOMEPAGE}"/>
- <h:outputText value=" *"
rendered="#{metadataservice.homepage.required}" />
- </h:panelGroup>
- <h:inputText id="homepage"
value="#{manager.uiUser.attribute.homepage}"
required="#{metadataservice.homepage.required}"/>
- <h:panelGroup />
- <h:message for="homepage" infoClass="portlet-msg-success"
errorClass="portlet-msg-error" fatalClass="portlet-msg-error"
warnClass="portlet-msg-alert"/>
-
-
- <h:panelGroup>
- <h:outputText value="#{bundle.IDENTITY_OCCUPATION}"/>
- <h:outputText value=" *"
rendered="#{metadataservice.occupation.required}" />
- </h:panelGroup>
- <h:inputText id="occupation"
value="#{manager.uiUser.attribute.occupation}"
required="#{metadataservice.occupation.required}"/>
- <h:panelGroup />
- <h:message for="occupation" infoClass="portlet-msg-success"
errorClass="portlet-msg-error" fatalClass="portlet-msg-error"
warnClass="portlet-msg-alert"/>
-
-
- <h:panelGroup>
- <h:outputText value="#{bundle.IDENTITY_INTERESTS}"/>
- <h:outputText value=" *"
rendered="#{metadataservice.interests.required}" />
- </h:panelGroup>
- <h:inputText id="interests"
value="#{manager.uiUser.attribute.interests}"
required="#{metadataservice.interests.required}"/>
- <h:panelGroup />
- <h:message for="interests" infoClass="portlet-msg-success"
errorClass="portlet-msg-error" fatalClass="portlet-msg-error"
warnClass="portlet-msg-alert"/>
-
-
- <h:panelGroup>
- <h:outputText value="#{bundle.IDENTITY_SIGNATURE}"/>
- <h:outputText value=" *"
rendered="#{metadataservice.signature.required}" />
- </h:panelGroup>
- <h:panelGroup>
- <h:inputTextarea id="signature"
value="#{manager.uiUser.attribute.signature}" cols="50"
rows="5"
required="#{metadataservice.signature.required}"/><br/>
- <h:outputText value="#{bundle.IDENTITY_CATEGORY_ADDITIONAL_SIGNATURE}"
/>
- </h:panelGroup>
- <h:panelGroup />
- <h:message for="signature" infoClass="portlet-msg-success"
errorClass="portlet-msg-error" fatalClass="portlet-msg-error"
warnClass="portlet-msg-alert"/>
+<h:panelGroup>
+ <h:outputText value="#{bundle.IDENTITY_SKYPE}"/>
+ <h:outputText value=" *"
rendered="#{metadataservice.skype.required}"/>
+</h:panelGroup>
+<h:inputText id="skype" value="#{manager.uiUser.attribute.skype}"
required="#{metadataservice.skype.required}">
+ <f:validator validatorId="AttributeValidator"/>
+</h:inputText>
+<h:panelGroup/>
+<h:message for="skype" infoClass="portlet-msg-success"
errorClass="portlet-msg-error" fatalClass="portlet-msg-error"
+ warnClass="portlet-msg-alert"/>
-
- <h:panelGroup>
- <h:outputText value="#{bundle.IDENTITY_EXTRA}"/>
- <h:outputText value=" *"
rendered="#{metadataservice.extra.required}" />
- </h:panelGroup>
- <h:panelGroup>
- <h:inputTextarea id="extra"
value="#{manager.uiUser.attribute.extra}" cols="50" rows="5"
required="#{metadataservice.extra.required}"/><br/>
- <h:outputText value="#{bundle.IDENTITY_CATEGORY_ADDITIONAL_EXTRA}"
/>
- </h:panelGroup>
- <h:panelGroup />
- <h:message for="extra" infoClass="portlet-msg-success"
errorClass="portlet-msg-error" fatalClass="portlet-msg-error"
warnClass="portlet-msg-alert"/>
-
- </h:panelGrid>
-
+<h:panelGroup>
+ <h:outputText value="#{bundle.IDENTITY_ICQ}"/>
+ <h:outputText value=" *"
rendered="#{metadataservice.icq.required}"/>
+</h:panelGroup>
+<h:inputText id="icq" value="#{manager.uiUser.attribute.icq}"
required="#{metadataservice.icq.required}">
+ <f:validator validatorId="AttributeValidator"/>
+</h:inputText>
+<h:panelGroup/>
+<h:message for="icq" infoClass="portlet-msg-success"
errorClass="portlet-msg-error" fatalClass="portlet-msg-error"
+ warnClass="portlet-msg-alert"/>
+
+<h:panelGroup>
+ <h:outputText value="#{bundle.IDENTITY_AIM}"/>
+ <h:outputText value=" *"
rendered="#{metadataservice.aim.required}"/>
+</h:panelGroup>
+<h:inputText id="aim" value="#{manager.uiUser.attribute.aim}"
required="#{metadataservice.aim.required}">
+ <f:validator validatorId="AttributeValidator"/>
+</h:inputText>
+<h:panelGroup/>
+<h:message for="aim" infoClass="portlet-msg-success"
errorClass="portlet-msg-error" fatalClass="portlet-msg-error"
+ warnClass="portlet-msg-alert"/>
+
+<h:panelGroup>
+ <h:outputText value="#{bundle.IDENTITY_MSNM}"/>
+ <h:outputText value=" *"
rendered="#{metadataservice.msnm.required}"/>
+</h:panelGroup>
+<h:inputText id="msnm" value="#{manager.uiUser.attribute.msnm}"
required="#{metadataservice.msnm.required}">
+ <f:validator validatorId="AttributeValidator"/>
+</h:inputText>
+<h:panelGroup/>
+<h:message for="msnm" infoClass="portlet-msg-success"
errorClass="portlet-msg-error" fatalClass="portlet-msg-error"
+ warnClass="portlet-msg-alert"/>
+
+<h:panelGroup>
+ <h:outputText value="#{bundle.IDENTITY_YIM}"/>
+ <h:outputText value=" *"
rendered="#{metadataservice.yim.required}"/>
+</h:panelGroup>
+<h:inputText id="yim" value="#{manager.uiUser.attribute.yim}"
required="#{metadataservice.yim.required}">
+ <f:validator validatorId="AttributeValidator"/>
+</h:inputText>
+<h:panelGroup/>
+<h:message for="yim" infoClass="portlet-msg-success"
errorClass="portlet-msg-error" fatalClass="portlet-msg-error"
+ warnClass="portlet-msg-alert"/>
+
+<h:panelGroup>
+ <h:outputText value="#{bundle.IDENTITY_XMMP}"/>
+ <h:outputText value=" *"
rendered="#{metadataservice.xmmp.required}"/>
+</h:panelGroup>
+<h:inputText id="xmmp" value="#{manager.uiUser.attribute.xmmp}"
required="#{metadataservice.xmmp.required}">
+ <f:validator validatorId="AttributeValidator"/>
+</h:inputText>
+<h:panelGroup/>
+<h:message for="xmmp" infoClass="portlet-msg-success"
errorClass="portlet-msg-error" fatalClass="portlet-msg-error"
+ warnClass="portlet-msg-alert"/>
+
+<h:panelGroup/>
+<h:panelGroup>
+ <ul class="topnav">
+ <li id="currentTab">
+ <h:outputText value="#{bundle.IDENTITY_CATEGORY_ADDITIONAL}"/>
+ </li>
+ </ul>
+</h:panelGroup>
+
+<h:panelGroup>
+ <h:outputText value="#{bundle.IDENTITY_HOMEPAGE}"/>
+ <h:outputText value=" *"
rendered="#{metadataservice.homepage.required}"/>
+</h:panelGroup>
+<h:inputText id="homepage"
value="#{manager.uiUser.attribute.homepage}"
+ required="#{metadataservice.homepage.required}">
+ <f:validator validatorId="AttributeValidator"/>
+</h:inputText>
+<h:panelGroup/>
+<h:message for="homepage" infoClass="portlet-msg-success"
errorClass="portlet-msg-error"
+ fatalClass="portlet-msg-error"
warnClass="portlet-msg-alert"/>
+
+
+<h:panelGroup>
+ <h:outputText value="#{bundle.IDENTITY_OCCUPATION}"/>
+ <h:outputText value=" *"
rendered="#{metadataservice.occupation.required}"/>
+</h:panelGroup>
+<h:inputText id="occupation"
value="#{manager.uiUser.attribute.occupation}"
+ required="#{metadataservice.occupation.required}">
+ <f:validator validatorId="AttributeValidator"/>
+</h:inputText>
+<h:panelGroup/>
+<h:message for="occupation" infoClass="portlet-msg-success"
errorClass="portlet-msg-error"
+ fatalClass="portlet-msg-error"
warnClass="portlet-msg-alert"/>
+
+
+<h:panelGroup>
+ <h:outputText value="#{bundle.IDENTITY_INTERESTS}"/>
+ <h:outputText value=" *"
rendered="#{metadataservice.interests.required}"/>
+</h:panelGroup>
+<h:inputText id="interests"
value="#{manager.uiUser.attribute.interests}"
+ required="#{metadataservice.interests.required}">
+ <f:validator validatorId="AttributeValidator"/>
+</h:inputText>
+<h:panelGroup/>
+<h:message for="interests" infoClass="portlet-msg-success"
errorClass="portlet-msg-error"
+ fatalClass="portlet-msg-error"
warnClass="portlet-msg-alert"/>
+
+
+<h:panelGroup>
+ <h:outputText value="#{bundle.IDENTITY_SIGNATURE}"/>
+ <h:outputText value=" *"
rendered="#{metadataservice.signature.required}"/>
+</h:panelGroup>
+<h:panelGroup>
+ <h:inputTextarea id="signature"
value="#{manager.uiUser.attribute.signature}" cols="50"
rows="5"
+ required="#{metadataservice.signature.required}">
+ <f:validator validatorId="AttributeValidator"/>
+ </h:inputTextarea><br/>
+ <h:outputText
value="#{bundle.IDENTITY_CATEGORY_ADDITIONAL_SIGNATURE}"/>
+</h:panelGroup>
+<h:panelGroup/>
+<h:message for="signature" infoClass="portlet-msg-success"
errorClass="portlet-msg-error"
+ fatalClass="portlet-msg-error"
warnClass="portlet-msg-alert"/>
+
+
+<h:panelGroup>
+ <h:outputText value="#{bundle.IDENTITY_EXTRA}"/>
+ <h:outputText value=" *"
rendered="#{metadataservice.extra.required}"/>
+</h:panelGroup>
+<h:panelGroup>
+ <h:inputTextarea id="extra"
value="#{manager.uiUser.attribute.extra}" cols="50"
rows="5"
+ required="#{metadataservice.extra.required}">
+ <f:validator validatorId="AttributeValidator"/>
+ </h:inputTextarea><br/>
+ <h:outputText value="#{bundle.IDENTITY_CATEGORY_ADDITIONAL_EXTRA}"/>
+</h:panelGroup>
+<h:panelGroup/>
+<h:message for="extra" infoClass="portlet-msg-success"
errorClass="portlet-msg-error" fatalClass="portlet-msg-error"
+ warnClass="portlet-msg-alert"/>
+
+</h:panelGrid>
+
</div>
\ No newline at end of file
Modified:
branches/Enterprise_Portal_Platform_4_3/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/Resource.properties
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/Resource.properties 2009-05-29
19:21:35 UTC (rev 13424)
+++
branches/Enterprise_Portal_Platform_4_3/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/Resource.properties 2009-05-29
23:04:54 UTC (rev 13425)
@@ -178,5 +178,5 @@
org.jboss.portal.object.name.admin.WSRP=WSRP
-INVALID_NAME_ERROR=''{0}'' is an invalid {1} name: Cannot be null, empty
or contain '\\', '<', '>', '(', ')',
'=' or '%5c'
+INVALID_NAME_ERROR=''{0}'' is an invalid {1} name: Cannot be null, empty
or contain '/', '.', '\\', '<', '>',
'(', ')', '=' or '%5c'
DUPLICATE_ERROR=A {1} named ''{0}'' already exists!
\ No newline at end of file
Modified:
branches/Enterprise_Portal_Platform_4_3/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/Resource_fr.properties
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/Resource_fr.properties 2009-05-29
19:21:35 UTC (rev 13424)
+++
branches/Enterprise_Portal_Platform_4_3/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/Resource_fr.properties 2009-05-29
23:04:54 UTC (rev 13425)
@@ -147,4 +147,4 @@
consumers_table_reload=Recharger consommateurs
CONSUMER_TYPE=Consommateur
DUPLICATE_ERROR=Un {1} nomm\u00e9 ''{0}'' existe d\u00e9j\u00e0!
-INVALID_NAME_ERROR=''{0}'' est un nom invalide pour un {1} : Ne peut pas
\u00eatre null, vide ou contenir '\\', '<', '>',
'(', ')', '=' ou '%5c'
\ No newline at end of file
+INVALID_NAME_ERROR=''{0}'' est un nom invalide pour un {1} : Ne peut pas
\u00eatre null, vide ou contenir '/', '.', '\\', '<',
'>', '(', ')', '=' ou '%5c'
\ No newline at end of file
Modified:
branches/Enterprise_Portal_Platform_4_3/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/Resource_it.properties
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/Resource_it.properties 2009-05-29
19:21:35 UTC (rev 13424)
+++
branches/Enterprise_Portal_Platform_4_3/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/Resource_it.properties 2009-05-29
23:04:54 UTC (rev 13425)
@@ -178,5 +178,5 @@
org.jboss.portal.object.name.admin.WSRP=WSRP
-INVALID_NAME_ERROR=''{0}'' non \u00e8 un nome valido di {1} : Non \u00f2
essere null, vuoto o contenere '\\', '<', '>', '(',
')', '=' o '%5c'
+INVALID_NAME_ERROR=''{0}'' non \u00e8 un nome valido di {1} : Non \u00f2
essere null, vuoto o contenere '/', '.', '\\', '<',
'>', '(', ')', '=' o '%5c'
DUPLICATE_ERROR=Un valore {1} con nome ''{0}'' esiste gi\u00e0!
\ No newline at end of file
Modified:
branches/Enterprise_Portal_Platform_4_3/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/Resource_pt_BR.properties
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/Resource_pt_BR.properties 2009-05-29
19:21:35 UTC (rev 13424)
+++
branches/Enterprise_Portal_Platform_4_3/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/classes/Resource_pt_BR.properties 2009-05-29
23:04:54 UTC (rev 13425)
@@ -76,7 +76,7 @@
edit_consumer_cache = Expira\u00e7\u00e3o do cache\:
edit_consumer_cache_seconds = (segundos antes de expirar)
edit_consumer_endpoint = Configura\u00e7\u00e3o do endpoint\:
-edit_consumer_endpoint_wsdl = Usar WSDL?
+edit_consumer_endpoint_wsdl = Utilizar WSDL?
edit_consumer_endpoint_sd = URL do Service Description\:
edit_consumer_endpoint_m = URL do Markup\:
edit_consumer_endpoint_r = URL do Registro\:
@@ -109,8 +109,8 @@
# Producer configuration screen
producer_config_title = Configura\u00e7\u00e3o do Produtor
-producer_config_sd_requires_reg = O acesso \u00e0 descri\u00e7\u00e3o completa do
servi\u00e7o exige que os consumidores estejam registados.
-producer_config_strict = Utilize compatibilidade estrita ao WSRP.
+producer_config_sd_requires_reg = O acesso \u00e0 descri\u00e7\u00e3o completa do
servi\u00e7o exige que os consumidores estejam registrados.
+producer_config_strict = Utilizar compatibilidade estrita ao WSRP.
producer_config_requires_reg = Registro obrigat\u00f3rio. Modificar essa
informa\u00e7\u00e3o invalidar\u00e1 os registros dos consumidores.
producer_config_reg_policy = Nome da classe de pol\u00edtica do registro\:
producer_config_reg_prop_validator = Nome da classe de valida\u00e7\u00e3o da propriedade
do registro\:
@@ -169,5 +169,5 @@
org.jboss.portal.object.name.admin.WSRP=WSRP
-INVALID_NAME_ERROR=''{0}'' \u00e9 um nome inv\u00e1lido para {1}\:
n\u00e3o deve ser nulo, vazio ou conter os caracteres '\\', '<',
'>', '(', ')', '=' ou '%5c'
+INVALID_NAME_ERROR=''{0}'' \u00e9 um nome inv\u00e1lido para {1}\:
n\u00e3o deve ser nulo, vazio ou conter os caracteres '/', '.',
'\\', '<', '>', '(', ')', '=' ou
'%5c'
DUPLICATE_ERROR=Um {1} denominado ''{0}'' j\u00e1 existe\!
\ No newline at end of file
Modified:
branches/Enterprise_Portal_Platform_4_3/faces/src/main/org/jboss/portal/faces/gui/BeanContext.java
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/faces/src/main/org/jboss/portal/faces/gui/BeanContext.java 2009-05-29
19:21:35 UTC (rev 13424)
+++
branches/Enterprise_Portal_Platform_4_3/faces/src/main/org/jboss/portal/faces/gui/BeanContext.java 2009-05-29
23:04:54 UTC (rev 13425)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2007, Red Hat Middleware, LLC, and individual *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
* contributors as indicated by the @authors tag. See the *
* copyright.txt in the distribution for a full listing of *
* individual contributors. *
@@ -23,11 +23,13 @@
package org.jboss.portal.faces.gui;
+import org.apache.log4j.Logger;
import org.jboss.portal.common.util.ParameterValidation;
import java.text.MessageFormat;
import java.util.Locale;
import java.util.Map;
+import java.util.MissingResourceException;
import java.util.ResourceBundle;
/**
@@ -37,13 +39,26 @@
*/
public abstract class BeanContext
{
+ protected final static Logger log = Logger.getLogger(BeanContext.class);
+
public static final String STATUS = "status";
- private static final String RESOURCE_NAME = "Resource";
+ private static final String DEFAULT_RESOURCE_NAME = "Resource";
private static final String UNEXPECTED_ERROR =
"bean_support_unexpected_error";
private static final String CAUSE = "bean_support_cause";
private static final String CURRENT_PLACEHOLDER = "###";
+ private String resourceName = DEFAULT_RESOURCE_NAME;
+ public void setResourceName(String resourceName)
+ {
+ this.resourceName = resourceName;
+ }
+
+ public String getResourceName()
+ {
+ return resourceName;
+ }
+
/**
* Retrieves the value of the parameter which name is given from the JSF request.
*
@@ -65,37 +80,76 @@
protected abstract Locale getLocale();
- public void createErrorMessage(String message, Object... params)
+ public void createErrorMessage(String localizedMessageId, Object... params)
{
- createLocalizedMessage(STATUS, message, getErrorSeverity(), params);
+ createLocalizedMessage(STATUS, localizedMessageId, getErrorSeverity(), params);
}
- public void createTargetedErrorMessage(String target, String message, Object...
params)
+ public void createTargetedErrorMessage(String target, String localizedMessageId,
Object... params)
{
- createLocalizedMessage(target, message, getErrorSeverity(), params);
+ createLocalizedMessage(target, localizedMessageId, getErrorSeverity(), params);
}
- protected void createLocalizedMessage(String target, String message, Object severity,
Object... params)
+ /**
+ * Adds a localized message using the appropriate severity to the identified target in
the context. This method
+ * accepts an arbitrary number of arguments to be passed as parameters of localized
strings.
+ *
+ * @param target the target in this context that will receive the new
message
+ * @param localizedMessageId a resource bundle identifier identifying which the
localized string to use as a message
+ * @param severity an object representing the severity of the message
(typically FacesMessage.Severity)
+ * @param params additional parameters to be passed to replace tokens in
localized strings
+ */
+ protected void createLocalizedMessage(String target, String localizedMessageId, Object
severity, Object... params)
{
- createMessage(target, getMessageFromBundle(message, params), severity);
+ createMessage(target, getMessageFromBundle(localizedMessageId, params), severity);
}
- public String getMessageFromBundle(String message, Object... params)
+ public String getMessageFromBundle(String localizedMessageId, Object... params)
{
- return getLocalizedMessage(message, getLocale(), params);
+ return getLocalizedMessage(localizedMessageId, getLocale(), resourceName, params);
}
public static String getLocalizedMessage(String localizationKey, Locale locale,
Object... params)
{
- ResourceBundle rb = ResourceBundle.getBundle(RESOURCE_NAME, locale);
- return MessageFormat.format(rb.getString(localizationKey), params);
+ return getLocalizedMessage(localizationKey, locale, DEFAULT_RESOURCE_NAME,
params);
}
+ public static String getLocalizedMessage(String localizationKey, Locale locale, String
resourceName, Object... params)
+ {
+ ResourceBundle rb = ResourceBundle.getBundle(resourceName, locale);
+
+ String message;
+ try
+ {
+ message = rb.getString(localizationKey);
+ }
+ catch (MissingResourceException e)
+ {
+ // if the key doesn't exist, return it instead of failing
+ log.info("Couldn't find localization message for key '" +
localizationKey + "' in bundle " + resourceName
+ + " for locale " + locale.getDisplayName());
+ return localizationKey;
+ }
+
+ return MessageFormat.format(message, params);
+ }
+
public void createErrorMessageFrom(Exception e)
{
createErrorMessageFrom(STATUS, e);
}
+ /**
+ * Creates a localized error message targeting the specified object in the context and
using the specified error
+ * information. This method looks for two specific resource bundle entries to localize
the message, {@link
+ * #UNEXPECTED_ERROR} and {@link #CAUSE}, using the following format for the message:
<code>result of {@link
+ * #getLocalizedMessageOrExceptionName(Throwable)} for the exception\n[localized value
associated with {@link
+ * #CAUSE}result of {@link #getLocalizedMessageOrExceptionName(Throwable)} for the
exception's cause if the cause
+ * exists]
+ *
+ * @param target the contextual object target by the message to be created
+ * @param e the exception that we want to display as an error message
+ */
public void createErrorMessageFrom(String target, Exception e)
{
Throwable cause = e.getCause();
@@ -104,6 +158,14 @@
createMessage(target, message, getErrorSeverity());
}
+ /**
+ * Retrieves a localized message associated with the specified Throwable.
+ *
+ * @param e the Throwable for which a localized message is to be retrieved
+ * @return the localized message associated with the specified Throwable if it exists
or the localized value
+ * associated with the {@link #UNEXPECTED_ERROR} resource bundle entry to
which is appended the Throwable
+ * class name.
+ */
private String getLocalizedMessageOrExceptionName(Throwable e)
{
String localizedMessage = e.getLocalizedMessage();
@@ -114,14 +176,14 @@
return localizedMessage;
}
- protected void createInfoMessage(String target, String message)
+ protected void createInfoMessage(String target, String localizedMessageId)
{
- createLocalizedMessage(target, message, getInfoSeverity());
+ createLocalizedMessage(target, localizedMessageId, getInfoSeverity());
}
- public void createInfoMessage(String message)
+ public void createInfoMessage(String localizedMessageId)
{
- createInfoMessage(STATUS, message);
+ createInfoMessage(STATUS, localizedMessageId);
}
/**
@@ -179,7 +241,7 @@
}
getFromSession(name, newValue.getClass(), sessionMap, "Provided object: "
+ newValue
- + " is not compatible with previously assigned '" + name +
"' object: " + CURRENT_PLACEHOLDER);
+ + " is not compatible with previously assigned '" + name +
"' object: " + CURRENT_PLACEHOLDER);
sessionMap.put(name, newValue);
return newValue;
}
@@ -197,7 +259,7 @@
public <T> T getFromSession(String name, Class<T> expectedClass)
{
return getFromSession(name, expectedClass, getSessionMap(), "Current
object:" + CURRENT_PLACEHOLDER
- + " is not compatible with expected class " + expectedClass +
" for '" + name + "'");
+ + " is not compatible with expected class " + expectedClass + "
for '" + name + "'");
}
/**
Modified:
branches/Enterprise_Portal_Platform_4_3/faces/src/main/org/jboss/portal/faces/gui/JSFBeanContext.java
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/faces/src/main/org/jboss/portal/faces/gui/JSFBeanContext.java 2009-05-29
19:21:35 UTC (rev 13424)
+++
branches/Enterprise_Portal_Platform_4_3/faces/src/main/org/jboss/portal/faces/gui/JSFBeanContext.java 2009-05-29
23:04:54 UTC (rev 13425)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2007, Red Hat Middleware, LLC, and individual *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
* contributors as indicated by the @authors tag. See the *
* copyright.txt in the distribution for a full listing of *
* individual contributors. *
@@ -23,6 +23,8 @@
package org.jboss.portal.faces.gui;
+import org.jboss.portal.common.util.ParameterValidation;
+
import javax.faces.application.FacesMessage;
import javax.faces.component.UIComponent;
import javax.faces.component.UIViewRoot;
@@ -39,17 +41,37 @@
{
public String getParameter(String key)
{
- Map pmap =
FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
+ return getParameter(key, FacesContext.getCurrentInstance());
+ }
+
+ public static String getParameter(String key, FacesContext facesContext)
+ {
+ Map pmap = facesContext.getExternalContext().getRequestParameterMap();
return (String)pmap.get(key);
}
public Map<String, Object> getSessionMap()
{
- return FacesContext.getCurrentInstance().getExternalContext().getSessionMap();
+ return JSFBeanContext.getSessionMap(FacesContext.getCurrentInstance());
}
+ public static Map<String, Object> getSessionMap(FacesContext facesContext)
+ {
+ return facesContext.getExternalContext().getSessionMap();
+ }
+
protected void createMessage(String target, String message, Object severity)
{
+ outputMessage(target, message, severity);
+ }
+
+ public static void outputMessage(String target, String message, Object severity)
+ {
+ if (ParameterValidation.isNullOrEmpty(target))
+ {
+ target = STATUS;
+ }
+
FacesMessage.Severity jsfSeverity;
if (severity instanceof FacesMessage.Severity)
{
@@ -71,13 +93,23 @@
else
{
// todo: do something better here
- System.out.println("Couldn't resolve component target: " +
target);
+ log.info("Couldn't resolve component target: " + target);
}
FacesMessage msg = new FacesMessage(jsfSeverity, message, message);
facesContext.addMessage(target, msg);
}
+ public static void outputLocalizedMessage(String target, String localizationKey,
Object severity, String resourceName, Object... params)
+ {
+ if(severity == null)
+ {
+ severity = FacesMessage.SEVERITY_ERROR;
+ }
+
+ outputMessage(target, getLocalizedMessage(localizationKey, getRequestLocale(),
resourceName, params), severity);
+ }
+
protected Object getErrorSeverity()
{
return FacesMessage.SEVERITY_ERROR;
@@ -90,6 +122,11 @@
protected Locale getLocale()
{
+ return getRequestLocale();
+ }
+
+ public static Locale getRequestLocale()
+ {
return FacesContext.getCurrentInstance().getExternalContext().getRequestLocale();
}
}
Modified:
branches/Enterprise_Portal_Platform_4_3/faces/src/main/org/jboss/portal/faces/gui/ManagedBean.java
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/faces/src/main/org/jboss/portal/faces/gui/ManagedBean.java 2009-05-29
19:21:35 UTC (rev 13424)
+++
branches/Enterprise_Portal_Platform_4_3/faces/src/main/org/jboss/portal/faces/gui/ManagedBean.java 2009-05-29
23:04:54 UTC (rev 13425)
@@ -26,7 +26,9 @@
import org.apache.log4j.Logger;
import org.jboss.portal.common.util.ParameterValidation;
+import java.util.regex.Pattern;
+
/**
* @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a>
* @version $Revision$
@@ -38,8 +40,31 @@
protected BeanContext beanContext;
public static final String INVALID_NAME = "INVALID_NAME_ERROR";
+ public static final String INVALID_PATH = "INVALID_PATH_ERROR";
public static final String DUPLICATE = "DUPLICATE_ERROR";
+ public static interface PropertyValidator
+ {
+ boolean checkForDuplicates();
+
+ String getObjectTypeName();
+
+ boolean isAlreadyExisting(String propertyName);
+
+ String doSimpleChecks(String name);
+
+ ParameterValidation.ValidationErrorHandler getValidationErrorHandler(String name,
String targetForErrorMessage);
+
+ Pattern getValidationPattern();
+ }
+
+ private PropertyValidator validator = new DefaultPropertyValidator();
+
+ protected void setValidator(PropertyValidator validator)
+ {
+ this.validator = validator;
+ }
+
public void setBeanContext(BeanContext beanContext)
{
this.beanContext = beanContext;
@@ -47,19 +72,37 @@
public String checkNameValidity(String name, String targetForErrorMessage)
{
+ return checkNameValidity(name, targetForErrorMessage, validator);
+ }
+
+ public String checkNameValidity(String name, String targetForErrorMessage,
PropertyValidator validator)
+ {
+ ParameterValidation.throwIllegalArgExceptionIfNull(validator,
"PropertyValidator");
+
+ String objectTypeName = validator.getObjectTypeName();
if (ParameterValidation.isNullOrEmpty(name))
{
- beanContext.createTargetedErrorMessage(targetForErrorMessage, INVALID_NAME,
name, getLocalizedType());
+ beanContext.createTargetedErrorMessage(targetForErrorMessage, INVALID_NAME,
name, getLocalizedType(objectTypeName));
return null;
}
else
{
+ String original = name;
+ name = validator.doSimpleChecks(name);
+
+ // we got an invalid name after simple checks, fail!
+ if (name == null)
+ {
+ beanContext.createTargetedErrorMessage(targetForErrorMessage, INVALID_NAME,
original, getLocalizedType(objectTypeName));
+ return null;
+ }
+
// Trim name
name = name.trim();
// "sanitize" name: if it's invalid, return null and output
message
- name = ParameterValidation.sanitizeFromPatternWithHandler(name,
ParameterValidation.XSS_CHECK,
- new MessageValidationHandler(null, targetForErrorMessage, name));
+ name = ParameterValidation.sanitizeFromPatternWithHandler(name,
validator.getValidationPattern(),
+ validator.getValidationErrorHandler(name, targetForErrorMessage));
// we got an invalid name, fail!
if (name == null)
@@ -68,9 +111,9 @@
}
// Check for duplicate
- if (isAlreadyExisting(name))
+ if (validator.checkForDuplicates() &&
validator.isAlreadyExisting(name))
{
- beanContext.createTargetedErrorMessage(targetForErrorMessage, DUPLICATE,
name, getLocalizedType());
+ getDuplicateErrorMessage(name, targetForErrorMessage, objectTypeName);
return null;
}
@@ -78,11 +121,16 @@
}
}
- private String getLocalizedType()
+ protected void getDuplicateErrorMessage(String name, String targetForErrorMessage,
String objectTypeName)
{
- return beanContext.getMessageFromBundle(getObjectTypeName());
+ beanContext.createTargetedErrorMessage(targetForErrorMessage, DUPLICATE, name,
getLocalizedType(objectTypeName));
}
+ private String getLocalizedType(String objectTypeName)
+ {
+ return beanContext.getMessageFromBundle(objectTypeName);
+ }
+
protected abstract String getObjectTypeName();
public abstract boolean isAlreadyExisting(String objectName);
@@ -128,22 +176,65 @@
}
}
- private class MessageValidationHandler extends
ParameterValidation.ValidationErrorHandler
+ protected class MessageValidationHandler extends
ParameterValidation.ValidationErrorHandler
{
private String targetForErrorMessage;
private String validatedName;
+ private String objectTypeName;
+ private String errorMessageKey;
- private MessageValidationHandler(String defaultValue, String targetForErrorMessage,
String validatedName)
+ public MessageValidationHandler(String defaultValue, String targetForErrorMessage,
String validatedName, String objectTypeName)
{
+ this(defaultValue, targetForErrorMessage, validatedName, objectTypeName,
INVALID_NAME);
+ }
+
+ public MessageValidationHandler(String defaultValue, String targetForErrorMessage,
String validatedName, String objectTypeName, String errorMessageKey)
+ {
super(defaultValue);
this.targetForErrorMessage = targetForErrorMessage;
this.validatedName = validatedName;
+ this.objectTypeName = objectTypeName;
+ this.errorMessageKey = errorMessageKey;
}
protected String internalValidationErrorHandling(String s)
{
- beanContext.createTargetedErrorMessage(targetForErrorMessage, INVALID_NAME,
validatedName, getLocalizedType());
+ beanContext.createTargetedErrorMessage(targetForErrorMessage, errorMessageKey,
validatedName, getLocalizedType(objectTypeName));
return null;
}
}
+
+ protected class DefaultPropertyValidator implements PropertyValidator
+ {
+ public boolean checkForDuplicates()
+ {
+ return true;
+ }
+
+ public String getObjectTypeName()
+ {
+ return ManagedBean.this.getObjectTypeName();
+ }
+
+ public boolean isAlreadyExisting(String propertyName)
+ {
+ return ManagedBean.this.isAlreadyExisting(propertyName);
+ }
+
+ public String doSimpleChecks(String name)
+ {
+ // if name contains . or /, it's invalid for a Portal object
+ return (name.indexOf('.') != -1 || name.indexOf('/') != -1) ?
null : name;
+ }
+
+ public ParameterValidation.ValidationErrorHandler getValidationErrorHandler(String
name, String targetForErrorMessage)
+ {
+ return new MessageValidationHandler(null, targetForErrorMessage, name,
getObjectTypeName());
+ }
+
+ public Pattern getValidationPattern()
+ {
+ return ParameterValidation.XSS_CHECK;
+ }
+ }
}