Ejemplo n.º 1
0
 public FlavorDefaultDefHandler(
     RootTagHandler<P> parentHandler,
     XMLStreamReader xmlReader,
     Source<?> source,
     boolean isInInternalNamespace,
     DefinitionService definitionService,
     ConfigAdapter configAdapter,
     DefinitionParserAdapter definitionParserAdapter) {
   super(
       parentHandler,
       xmlReader,
       source,
       isInInternalNamespace,
       definitionService,
       configAdapter,
       definitionParserAdapter);
   builder.setLocation(getLocation());
   builder.setAccess(getAccess(isInInternalNamespace));
 }
Ejemplo n.º 2
0
  @Override
  protected void readAttributes() throws InvalidDefinitionException {
    String componentFilter = getAttributeValue(ATTRIBUTE_COMPONENT);
    if (!AuraTextUtil.isNullEmptyOrWhitespace(componentFilter)) {
      builder.setComponent(componentFilter);
    } else {
      throw new InvalidDefinitionException("Missing required attribute 'component'", getLocation());
    }

    String flavorFilter = getAttributeValue(ATTRIBUTE_DEFAULT);
    if (!AuraTextUtil.isNullEmptyOrWhitespace(flavorFilter)) {
      builder.setFlavor(flavorFilter);
    } else {
      throw new InvalidDefinitionException("Missing required attribute 'default'", getLocation());
    }

    builder.setDescription(getAttributeValue(ATTRIBUTE_DESCRIPTION));
    builder.setParentDescriptor(getParentDefDescriptor());
    builder.setDescriptor(definitionService.getDefDescriptor(flavorFilter, FlavorDefaultDef.class));
  }
Ejemplo n.º 3
0
 @Override
 protected FlavorDefaultDef createDefinition() throws QuickFixException {
   return builder.build();
 }