/** * 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; }
/** * 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; }
/** * 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; }
/** * 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; }
/** * Get the named parameter. * <p/> * Calls {@link org.milyn.delivery.ContentDeliveryConfig#getSmooksResourceConfigurations()} * to get the configurations map and then passes that to * {@link #getParameter(String, java.util.Map)}, returning its return value. * * @param name Parameter name. * @param config Device Delivery Configuration. * @return The Parameter instance for the named parameter, or null if not defined. */ public static Parameter getParamter(String name, ContentDeliveryConfig config) { AssertArgument.isNotNullAndNotEmpty(name, "name"); AssertArgument.isNotNull(config, "config"); return getParameter(name, config.getSmooksResourceConfigurations()); }
/** * Get the named parameter. * <p/> * Calls {@link org.milyn.delivery.ContentDeliveryConfig#getSmooksResourceConfigurations()} * to get the configurations map and then passes that to * {@link #getParameter(String, java.util.Map)}, returning its return value. * * @param name Parameter name. * @param config Device Delivery Configuration. * @return The Parameter instance for the named parameter, or null if not defined. */ public static Parameter getParamter(String name, ContentDeliveryConfig config) { AssertArgument.isNotNullAndNotEmpty(name, "name"); AssertArgument.isNotNull(config, "config"); return getParameter(name, config.getSmooksResourceConfigurations()); }
/** * Get the named parameter. * <p/> * Calls {@link org.milyn.delivery.ContentDeliveryConfig#getSmooksResourceConfigurations()} * to get the configurations map and then passes that to * {@link #getParameter(String, java.util.Map)}, returning its return value. * * @param name Parameter name. * @param config Device Delivery Configuration. * @return The Parameter instance for the named parameter, or null if not defined. */ public static Parameter getParamter(String name, ContentDeliveryConfig config) { AssertArgument.isNotNullAndNotEmpty(name, "name"); AssertArgument.isNotNull(config, "config"); return getParameter(name, config.getSmooksResourceConfigurations()); }
/** * Get the named parameter. * * Calls {@link org.milyn.delivery.ContentDeliveryConfig#getSmooksResourceConfigurations()} * to get the configurations map and then passes that to * {@link #getParameter(String, java.util.Map)}, returning its return value. * * @param name Parameter name. * @param config Device Delivery Configuration. * @return The Parameter instance for the named parameter, or null if not defined. */ public static Parameter getParamter(String name, ContentDeliveryConfig config) { AssertArgument.isNotNullAndNotEmpty(name, "name"); AssertArgument.isNotNull(config, "config"); return getParameter(name, config.getSmooksResourceConfigurations()); }
public static DocumentTypeData getDocType(ExecutionContext executionContext) { List<SmooksResourceConfiguration> docTypeUDs = executionContext.getDeliveryConfig().getSmooksResourceConfigurations("doctype"); SmooksResourceConfiguration docTypeSmooksResourceConfiguration = null; if(docTypeUDs != null && docTypeUDs.size() > 0) { docTypeSmooksResourceConfiguration = docTypeUDs.get(0); } // Only use the cdrdef if the override flag is set. The override flag will // cause this DOCTYPE to override any DOCYTPE decl from the source doc. if(docTypeSmooksResourceConfiguration != null && docTypeSmooksResourceConfiguration.getBoolParameter("override", true)) { String name = docTypeSmooksResourceConfiguration.getStringParameter("name", "!!DOCTYPE name undefined - fix smooks-resource!!"); String publicId = docTypeSmooksResourceConfiguration.getStringParameter("publicId", "!!DOCTYPE publicId undefined - fix smooks-resource!!"); String systemId = docTypeSmooksResourceConfiguration.getStringParameter("systemId", "!!DOCTYPE systemId undefined - fix smooks-resource!!"); String xmlns = docTypeSmooksResourceConfiguration.getStringParameter("xmlns"); boolean omit = docTypeSmooksResourceConfiguration.getBoolParameter("omit", false); return new DocumentTypeData(name, publicId, systemId, xmlns, omit); } return (DocumentTypeData) executionContext.getAttribute(DOCTYPE_KEY); }
public static DocumentTypeData getDocType(ExecutionContext executionContext) { List<SmooksResourceConfiguration> docTypeUDs = executionContext.getDeliveryConfig().getSmooksResourceConfigurations("doctype"); SmooksResourceConfiguration docTypeSmooksResourceConfiguration = null; if(docTypeUDs != null && docTypeUDs.size() > 0) { docTypeSmooksResourceConfiguration = docTypeUDs.get(0); } // Only use the cdrdef if the override flag is set. The override flag will // cause this DOCTYPE to override any DOCYTPE decl from the source doc. if(docTypeSmooksResourceConfiguration != null && docTypeSmooksResourceConfiguration.getBoolParameter("override", true)) { String name = docTypeSmooksResourceConfiguration.getStringParameter("name", "!!DOCTYPE name undefined - fix smooks-resource!!"); String publicId = docTypeSmooksResourceConfiguration.getStringParameter("publicId", "!!DOCTYPE publicId undefined - fix smooks-resource!!"); String systemId = docTypeSmooksResourceConfiguration.getStringParameter("systemId", "!!DOCTYPE systemId undefined - fix smooks-resource!!"); String xmlns = docTypeSmooksResourceConfiguration.getStringParameter("xmlns"); boolean omit = docTypeSmooksResourceConfiguration.getBoolParameter("omit", false); return new DocumentTypeData(name, publicId, systemId, xmlns, omit); } return (DocumentTypeData) executionContext.getAttribute(DOCTYPE_KEY); }
public static DocumentTypeData getDocType(ExecutionContext executionContext) { List<SmooksResourceConfiguration> docTypeUDs = executionContext.getDeliveryConfig().getSmooksResourceConfigurations("doctype"); SmooksResourceConfiguration docTypeSmooksResourceConfiguration = null; if(docTypeUDs != null && docTypeUDs.size() > 0) { docTypeSmooksResourceConfiguration = docTypeUDs.get(0); } // Only use the cdrdef if the override flag is set. The override flag will // cause this DOCTYPE to override any DOCYTPE decl from the source doc. if(docTypeSmooksResourceConfiguration != null && docTypeSmooksResourceConfiguration.getBoolParameter("override", true)) { String name = docTypeSmooksResourceConfiguration.getStringParameter("name", "!!DOCTYPE name undefined - fix smooks-resource!!"); String publicId = docTypeSmooksResourceConfiguration.getStringParameter("publicId", "!!DOCTYPE publicId undefined - fix smooks-resource!!"); String systemId = docTypeSmooksResourceConfiguration.getStringParameter("systemId", "!!DOCTYPE systemId undefined - fix smooks-resource!!"); String xmlns = docTypeSmooksResourceConfiguration.getStringParameter("xmlns"); boolean omit = docTypeSmooksResourceConfiguration.getBoolParameter("omit", false); return new DocumentTypeData(name, publicId, systemId, xmlns, omit); } return (DocumentTypeData) executionContext.getAttribute(DOCTYPE_KEY); }
public static DocumentTypeData getDocType(ExecutionContext executionContext) { List<SmooksResourceConfiguration> docTypeUDs = executionContext.getDeliveryConfig().getSmooksResourceConfigurations("doctype"); SmooksResourceConfiguration docTypeSmooksResourceConfiguration = null; if(docTypeUDs != null && docTypeUDs.size() > 0) { docTypeSmooksResourceConfiguration = docTypeUDs.get(0); } // Only use the cdrdef if the override flag is set. The override flag will // cause this DOCTYPE to override any DOCYTPE decl from the source doc. if(docTypeSmooksResourceConfiguration != null && docTypeSmooksResourceConfiguration.getBoolParameter("override", true)) { String name = docTypeSmooksResourceConfiguration.getStringParameter("name", "!!DOCTYPE name undefined - fix smooks-resource!!"); String publicId = docTypeSmooksResourceConfiguration.getStringParameter("publicId", "!!DOCTYPE publicId undefined - fix smooks-resource!!"); String systemId = docTypeSmooksResourceConfiguration.getStringParameter("systemId", "!!DOCTYPE systemId undefined - fix smooks-resource!!"); String xmlns = docTypeSmooksResourceConfiguration.getStringParameter("xmlns"); boolean omit = docTypeSmooksResourceConfiguration.getBoolParameter("omit", false); return new DocumentTypeData(name, publicId, systemId, xmlns, omit); } return (DocumentTypeData) executionContext.getAttribute(DOCTYPE_KEY); }