use of eu.bcvsolutions.idm.acc.service.api.SysProvisioningArchiveService in project CzechIdMng by bcvsolutions.
the class SysProvisioningArchiveController method getDifferenceObject.
@ResponseBody
@RequestMapping(value = "/{backendId}/difference-object", method = RequestMethod.GET)
@PreAuthorize("hasAuthority('" + AccGroupPermission.PROVISIONING_ARCHIVE_READ + "')")
@ApiOperation(value = "Detail of the provisioning changes", nickname = "getProvisioningDetail", tags = { SysProvisioningArchiveController.TAG }, authorizations = { @Authorization(value = SwaggerConfig.AUTHENTICATION_BASIC, scopes = { @AuthorizationScope(scope = AccGroupPermission.PROVISIONING_ARCHIVE_READ, description = "") }), @Authorization(value = SwaggerConfig.AUTHENTICATION_CIDMST, scopes = { @AuthorizationScope(scope = AccGroupPermission.PROVISIONING_ARCHIVE_READ, description = "") }) })
public ResponseEntity<?> getDifferenceObject(@ApiParam(value = "Provisioning detail uuid identifier.", required = true) @PathVariable @NotNull String backendId) {
SysProvisioningArchiveDto archive = getDto(backendId);
if (archive == null) {
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
ProvisioningContext context = archive.getProvisioningContext();
if (context == null) {
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
List<SysAttributeDifferenceDto> result = ((SysProvisioningArchiveService) getService()).evaluateProvisioningDifferences(context.getSystemConnectorObject(), context.getConnectorObject());
return new ResponseEntity<>(result, HttpStatus.OK);
}
Aggregations