Search in sources :

Example 16 with ScheduledPersistedAction

use of org.alfresco.service.cmr.action.scheduled.ScheduledPersistedAction 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

ScheduledPersistedAction (org.alfresco.service.cmr.action.scheduled.ScheduledPersistedAction)16 BaseSpringTest (org.alfresco.util.BaseSpringTest)9 Test (org.junit.Test)9 Date (java.util.Date)6 UserTransaction (javax.transaction.UserTransaction)4 SleepActionExecuter (org.alfresco.repo.action.ActionServiceImplTest.SleepActionExecuter)2 QuickShareLinkExpiryAction (org.alfresco.service.cmr.quickshare.QuickShareLinkExpiryAction)2 NodeRef (org.alfresco.service.cmr.repository.NodeRef)2 ArrayList (java.util.ArrayList)1 ClientAppNotFoundException (org.alfresco.repo.client.config.ClientAppNotFoundException)1 AccessDeniedException (org.alfresco.repo.security.permissions.AccessDeniedException)1 InvalidSharedIdException (org.alfresco.service.cmr.quickshare.InvalidSharedIdException)1 QuickShareDisabledException (org.alfresco.service.cmr.quickshare.QuickShareDisabledException)1 ChildAssociationRef (org.alfresco.service.cmr.repository.ChildAssociationRef)1 InvalidNodeRefException (org.alfresco.service.cmr.repository.InvalidNodeRefException)1 NoSuchPersonException (org.alfresco.service.cmr.security.NoSuchPersonException)1 After (org.junit.After)1 Before (org.junit.Before)1