Пример #1
0
  @SuppressWarnings("rawtypes")
  @Override
  protected void readSystemAttributes() throws QuickFixException {
    super.readSystemAttributes();
    builder.setLocalId(getSystemAttributeValue("id"));
    String load = getSystemAttributeValue("load");
    if (!AuraTextUtil.isNullEmptyOrWhitespace(load)) {
      Load loadVal;
      try {
        loadVal = Load.valueOf(load.toUpperCase());
      } catch (IllegalArgumentException e) {
        throw new AuraRuntimeException(
            String.format("Invalid value '%s' specified for 'aura:load' attribute", load),
            getLocation());
      }
      builder.setLoad(loadVal);
      if (loadVal == Load.LAZY || loadVal == Load.EXCLUSIVE) {
        ((BaseComponentDefHandler) getParentHandler()).setRender("client");
      }
    }

    String flavor = getSystemAttributeValue("flavor");
    if (!AuraTextUtil.isNullEmptyOrWhitespace(flavor)) {
      builder.setFlavor(flavor);
    }
  }