Skip to content

Commit

Permalink
Import requst parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
bohdanm-bb committed Feb 11, 2024
1 parent e0eaf18 commit da7e0ba
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Apps.XTM/Actions/GlossaryActions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,12 @@ public async Task ImportGlossary([ActionParameter] ImportGlossaryRequest request
fileTypeSpecified = true
}
},
new xtmImportTermMTOMOptionsAPI() { purgeTermsSpecified = false, addToExistingTermsSpecified = false }); //{ addToExistingTermsSpecified = false, purgeTermsSpecified = false}
new xtmImportTermMTOMOptionsAPI() {
purgeTerms = request.PurgeTerms != null ? request.PurgeTerms.Value : default,
purgeTermsSpecified = request.PurgeTerms != null,
addToExistingTerms = request.AddToExisting != null ? request.AddToExisting.Value : default,
addToExistingTermsSpecified = request.AddToExisting != null
});

var fileDescriptors = resultFile.@return.Select(x => new xtmTermBaseFileDescriptorAPI() { id = x.id, idSpecified = true }).ToArray();
await PollTermFileOperationStatus(fileDescriptors);
Expand Down
6 changes: 6 additions & 0 deletions Apps.XTM/Models/Request/Glossaries/ImportGlossaryRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,11 @@ public class ImportGlossaryRequest
[Display("Customer ID")]
[DataSource(typeof(CustomerDataHandler))]
public string CustomerId { get; set; }

[Display("Purge terms")]
public bool? PurgeTerms { get; set; }

[Display("Add to existing terms")]
public bool? AddToExisting { get; set; }
}
}

0 comments on commit da7e0ba

Please sign in to comment.