Author: emuckenhuber
Date: 2008-04-22 11:01:55 -0400 (Tue, 22 Apr 2008)
New Revision: 10692
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/IdentityConstants.java
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/IdentityMailService.java
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/IdentityUserManagementService.java
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/impl/IdentityCommandFactoryService.java
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/impl/IdentityMailServiceImpl.java
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/impl/IdentityUserManagementServiceImpl.java
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/metadata/IdentityUIConfiguration.java
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/metadata/IdentityUIConfigurationService.java
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/metadata/IdentityUIConfigurationServiceImpl.java
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/metadata/UIComponentConfiguration.java
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/workflow/RegistrationService.java
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/workflow/UserContainer.java
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/workflow/impl/CreateUserAction.java
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/workflow/impl/RegistrationServiceImpl.java
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/workflow/impl/SendValidationMailAction.java
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/workflow/impl/UpdateEmailAction.java
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/workflow/impl/ValidateEmailServiceImpl.java
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/CreateUserAction.java
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/EditProfileAction.java
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/LostPasswordAction.java
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/admin/RoleManagementBean.java
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/admin/UserAdministrationBean.java
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/common/ConfigurationBean.java
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/common/IdentityRoleBean.java
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/common/IdentityUserBean.java
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/common/MetaDataServiceBean.java
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/faces/components/StaticValues.java
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/CurrentPasswordValidator.java
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/EmailValidator.java
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/PasswordValidator.java
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/WEB-INF/portlet.xml
Log:
JBPORTAL-1974 for 2.7 branch, generics and cleanup
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/IdentityConstants.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/IdentityConstants.java 2008-04-22
06:44:16 UTC (rev 10691)
+++
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/IdentityConstants.java 2008-04-22
15:01:55 UTC (rev 10692)
@@ -61,6 +61,7 @@
/** Registration and validation status */
public static final String REGISTRATION_REGISTERED = "registered";
public static final String REGISTRATION_PENDING = "registration_pending";
+ public static final String REGISTRATION_FAILED = "registration_failed";
public static final String VALIDATION_FAILED = "validation_failed";
public static final String VALIDATION_VALIDATED = "validated";
public static final String VALIDATION_ERROR = "validation_error";
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/IdentityMailService.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/IdentityMailService.java 2008-04-22
06:44:16 UTC (rev 10691)
+++
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/IdentityMailService.java 2008-04-22
15:01:55 UTC (rev 10692)
@@ -52,6 +52,7 @@
* @param email to
* @param subject
* @param email body
+ * @throws IllegalArgumentException
*/
public void send(String emailFrom, String emailTo, String subject, String emailText);
}
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/IdentityUserManagementService.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/IdentityUserManagementService.java 2008-04-22
06:44:16 UTC (rev 10691)
+++
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/IdentityUserManagementService.java 2008-04-22
15:01:55 UTC (rev 10692)
@@ -25,17 +25,41 @@
import java.util.List;
import java.util.Map;
+import org.jboss.portal.identity.IdentityException;
+
/**
+ * The IdentityUserManagementService interface
+ *
* @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
* @version $Revision$
*/
public interface IdentityUserManagementService
{
- boolean createUser(String username, String password, Map profileMap, List roles);
+ /**
+ * @param username the user name
+ * @param password the users password
+ * @param profileMap the users profile map
+ * @param roles the users roles
+ * @throws IdentityException
+ * @throws IllegalArgumentException
+ */
+ void createUser(String username, String password, Map<String, Object>
profileMap, List<String> roles) throws IdentityException;
- public String getCurrentEmail(String username);
+ /**
+ * @param username the user name
+ * @return the users email address
+ * @throws IdentityException
+ * @throws IllegalArgumentException if the user name is null
+ */
+ String getCurrentEmail(String username) throws IdentityException;
- public boolean updateEmail(String username, String email);
+ /**
+ * @param username the user name
+ * @param email the users new email address
+ * @throws IdentityException
+ * @throws IllegalArgumentException
+ */
+ void updateEmail(String username, String email) throws IdentityException;
}
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/impl/IdentityCommandFactoryService.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/impl/IdentityCommandFactoryService.java 2008-04-22
06:44:16 UTC (rev 10691)
+++
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/impl/IdentityCommandFactoryService.java 2008-04-22
15:01:55 UTC (rev 10692)
@@ -75,10 +75,10 @@
String hash = aRequest[1];
try
{
- // Validating email
- String status = validateEmailService.validateEmail(bpmId, hash);
- // Passing status to portlet render parameters
- operation = status;
+ // Validating email
+ String status = validateEmailService.validateEmail(bpmId, hash);
+ // Passing status to portlet render parameters
+ operation = status;
}
catch(CoreIdentityConfigurationException e)
{
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/impl/IdentityMailServiceImpl.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/impl/IdentityMailServiceImpl.java 2008-04-22
06:44:16 UTC (rev 10691)
+++
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/impl/IdentityMailServiceImpl.java 2008-04-22
15:01:55 UTC (rev 10692)
@@ -70,6 +70,9 @@
/** The core-identity configuration service. */
private IdentityUIConfigurationService identityUIConfigurationService;
+
+ /** The Bundle prefix for an unknown action. */
+ public static final String UNKOWN_ACTION_PREFIX =
"IDENTITY_MAIL_SUBJECT_CUSTOM_";
/** The logger */
private static final Logger log = Logger.getLogger(IdentityMailServiceImpl.class);
@@ -84,7 +87,7 @@
{
super.startService();
- IdentityUIConfiguration cf
=this.identityUIConfigurationService.getConfiguration();
+ IdentityUIConfiguration cf =
this.identityUIConfigurationService.getConfiguration();
// Set mail attributes
this.setEmailDomain(cf.getEmailDomain());
this.setEmailFrom(cf.getEmailFrom());
@@ -193,9 +196,14 @@
}
else
{
- subject = bundle.getString(templateLocation);
+ // In the case it's an unknown action we try to load a custom subject from
the Bundle
+ // where the templateLocation is the path to the folder containing the email
templates
+ // IDENTITY_MAIL_SUBJECT_CUSTOM_templateLocation
+ subject = bundle.getString(UNKOWN_ACTION_PREFIX + templateLocation);
+
+ // No null subject allowed
if(subject == null)
- throw new IllegalArgumentException("unknown template.");
+ throw new IllegalArgumentException("No custom mail subject found
(Unknown Template). ");
}
// Generating message
@@ -209,6 +217,13 @@
public void send(String emailFrom, String emailTo, String subject, String emailText)
{
+ if(emailFrom == null)
+ throw new IllegalArgumentException("email-from may not be null.");
+ if(emailTo == null)
+ throw new IllegalArgumentException("email-to may not be null.");
+ if(subject == null)
+ throw new IllegalArgumentException("email-subject may not be null.");
+
this.getMailModule().send(emailFrom, emailTo, subject, emailText);
}
@@ -232,6 +247,7 @@
InputStream in = config.openStream();
Template tpl = new Template("emailTemplate", new InputStreamReader(in),
new Configuration());
StringWriter out = new StringWriter();
+ // Process
tpl.process(mailData, out);
IOTools.safeClose(out);
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/impl/IdentityUserManagementServiceImpl.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/impl/IdentityUserManagementServiceImpl.java 2008-04-22
06:44:16 UTC (rev 10691)
+++
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/impl/IdentityUserManagementServiceImpl.java 2008-04-22
15:01:55 UTC (rev 10692)
@@ -24,13 +24,13 @@
import java.util.ArrayList;
import java.util.HashSet;
-import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.jboss.portal.core.identity.services.IdentityConstants;
import org.jboss.portal.core.identity.services.IdentityUserManagementService;
+import
org.jboss.portal.core.identity.services.metadata.CoreIdentityConfigurationException;
import org.jboss.portal.core.identity.services.metadata.IdentityUIConfigurationService;
import org.jboss.portal.identity.IdentityContext;
import org.jboss.portal.identity.IdentityException;
@@ -61,12 +61,12 @@
/** The identity membership module */
private MembershipModule membershipModule;
-
+
/** The identity service controller */
private IdentityServiceController identityServiceController;
-
+
/** The core-identity configuration service */
- private IdentityUIConfigurationService identityUIConfigurationService;
+ private IdentityUIConfigurationService identityUIConfigurationService;
/** The JNDI binding */
private JNDI.Binding jndiBinding;
@@ -77,19 +77,23 @@
public void startService() throws Exception
{
super.startService();
-
+
try
{
// Loading required modules
- userModule = (UserModule)
identityServiceController.getIdentityContext().getObject(IdentityContext.TYPE_USER_MODULE);
- roleModule = (RoleModule)
identityServiceController.getIdentityContext().getObject(IdentityContext.TYPE_ROLE_MODULE);
- userProfileModule = (UserProfileModule)
identityServiceController.getIdentityContext().getObject(IdentityContext.TYPE_USER_PROFILE_MODULE);
- membershipModule = (MembershipModule)
identityServiceController.getIdentityContext().getObject(IdentityContext.TYPE_MEMBERSHIP_MODULE);
+ userModule = (UserModule)
identityServiceController.getIdentityContext().getObject(
+ IdentityContext.TYPE_USER_MODULE);
+ roleModule = (RoleModule)
identityServiceController.getIdentityContext().getObject(
+ IdentityContext.TYPE_ROLE_MODULE);
+ userProfileModule = (UserProfileModule)
identityServiceController.getIdentityContext().getObject(
+ IdentityContext.TYPE_USER_PROFILE_MODULE);
+ membershipModule = (MembershipModule)
identityServiceController.getIdentityContext().getObject(
+ IdentityContext.TYPE_MEMBERSHIP_MODULE);
}
- catch(IdentityException e)
+ catch (IdentityException e)
{
super.stopService();
- throw new RuntimeException(e);
+ throw new CoreIdentityConfigurationException(e);
}
if (this.jndiName != null)
@@ -180,87 +184,74 @@
this.identityUIConfigurationService = identityUIConfigurationService;
}
- public boolean createUser(String username, String password, Map profileMap, List
roles)
+ public void createUser(String username, String password, Map<String, Object>
profileMap, List<String> roles) throws IdentityException
{
- try
- {
- User user = this.getUserModule().createUser(username, password);
- Set roleSet = this.checkRoles(roles);
- // Enable the user
- profileMap.put(User.INFO_USER_ENABLED, Boolean.TRUE);
+ if (username == null)
+ throw new IllegalArgumentException("Username may not be null.");
+ if (password == null)
+ throw new IllegalArgumentException("Password may not be null.");
+ if (profileMap == null)
+ throw new IllegalArgumentException("profileMap may not be null.");
- Iterator i = profileMap.keySet().iterator();
- while (i.hasNext())
- {
- String key = (String) i.next();
- Object value = profileMap.get(key);
- this.getUserProfileModule().setProperty(user, key, value);
- }
+
+ User user = this.getUserModule().createUser(username, password);
+ Set<Role> roleSet = this.checkRoles(roles);
- this.getMembershipModule().assignRoles(user, roleSet);
- return true;
- }
- catch (Exception e)
+ // Enable the user
+ profileMap.put(User.INFO_USER_ENABLED, Boolean.TRUE);
+
+ for(String key : profileMap.keySet())
{
- log.error("Error when creating user", e);
+ Object value = profileMap.get(key);
+ this.getUserProfileModule().setProperty(user, key, value);
}
- return false;
+ this.getMembershipModule().assignRoles(user, roleSet);
}
- public String getCurrentEmail(String username)
+ public String getCurrentEmail(String username) throws IdentityException
{
- try
- {
- User user = this.getUserModule().findUserByUserName(username);
- return (String) this.getUserProfileModule().getProperty(user,
User.INFO_USER_EMAIL_REAL);
- }
- catch (Exception e)
- {
- log.error("failed to retrieve current email address", e);
- }
- return null;
+ if(username == null)
+ throw new IllegalArgumentException("username may not be null.");
+
+ User user = this.getUserModule().findUserByUserName(username);
+ return (String) this.getUserProfileModule().getProperty(user,
User.INFO_USER_EMAIL_REAL);
}
- public boolean updateEmail(String username, String email)
+ public void updateEmail(String username, String email) throws IdentityException
{
- try
- {
- User user = this.getUserModule().findUserByUserName(username);
- this.getUserProfileModule().setProperty(user, User.INFO_USER_EMAIL_REAL,
email);
- return true;
- }
- catch (Exception e)
- {
- log.error("failed to update email", e);
- }
- return false;
+ if(username == null)
+ throw new IllegalArgumentException("username may not be null.");
+ if(email == null)
+ throw new IllegalArgumentException("email may not be null.");
+
+ User user = this.getUserModule().findUserByUserName(username);
+ this.getUserProfileModule().setProperty(user, User.INFO_USER_EMAIL_REAL, email);
}
- private Set checkRoles(List roles) throws IllegalArgumentException, IdentityException
+ private Set<Role> checkRoles(List<String> roles) throws
IllegalArgumentException, IdentityException
{
- Set roleSet = new HashSet();
+
+ Set<Role> roleSet = new HashSet<Role>();
// Set default roles if required
- if (roles == null || (roles != null && roles.size() == 0 ))
+ if (roles == null || (roles != null && roles.size() == 0))
{
roles =
this.identityUIConfigurationService.getConfiguration().getDefaultRoles();
}
// If roles are still not available
- if (roles == null || (roles != null && roles.size() == 0 ))
+ if (roles == null || (roles != null && roles.size() == 0))
{
- roles = new ArrayList();
+ roles = new ArrayList<String>();
roles.add(IdentityConstants.DEFAULT_ROLE);
log.error("no default roles spezified - please check your
configuration");
}
-
+
if (roles != null && roles.size() > 0)
{ // Checking existing roles
- Iterator i = roles.iterator();
- while (i.hasNext())
+ for(String roleName : roles)
{
- String roleName = (String) i.next();
Role role = this.getRoleModule().findRoleByName(roleName);
if (role == null)
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/metadata/IdentityUIConfiguration.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/metadata/IdentityUIConfiguration.java 2008-04-22
06:44:16 UTC (rev 10691)
+++
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/metadata/IdentityUIConfiguration.java 2008-04-22
15:01:55 UTC (rev 10692)
@@ -49,13 +49,13 @@
private String emailFrom;
/** List of default roles */
- private List defaultRoles;
+ private List<String> defaultRoles;
/** Characters used for generating a random password */
private String passwordGenerationCharacters;
/** Map of available UI-Components */
- private Map uiComponents;
+ private Map<String, UIComponentConfiguration> uiComponents;
public String getSubscriptionMode()
{
@@ -107,12 +107,12 @@
this.emailFrom = emailFrom;
}
- public List getDefaultRoles()
+ public List<String> getDefaultRoles()
{
return defaultRoles;
}
- public void setDefaultRoles(List defaultRoles)
+ public void setDefaultRoles(List<String> defaultRoles)
{
this.defaultRoles = defaultRoles;
}
@@ -127,12 +127,12 @@
this.passwordGenerationCharacters = passwordGenerationCharacters;
}
- public Map getUiComponents()
+ public Map<String, UIComponentConfiguration> getUiComponents()
{
return uiComponents;
}
- public void setUiComponents(Map uiComponents)
+ public void setUiComponents(Map<String, UIComponentConfiguration> uiComponents)
{
this.uiComponents = uiComponents;
}
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/metadata/IdentityUIConfigurationService.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/metadata/IdentityUIConfigurationService.java 2008-04-22
06:44:16 UTC (rev 10691)
+++
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/metadata/IdentityUIConfigurationService.java 2008-04-22
15:01:55 UTC (rev 10692)
@@ -22,8 +22,6 @@
******************************************************************************/
package org.jboss.portal.core.identity.services.metadata;
-import javax.naming.NamingException;
-
import org.jboss.portal.workflow.service.WorkflowService;
/**
@@ -33,29 +31,40 @@
public interface IdentityUIConfigurationService
{
- /**
- *
- * Core-Identity configuration
- *
+ /**
* @return IdentityUIConfiguration
*/
IdentityUIConfiguration getConfiguration();
/**
- *
- * jBPM Workflow Service
- *
- * @return WorkflowService
- * @throws NamingException
+ * @return the workflow service
+ * @throws CoreIdentityConfigurationException
*/
WorkflowService getWorkflowService() throws CoreIdentityConfigurationException;
+ /**
+ * @param the workflow service
+ */
void setWorkflowService(WorkflowService workflowService);
+ /**
+ * @return true if the configuration is valid
+ * @throws CoreIdentityConfigurationException
+ */
boolean isValidConfiguration() throws CoreIdentityConfigurationException;
+ /**
+ * start the workflow service
+ *
+ * @throws Exception
+ */
void startWorkflow() throws Exception;
+ /**
+ * stop the workflow service
+ *
+ * @throws Exception
+ */
void stopWorkflow() throws Exception;
}
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/metadata/IdentityUIConfigurationServiceImpl.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/metadata/IdentityUIConfigurationServiceImpl.java 2008-04-22
06:44:16 UTC (rev 10691)
+++
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/metadata/IdentityUIConfigurationServiceImpl.java 2008-04-22
15:01:55 UTC (rev 10692)
@@ -245,7 +245,7 @@
}
catch(Exception e)
{
- throw new CoreIdentityConfigurationException("I don't like your
subscription mode [" + processName + "] ! Please make sure that the file and the
process name match - also check the syntax.", e);
+ throw new CoreIdentityConfigurationException("Invalid subscription mode
[" + processName + "] ! Please make sure that the file and the process name
match - also check the syntax.", e);
}
finally
{
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/metadata/UIComponentConfiguration.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/metadata/UIComponentConfiguration.java 2008-04-22
06:44:16 UTC (rev 10691)
+++
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/metadata/UIComponentConfiguration.java 2008-04-22
15:01:55 UTC (rev 10692)
@@ -44,7 +44,7 @@
private String name;
/** List of validators */
- private List validators;
+ private List<String> validators;
/** The converter */
private String converter;
@@ -56,7 +56,7 @@
private boolean readOnly;
/** Property values */
- private Map values;
+ private Map<String, String> values;
/** Reference for predefined values */
private String predefinedMapValues;
@@ -91,12 +91,12 @@
return (String) validators.get(0);
}
- public List getValidators()
+ public List<String> getValidators()
{
return validators;
}
- public void setValidators(List validators)
+ public void setValidators(List<String> validators)
{
this.validators = validators;
}
@@ -133,12 +133,12 @@
this.converter = converter;
}
- public Map getValues()
+ public Map<String, String> getValues()
{
return values;
}
- public void setValues(Map values)
+ public void setValues(Map<String, String> values)
{
this.values = values;
}
@@ -168,4 +168,14 @@
// Returns the Class of the Property
return
Thread.currentThread().getContextClassLoader().loadClass(this.propertyInfo.getType());
}
+
+ public String toString()
+ {
+ StringBuilder builder = new StringBuilder();
+ builder.append(getClass().getSimpleName());
+
builder.append('(a)').append(Integer.toHexString(System.identityHashCode(this)));
+ builder.append("{ name = ").append(name).append(',');
+ builder.append(" reference = ").append(propertyRef).append('}');
+ return builder.toString();
+ }
}
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/workflow/RegistrationService.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/workflow/RegistrationService.java 2008-04-22
06:44:16 UTC (rev 10691)
+++
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/workflow/RegistrationService.java 2008-04-22
15:01:55 UTC (rev 10692)
@@ -38,16 +38,17 @@
/**
* Start the registration process for a new user
*
- * @param portalURL
- * @param username
- * @param password
- * @param profileMap
- * @param roles
- * @param locale
- * @param adminFlag
- * @return
+ * @param portalURL the portal url, used for sending the validation email
+ * @param username the user name
+ * @param password the users password
+ * @param profileMap the users profile map
+ * @param roles the users roles
+ * @param locale the users locale
+ * @param adminFlag if this service uses the admin approval workflow
+ * @throws CoreIdentityConfigurationException
+ * @return a status string
*/
- String registerUser(String portalURL, String username, String password, Map
profileMap, List roles, Locale locale, boolean adminFlag) throws
CoreIdentityConfigurationException;
+ String registerUser(String url, String username, String password, Map<String,
Object> profileMap, List<String> roles, Locale locale, boolean adminFlag) throws
CoreIdentityConfigurationException;
/**
* Approve or reject a registration
@@ -64,7 +65,7 @@
* @param nodeName
* @return
*/
- List getPendingUsers(String nodeName) throws CoreIdentityConfigurationException;
+ List<UserContainer> getPendingUsers(String nodeName) throws
CoreIdentityConfigurationException;
/**
* Check for a existing username in the jBPM context
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/workflow/UserContainer.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/workflow/UserContainer.java 2008-04-22
06:44:16 UTC (rev 10691)
+++
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/workflow/UserContainer.java 2008-04-22
15:01:55 UTC (rev 10692)
@@ -47,10 +47,10 @@
private String password;
/** The profile Map */
- private Map profileMap;
+ private Map<String, Object> profileMap;
/** The assigned roles */
- private List roles;
+ private List<String> roles;
/** Is selected */
private boolean selected = false;
@@ -63,7 +63,7 @@
this.username = user.getUserName();
}
- public UserContainer(String username, String password, Map profileMap, List roles)
+ public UserContainer(String username, String password, Map<String, Object>
profileMap, List<String> roles)
{
this.username = username;
this.password = password;
@@ -101,22 +101,22 @@
this.processId = processId;
}
- public Map getProfileMap()
+ public Map<String, Object> getProfileMap()
{
return profileMap;
}
- public void setProfileMap(Map profileMap)
+ public void setProfileMap(Map<String, Object> profileMap)
{
this.profileMap = profileMap;
}
- public List getRoles()
+ public List<String> getRoles()
{
return roles;
}
- public void setRoles(List roles)
+ public void setRoles(List<String> roles)
{
this.roles = roles;
}
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/workflow/impl/CreateUserAction.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/workflow/impl/CreateUserAction.java 2008-04-22
06:44:16 UTC (rev 10691)
+++
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/workflow/impl/CreateUserAction.java 2008-04-22
15:01:55 UTC (rev 10692)
@@ -35,6 +35,7 @@
* @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
* @version $Revision$
*/
+@SuppressWarnings("serial")
public class CreateUserAction implements ActionHandler
{
@@ -42,21 +43,15 @@
private IdentityUserManagementService identityManagementService;
/** The logger */
- private static Logger log = Logger.getLogger(CreateUserAction.class);
+ private final static Logger log = Logger.getLogger(CreateUserAction.class);
public void execute(ExecutionContext ectx) throws Exception
{
- try
- {
- // Getting user information
- UserContainer uc = (UserContainer)
ectx.getContextInstance().getVariable(IdentityConstants.VARIABLE_USER);
- // Creating user
- this.getIdentityManagementService().createUser(uc.getUsername(),
uc.getPassword(), uc.getProfileMap(), uc.getRoles());
- }
- catch (ClassCastException e)
- {
- log.error("error while creating user", e);
- }
+ // Getting user information
+ UserContainer uc = (UserContainer)
ectx.getContextInstance().getVariable(IdentityConstants.VARIABLE_USER);
+
+ // Creating user
+ this.getIdentityManagementService().createUser(uc.getUsername(), uc.getPassword(),
uc.getProfileMap(), uc.getRoles());
}
private IdentityUserManagementService getIdentityManagementService()
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/workflow/impl/RegistrationServiceImpl.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/workflow/impl/RegistrationServiceImpl.java 2008-04-22
06:44:16 UTC (rev 10691)
+++
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/workflow/impl/RegistrationServiceImpl.java 2008-04-22
15:01:55 UTC (rev 10692)
@@ -37,6 +37,7 @@
import org.jboss.portal.core.identity.services.metadata.IdentityUIConfigurationService;
import org.jboss.portal.core.identity.services.workflow.RegistrationService;
import org.jboss.portal.core.identity.services.workflow.UserContainer;
+import org.jboss.portal.identity.IdentityException;
import org.jboss.portal.identity.User;
import org.jboss.portal.jems.as.JNDI;
import org.jboss.portal.jems.as.system.AbstractJBossService;
@@ -150,7 +151,7 @@
this.identityUserManagementService = identityManagementService;
}
- public String registerUser(String url, String username, String password, Map
profileMap, List roles, Locale locale, boolean adminFlag)
+ public String registerUser(String url, String username, String password,
Map<String, Object> profileMap, List<String> roles, Locale locale, boolean
adminFlag)
throws CoreIdentityConfigurationException
{
@@ -160,8 +161,15 @@
||
IdentityConstants.SUBSCRIPTION_MODE_AUTOMATIC.equals(adminSubscriptionMode))
{
// Admin - automatic subscription
- this.getIdentityUserManagementService().createUser(username, password,
profileMap, roles);
- return IdentityConstants.REGISTRATION_REGISTERED;
+ try
+ {
+ this.getIdentityUserManagementService().createUser(username, password,
profileMap, roles);
+ return IdentityConstants.REGISTRATION_REGISTERED;
+ }
+ catch(IdentityException e)
+ {
+ throw new CoreIdentityConfigurationException("registration
failed", e);
+ }
}
else
{
@@ -176,8 +184,15 @@
if (subscriptionMode == null ||
IdentityConstants.SUBSCRIPTION_MODE_AUTOMATIC.equals(subscriptionMode))
{
// User - automatic subscription
- this.getIdentityUserManagementService().createUser(username, password,
profileMap, roles);
- return IdentityConstants.REGISTRATION_REGISTERED;
+ try
+ {
+ this.getIdentityUserManagementService().createUser(username, password,
profileMap, roles);
+ return IdentityConstants.REGISTRATION_REGISTERED;
+ }
+ catch(IdentityException e)
+ {
+ throw new CoreIdentityConfigurationException("registration
failed", e);
+ }
}
else
{
@@ -303,9 +318,9 @@
return count;
}
- public List getPendingUsers(String nodeName) throws
CoreIdentityConfigurationException
+ public List<UserContainer> getPendingUsers(String nodeName) throws
CoreIdentityConfigurationException
{
- List queue = new ArrayList();
+ List<UserContainer> queue = new ArrayList<UserContainer>();
JbpmContext jbpmContext = null;
try
{
@@ -332,9 +347,9 @@
return queue;
}
- private List getPendingUser(List processInstances, String nodeName)
+ private List<UserContainer> getPendingUser(List processInstances, String
nodeName)
{
- List queue = new ArrayList();
+ List<UserContainer> queue = new ArrayList<UserContainer>();
if (processInstances != null)
{
Iterator i = processInstances.iterator();
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/workflow/impl/SendValidationMailAction.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/workflow/impl/SendValidationMailAction.java 2008-04-22
06:44:16 UTC (rev 10691)
+++
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/workflow/impl/SendValidationMailAction.java 2008-04-22
15:01:55 UTC (rev 10692)
@@ -33,7 +33,6 @@
import org.jboss.portal.common.util.Tools;
import org.jboss.portal.core.identity.services.IdentityConstants;
import org.jboss.portal.core.identity.services.IdentityMailService;
-import org.jboss.portal.core.identity.services.IdentityUserManagementService;
import org.jboss.portal.core.identity.services.workflow.UserContainer;
import org.jbpm.graph.def.ActionHandler;
import org.jbpm.graph.exe.ExecutionContext;
@@ -42,21 +41,20 @@
* @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
* @version $Revision$
*/
+@SuppressWarnings("serial")
public class SendValidationMailAction implements ActionHandler
{
- /** . */
- private IdentityUserManagementService identityManagementService;
- /** . */
+ /** The identity mail service. */
private IdentityMailService identityMailService;
- /** . */
+ /** The logger. */
private static Logger log = Logger.getLogger(SendValidationMailAction.class);
public void execute(ExecutionContext ectx) throws Exception
{
HashMap emailMap = new HashMap();
- String hash = this.hashGen();
+ String hash = generateRandomHash();
String action = (String)
ectx.getContextInstance().getVariable(IdentityConstants.ACTION);
String email = (String)
ectx.getContextInstance().getVariable(IdentityConstants.VARIABLE_EMAIL);
@@ -67,45 +65,38 @@
locale = new Locale(IdentityConstants.DEFAULT_LOCALE);
}
- try
- {
- UserContainer uc = (UserContainer)
ectx.getContextInstance().getVariable(IdentityConstants.VARIABLE_USER);
+ UserContainer uc = (UserContainer)
ectx.getContextInstance().getVariable(IdentityConstants.VARIABLE_USER);
- // Register new user
- if (IdentityConstants.ACTION_REGISTER_USER.equals(action))
- {
- emailMap.put(IdentityConstants.EMAIL_TO, email);
- emailMap.put("username", uc.getUsername());
- emailMap.put("password", uc.getPassword());
- }
- // Change email request (send an email to the NEW email address)
- else if (IdentityConstants.ACTION_CHANGE_EMAIL.equals(action))
- {
- emailMap.put(IdentityConstants.EMAIL_TO, email);
- }
- else
- {
- throw new RuntimeException("no actuin defined for SendValidationMail:
" + action);
- }
-
- ectx.getContextInstance().setVariable(IdentityConstants.VALIDATION_HASH, hash);
-
- // Generating the validation URL
- String portalURL = (String)
ectx.getContextInstance().getVariable(IdentityConstants.PORTAL_URL);
- String activationLink = portalURL + "/" +
IdentityConstants.VALIDATE_EMAIL + "/"
- + ectx.getProcessInstance().getId() + "/" + hash;
- emailMap.put("activationLink", activationLink);
-
- this.getIdentityMailService().sendMail(action, emailMap, locale);
+ // Register new user
+ if (IdentityConstants.ACTION_REGISTER_USER.equals(action))
+ {
+ emailMap.put(IdentityConstants.EMAIL_TO, email);
+ emailMap.put("username", uc.getUsername());
+ emailMap.put("password", uc.getPassword());
}
- catch (ClassCastException e)
+ // Change email request (send an email to the NEW email address)
+ else if (IdentityConstants.ACTION_CHANGE_EMAIL.equals(action))
{
- log.error("error while sending validation mail", e);
+ emailMap.put(IdentityConstants.EMAIL_TO, email);
}
+ else
+ {
+ throw new RuntimeException("no actuin defined for SendValidationMail:
" + action);
+ }
+
+ ectx.getContextInstance().setVariable(IdentityConstants.VALIDATION_HASH, hash);
+
+ // Generating the validation URL
+ String portalURL = (String)
ectx.getContextInstance().getVariable(IdentityConstants.PORTAL_URL);
+ String activationLink = portalURL + "/" +
IdentityConstants.VALIDATE_EMAIL + "/"
+ + ectx.getProcessInstance().getId() + "/" + hash;
+ emailMap.put("activationLink", activationLink);
+
+ this.getIdentityMailService().sendMail(action, emailMap, locale);
}
// generating a random hash
- private String hashGen()
+ private static String generateRandomHash()
{
try
{
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/workflow/impl/UpdateEmailAction.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/workflow/impl/UpdateEmailAction.java 2008-04-22
06:44:16 UTC (rev 10691)
+++
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/workflow/impl/UpdateEmailAction.java 2008-04-22
15:01:55 UTC (rev 10692)
@@ -35,13 +35,14 @@
* @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
* @version $Revision$
*/
+@SuppressWarnings("serial")
public class UpdateEmailAction implements ActionHandler
{
- /** . */
+ /** The identity management service. */
private IdentityUserManagementService identityManagementService;
- /** . */
+ /** The logger. */
private static Logger log = Logger.getLogger(CreateUserAction.class);
public void execute(ExecutionContext ectx) throws Exception
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/workflow/impl/ValidateEmailServiceImpl.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/workflow/impl/ValidateEmailServiceImpl.java 2008-04-22
06:44:16 UTC (rev 10691)
+++
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/services/workflow/impl/ValidateEmailServiceImpl.java 2008-04-22
15:01:55 UTC (rev 10692)
@@ -32,6 +32,7 @@
import org.jboss.portal.core.identity.services.metadata.IdentityUIConfigurationService;
import org.jboss.portal.core.identity.services.workflow.UserContainer;
import org.jboss.portal.core.identity.services.workflow.ValidateEmailService;
+import org.jboss.portal.identity.IdentityException;
import org.jboss.portal.identity.User;
import org.jboss.portal.jems.as.JNDI;
import org.jboss.portal.jems.as.system.AbstractJBossService;
@@ -47,7 +48,6 @@
public class ValidateEmailServiceImpl extends AbstractJBossService implements
ValidateEmailService
{
-
/** The e-mail validation process name */
private String processName =
IdentityConstants.jbp_identity_validate_email_process_name;
@@ -139,8 +139,15 @@
{
if (! this.identityUIConfigurationService.getConfiguration().enableWorkflow())
{
- this.getIdentityUserManagementService().updateEmail(user.getUserName(), email);
- return IdentityConstants.REGISTRATION_REGISTERED;
+ try
+ {
+ this.getIdentityUserManagementService().updateEmail(user.getUserName(),
email);
+ return IdentityConstants.REGISTRATION_REGISTERED;
+ }
+ catch(IdentityException e)
+ {
+ throw new CoreIdentityConfigurationException("udating the email address
failed.", e);
+ }
}
else
{
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/CreateUserAction.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/CreateUserAction.java 2008-04-22
06:44:16 UTC (rev 10691)
+++
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/CreateUserAction.java 2008-04-22
15:01:55 UTC (rev 10692)
@@ -188,24 +188,23 @@
}
catch(CoreIdentityConfigurationException e)
{
+ registrationStatus = IdentityConstants.REGISTRATION_FAILED;
log.error("", e);
- FacesContext.getCurrentInstance().addMessage(null, new
FacesMessage(bundle.getString("IDENTITY_VALIDATION_ERROR_REGISTRATION")));
}
}
- /*
- * Cleaning up
- */
+
+ // cleaning up the user
this.uiUser = new IdentityUIUser();
- if (registrationStatus.equals(IdentityConstants.REGISTRATION_PENDING) &&
!adminSubscription.equals("admin"))
+ if (IdentityConstants.REGISTRATION_PENDING.equals(registrationStatus) &&
!adminSubscription.equals("admin"))
{
FacesContext.getCurrentInstance().addMessage(null, new
FacesMessage(bundle.getString("IDENTITY_REGISTER_PENDING_TITLE")));
}
- else if (registrationStatus.equals(IdentityConstants.REGISTRATION_REGISTERED)
&& !adminSubscription.equals("admin"))
+ else if (IdentityConstants.REGISTRATION_REGISTERED.equals(registrationStatus)
&& !adminSubscription.equals("admin"))
{
FacesContext.getCurrentInstance().addMessage(null, new
FacesMessage(bundle.getString("IDENTITY_REGISTER_SUCCESS_TITLE")));
}
- else if (adminSubscription.equals("admin"))
+ else if (adminSubscription.equals("admin") && !
IdentityConstants.REGISTRATION_FAILED.equals(registrationStatus))
{
FacesContext.getCurrentInstance().addMessage(null, new
FacesMessage(bundle.getString("IDENTITY_MANAGEMENT_CREATE_USER_CREATED")));
}
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/EditProfileAction.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/EditProfileAction.java 2008-04-22
06:44:16 UTC (rev 10691)
+++
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/EditProfileAction.java 2008-04-22
15:01:55 UTC (rev 10692)
@@ -36,21 +36,16 @@
import org.jboss.logging.Logger;
import org.jboss.portal.api.node.PortalNode;
import org.jboss.portal.api.node.PortalNodeURL;
-import org.jboss.portal.common.p3p.P3PConstants;
import org.jboss.portal.common.text.FastURLDecoder;
import org.jboss.portal.core.aspects.server.UserInterceptor;
import org.jboss.portal.core.identity.services.IdentityConstants;
import org.jboss.portal.core.identity.services.workflow.ValidateEmailService;
import org.jboss.portal.core.identity.ui.IdentityUIUser;
import org.jboss.portal.core.identity.ui.common.IdentityUserBean;
-import org.jboss.portal.faces.el.PropertyValue;
import org.jboss.portal.identity.IdentityException;
import org.jboss.portal.identity.User;
import org.jboss.portal.portlet.aspects.portlet.ContextDispatcherInterceptor;
-import org.jboss.portal.portlet.impl.jsr168.api.PortletContextImpl;
-import org.jboss.portal.portlet.impl.jsr168.api.PortletRequestImpl;
import org.jboss.portal.portlet.invocation.ActionInvocation;
-import org.jboss.portal.portlet.invocation.RenderInvocation;
import org.jboss.portal.server.ServerInvocation;
import org.jboss.portal.server.ServerInvocationContext;
import org.jboss.portlet.JBossActionRequest;
@@ -275,7 +270,7 @@
this.identityUserBean.updatePassword(this.currentUser, this.password);
ctx.addMessage("status", new
FacesMessage(bundle.getString("IDENTITY_EDIT_CHANGE_PASSWOR_STATUS")));
}
- catch (Exception e)
+ catch (IdentityException e)
{
log.error("error while updating password", e);
ctx.addMessage("status", new
FacesMessage(bundle.getString("IDENTITY_EDIT_CHANGE_PASSWORD_ERROR")));
@@ -333,6 +328,11 @@
return "status";
}
+ /**
+ * Reset the window state (MAXIMIZED, NORMAL), which is for editing profile
+ *
+ * @param ctx the faces context
+ */
private void resetWindowState(FacesContext ctx)
{
if ( windowState != null)
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/LostPasswordAction.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/LostPasswordAction.java 2008-04-22
06:44:16 UTC (rev 10691)
+++
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/LostPasswordAction.java 2008-04-22
15:01:55 UTC (rev 10692)
@@ -48,25 +48,25 @@
*/
public class LostPasswordAction
{
- /** . */
+ /** The user name. */
private String username;
- /** . */
+ /** The users email address. */
private String email;
- /** . */
+ /** Characters used for generating the password. */
private String passwordCharacters;
- /** . */
+ /** The identity user bean. */
private IdentityUserBean identityUserBean;
- /** . */
+ /** The identity mail service. */
private IdentityMailService identityMailService;
- /** . */
+ /** The logger. */
private static final Logger log = Logger.getLogger(LostPasswordAction.class);
- /** . */
+ /** The decoder. */
private static final FastURLDecoder decoder = FastURLDecoder.getUTF8Instance();
public String getUsername()
@@ -160,7 +160,7 @@
IdentityUIUser uiUser = new IdentityUIUser(user.getUserName());
- Map mailMap = new HashMap();
+ Map<String, String> mailMap = new HashMap<String, String>();
mailMap.put(IdentityConstants.EMAIL_TO, (String)
uiUser.getAttribute().getValue("email").getObject());
mailMap.put("username", user.getUserName());
mailMap.put("password", newPassword);
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/admin/RoleManagementBean.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/admin/RoleManagementBean.java 2008-04-22
06:44:16 UTC (rev 10691)
+++
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/admin/RoleManagementBean.java 2008-04-22
15:01:55 UTC (rev 10692)
@@ -24,7 +24,6 @@
import java.util.ArrayList;
import java.util.HashSet;
-import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.ResourceBundle;
@@ -50,31 +49,31 @@
*/
public class RoleManagementBean
{
- /** . */
+ /** The current role. */
private String currentRole;
- /** . */
+ /** The uiRole */
private UIRole uiRole;
- /** . */
+ /** The initial page. */
private int page = 1;
- /** . */
+ /** The initial result limit. */
private String limit = "10";
- /** . */
+ /** The filtered user name. */
private String userNameFilter = new String();
- /** . */
+ /** The related role list. */
private ListDataModel roleList;
- /** . */
+ /** The identity role bean. */
private IdentityRoleBean identityRoleBean;
- /** The logger */
+ /** The logger. */
private static final Logger log = Logger.getLogger(RoleManagementBean.class);
- /** The decoder */
+ /** The decoder. */
private static final FastURLDecoder decoder = FastURLDecoder.getUTF8Instance();
public IdentityRoleBean getIdentityRoleBean()
@@ -129,21 +128,21 @@
public ListDataModel getRoleList()
{
- List list = new ArrayList();
- Set set = new HashSet();
+ List<UIRole> list = new ArrayList<UIRole>();
+ Set<Role> set = new HashSet<Role>();
try
{
set = identityRoleBean.getRoleModule().findRoles();
}
catch (IdentityException e)
{
- log.error("", e);
+ log.error("Error while performing roleModule.findRoles.", e);
}
- Iterator i = set.iterator();
- while (i.hasNext())
+
+ for(Role role : set)
{
- UIRole role = new UIRole((Role) i.next());
- list.add(role);
+ UIRole uiRole = new UIRole(role);
+ list.add(uiRole);
}
this.roleList = new ListDataModel(list);
return this.roleList;
@@ -172,9 +171,13 @@
public ListDataModel getRoleMembers()
{
- Set members = new HashSet();
- List roleMembers = new ArrayList();
+ Set<User> members = new HashSet<User>();
+ List<IdentityUIUser> roleMembers = new ArrayList<IdentityUIUser>();
FacesContext ctx = FacesContext.getCurrentInstance();
+
+ if(this.currentRole == null || this.currentRole.length() < 1)
+ return new ListDataModel(roleMembers);
+
try
{
int intLimit = Integer.valueOf(limit).intValue();
@@ -188,20 +191,14 @@
ResourceBundle bundle =
ResourceBundle.getBundle("conf.bundles.Identity",
ctx.getViewRoot().getLocale());
ctx.addMessage("status", new
FacesMessage(bundle.getString("IDENTITY_MANAGEMENT_ERROR_ACTION_ROLE")));
}
- Iterator i = members.iterator();
- while (i.hasNext())
+
+ if(members != null)
{
- User user = (User) i.next();
- try
+ for(User user : members)
{
- roleMembers.add(new IdentityUIUser(user.getUserName()));
+ IdentityUIUser uiUser = new IdentityUIUser(user.getUserName());
+ roleMembers.add(uiUser);
}
- catch (Exception e)
- {
- log.error("", e);
- ResourceBundle bundle =
ResourceBundle.getBundle("conf.bundles.Identity",
ctx.getViewRoot().getLocale());
- ctx.addMessage("status", new
FacesMessage(bundle.getString("IDENTITY_MANAGEMENT_ERROR_ACTION_USER")));
- }
}
return new ListDataModel(roleMembers);
}
@@ -216,8 +213,8 @@
{
try
{
- this.uiRole = identityRoleBean.getUIRole(this.currentRole);
- return "deleteRole";
+ this.uiRole = identityRoleBean.getUIRole(this.currentRole);
+ return "deleteRole";
}
catch (Exception e)
{
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/admin/UserAdministrationBean.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/admin/UserAdministrationBean.java 2008-04-22
06:44:16 UTC (rev 10691)
+++
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/admin/UserAdministrationBean.java 2008-04-22
15:01:55 UTC (rev 10692)
@@ -24,7 +24,6 @@
import java.util.ArrayList;
import java.util.HashMap;
-import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.ResourceBundle;
@@ -53,61 +52,61 @@
public class UserAdministrationBean
{
- /** . */
+ /** The current user. */
private String currentUser;
- /** . */
+ /** A list of users. */
private ListDataModel userList;
- /** . */
+ /** The page. */
private int page = 1;
- /** . */
+ /** The result limit. */
private String limit = "10";
- /** . */
+ /** The user count. */
private int userCount = 0;
- /** . */
- private List roles = new ArrayList();
+ /** The roles */
+ private List<String> roles = new ArrayList<String>();
- /** . */
+ /** The node which should be displayed. */
private String displayNode = IdentityConstants.JBPM_NODE_APPROVAL;
- /** . */
+ /** The subscription mode. */
private String subscriptionMode;
- /** . */
+ /** The admin subscription mode. */
private String adminSubscriptionMode;
- /** . */
- private List pendingUsers = null;
+ /** The pending users. */
+ private List<UserContainer> pendingUsers = null;
- /** . */
- private List pendingActionList = null;
+ /** The pending list selected for approval or reject. */
+ private List<UserContainer> pendingActionList = null;
- /** . */
+ /** The pending user action. */
private String pendingUserAction = null;
- /** . */
+ /** The uiUser. */
private IdentityUIUser uiUser;
- /** . */
+ /** The search string */
private String searchString = "";
- /** . */
+ /** The identity user bean. */
private IdentityUserBean identityUserBean;
- /** . */
+ /** The idenetity role bean. */
private IdentityRoleBean identityRoleBean;
- /** . */
+ /** The registration service. */
private RegistrationService registrationService;
- /** . */
+ /** The logger. */
private static final Logger log = Logger.getLogger(UserAdministrationBean.class);
- /** The decoder */
+ /** The decoder. */
private static final FastURLDecoder decoder = FastURLDecoder.getUTF8Instance();
public UserAdministrationBean()
@@ -154,12 +153,12 @@
this.limit = limit;
}
- public List getRoles()
+ public List<String> getRoles()
{
return roles;
}
- public void setRoles(List roles)
+ public void setRoles(List<String> roles)
{
this.roles = roles;
}
@@ -204,7 +203,7 @@
return pendingUserAction;
}
- public List getPendingActionList()
+ public List<UserContainer> getPendingActionList()
{
return pendingActionList;
}
@@ -263,10 +262,9 @@
String action = (String) params.get("enableAction");
this.currentUser = params.get("currentUser") != null ?
decoder.encode((String) params.get("currentUser")) : null;
- // TODO - do something better than .equals("admin")
- if (this.currentUser != null && action != null && !
this.currentUser.equals("admin"))
+ if (this.currentUser != null && action != null)
{
- HashMap profileMap = new HashMap();
+ Map<String, Object> profileMap = new HashMap<String, Object>();
User user;
try
@@ -293,6 +291,7 @@
}
// Updating search
ctx.addMessage("status", new FacesMessage("user enabled"));
+ // Update userList
return this.searchUsers();
}
return "searchUsers";
@@ -329,7 +328,7 @@
return userCount;
}
- public List getPendingUsers()
+ public List<UserContainer> getPendingUsers()
{
try
{
@@ -349,6 +348,7 @@
ExternalContext ectx = ctx.getExternalContext();
Map params = ectx.getRequestParameterMap();
this.currentUser = params.get("currentUser") != null ?
decoder.encode((String) params.get("currentUser")) : null;
+
if (this.currentUser != null)
{
this.uiUser = new IdentityUIUser(this.currentUser);
@@ -365,6 +365,7 @@
User user = identityUserBean.findUserByUserName(this.uiUser.getUsername());
identityUserBean.getUserModule().removeUser(user.getId());
FacesContext.getCurrentInstance().addMessage("status", new
FacesMessage(bundle.getString("IDENTITY_MANAGEMENT_USER_DELETED")));
+ // Update the userList
this.searchUsers();
return "userAdmin";
}
@@ -426,10 +427,9 @@
public String approveList()
{
this.pendingUserAction = "approve";
- this.pendingActionList = new ArrayList();
- for(Iterator i = pendingUsers.iterator(); i.hasNext(); )
+ this.pendingActionList = new ArrayList<UserContainer>();
+ for(UserContainer user : pendingUsers)
{
- UserContainer user = (UserContainer) i.next();
if ( user.isSelected() )
{
this.pendingActionList.add(user);
@@ -445,10 +445,9 @@
public String rejectList()
{
this.pendingUserAction = "reject";
- this.pendingActionList = new ArrayList();
- for(Iterator i = pendingUsers.iterator(); i.hasNext(); )
+ this.pendingActionList = new ArrayList<UserContainer>();
+ for(UserContainer user : pendingUsers)
{
- UserContainer user = (UserContainer) i.next();
if ( user.isSelected() )
{
this.pendingActionList.add(user);
@@ -465,9 +464,8 @@
{
try
{
- for(Iterator i = pendingActionList.iterator(); i.hasNext(); )
+ for(UserContainer user : pendingActionList)
{
- UserContainer user = (UserContainer) i.next();
if (this.pendingUserAction.equals("approve"))
{
this.registrationService.approve(user.getProcessId(), true);
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/common/ConfigurationBean.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/common/ConfigurationBean.java 2008-04-22
06:44:16 UTC (rev 10691)
+++
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/common/ConfigurationBean.java 2008-04-22
15:01:55 UTC (rev 10692)
@@ -61,14 +61,16 @@
public boolean isValidConfiguration()
{
+ if(this.identityUIConfigurationService == null)
+ {
+ log.error("IdentityUIConfigurationService not found.");
+ return false;
+ }
+
try
{
this.identityUIConfigurationService.isValidConfiguration();
}
- catch(NullPointerException e)
- {
- return false;
- }
catch(CoreIdentityConfigurationException e)
{
log.error("", e);
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/common/IdentityRoleBean.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/common/IdentityRoleBean.java 2008-04-22
06:44:16 UTC (rev 10691)
+++
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/common/IdentityRoleBean.java 2008-04-22
15:01:55 UTC (rev 10692)
@@ -24,7 +24,6 @@
import java.util.ArrayList;
import java.util.HashSet;
-import java.util.Iterator;
import java.util.List;
import java.util.Set;
@@ -70,22 +69,20 @@
this.membershipModule = membershipModule;
}
- public void assignRoles(User user, List roles) throws IllegalArgumentException,
IdentityException
+ public void assignRoles(User user, List<String> roles) throws
IllegalArgumentException, IdentityException
{
- Set roleSet = this.checkRoles(roles);
+ Set<Role> roleSet = this.checkRoles(roles);
this.membershipModule.assignRoles(user, roleSet);
}
- private Set checkRoles(List roles) throws IllegalArgumentException, IdentityException
+ private Set<Role> checkRoles(List<String> roles) throws
IllegalArgumentException, IdentityException
{
- Set roleSet = new HashSet();
+ Set<Role> roleSet = new HashSet<Role>();
if (roles != null && roles.size() > 0)
{ // Checking existing roles
- Iterator i = roles.iterator();
- while (i.hasNext())
+ for(String roleName : roles)
{
- String roleName = (String) i.next();
Role role = roleModule.findRoleByName(roleName);
if (role == null)
@@ -108,10 +105,10 @@
cRole.setDisplayName(roleDisplayName);
}
- public void updateRoles(User user, List roles) throws IllegalArgumentException,
NoSuchUserException,
+ public void updateRoles(User user, List<String> roles) throws
IllegalArgumentException, NoSuchUserException,
IdentityException
{
- Set roleSet = this.checkRoles(roles);
+ Set<Role> roleSet = this.checkRoles(roles);
this.membershipModule.assignRoles(user, roleSet);
}
@@ -124,10 +121,10 @@
return uiRole;
}
- public List getRoleSelectItems()
+ public List<SelectItem> getRoleSelectItems()
{
- List list = new ArrayList();
- Set set = new HashSet();
+ List<SelectItem> list = new ArrayList<SelectItem>();
+ Set<Role> set = new HashSet<Role>();
try
{
set = roleModule.findRoles();
@@ -137,23 +134,22 @@
// FIXME
e.printStackTrace();
}
- Iterator i = set.iterator();
- while (i.hasNext())
+
+ for(Role role : set)
{
- Role role = (Role) i.next();
list.add(new SelectItem(role.getName(), role.getDisplayName()));
}
return list;
}
- public List getUserRoles(User user) throws IllegalArgumentException,
NoSuchUserException, IdentityException
+ public List<String> getUserRoles(User user) throws IllegalArgumentException,
NoSuchUserException, IdentityException
{
- List list = new ArrayList();
- Set roleSet = this.membershipModule.getRoles(user);
- Iterator i = roleSet.iterator();
- while (i.hasNext())
+ List<String> list = new ArrayList<String>();
+ Set<Role> roleSet = this.membershipModule.getRoles(user);
+
+ for(Role role : roleSet)
{
- list.add(((Role) i.next()).getName());
+ list.add(role.getName());
}
return list;
}
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/common/IdentityUserBean.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/common/IdentityUserBean.java 2008-04-22
06:44:16 UTC (rev 10691)
+++
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/common/IdentityUserBean.java 2008-04-22
15:01:55 UTC (rev 10692)
@@ -25,7 +25,6 @@
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
-import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.ResourceBundle;
@@ -92,20 +91,18 @@
this.metaDataService = metaDataService;
}
- /*
- * converts the dynamic attribute Map to a map concerning the identity service -
UserProfileModule
+ /**
+ * converts the dynamic attribute Map to a map for the identity service -
UserProfileModule
*/
- public Map getProfileMap(Map attributeMap)
+ public Map<String, Object> getProfileMap(Map<String, Object>
attributeMap)
{
- Map profileMap = new HashMap();
- Set attributeSet = attributeMap.keySet();
- Iterator i = attributeSet.iterator();
+ Map<String, Object> profileMap = new HashMap<String, Object>();
- while(i.hasNext())
+ for(String key : attributeMap.keySet())
{
- String key = (String) i.next();
Object value = attributeMap.get(key);
UIComponentConfiguration uiComponent = (UIComponentConfiguration)
this.metaDataService.getValue(key).getObject();
+
if ( uiComponent != null)
{
profileMap.put(uiComponent.getPropertyRef(), value);
@@ -114,14 +111,12 @@
return profileMap;
}
- public void updateProfile(User user, Map attributeMap)
+ public void updateProfile(User user, Map<String, Object> attributeMap)
{
- Map profileMap = this.getProfileMap(attributeMap);
- Iterator i = profileMap.keySet().iterator();
+ Map<String, Object> profileMap = this.getProfileMap(attributeMap);
- while(i.hasNext())
+ for(String key : profileMap.keySet())
{
- String key = (String) i.next();
Object value = profileMap.get(key);
try
{
@@ -140,20 +135,18 @@
return userModule.findUserByUserName(username);
}
- public List findUsersFilteredByUserName(String filter, int offset, int limit)
+ public List<IdentityUIUser> findUsersFilteredByUserName(String filter, int
offset, int limit)
throws IllegalArgumentException, IdentityException
{
- Set users = new HashSet();
- List list = new ArrayList();
+ Set<User> users = new HashSet<User>();
+ List<IdentityUIUser> list = new ArrayList<IdentityUIUser>();
users = userModule.findUsersFilteredByUserName(filter, offset, limit);
- Iterator i = users.iterator();
-
- while (i.hasNext())
+ for(User user : users)
{
- User u = (User) i.next();
- list.add(new IdentityUIUser(u.getUserName()));
+ IdentityUIUser uiUser =new IdentityUIUser(user.getUserName());
+ list.add(uiUser);
}
return list;
}
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/common/MetaDataServiceBean.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/common/MetaDataServiceBean.java 2008-04-22
06:44:16 UTC (rev 10691)
+++
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/common/MetaDataServiceBean.java 2008-04-22
15:01:55 UTC (rev 10692)
@@ -41,7 +41,7 @@
public class MetaDataServiceBean implements DynamicBean
{
/** The map */
- Map map = null;
+ Map<String, UIComponentConfiguration> map = null;
public MetaDataServiceBean()
{
@@ -58,7 +58,7 @@
public PropertyValue getValue(Object propertyName) throws IllegalArgumentException
{
- UIComponentConfiguration uiComponent = (UIComponentConfiguration) map.get((String)
propertyName);
+ UIComponentConfiguration uiComponent = map.get((String) propertyName);
return uiComponent != null ? new PropertyValue(uiComponent) : null;
}
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/faces/components/StaticValues.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/faces/components/StaticValues.java 2008-04-22
06:44:16 UTC (rev 10691)
+++
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/faces/components/StaticValues.java 2008-04-22
15:01:55 UTC (rev 10692)
@@ -50,9 +50,9 @@
*
* @return List <SelectItem>
*/
- public static List getTimezone()
+ public static List<SelectItem> getTimezone()
{
- List list = new ArrayList();
+ List<SelectItem> list = new ArrayList<SelectItem>();
for (int i = 0; i < UserPortletConstants.TIME_ZONE_OFFSETS.length; i++)
{
if (UserPortletConstants.TIME_ZONE_OFFSETS[i] != null)
@@ -69,14 +69,14 @@
* @param FacesContext
* @return List <SelectItem>
*/
- public static List getTheme(FacesContext ctx)
+ public static List<SelectItem> getTheme(FacesContext ctx)
{
- List list = new ArrayList();
+ List<SelectItem> list = new ArrayList<SelectItem>();
PortletContext pctx = (PortletContext) ctx.getExternalContext().getContext();
ThemeService themeService = (ThemeService)
pctx.getAttribute("ThemeService");
- for (Iterator i = themeService.getThemes().iterator(); i.hasNext();)
+ for (Iterator<PortalTheme> i = themeService.getThemes().iterator();
i.hasNext();)
{
- PortalTheme theme = (PortalTheme)i.next();
+ PortalTheme theme = i.next();
ThemeInfo info = theme.getThemeInfo();
list.add(new SelectItem(info.getRegistrationId().toString(), info.getAppId() +
"." + info.getName()));
}
@@ -89,28 +89,28 @@
* @param FacesContext
* @return List <SelectItem>
*/
- public static List getLocale(FacesContext ctx)
+ public static List<SelectItem> getLocale(FacesContext ctx)
{
- List list = new ArrayList();
+ List<SelectItem> list = new ArrayList<SelectItem>();
Locale currentLocale = ctx.getViewRoot().getLocale();
- ArrayList locales = new ArrayList(LocaleManager.getLocales());
+ ArrayList<Locale> locales = new
ArrayList<Locale>(LocaleManager.getLocales());
Collections.sort(locales, new LocaleComparator());
- for (Iterator i = locales.iterator(); i.hasNext();)
+ for (Iterator<Locale> i = locales.iterator(); i.hasNext();)
{
- Locale locale = (Locale)i.next();
+ Locale locale = i.next();
list.add(new SelectItem(locale.toString(),
locale.getDisplayName(currentLocale)));
}
return list;
}
- private static class LocaleComparator implements Comparator
+ private static class LocaleComparator implements Comparator<Locale>
{
- public int compare(Object arg0, Object arg1)
+ public int compare(Locale arg0, Locale arg1)
{
- Locale locale1 = (Locale)arg0;
- Locale locale2 = (Locale)arg1;
+ Locale locale1 = arg0;
+ Locale locale2 = arg1;
int compare =
locale1.getDisplayLanguage().compareTo(locale2.getDisplayLanguage());
if (compare == 0)
{
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/CurrentPasswordValidator.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/CurrentPasswordValidator.java 2008-04-22
06:44:16 UTC (rev 10691)
+++
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/CurrentPasswordValidator.java 2008-04-22
15:01:55 UTC (rev 10692)
@@ -41,26 +41,20 @@
public class CurrentPasswordValidator implements Validator
{
- /** . */
+ /** The user module. */
private UserModule userModule;
- /** . */
- private String currentUser;
-
- /** . */
- private User user;
-
public void validate(FacesContext context, UIComponent component, Object value) throws
ValidatorException
{
ResourceBundle bundle = ResourceBundle.getBundle("conf.bundles.Identity",
context.getViewRoot().getLocale());
PortletContext portletContext = (PortletContext)
context.getExternalContext().getContext();
userModule = (UserModule) portletContext.getAttribute("UserModule");
- this.currentUser = context.getExternalContext().getRemoteUser();
+ String currentUser = context.getExternalContext().getRemoteUser();
-
+ User user;
try
{
- user = userModule.findUserByUserName(this.currentUser);
+ user = userModule.findUserByUserName(currentUser);
}
catch (Exception e)
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/EmailValidator.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/EmailValidator.java 2008-04-22
06:44:16 UTC (rev 10691)
+++
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/EmailValidator.java 2008-04-22
15:01:55 UTC (rev 10692)
@@ -36,7 +36,7 @@
*/
public class EmailValidator implements Validator
{
- /** . */
+ /** The email validation string. */
private static final String EMAIL_VALIDATION =
"^[_a-zA-Z0-9-]+(\\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\\.[a-zA-Z0-9-]+)*\\.(([0-9]{1,3})|([a-zA-Z]{2,3})|(aero|coop|info|museum|name))$";
public void validate(FacesContext context, UIComponent component, Object value) throws
ValidatorException
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/PasswordValidator.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/PasswordValidator.java 2008-04-22
06:44:16 UTC (rev 10691)
+++
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/PasswordValidator.java 2008-04-22
15:01:55 UTC (rev 10692)
@@ -49,7 +49,6 @@
{
throw new ValidatorException(new
FacesMessage(bundle.getString("IDENTITY_VALIDATION_ERROR_PASSWORD_DOESNT_MATCH")));
}
-
}
else
{
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/WEB-INF/portlet.xml
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/WEB-INF/portlet.xml 2008-04-22
06:44:16 UTC (rev 10691)
+++
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/WEB-INF/portlet.xml 2008-04-22
15:01:55 UTC (rev 10692)
@@ -38,6 +38,7 @@
<filter-mapping>
<filter-name>JBoss Portlet Filter</filter-name>
<portlet-name>IdentityUserPortlet</portlet-name>
+ <portlet-name>IdentityAdminPortlet</portlet-name>
</filter-mapping>