Package gov.niem.tools.api.migrate
Class MigrationService
java.lang.Object
gov.niem.tools.api.migrate.MigrationService
Migrate a CMF model from one version to any subsequent version.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
checkParams
(String stewardKey, String modelKey, String from, String to) Check that the user-provided parameters are valid.byte[]
migrateCmf
(String stewardKey, String modelKey, String from, String to, org.springframework.web.multipart.MultipartFile multipartFile) Migrate a CMF model from the given version to the target 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 modelmodelKey
- With the stewardKey, identifies the modelfrom
- Current version of the model provided by the userto
- 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 modelmodelKey
- With the stewardKey, identifies the modelfrom
- Current version of the model provided by the userto
- Version to which the model should be migrated- Throws:
Exception
-