private Restoration createRestoration(Snapshot snapshot,
                                          DuracloudEndPointConfig destination,
                                          String userEmail)
        throws SnapshotException {
        Restoration restoration = new Restoration();
        restoration.setDestination(destination);
        restoration.setSnapshot(snapshot);
        restoration.setUserEmail(userEmail);
        restoration.setStartDate(new Date());

        String restoreStartDate =
            DateUtil.convertToStringPlain(restoration.getStartDate().getTime());
        DuracloudEndPointConfig source = snapshot.getSource();

        String accountId = extractAccountId(source.getHost());

        String restorationId = accountId + "_" +
                               source.getStoreId() + "_" +
                               source.getSpaceId() + "_" +
                               restoreStartDate;
        restoration.setRestorationId(restorationId);
        return restoration;
    }
private Restoration createRestoration ( Snapshot snapshot , DuracloudEndPointConfig destination , String userEmail ) throws SnapshotException { Restoration restoration = new Restoration ( ) ; restoration . setDestination ( destination ) ; restoration . setSnapshot ( snapshot ) ; restoration . setUserEmail ( userEmail ) ; restoration . setStartDate ( new Date ( ) ) ; String restoreStartDate = DateUtil . convertToStringPlain ( restoration . getStartDate ( ) . getTime ( ) ) ; DuracloudEndPointConfig source = snapshot . getSource ( ) ; String accountId = extractAccountId ( source . getHost ( ) ) ; String restorationId = accountId + "_" + source . getStoreId ( ) + "_" + source . getSpaceId ( ) + "_" + restoreStartDate ; restoration . setRestorationId ( restorationId ) ; return restoration ; }
@param snapshot
@param userEmail
@return