private boolean setPermission(final String consentId, boolean allowed) {
    final Consent defConsent = getDefaultConsent(consentId);
    if (defConsent != null && !defConsent.isDeleted()) {
      setConsents(Collections.singleton(defConsent.derive(allowed)));
      return true;
    }
    return false;
  }
private boolean setPermission(final String consentId, boolean allowed)