Merged WEBAPP-API (5.2.1) to 5.2.N (5.2.1)

133145 jkaabimofrad: APPSREPO-54: Added support to the quick-share V1 API to allow setting an optional expiry date when creating a shared link.
              - Also, fixed the overloaded shareContent method which was missed during code clean-up.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@133219 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jamal Kaabi-Mofrad
2016-11-28 16:54:07 +00:00
parent 7e67a40024
commit 090b7bbe41
2 changed files with 11 additions and 13 deletions

View File

@@ -763,7 +763,7 @@ public class QuickShareServiceIntegrationTest
QuickShareLinkExpiryAction expiryAction = getExpiryActionAndAttachSchedule(quickShareDTO.getId());
assertEquals(expiryDate, expiryAction.getScheduleStart());
// Unshare
quickShareService.unshareContent(quickShareDTO.getId());
unshare(quickShareDTO.getId(), user1.getUsername());
// Set the expiry date to be next year
expiryDate = DateTime.now().plusYears(1).toDate();
@@ -772,7 +772,7 @@ public class QuickShareServiceIntegrationTest
expiryAction = getExpiryActionAndAttachSchedule(quickShareDTO.getId());
assertEquals(expiryDate, expiryAction.getScheduleStart());
// Unshare
quickShareService.unshareContent(quickShareDTO.getId());
unshare(quickShareDTO.getId(), user1.getUsername());
}
/*
* Set the expiry date period enforcement to Hours
@@ -797,7 +797,7 @@ public class QuickShareServiceIntegrationTest
QuickShareLinkExpiryAction expiryAction = getExpiryActionAndAttachSchedule(quickShareDTO.getId());
assertEquals(expiryDate, expiryAction.getScheduleStart());
// Unshare
quickShareService.unshareContent(quickShareDTO.getId());
unshare(quickShareDTO.getId(), user1.getUsername());
// Set the expiry date to be in the next 2 days, even though we did set the date period to HOURS.
expiryDate = DateTime.now().plusDays(2).toDate();
@@ -806,7 +806,7 @@ public class QuickShareServiceIntegrationTest
expiryAction = getExpiryActionAndAttachSchedule(quickShareDTO.getId());
assertEquals(expiryDate, expiryAction.getScheduleStart());
// Unshare
quickShareService.unshareContent(quickShareDTO.getId());
unshare(quickShareDTO.getId(), user1.getUsername());
}
/*
* Set the expiry date period enforcement to Minutes
@@ -831,7 +831,7 @@ public class QuickShareServiceIntegrationTest
QuickShareLinkExpiryAction expiryAction = getExpiryActionAndAttachSchedule(quickShareDTO.getId());
assertEquals(expiryDate, expiryAction.getScheduleStart());
// Unshare
quickShareService.unshareContent(quickShareDTO.getId());
unshare(quickShareDTO.getId(), user1.getUsername());
// Set the expiry date to be in 60 days
expiryDate = DateTime.now().plusDays(60).toDate();
@@ -840,7 +840,7 @@ public class QuickShareServiceIntegrationTest
expiryAction = getExpiryActionAndAttachSchedule(quickShareDTO.getId());
assertEquals(expiryDate, expiryAction.getScheduleStart());
// Unshare
quickShareService.unshareContent(quickShareDTO.getId());
unshare(quickShareDTO.getId(), user1.getUsername());
}
}
finally