class AutonomiccsSystemVirtualMachinesTemplateRegister implements InitializingBean {

    protected RegisterTemplateCmd createRegisterTemplateCommandForHypervisor(HypervisorType hypervisor) {
        RegisterTemplateCmd registerTemplateCmd = new RegisterTemplateCmd();
        reflectionUtils.setFieldIntoObject(registerTemplateCmd, "displayText", autonomiccsSystemVmTemplateService.getAutonomiccsSystemVmTemplateDisplayText(hypervisor));
        reflectionUtils.setFieldIntoObject(registerTemplateCmd, "format", getSupportedImageFormat(hypervisor));
        reflectionUtils.setFieldIntoObject(registerTemplateCmd, "hypervisor", hypervisor.name());
        reflectionUtils.setFieldIntoObject(registerTemplateCmd, "templateName", autonomiccsSystemVmTemplateService.getAutonomiccsSystemVmTemplateName(hypervisor));
        reflectionUtils.setFieldIntoObject(registerTemplateCmd, "osTypeId", guestOsService.getGuestOsUuid(guestOsName));
        reflectionUtils.setFieldIntoObject(registerTemplateCmd, "zoneId", allAvailableZoneMagicNumber);
        reflectionUtils.setFieldIntoObject(registerTemplateCmd, "url", autonomiccsSystemVmTemplateService.getSystemVmTemplateUrl(hypervisor));
        reflectionUtils.setFieldIntoObject(registerTemplateCmd, "accountName", "system");
        reflectionUtils.setFieldIntoObject(registerTemplateCmd, "domainId", systemAccountDomainId);
        reflectionUtils.setFieldIntoObject(registerTemplateCmd, "projectId", null);
        reflectionUtils.setFieldIntoObject(registerTemplateCmd, "requiresHvm", false);
        Map<Object, Object> details = createTemplateDetails();
        reflectionUtils.setFieldIntoObject(registerTemplateCmd, "details", details);
        reflectionUtils.setFieldIntoObject(registerTemplateCmd, "_accountService", accountService);
        return registerTemplateCmd;

    }

}