Search in sources :

Example 6 with QuickShareLinkExpiryAction

use of org.alfresco.service.cmr.quickshare.QuickShareLinkExpiryAction in project alfresco-repository by Alfresco.

the class QuickShareServiceIntegrationTest method getExpiryActionAndAttachSchedule.

private QuickShareLinkExpiryAction getExpiryActionAndAttachSchedule(String sharedId) {
    // Check that the expiry action is persisted
    QuickShareLinkExpiryAction expiryAction = getExpiryAction(sharedId);
    assertNotNull(expiryAction);
    assertNotNull("Expiry action should have been persisted.", expiryAction.getNodeRef());
    assertNull("The schedule hasn't been attached yet.", expiryAction.getSchedule());
    ScheduledPersistedAction scheduledPersistedAction = getSchedule(expiryAction);
    assertNotNull("Scheduled action should have been persisted.", scheduledPersistedAction);
    // Attach the schedule
    expiryAction.setSchedule(scheduledPersistedAction);
    return expiryAction;
}
Also used : ScheduledPersistedAction(org.alfresco.service.cmr.action.scheduled.ScheduledPersistedAction) QuickShareLinkExpiryAction(org.alfresco.service.cmr.quickshare.QuickShareLinkExpiryAction)

Aggregations

QuickShareLinkExpiryAction (org.alfresco.service.cmr.quickshare.QuickShareLinkExpiryAction)6 ScheduledPersistedAction (org.alfresco.service.cmr.action.scheduled.ScheduledPersistedAction)2 NodeRef (org.alfresco.service.cmr.repository.NodeRef)2 Date (java.util.Date)1 ClientAppNotFoundException (org.alfresco.repo.client.config.ClientAppNotFoundException)1 RestoreNodeReport (org.alfresco.repo.node.archive.RestoreNodeReport)1 AccessDeniedException (org.alfresco.repo.security.permissions.AccessDeniedException)1 InvalidSharedIdException (org.alfresco.service.cmr.quickshare.InvalidSharedIdException)1 QuickShareDTO (org.alfresco.service.cmr.quickshare.QuickShareDTO)1 QuickShareDisabledException (org.alfresco.service.cmr.quickshare.QuickShareDisabledException)1 InvalidNodeRefException (org.alfresco.service.cmr.repository.InvalidNodeRefException)1 NoSuchPersonException (org.alfresco.service.cmr.security.NoSuchPersonException)1 Test (org.junit.Test)1