public PurposePIICategory(PIICategory piiCategory, Boolean mandatory) { super(piiCategory.getId(), piiCategory.getName(), piiCategory.getDescription(), piiCategory.getSensitive(), piiCategory.getTenantId(), piiCategory.getDisplayName()); this.mandatory = mandatory; }
private List<PIICategoryValidity> getPiiCategoryValiditiesForClaims(List<ClaimMetaData> claims, String termination) throws SSOConsentServiceException { List<PIICategoryValidity> piiCategoryIds = new ArrayList<>(); for (ClaimMetaData claim : claims) { PIICategory piiCategory; try { piiCategory = getConsentManager().getPIICategoryByName(claim.getClaimUri()); } catch (ConsentManagementClientException e) { if (isInvalidPIICategoryError(e)) { piiCategory = addPIICategoryForClaim(claim); } else { throw new SSOConsentServiceException("Consent PII category error", "Error while retrieving" + " PII category: " + DEFAULT_PURPOSE_CATEGORY, e); } } catch (ConsentManagementException e) { throw new SSOConsentServiceException("Consent PII category error", "Error while retrieving " + "PII category: " + DEFAULT_PURPOSE_CATEGORY, e); } piiCategoryIds.add(new PIICategoryValidity(piiCategory.getId(), termination)); } return piiCategoryIds; }
private List<PIICategoryValidity> getPiiCategoryValiditiesForClaims(List<ClaimMetaData> claims, String termination) throws SSOConsentServiceException { List<PIICategoryValidity> piiCategoryIds = new ArrayList<>(); for (ClaimMetaData claim : claims) { PIICategory piiCategory; try { piiCategory = getConsentManager().getPIICategoryByName(claim.getClaimUri()); } catch (ConsentManagementClientException e) { if (isInvalidPIICategoryError(e)) { piiCategory = addPIICategoryForClaim(claim); } else { throw new SSOConsentServiceException("Consent PII category error", "Error while retrieving" + " PII category: " + DEFAULT_PURPOSE_CATEGORY, e); } } catch (ConsentManagementException e) { throw new SSOConsentServiceException("Consent PII category error", "Error while retrieving " + "PII category: " + DEFAULT_PURPOSE_CATEGORY, e); } piiCategoryIds.add(new PIICategoryValidity(piiCategory.getId(), termination)); } return piiCategoryIds; }
if (purposePIICategory.getId().equals(piiCategoryId.getId())) { isPiiCategoryAdded = true; break; piiCategories.add(new PurposePIICategory(piiCategoryId.getId(), piiCategoryDTO.isMandatory())); boolean isPiiCategoryAdded = false; for (PurposePIICategory purposePIICategory : piiCategories) { if (purposePIICategory.getId().equals(piiCategoryResponse.getId())) { isPiiCategoryAdded = true; break; piiCategories.add(new PurposePIICategory(piiCategoryResponse.getId(), piiCategoryDTO.isMandatory()));