Beispiel #1
0
  public static void checkVAppTemplate(VAppTemplate template) {
    // Check required fields
    assertNotNull(template.getName(), String.format(NOT_NULL_OBJECT_FMT, "Name", "VAppTemplate"));

    // Check optional fields
    Owner owner = template.getOwner();
    if (owner != null) checkOwner(owner);
    for (VAppTemplate child : template.getChildren()) {
      checkVAppTemplate(child);
    }
    for (SectionType<?> section : template.getSections()) {
      checkSectionType(section);
    }
    if (template.getTasks() != null) {
      for (Task task : template.getTasks()) {
        checkTask(task);
      }
    }
    if (template.getFiles() != null) {
      for (File file : template.getFiles()) {
        checkFile(file);
      }
    }

    // NOTE vAppScopedLocalId cannot be checked
    // NOTE ovfDescriptorUploaded cannot be checked
    // NOTE goldMaster cannot be checked

    // Check parent type
    checkResourceEntityType(template);
  }
 public Builder fromVAppTemplate(VAppTemplate in) {
   return fromResourceEntityType(in)
       .owner(in.getOwner())
       .children(in.getChildren())
       .sections(in.getSections())
       .vAppScopedLocalId(in.getVAppScopedLocalId())
       .ovfDescriptorUploaded(in.isOvfDescriptorUploaded())
       .goldMaster(in.isGoldMaster());
 }