@Test void testGetName() { TrustDomain trustDomain = TrustDomain.of("test.domain"); assertEquals("test.domain", trustDomain.getName()); }
public static TrustDomain of(@NonNull final String trustDomain) { if (StringUtils.isBlank(trustDomain)) { throw new IllegalArgumentException("Trust domain cannot be empty"); } URI uri; try { val normalized = normalize(trustDomain); uri = new URI(normalized); validateUri(uri); } catch (URISyntaxException e) { throw new IllegalArgumentException(e.getMessage(), e); } val host = uri.getHost(); validateHost(host); return new TrustDomain(host); }
TrustDomain { public static TrustDomain of(@NonNull final String trustDomain) { if (StringUtils.isBlank(trustDomain)) { throw new IllegalArgumentException("Trust domain cannot be empty"); } URI uri; try { val normalized = normalize(trustDomain); uri = new URI(normalized); validateUri(uri); } catch (URISyntaxException e) { throw new IllegalArgumentException(e.getMessage(), e); } val host = uri.getHost(); validateHost(host); return new TrustDomain(host); } }
TrustDomain { public static TrustDomain of(@NonNull final String trustDomain) { if (StringUtils.isBlank(trustDomain)) { throw new IllegalArgumentException("Trust domain cannot be empty"); } URI uri; try { val normalized = normalize(trustDomain); uri = new URI(normalized); validateUri(uri); } catch (URISyntaxException e) { throw new IllegalArgumentException(e.getMessage(), e); } val host = uri.getHost(); validateHost(host); return new TrustDomain(host); } private  TrustDomain(final String trustDomain); }
TrustDomain { public static TrustDomain of(@NonNull final String trustDomain) { if (StringUtils.isBlank(trustDomain)) { throw new IllegalArgumentException("Trust domain cannot be empty"); } URI uri; try { val normalized = normalize(trustDomain); uri = new URI(normalized); validateUri(uri); } catch (URISyntaxException e) { throw new IllegalArgumentException(e.getMessage(), e); } val host = uri.getHost(); validateHost(host); return new TrustDomain(host); } private  TrustDomain(final String trustDomain); static TrustDomain of(@NonNull final String trustDomain); SpiffeId newSpiffeId(final String... segments); @Override String toString(); }
TrustDomain { public static TrustDomain of(@NonNull final String trustDomain) { if (StringUtils.isBlank(trustDomain)) { throw new IllegalArgumentException("Trust domain cannot be empty"); } URI uri; try { val normalized = normalize(trustDomain); uri = new URI(normalized); validateUri(uri); } catch (URISyntaxException e) { throw new IllegalArgumentException(e.getMessage(), e); } val host = uri.getHost(); validateHost(host); return new TrustDomain(host); } private  TrustDomain(final String trustDomain); static TrustDomain of(@NonNull final String trustDomain); SpiffeId newSpiffeId(final String... segments); @Override String toString();  }