All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.spring.extender.context.xml Maven / Gradle / Ivy

Go to download

Contains the entire NEBA core implementation, i.e. the framework that interprets the NEBA API annotations and provides implementations for the service and lifecycle callback interfaces provided in the NEBA API. This package must not export anything as its implementation details are entirely private.

There is a newer version: 5.2.3
Show newest version
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	   xmlns:bp="http://www.osgi.org/xmlns/blueprint/v1.0.0"
	   xmlns:context="http://www.springframework.org/schema/context"
	   xmlns:util="http://www.springframework.org/schema/util"
	   xmlns:task="http://www.springframework.org/schema/task"
	   xmlns:compendium="http://www.eclipse.org/gemini/blueprint/schema/blueprint-compendium"

	   xsi:schemaLocation="http://www.springframework.org/schema/beans
           http://www.springframework.org/schema/beans/spring-beans-4.3.xsd
           http://www.springframework.org/schema/util
           http://www.springframework.org/schema/util/spring-util-4.3.xsd
           http://www.springframework.org/schema/task
           http://www.springframework.org/schema/task/spring-task-4.3.xsd
           http://www.osgi.org/xmlns/blueprint/v1.0.0
           http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
           http://www.springframework.org/schema/context
           http://www.springframework.org/schema/context/spring-context-4.3.xsd
           http://www.eclipse.org/gemini/blueprint/schema/blueprint-compendium
           http://www.eclipse.org/gemini/blueprint/schema/blueprint-compendium/gemini-blueprint-compendium.xsd">

	<context:component-scan base-package="io.neba.core" />

	<task:annotation-driven  proxy-target-class="true"/>

    <task:executor id="singlethreaded" pool-size="1" queue-capacity="1" rejection-policy="DISCARD_OLDEST" />
	
	<util:constant
		static-field="io.neba.core.resourcemodels.registration.ModelRegistryConsolePlugin.LABEL"
		id="modelRegistryLabel" />

    <!-- A java.util.Properties instance called "extenderProperties" is automatically used by blueprint extender (naming convention) -->
    <util:properties id="extenderProperties" location="io/neba/core/blueprint/extender.properties" />

	<bp:blueprint>
		<!-- References to other OSGi services -->
		<bp:reference interface="org.apache.sling.api.resource.ResourceResolverFactory" id="resourceResolverFactory" />

        <bp:reference interface="org.osgi.service.cm.ConfigurationAdmin" id="configurationAdmin"/>

		<bp:reference interface="javax.servlet.ServletContext" id="servletContext" />

		<bp:reference interface="javax.servlet.ServletConfig" id="servletConfig" />

		<bp:reference interface="org.apache.sling.api.servlets.ServletResolver" id="servletResolver" />

		<!-- All post processors are used by the mapper -->
		<bp:reference-list interface="io.neba.api.resourcemodels.ResourceModelPostProcessor" availability="optional">
			<bp:reference-listener ref="resourceToModelMapper" bind-method="bind" unbind-method="unbind" />
		</bp:reference-list>
		<!-- All caches are used by the adapter factory -->
		<bp:reference-list interface="io.neba.api.resourcemodels.ResourceModelCache" availability="optional">
			<bp:reference-listener ref="resourceModelCaches" bind-method="bind" unbind-method="unbind" />
		</bp:reference-list>
		<!-- All custom injectors are used by the resource to model mapper -->
		<bp:reference-list interface="io.neba.api.resourcemodels.AnnotatedFieldMapper" availability="optional">
			<bp:reference-listener ref="annotatedFieldMappers" bind-method="bind" unbind-method="unbind" />
		</bp:reference-list>

		<!-- Beans not providable by classpath scanning -->
		<bp:bean class="org.springframework.web.filter.RequestContextFilter" id="requestContextFilter" />

		<bp:bean class="io.neba.core.resourcemodels.caching.RequestScopedResourceModelCache" id="requestScopedResourceModelCache">
			<compendium:managed-properties persistent-id="io.neba.core.resourcemodels.caching.RequestScopedResourceModelCacheConfiguration" autowire-on-update="true" />
		</bp:bean>

		<!-- Beans exported as OSGi services -->
		<bp:service ref="requestScopedResourceModelCache" id="requestScopedResourceModelCacheService">
            <bp:interfaces>
                <bp:value>io.neba.api.resourcemodels.ResourceModelCache</bp:value>
                <bp:value>javax.servlet.Filter</bp:value>
            </bp:interfaces>
			<bp:service-properties>
                <entry key="sling.filter.scope">
                    <array value-type="java.lang.String">
                        <value>REQUEST</value>
                        <value>ERROR</value>
                    </array>
                </entry>
                <entry key="service.description" value="A request-scoped resource model cache." />
				<entry key="service.vendor" value="neba.io" />
			</bp:service-properties>
		</bp:service>

		<bp:service interface="javax.servlet.Filter" ref="requestContextFilter" id="requestContextFilterService">
			<bp:service-properties>
				<entry key="sling.filter.scope">
					<array value-type="java.lang.String">
						<value>REQUEST</value>
						<value>ERROR</value>
					</array>
				</entry>
				<entry key="service.description" value="Exposes HTTP requests and their attributes via a ThreadLocal." />
				<entry key="service.vendor" value="Springsource" />
			</bp:service-properties>
		</bp:service>

		<bp:service interface="javax.servlet.Servlet" ref="mvcServlet">
			<bp:service-properties>
				<entry key="sling.servlet.paths">
                    <array value-type="java.lang.String">
                        <value>/mvc</value>
                        <value>/bin/mvc</value>
                    </array>
				</entry>
				<entry key="service.description" value="A generic servlet that handles all requests using Spring MVC." />
				<entry key="service.vendor" value="neba.io" />
			</bp:service-properties>
		</bp:service>

		<bp:service ref="modelRegistryConsolePlugin" interface="javax.servlet.Servlet">
			<bp:service-properties>
				<entry key="felix.webconsole.label" value-ref="modelRegistryLabel" />
				<entry key="service.description" value="Provides a felix console plugin listing all registered @ResourceModel's." />
				<entry key="service.vendor" value="neba.io" />
			</bp:service-properties>
		</bp:service>

        <bp:service ref="logfileViewerConsolePlugin" interface="javax.servlet.Servlet" ranking="0">
            <bp:service-properties>
                <bp:entry key="felix.webconsole.label" value="logviewer"/>
                <bp:entry key="service.vendor" value="neba.io"/>
                <bp:entry key="service.description"
                          value="Provides a Felix console plugin for monitoring and downloading Sling logfiles."/>
            </bp:service-properties>
        </bp:service>

        <bp:service ref="modelStatisticsConsolePlugin" interface="javax.servlet.Servlet" ranking="0">
            <bp:service-properties>
                <bp:entry key="felix.webconsole.label" value="modelstatistics"/>
                <bp:entry key="service.vendor" value="neba.io"/>
                <bp:entry key="service.description"
                          value="Provides a Felix console plugin visualizing resource @ResourceModel statistics."/>
            </bp:service-properties>
        </bp:service>

        <bp:service ref="resourceModelProviderImpl" interface="io.neba.api.resourcemodels.ResourceModelProvider" />

		<bp:service ref="mappableTypeHierarchyChangeListener" interface="org.osgi.service.event.EventHandler">
			<bp:service-properties>
				<entry key="event.topics" value="org/apache/sling/api/resource/Resource/CHANGED"/>
				<!-- React to changes potentially altering the cacheable resource type hierarchy, unless they are occurring
				     in a location known not to contain data relevant to the type hierarchy, such as /var or /content -->
				<entry key="event.filter" value="(&amp;
				 (!(path=/content/*))
				 (!(path=/var/*))
				 (!(path=/jcr:*))
				 (!(path=/oak:*))
				 (|
						(resourceAddedAttributes=jcr:mixinTypes)
						(resourceAddedAttributes=sling:resourceSuperType)
						(resourceChangedAttributes=jcr:mixinTypes)
						(resourceChangedAttributes=sling:resourceType)
						(resourceChangedAttributes=sling:resourceSuperType)
						(resourceRemovedAttributes=sling:resourceSuperType)
						(resourceRemovedAttributes=jcr:mixinTypes)
				))" />
				<entry key="service.description" value="An event handler invalidating cache resource type hierarchy information." />
				<entry key="service.vendor" value="neba.io" />
			</bp:service-properties>
		</bp:service>
	</bp:blueprint>
</beans>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy