private DataDecoder getDecoder(ExecutionContext executionContext) throws DataDecodeException { @SuppressWarnings("unchecked") List decoders = executionContext.getDeliveryConfig().getObjects("decoder:" + typeAlias); if (decoders == null || decoders.isEmpty()) { decoder = DataDecoder.Factory.create(typeAlias); } else if (!(decoders.get(0) instanceof DataDecoder)) { throw new DataDecodeException("Configured decoder '" + typeAlias + ":" + decoders.get(0).getClass().getName() + "' is not an instance of " + DataDecoder.class.getName()); } else { decoder = (DataDecoder) decoders.get(0); } return decoder; }
private void initialiseEmptyElements() { DTDStore.DTDObjectContainer dtd = execContext.getDeliveryConfig().getDTD(); if(dtd != null) { String[] emptyEls = dtd.getEmptyElements(); if(emptyEls != null && emptyEls.length > 0) { Collections.addAll(emptyElements, emptyEls); } } }
/** * Get the SAX Parser configuration for the profile associated with the supplied delivery configuration. * * @param deliveryConfig Content delivery configuration. * @return Returns the SAX Parser configuration for the profile associated with the supplied delivery * configuration, or null if no parser configuration is specified. */ public static SmooksResourceConfiguration getSAXParserConfiguration(ContentDeliveryConfig deliveryConfig) { if (deliveryConfig == null) { throw new IllegalArgumentException("null 'deliveryConfig' arg in method call."); } SmooksResourceConfiguration saxDriverConfig = null; List<SmooksResourceConfiguration> saxConfigs = deliveryConfig.getSmooksResourceConfigurations(ORG_XML_SAX_DRIVER); if (saxConfigs != null && !saxConfigs.isEmpty()) { saxDriverConfig = saxConfigs.get(0); } return saxDriverConfig; }
FilterBypass filterBypass = deliveryConfig.getFilterBypass(); if(filterBypass != null && filterBypass.bypass(executionContext, source, results[0])) { Filter messageFilter = deliveryConfig.newFilter(executionContext); Filter.setFilter(messageFilter); try { deliveryConfig.executeHandlerInit(executionContext); messageFilter.doFilter(); } finally { beanContext.removeBean(UniqueID.BEAN_ID, null); } finally { deliveryConfig.executeHandlerCleanup(executionContext);
saxReader = deliveryConfig.getXMLReader(); detachXMLReader(executionContext); } finally { deliveryConfig.returnXMLReader(saxReader);
mapConfigBuilderEvents(deliveryConfig.getConfigBuilderEvents());
FilterBypass filterBypass = deliveryConfig.getFilterBypass(); if(filterBypass != null && filterBypass.bypass(executionContext, source, results[0])) { Filter messageFilter = deliveryConfig.newFilter(executionContext); Filter.setFilter(messageFilter); try { deliveryConfig.executeHandlerInit(executionContext); messageFilter.doFilter(); } finally { beanContext.removeBean(UniqueID.BEAN_ID, null); } finally { deliveryConfig.executeHandlerCleanup(executionContext);
saxReader = deliveryConfig.getXMLReader(); detachXMLReader(executionContext); } finally { deliveryConfig.returnXMLReader(saxReader);
mapConfigBuilderEvents(deliveryConfig.getConfigBuilderEvents());
FilterBypass filterBypass = deliveryConfig.getFilterBypass(); if(filterBypass != null && filterBypass.bypass(executionContext, source, results[0])) { Filter messageFilter = deliveryConfig.newFilter(executionContext); Filter.setFilter(messageFilter); try { deliveryConfig.executeHandlerInit(executionContext); messageFilter.doFilter(); } finally { beanContext.removeBean(UniqueID.BEAN_ID, null); } finally { deliveryConfig.executeHandlerCleanup(executionContext);
saxReader = deliveryConfig.getXMLReader(); detachXMLReader(executionContext); } finally { deliveryConfig.returnXMLReader(saxReader);
private DataDecoder getDecoder(ExecutionContext executionContext) throws DataDecodeException { if(decoder == null) { @SuppressWarnings("unchecked") List decoders = executionContext.getDeliveryConfig().getObjects("decoder:" + typeAlias); if (decoders == null || decoders.isEmpty()) { decoder = DataDecoder.Factory.create(typeAlias); } else if (!(decoders.get(0) instanceof DataDecoder)) { throw new DataDecodeException("Configured decoder '" + typeAlias + ":" + decoders.get(0).getClass().getName() + "' is not an instance of " + DataDecoder.class.getName()); } else { decoder = (DataDecoder) decoders.get(0); } } return decoder; }
/** * Get the SAX Parser configuration for the profile associated with the supplied delivery configuration. * * @param deliveryConfig Content delivery configuration. * @return Returns the SAX Parser configuration for the profile associated with the supplied delivery * configuration, or null if no parser configuration is specified. */ public static SmooksResourceConfiguration getSAXParserConfiguration(ContentDeliveryConfig deliveryConfig) { if (deliveryConfig == null) { throw new IllegalArgumentException("null 'deliveryConfig' arg in method call."); } SmooksResourceConfiguration saxDriverConfig = null; List<SmooksResourceConfiguration> saxConfigs = deliveryConfig.getSmooksResourceConfigurations(ORG_XML_SAX_DRIVER); if (saxConfigs != null && !saxConfigs.isEmpty()) { saxDriverConfig = saxConfigs.get(0); } return saxDriverConfig; }
private void initialiseEmptyElements() { DTDStore.DTDObjectContainer dtd = execContext.getDeliveryConfig().getDTD(); if(dtd != null) { String[] emptyEls = dtd.getEmptyElements(); if(emptyEls != null && emptyEls.length > 0) { Collections.addAll(emptyElements, emptyEls); } } }
mapConfigBuilderEvents(deliveryConfig.getConfigBuilderEvents());
FilterBypass filterBypass = deliveryConfig.getFilterBypass(); if(filterBypass != null && filterBypass.bypass(executionContext, source, results[0])) { Filter messageFilter = deliveryConfig.newFilter(executionContext); Filter.setFilter(messageFilter); try { deliveryConfig.executeHandlerInit(executionContext); messageFilter.doFilter(); } finally { beanContext.removeBean(UniqueID.BEAN_ID, null); } finally { deliveryConfig.executeHandlerCleanup(executionContext);
saxReader = deliveryConfig.getXMLReader(); detachXMLReader(executionContext); } finally { deliveryConfig.returnXMLReader(saxReader);
private DataDecoder getDecoder(ExecutionContext executionContext) throws DataDecodeException { if(decoder == null) { @SuppressWarnings("unchecked") List decoders = executionContext.getDeliveryConfig().getObjects("decoder:" + typeAlias); if (decoders == null || decoders.isEmpty()) { decoder = DataDecoder.Factory.create(typeAlias); } else if (!(decoders.get(0) instanceof DataDecoder)) { throw new DataDecodeException("Configured decoder '" + typeAlias + ":" + decoders.get(0).getClass().getName() + "' is not an instance of " + DataDecoder.class.getName()); } else { decoder = (DataDecoder) decoders.get(0); } } return decoder; }
/** * Get the SAX Parser configuration for the profile associated with the supplied delivery configuration. * * @param deliveryConfig Content delivery configuration. * @return Returns the SAX Parser configuration for the profile associated with the supplied delivery * configuration, or null if no parser configuration is specified. */ public static SmooksResourceConfiguration getSAXParserConfiguration(ContentDeliveryConfig deliveryConfig) { if (deliveryConfig == null) { throw new IllegalArgumentException("null 'deliveryConfig' arg in method call."); } SmooksResourceConfiguration saxDriverConfig = null; List<SmooksResourceConfiguration> saxConfigs = deliveryConfig.getSmooksResourceConfigurations(ORG_XML_SAX_DRIVER); if (saxConfigs != null && !saxConfigs.isEmpty()) { saxDriverConfig = saxConfigs.get(0); } return saxDriverConfig; }
private void initialiseEmptyElements() { DTDStore.DTDObjectContainer dtd = execContext.getDeliveryConfig().getDTD(); if(dtd != null) { String[] emptyEls = dtd.getEmptyElements(); if(emptyEls != null && emptyEls.length > 0) { Collections.addAll(emptyElements, emptyEls); } } }