private CustomizationSysprep getPopulatedCustomizationSysprep(GuestInputs guestInputs) { CustomizationSysprep customizationSysprep = new CustomizationSysprep(); CustomizationGuiUnattended guiUnattended = getGuiUnattended(guestInputs); customizationSysprep.setGuiUnattended(guiUnattended); CustomizationIdentification identification = getCustomizationIdentification(guestInputs); customizationSysprep.setIdentification(identification); if (StringUtils.isNotBlank(guestInputs.getLicenseDataMode())) { CustomizationLicenseFilePrintData licenseFilePrintData = getCustomizationLicenseFilePrintData(guestInputs); customizationSysprep.setLicenseFilePrintData(licenseFilePrintData); } return customizationSysprep; }
private CustomizationIdentification getCustomizationIdentification(GuestInputs guestInputs) { CustomizationIdentification identification = new CustomizationIdentification(); if (StringUtils.isNotBlank(guestInputs.getDomain()) && StringUtils.isNotBlank(guestInputs.getWorkgroup())) { throw new RuntimeException(ErrorMessages.DOMAIN_AND_WORKGROUP_BOTH_PRESENT); } if (StringUtils.isNotBlank(guestInputs.getDomain())) { identification.setDomainAdmin(guestInputs.getDomainUsername()); identification.setJoinDomain(guestInputs.getDomain()); CustomizationPassword customPassword = getCustomizationPassword(guestInputs.getDomainPassword()); identification.setDomainAdminPassword(customPassword); } else { identification.setJoinWorkgroup(guestInputs.getWorkgroup()); } return identification; }