Class MigrationService

java.lang.Object
gov.niem.tools.api.migrate.MigrationService

@Component public class MigrationService extends Object
Migrate a CMF model from one version to any subsequent version.
  • Constructor Details

    • MigrationService

      public MigrationService()
  • Method Details

    • migrateCmf

      public byte[] migrateCmf(String stewardKey, String modelKey, String from, String to, org.springframework.web.multipart.MultipartFile multipartFile) throws Exception
      Migrate a CMF model from the given version to the target version.
      Parameters:
      stewardKey - Identifies the owner of the model
      modelKey - With the stewardKey, identifies the model
      from - Current version of the model provided by the user
      to - Version to which the model should be migrated
      Throws:
      Exception
    • checkParams

      public void checkParams(String stewardKey, String modelKey, String from, String to) throws Exception
      Check that the user-provided parameters are valid.
      Parameters:
      stewardKey - Identifies the owner of the model
      modelKey - With the stewardKey, identifies the model
      from - Current version of the model provided by the user
      to - Version to which the model should be migrated
      Throws:
      Exception