All Downloads are FREE. Search and download functionalities are using the official Maven repository.

co.privacyone.sdk.ldar.util.LdarModelBuilder Maven / Gradle / Ivy

There is a newer version: 2.2.1
Show newest version
/*************************************************************************
 *
 * Privacy1 AB CONFIDENTIAL
 * ________________________
 *
 *  [2017] - [2020] Privacy1 AB
 *  All Rights Reserved.
 *
 * NOTICE:  All information contained herein is, and remains the property
 * of Privacy1 AB.  The intellectual and technical concepts contained herein
 * are proprietary to Privacy1 AB and may be covered by European, U.S. and Foreign
 * Patents, patents in process, and are protected by trade secret or copyright law.
 *
 * Dissemination of this information or reproduction of this material
 * is strictly forbidden.
 */
package co.privacyone.sdk.ldar.util;

import co.privacyone.ldar.restmodel.archive.ArchiveStorageModel;
import co.privacyone.ldar.restmodel.archive.CreateArchiveRequestModel;
import co.privacyone.ldar.restmodel.dar.DarProcessedModel;
import co.privacyone.ldar.restmodel.dar.DarProcessingModel;
import co.privacyone.ldar.restmodel.messaging.UserContact;

public class LdarModelBuilder {

  public static DarProcessingModel buildDarProcessingModel(final String darId, final String stateDescription) {
    final DarProcessingModel model = new DarProcessingModel();
    model.setDarId(darId);
    model.setStateDescription(stateDescription);
    return model;
  }

  public static DarProcessedModel buildDarProcessedModel(
      final String darId,
      final String status,
      final String stateDescription) {
    final DarProcessedModel model = new DarProcessedModel();
    model.setDarId(darId);
    model.setStatus(status);
    model.setStateDescription(stateDescription);
    return model;
  }

  public static CreateArchiveRequestModel buildCreateArchiveRequestModel(
      final String darId,
      final ArchiveStorageModel archivePath,
      final UserContact userContact) {
    final CreateArchiveRequestModel model = new CreateArchiveRequestModel();
    model.setDarId(darId);
    model.setArchiveStorageModel(archivePath);
    model.setUserContact(userContact);
    return model;
  }

  public static UserContact buildUserContact(final String email, final String phoneNumber) {
    final UserContact userContact = new UserContact();
    userContact.setEmail(email);
    userContact.setPhoneNumber(phoneNumber);
    return userContact;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy