@Test public void testAdWithoutDomain() { CreateKerberosConfigRequest request = new CreateKerberosConfigRequest(); ActiveDirectoryKerberosDescriptor adDescriptor = createActiveDirectoryKerberosDescriptor(false); request.setActiveDirectory(adDescriptor); request.setName(NAME); KerberosConfig kerberosConfig = underTest.convert(request); checkActiveDirectoryParams(kerberosConfig, false); }
public KerberosConfig convert(CreateKerberosConfigRequest request) { if (request == null || !KerberosRequestValidator.isValid(request)) { throw new BadRequestException("Improper CreateKerberosConfigRequest!"); } KerberosConfig kerberos; if (request.getFreeIpa() != null) { kerberos = convertFreeIpa(request.getFreeIpa()); } else if (request.getActiveDirectory() != null) { kerberos = convertActiveDirectory(request.getActiveDirectory()); } else if (request.getMit() != null) { kerberos = convertMit(request.getMit()); } else { throw new BadRequestException("Unable to determine Kerberos Configuration since none of them are provided in the request!"); } kerberos.setName(request.getName()); kerberos.setDescription(request.getDescription()); kerberos.setEnvironmentCrn(request.getEnvironmentCrn()); return kerberos; }
CreateKerberosConfigRequestToKerberosConfigConverter { public KerberosConfig convert(CreateKerberosConfigRequest request) { if (request == null || !KerberosRequestValidator.isValid(request)) { throw new BadRequestException("Improper CreateKerberosConfigRequest!"); } KerberosConfig kerberos; if (request.getFreeIpa() != null) { kerberos = convertFreeIpa(request.getFreeIpa()); } else if (request.getActiveDirectory() != null) { kerberos = convertActiveDirectory(request.getActiveDirectory()); } else if (request.getMit() != null) { kerberos = convertMit(request.getMit()); } else { throw new BadRequestException("Unable to determine Kerberos Configuration since none of them are provided in the request!"); } kerberos.setName(request.getName()); kerberos.setDescription(request.getDescription()); kerberos.setEnvironmentCrn(request.getEnvironmentCrn()); return kerberos; } }
CreateKerberosConfigRequestToKerberosConfigConverter { public KerberosConfig convert(CreateKerberosConfigRequest request) { if (request == null || !KerberosRequestValidator.isValid(request)) { throw new BadRequestException("Improper CreateKerberosConfigRequest!"); } KerberosConfig kerberos; if (request.getFreeIpa() != null) { kerberos = convertFreeIpa(request.getFreeIpa()); } else if (request.getActiveDirectory() != null) { kerberos = convertActiveDirectory(request.getActiveDirectory()); } else if (request.getMit() != null) { kerberos = convertMit(request.getMit()); } else { throw new BadRequestException("Unable to determine Kerberos Configuration since none of them are provided in the request!"); } kerberos.setName(request.getName()); kerberos.setDescription(request.getDescription()); kerberos.setEnvironmentCrn(request.getEnvironmentCrn()); return kerberos; }  }
CreateKerberosConfigRequestToKerberosConfigConverter { public KerberosConfig convert(CreateKerberosConfigRequest request) { if (request == null || !KerberosRequestValidator.isValid(request)) { throw new BadRequestException("Improper CreateKerberosConfigRequest!"); } KerberosConfig kerberos; if (request.getFreeIpa() != null) { kerberos = convertFreeIpa(request.getFreeIpa()); } else if (request.getActiveDirectory() != null) { kerberos = convertActiveDirectory(request.getActiveDirectory()); } else if (request.getMit() != null) { kerberos = convertMit(request.getMit()); } else { throw new BadRequestException("Unable to determine Kerberos Configuration since none of them are provided in the request!"); } kerberos.setName(request.getName()); kerberos.setDescription(request.getDescription()); kerberos.setEnvironmentCrn(request.getEnvironmentCrn()); return kerberos; }  KerberosConfig convert(CreateKerberosConfigRequest request); }
CreateKerberosConfigRequestToKerberosConfigConverter { public KerberosConfig convert(CreateKerberosConfigRequest request) { if (request == null || !KerberosRequestValidator.isValid(request)) { throw new BadRequestException("Improper CreateKerberosConfigRequest!"); } KerberosConfig kerberos; if (request.getFreeIpa() != null) { kerberos = convertFreeIpa(request.getFreeIpa()); } else if (request.getActiveDirectory() != null) { kerberos = convertActiveDirectory(request.getActiveDirectory()); } else if (request.getMit() != null) { kerberos = convertMit(request.getMit()); } else { throw new BadRequestException("Unable to determine Kerberos Configuration since none of them are provided in the request!"); } kerberos.setName(request.getName()); kerberos.setDescription(request.getDescription()); kerberos.setEnvironmentCrn(request.getEnvironmentCrn()); return kerberos; }  KerberosConfig convert(CreateKerberosConfigRequest request);  }