Merged 5.2.0-CLOUD45 (Cloud ) to 5.2.N (5.2.1)

135265 cturlica: CLD-67: TestSiteMembershipRequests tests failing after cloud update from 5.2-SNAPSHOT to 5.2.0-CLOUD45-SNAPSHOT (plat/share)
      - we shouldn't have default null value for not set properties (partial change for REPO-892)


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@135306 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Cristian Turlica
2017-02-21 11:50:24 +00:00
parent 02928e266a
commit c64c1f5389

View File

@@ -113,7 +113,10 @@ public class Person implements Serializable
setLocation(location); setLocation(location);
setTelephone(telephone); setTelephone(telephone);
setMobile(mobile); setMobile(mobile);
if (email != null)
{
setEmail(email); setEmail(email);
}
setSkypeId(skypeId); setSkypeId(skypeId);
setInstantMessageId(instantMessageId); setInstantMessageId(instantMessageId);
setUserStatus(userStatus); setUserStatus(userStatus);
@@ -125,8 +128,11 @@ public class Person implements Serializable
// system-maintained / derived // system-maintained / derived
setStatusUpdatedAt(statusUpdatedAt); setStatusUpdatedAt(statusUpdatedAt);
setQuota(quota); setQuota(quota);
if (quotaUsed != null)
{
setQuotaUsed(quotaUsed); setQuotaUsed(quotaUsed);
} }
}
public Person(NodeRef nodeRef, Map<QName, Serializable> nodeProps, boolean enabled) public Person(NodeRef nodeRef, Map<QName, Serializable> nodeProps, boolean enabled)
{ {
@@ -489,7 +495,10 @@ public class Person implements Serializable
addToMap(properties, ContentModel.PROP_LOCATION, getLocation()); addToMap(properties, ContentModel.PROP_LOCATION, getLocation());
addToMap(properties, ContentModel.PROP_TELEPHONE, getTelephone()); addToMap(properties, ContentModel.PROP_TELEPHONE, getTelephone());
addToMap(properties, ContentModel.PROP_MOBILE, getMobile()); addToMap(properties, ContentModel.PROP_MOBILE, getMobile());
if (wasSet(ContentModel.PROP_EMAIL))
{
addToMap(properties, ContentModel.PROP_EMAIL, getEmail()); addToMap(properties, ContentModel.PROP_EMAIL, getEmail());
}
if (wasSet(PROP_PERSON_COMPANY)) if (wasSet(PROP_PERSON_COMPANY))
{ {
@@ -568,7 +577,10 @@ public class Person implements Serializable
addToMap(properties, ContentModel.PROP_USER_STATUS_TIME, getStatusUpdatedAt()); addToMap(properties, ContentModel.PROP_USER_STATUS_TIME, getStatusUpdatedAt());
addToMap(properties, ContentModel.PROP_GOOGLEUSERNAME, getGoogleId()); addToMap(properties, ContentModel.PROP_GOOGLEUSERNAME, getGoogleId());
addToMap(properties, ContentModel.PROP_SIZE_QUOTA, getQuota()); addToMap(properties, ContentModel.PROP_SIZE_QUOTA, getQuota());
if (wasSet(ContentModel.PROP_SIZE_CURRENT))
{
addToMap(properties, ContentModel.PROP_SIZE_CURRENT, getQuotaUsed()); addToMap(properties, ContentModel.PROP_SIZE_CURRENT, getQuotaUsed());
}
addToMap(properties, ContentModel.PROP_PERSONDESC, getDescription()); addToMap(properties, ContentModel.PROP_PERSONDESC, getDescription());
addToMap(properties, ContentModel.PROP_ENABLED, isEnabled()); addToMap(properties, ContentModel.PROP_ENABLED, isEnabled());