Improves the logic around a global provisioned display name.

cusax-fix
Yana Stamcheva 13 years ago
parent bb68946a97
commit c63b98607a

@ -95,6 +95,9 @@ public GlobalDisplayDetailsImpl()
*/ */
public String getGlobalDisplayName() public String getGlobalDisplayName()
{ {
if (!StringUtils.isNullOrEmpty(provisionedDisplayName))
return provisionedDisplayName;
return globalDisplayName; return globalDisplayName;
} }
@ -350,8 +353,7 @@ public void run()
} }
if(!StringUtils.isNullOrEmpty(provisionedDisplayName) if(!StringUtils.isNullOrEmpty(provisionedDisplayName)
|| (globalDisplayName != null || (!StringUtils.isNullOrEmpty(globalDisplayName) && !isUpdate))
&& globalDisplayName.length() > 0 && !isUpdate))
return; return;
if (currentFirstName == null) if (currentFirstName == null)
@ -407,8 +409,7 @@ protected void setGlobalDisplayName()
* it will make the accountName start with the * it will make the accountName start with the
* string "null". * string "null".
*/ */
if ((accountName == null) if (StringUtils.isNullOrEmpty(accountName))
|| (accountName.length() == 0))
accountName = currentLastName; accountName = currentLastName;
else else
accountName += " " + currentLastName; accountName += " " + currentLastName;
@ -422,7 +423,7 @@ protected void setGlobalDisplayName()
globalDisplayName = accountName; globalDisplayName = accountName;
if (accountName != null && accountName.length() > 0) if (!StringUtils.isNullOrEmpty(globalDisplayName))
{ {
fireGlobalDisplayNameEvent(globalDisplayName); fireGlobalDisplayNameEvent(globalDisplayName);
} }

Loading…
Cancel
Save