ImageUpdater¶
Implements IImageUpdater, the group-imaging update operation invoked by SAIF.Services.Groups.Imaging.ImageService.UpdateImage. It depends on IValidationService for edit validation, IGroupImageRepository and IGroupRepository to look up the target image group and its new group association, IImageCategoryCodeRepository to resolve the document-type code, and IGroupImageSecurityProvider to stamp the updating user's ID.
Purpose¶
- Validates an
ImageEditrequest before applying it. - Applies document date, description text, document type, confidentiality (security level), and group re-association changes to an existing group image, stamping the update user and timestamp.
Context¶
- Namespace:
SAIF.Services.Groups.Imaging - Assembly/package:
SAIF.Services(packaged inside theSAIF.SAIFCode.CoreNuGet package)
Public members¶
| Member | Signature | Purpose |
|---|---|---|
| ImageUpdater(...) | public ImageUpdater(IValidationService validationService, IGroupImageRepository groupImageRepository, IImageCategoryCodeRepository imageCategoryCodeRepository, IGroupRepository groupRepository, IGroupImageSecurityProvider security) |
Wires in the validation, repository, category-code, and security collaborators used by Update. |
| Update | public void Update(ImageEdit imageEdit) |
Validates imageEdit (throwing on failure via ValidateAndThrow), then applies all field changes to the corresponding group image entity. |
Behavioral notes¶
UpdatecallsvalidationService.ValidateAndThrow, so validation failures surface as thrown exceptions rather than a returned result*.- Confidentiality is persisted as a security-level code:
Image.ConfidentialSecurityLevelwhenimageEdit.IsConfidentialis true, otherwiseImage.NonConfidentialSecurityLevel. - Does not itself begin/commit a unit-of-work transaction; that boundary is owned by the calling
ImageService.UpdateImage*.
Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with ** could not be confirmed; treat as unknown until verified.
Sources¶
- Services/SAIF.Services/Groups/Imaging/ImageUpdater.cs