@Test public void testIntygRedirectTypMissing() { URI res = service.intygRedirect(null, INTYG_TYPE_VERSION, "intygId"); assertNull(res); }
@Override public URI intygRedirect(String typ, String intygTypeVersion, String intygId) { if (Strings.nullToEmpty(intygId).trim().isEmpty()) { LOG.error("Path parameter 'intygId' was either whitespace, empty (\"\") or null"); return null; } if (Strings.nullToEmpty(typ).trim().isEmpty()) { LOG.error("Path parameter 'typ' was either whitespace, empty (\"\") or null"); return null; } if (Strings.nullToEmpty(intygTypeVersion).trim().isEmpty()) { LOG.error("Parameter 'intygTypeVersion' was either whitespace, empty (\"\") or null"); return null; } LOG.debug("Redirecting to view intyg {} of type {}", intygId, typ); Map<String, Object> urlParams = new HashMap<>(); urlParams.put(PARAM_CERT_TYPE, typ); urlParams.put(PARAM_CERT_TYPE_VERSION, intygTypeVersion); urlParams.put(PARAM_CERT_ID, intygId); return UriBuilder.fromPath(urlBaseTemplate).fragment(urlUtkastFragmentTemplate).buildFromMap(urlParams); }
MailLinkServiceImpl implements MailLinkService { @Override public URI intygRedirect(String typ, String intygTypeVersion, String intygId) { if (Strings.nullToEmpty(intygId).trim().isEmpty()) { LOG.error("Path parameter 'intygId' was either whitespace, empty (\"\") or null"); return null; } if (Strings.nullToEmpty(typ).trim().isEmpty()) { LOG.error("Path parameter 'typ' was either whitespace, empty (\"\") or null"); return null; } if (Strings.nullToEmpty(intygTypeVersion).trim().isEmpty()) { LOG.error("Parameter 'intygTypeVersion' was either whitespace, empty (\"\") or null"); return null; } LOG.debug("Redirecting to view intyg {} of type {}", intygId, typ); Map<String, Object> urlParams = new HashMap<>(); urlParams.put(PARAM_CERT_TYPE, typ); urlParams.put(PARAM_CERT_TYPE_VERSION, intygTypeVersion); urlParams.put(PARAM_CERT_ID, intygId); return UriBuilder.fromPath(urlBaseTemplate).fragment(urlUtkastFragmentTemplate).buildFromMap(urlParams); } }
MailLinkServiceImpl implements MailLinkService { @Override public URI intygRedirect(String typ, String intygTypeVersion, String intygId) { if (Strings.nullToEmpty(intygId).trim().isEmpty()) { LOG.error("Path parameter 'intygId' was either whitespace, empty (\"\") or null"); return null; } if (Strings.nullToEmpty(typ).trim().isEmpty()) { LOG.error("Path parameter 'typ' was either whitespace, empty (\"\") or null"); return null; } if (Strings.nullToEmpty(intygTypeVersion).trim().isEmpty()) { LOG.error("Parameter 'intygTypeVersion' was either whitespace, empty (\"\") or null"); return null; } LOG.debug("Redirecting to view intyg {} of type {}", intygId, typ); Map<String, Object> urlParams = new HashMap<>(); urlParams.put(PARAM_CERT_TYPE, typ); urlParams.put(PARAM_CERT_TYPE_VERSION, intygTypeVersion); urlParams.put(PARAM_CERT_ID, intygId); return UriBuilder.fromPath(urlBaseTemplate).fragment(urlUtkastFragmentTemplate).buildFromMap(urlParams); }  }
MailLinkServiceImpl implements MailLinkService { @Override public URI intygRedirect(String typ, String intygTypeVersion, String intygId) { if (Strings.nullToEmpty(intygId).trim().isEmpty()) { LOG.error("Path parameter 'intygId' was either whitespace, empty (\"\") or null"); return null; } if (Strings.nullToEmpty(typ).trim().isEmpty()) { LOG.error("Path parameter 'typ' was either whitespace, empty (\"\") or null"); return null; } if (Strings.nullToEmpty(intygTypeVersion).trim().isEmpty()) { LOG.error("Parameter 'intygTypeVersion' was either whitespace, empty (\"\") or null"); return null; } LOG.debug("Redirecting to view intyg {} of type {}", intygId, typ); Map<String, Object> urlParams = new HashMap<>(); urlParams.put(PARAM_CERT_TYPE, typ); urlParams.put(PARAM_CERT_TYPE_VERSION, intygTypeVersion); urlParams.put(PARAM_CERT_ID, intygId); return UriBuilder.fromPath(urlBaseTemplate).fragment(urlUtkastFragmentTemplate).buildFromMap(urlParams); }  @Override URI intygRedirect(String typ, String intygTypeVersion, String intygId); }
MailLinkServiceImpl implements MailLinkService { @Override public URI intygRedirect(String typ, String intygTypeVersion, String intygId) { if (Strings.nullToEmpty(intygId).trim().isEmpty()) { LOG.error("Path parameter 'intygId' was either whitespace, empty (\"\") or null"); return null; } if (Strings.nullToEmpty(typ).trim().isEmpty()) { LOG.error("Path parameter 'typ' was either whitespace, empty (\"\") or null"); return null; } if (Strings.nullToEmpty(intygTypeVersion).trim().isEmpty()) { LOG.error("Parameter 'intygTypeVersion' was either whitespace, empty (\"\") or null"); return null; } LOG.debug("Redirecting to view intyg {} of type {}", intygId, typ); Map<String, Object> urlParams = new HashMap<>(); urlParams.put(PARAM_CERT_TYPE, typ); urlParams.put(PARAM_CERT_TYPE_VERSION, intygTypeVersion); urlParams.put(PARAM_CERT_ID, intygId); return UriBuilder.fromPath(urlBaseTemplate).fragment(urlUtkastFragmentTemplate).buildFromMap(urlParams); }  @Override URI intygRedirect(String typ, String intygTypeVersion, String intygId);  }