configTable = getDeliveryConfigTable(applicationContext); if(configTable == null) { synchronized(ContentDeliveryConfigBuilder.class) { configTable = getDeliveryConfigTable(applicationContext); if(configTable == null) { configTable = new LinkedHashMap<String, ContentDeliveryConfig>(); ContentDeliveryConfigBuilder configBuilder = new ContentDeliveryConfigBuilder(profileSet, applicationContext); configBuilder.load(); config = configBuilder.createConfig(extendedVisitorConfigMap); configTable.put(profileSet.getBaseProfile(), config);
/** * Build the basic SmooksResourceConfiguration table from the list. * @param resourceConfigsList List of SmooksResourceConfigurations. */ private void buildSmooksResourceConfigurationTable(List resourceConfigsList) { for (final Object resourceConfig : resourceConfigsList) { addResourceConfiguration((SmooksResourceConfiguration) resourceConfig); } }
buildSmooksResourceConfigurationTable(resourceConfigsList); sortSmooksResourceConfigurations(resourceConfigTable); expandSmooksResourceConfigurationTable(); sortSmooksResourceConfigurations(resourceConfigTable); extractContentHandlers(); fireEvent(ContentDeliveryConfigBuilderLifecycleEvent.HANDLERS_CREATED); logResourceConfig();
filterType = getStreamFilterType(); configBuilderEvents.add(new ConfigBuilderEvent("SAX/DOM support characteristics of the Resource Configuration map:\n" + getResourceFilterCharacteristics())); configBuilderEvents.add(new ConfigBuilderEvent("Using Stream Filter Type: " + filterType)); fireEvent(ContentDeliveryConfigBuilderLifecycleEvent.CONFIG_BUILDER_CREATED); fireEvent(ContentDeliveryConfigBuilderLifecycleEvent.CONFIG_BUILDER_CREATED);
/** * Public Constructor. * <p/> * The execution context is constructed within the context of a target profile and * application context. * @param targetProfile The target profile (base profile) for this context. * These parameters are not appended to the supplied requestURI. This arg must be supplied, even if it's empty. * @param context The application context. * @param contentEncoding Character encoding to be used when parsing content. Null * defaults to "UTF-8". * @param extendedVisitorConfigMap Preconfigured/extended Visitor Configuration Map. * @throws UnknownProfileMemberException Unknown target profile. */ public StandaloneExecutionContext(String targetProfile, ApplicationContext context, String contentEncoding, VisitorConfigMap extendedVisitorConfigMap) throws UnknownProfileMemberException { if(targetProfile == null) { throw new IllegalArgumentException("null 'targetProfile' arg in constructor call."); } if(context == null) { throw new IllegalArgumentException("null 'context' arg in constructor call."); } this.context = context; setContentEncoding(contentEncoding); targetProfileSet = context.getProfileStore().getProfileSet(targetProfile); deliveryConfig = ContentDeliveryConfigBuilder.getConfig(targetProfileSet, context, extendedVisitorConfigMap); isDefaultSerializationOn = ParameterAccessor.getBoolParameter(Filter.DEFAULT_SERIALIZATION_ON, true, deliveryConfig); }
logger.debug("SAX/DOM support characteristics of the Resource Configuration map:\n" + getResourceFilterCharacteristics()); filterType = StreamFilterType.SAX; } else { throw new SmooksException("Ambiguous Resource Configuration set. All Element Content Handlers must support processing on the SAX and/or DOM Filter:\n" + getResourceFilterCharacteristics());
filterType = getStreamFilterType(); configBuilderEvents.add(new ConfigBuilderEvent("SAX/DOM support characteristics of the Resource Configuration map:\n" + getResourceFilterCharacteristics())); configBuilderEvents.add(new ConfigBuilderEvent("Using Stream Filter Type: " + filterType)); fireEvent(ContentDeliveryConfigBuilderLifecycleEvent.CONFIG_BUILDER_CREATED); fireEvent(ContentDeliveryConfigBuilderLifecycleEvent.CONFIG_BUILDER_CREATED);
/** * Public Constructor. * * The execution context is constructed within the context of a target profile and * application context. * @param targetProfile The target profile (base profile) for this context. * These parameters are not appended to the supplied requestURI. This arg must be supplied, even if it's empty. * @param context The application context. * @param contentEncoding Character encoding to be used when parsing content. Null * defaults to "UTF-8". * @param extendedVisitorConfigMap Preconfigured/extended Visitor Configuration Map. * @throws UnknownProfileMemberException Unknown target profile. */ public StandaloneExecutionContext(String targetProfile, ApplicationContext context, String contentEncoding, VisitorConfigMap extendedVisitorConfigMap) throws UnknownProfileMemberException { if(targetProfile == null) { throw new IllegalArgumentException("null 'targetProfile' arg in constructor call."); } if(context == null) { throw new IllegalArgumentException("null 'context' arg in constructor call."); } this.context = context; setContentEncoding(contentEncoding); targetProfileSet = context.getProfileStore().getProfileSet(targetProfile); deliveryConfig = ContentDeliveryConfigBuilder.getConfig(targetProfileSet, context, extendedVisitorConfigMap); isDefaultSerializationOn = ParameterAccessor.getBoolParameter(Filter.DEFAULT_SERIALIZATION_ON, true, deliveryConfig); }
logger.debug("SAX/DOM support characteristics of the Resource Configuration map:\n" + getResourceFilterCharacteristics()); filterType = StreamFilterType.SAX; } else { throw new SmooksException("Ambiguous Resource Configuration set. All Element Content Handlers must support processing on the SAX and/or DOM Filter:\n" + getResourceFilterCharacteristics());
buildSmooksResourceConfigurationTable(resourceConfigsList); sortSmooksResourceConfigurations(resourceConfigTable); expandSmooksResourceConfigurationTable(); sortSmooksResourceConfigurations(resourceConfigTable); extractContentHandlers(); fireEvent(ContentDeliveryConfigBuilderLifecycleEvent.HANDLERS_CREATED); logResourceConfig();
configTable = getDeliveryConfigTable(applicationContext); if(configTable == null) { synchronized(ContentDeliveryConfigBuilder.class) { configTable = getDeliveryConfigTable(applicationContext); if(configTable == null) { configTable = new LinkedHashMap<String, ContentDeliveryConfig>(); ContentDeliveryConfigBuilder configBuilder = new ContentDeliveryConfigBuilder(profileSet, applicationContext); configBuilder.load(); config = configBuilder.createConfig(extendedVisitorConfigMap); configTable.put(profileSet.getBaseProfile(), config);
filterType = getStreamFilterType(); configBuilderEvents.add(new ConfigBuilderEvent("SAX/DOM support characteristics of the Resource Configuration map:\n" + getResourceFilterCharacteristics())); configBuilderEvents.add(new ConfigBuilderEvent("Using Stream Filter Type: " + filterType)); fireEvent(ContentDeliveryConfigBuilderLifecycleEvent.CONFIG_BUILDER_CREATED); fireEvent(ContentDeliveryConfigBuilderLifecycleEvent.CONFIG_BUILDER_CREATED);
/** * Build the basic SmooksResourceConfiguration table from the list. * @param resourceConfigsList List of SmooksResourceConfigurations. */ private void buildSmooksResourceConfigurationTable(List resourceConfigsList) { for (final Object resourceConfig : resourceConfigsList) { addResourceConfiguration((SmooksResourceConfiguration) resourceConfig); } }
/** * Public Constructor. * <p/> * The execution context is constructed within the context of a target profile and * application context. * @param targetProfile The target profile (base profile) for this context. * These parameters are not appended to the supplied requestURI. This arg must be supplied, even if it's empty. * @param context The application context. * @param contentEncoding Character encoding to be used when parsing content. Null * defaults to "UTF-8". * @param extendedVisitorConfigMap Preconfigured/extended Visitor Configuration Map. * @throws UnknownProfileMemberException Unknown target profile. */ public StandaloneExecutionContext(String targetProfile, ApplicationContext context, String contentEncoding, VisitorConfigMap extendedVisitorConfigMap) throws UnknownProfileMemberException { if(targetProfile == null) { throw new IllegalArgumentException("null 'targetProfile' arg in constructor call."); } if(context == null) { throw new IllegalArgumentException("null 'context' arg in constructor call."); } this.context = context; setContentEncoding(contentEncoding); targetProfileSet = context.getProfileStore().getProfileSet(targetProfile); deliveryConfig = ContentDeliveryConfigBuilder.getConfig(targetProfileSet, context, extendedVisitorConfigMap); isDefaultSerializationOn = ParameterAccessor.getBoolParameter(Filter.DEFAULT_SERIALIZATION_ON, true, deliveryConfig); }
logger.debug("SAX/DOM support characteristics of the Resource Configuration map:\n" + getResourceFilterCharacteristics()); filterType = StreamFilterType.SAX; } else { throw new SmooksException("Ambiguous Resource Configuration set. All Element Content Handlers must support processing on the SAX and/or DOM Filter:\n" + getResourceFilterCharacteristics());
buildSmooksResourceConfigurationTable(resourceConfigsList); sortSmooksResourceConfigurations(resourceConfigTable); expandSmooksResourceConfigurationTable(); sortSmooksResourceConfigurations(resourceConfigTable); extractContentHandlers(); fireEvent(ContentDeliveryConfigBuilderLifecycleEvent.HANDLERS_CREATED); logResourceConfig();
configTable = getDeliveryConfigTable(applicationContext); if(configTable == null) { synchronized(ContentDeliveryConfigBuilder.class) { configTable = getDeliveryConfigTable(applicationContext); if(configTable == null) { configTable = new LinkedHashMap<String, ContentDeliveryConfig>(); ContentDeliveryConfigBuilder configBuilder = new ContentDeliveryConfigBuilder(profileSet, applicationContext); configBuilder.load(); config = configBuilder.createConfig(extendedVisitorConfigMap); configTable.put(profileSet.getBaseProfile(), config);
filterType = getStreamFilterType(); configBuilderEvents.add(new ConfigBuilderEvent("SAX/DOM support characteristics of the Resource Configuration map:\n" + getResourceFilterCharacteristics())); configBuilderEvents.add(new ConfigBuilderEvent("Using Stream Filter Type: " + filterType)); fireEvent(ContentDeliveryConfigBuilderLifecycleEvent.CONFIG_BUILDER_CREATED); fireEvent(ContentDeliveryConfigBuilderLifecycleEvent.CONFIG_BUILDER_CREATED);
/** * Build the basic SmooksResourceConfiguration table from the list. * @param resourceConfigsList List of SmooksResourceConfigurations. */ private void buildSmooksResourceConfigurationTable(List resourceConfigsList) { for (final Object resourceConfig : resourceConfigsList) { addResourceConfiguration((SmooksResourceConfiguration) resourceConfig); } }
/** * Public Constructor. * <p/> * The execution context is constructed within the context of a target profile and * application context. * @param targetProfile The target profile (base profile) for this context. * These parameters are not appended to the supplied requestURI. This arg must be supplied, even if it's empty. * @param context The application context. * @param contentEncoding Character encoding to be used when parsing content. Null * defaults to "UTF-8". * @param extendedVisitorConfigMap Preconfigured/extended Visitor Configuration Map. * @throws UnknownProfileMemberException Unknown target profile. */ public StandaloneExecutionContext(String targetProfile, ApplicationContext context, String contentEncoding, VisitorConfigMap extendedVisitorConfigMap) throws UnknownProfileMemberException { if(targetProfile == null) { throw new IllegalArgumentException("null 'targetProfile' arg in constructor call."); } if(context == null) { throw new IllegalArgumentException("null 'context' arg in constructor call."); } this.context = context; setContentEncoding(contentEncoding); targetProfileSet = context.getProfileStore().getProfileSet(targetProfile); deliveryConfig = ContentDeliveryConfigBuilder.getConfig(targetProfileSet, context, extendedVisitorConfigMap); isDefaultSerializationOn = ParameterAccessor.getBoolParameter(Filter.DEFAULT_SERIALIZATION_ON, true, deliveryConfig); }