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)); }
@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)); }
@Override protected FlavorDefaultDef createDefinition() throws QuickFixException { return builder.build(); }