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

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

The newest version!
<?xml version="1.0" encoding="UTF-8"?>
<!--

    Unless explicitly acquired and licensed from Licensor under another license, the contents of
    this file are subject to the Reciprocal Public License ("RPL") Version 1.5, or subsequent
    versions as allowed by the RPL, and You may not copy or use this file in either source code
    or executable form, except in compliance with the terms and conditions of the RPL

    All software distributed under the RPL is provided strictly on an "AS IS" basis, WITHOUT
    WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, AND LICENSOR HEREBY DISCLAIMS ALL SUCH
    WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
    PARTICULAR PURPOSE, QUIET ENJOYMENT, OR NON-INFRINGEMENT. See the RPL for specific language
    governing rights and limitations under the RPL.

    http://opensource.org/licenses/RPL-1.5

    Copyright 2012-2017 Open Justice Broker Consortium

-->
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camel="http://camel.apache.org/schema/spring"
	xmlns:context="http://www.springframework.org/schema/context"
	xmlns:util="http://www.springframework.org/schema/util"
	xsi:schemaLocation="
       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
       http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
       http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
       http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd
       ">

	<!-- needed cxf imports -->
	<import resource="classpath:META-INF/cxf/cxf.xml" />

	<context:component-scan base-package="org.ojbc.bundles.utilities.auditing" />

	<camel:camelContext xmlns="http://camel.apache.org/schema/spring"
		id="audit_rest_utility_context">

		<route>
			<from uri="cxfrs:bean:auditServer" />
			<log
				message="Entering audit REST route: Http method ${header.CamelHttpMethod}" />
			<log message="REST path is ${header.CamelHttpPath}, operation name: ${header.operationName}" />
			<choice>
				<when>
					<simple>${header.operationName} == 'auditPrintResults'</simple>
					<to uri="direct:auditPrintResults" />
				</when>
				<when>
					<simple>${header.operationName} == 'auditUserLogin'</simple>
					<to uri="direct:auditUserLogin" />
				</when>

				<when>
					<simple>${header.operationName} == 'auditUserLogout'</simple>
					<to uri="direct:auditUserLogout" />
				</when>
				
				<when>
					<simple>${header.operationName} == 'searchForFederalRapbackSubscriptions'</simple>
					<to uri="direct:searchForFederalRapbackSubscriptionsByStateSubscriptionId" />
				</when>

				<when>
					<simple>${header.operationName} == 'retrieveExpiringSubscriptions'</simple>
					<to uri="direct:retrieveExpiringSubscriptions" />
				</when>

				<when>
					<simple>${header.operationName} == 'retrieveExpiredSubscriptions'</simple>
					<to uri="direct:retrieveExpiredSubscriptions" />
				</when>

				<when>
					<simple>${header.operationName} == 'retrieveAllAgencies'</simple>
					<to uri="direct:retrieveAllAgencies" />
				</when>
				
				<when>
					<simple>${header.operationName} == 'retrieveRapbackNotifications'</simple>
					<to uri="direct:retrieveRapbackNotifications" />
				</when>				
				
				<when>
					<simple>${header.operationName} == 'retrieveNotificationsSent'</simple>
					<to uri="direct:retrieveNotificationsSent" />
				</when>				
				
				<when>
					<simple>${header.operationName} == 'searchForFederalRapbackNotifications'</simple>
					<to uri="direct:searchForFederalRapbackNotificationsByStateSubscriptionId" />
				</when>
				
				<when>
					<simple>${header.operationName} == 'retrieveFederalRapbackSubscriptionErrors'</simple>
					<to uri="direct:retrieveFederalRapbackSubscriptionErrors" />
				</when>
				
				<when>
					<simple>${header.operationName} == 'returnFederalRapbackSubscriptionDetail'</simple>
					<to uri="direct:returnFederalRapbackSubscriptionDetail" />
				</when>
				
				<when>
					<simple>${header.operationName} == 'auditUserAcknowledgement'</simple>
					<to uri="direct:auditUserAcknowledgement" />
				</when>

				<when>
					<simple>${header.operationName} == 'retrieveUserAuthentications'</simple>
					<to uri="direct:retrieveUserAuthentications" />
				</when>

				<when>
					<simple>${header.operationName} == 'retrievePersonSearchRequest'</simple>
					<to uri="direct:retrievePersonSearchRequest" />
				</when>

				<when>
					<simple>${header.operationName} == 'retrieveFirearmSearchRequest'</simple>
					<to uri="direct:retrieveFirearmSearchRequest" />
				</when>

				<when>
					<simple>${header.operationName} == 'retrieveVehicleSearchRequest'</simple>
					<to uri="direct:retrieveVehicleSearchRequest" />
				</when>

				<when>
					<simple>${header.operationName} == 'retrieveIncidentSearchRequest'</simple>
					<to uri="direct:retrieveIncidentSearchRequest" />
				</when>
				
			</choice>
		</route>

		<route id="directRetrievePersonSearchRequest">
			<from uri="direct:retrievePersonSearchRequest" />
			
			<camel:log message="Return Person Search Request"/>
			
			<bean ref="auditRestImpl" method="retrievePersonSearchRequest" />
		</route>	

		<route id="directRetrieveFirearmSearchRequest">
			<from uri="direct:retrieveFirearmSearchRequest" />
			
			<camel:log message="Return Firearm Search Request"/>
			
			<bean ref="auditRestImpl" method="retrieveFirearmSearchRequest" />
		</route>	

		<route id="directRetrieveVehicleSearchRequest">
			<from uri="direct:retrieveVehicleSearchRequest" />
			
			<camel:log message="Return Vehicle Search Requests"/>
			
			<bean ref="auditRestImpl" method="retrieveVehicleSearchRequest" />
		</route>	

		<route id="directRetrieveIncidentSearchRequest">
			<from uri="direct:retrieveIncidentSearchRequest" />
			
			<camel:log message="Return Incident Search Requests"/>
			
			<bean ref="auditRestImpl" method="retrieveIncidentSearchRequest" />
		</route>	
		
		
		<route id="directRetrieveUserAuthentications">
			<from uri="direct:retrieveUserAuthentications" />
			
			<camel:log message="Return User Authentications"/>
			
			<bean ref="auditRestImpl" method="retrieveUserAuthentications" />
		</route>	
		
		<route id="directReturnFederalRapbackSubscriptionDetail">
			<from uri="direct:returnFederalRapbackSubscriptionDetail" />
			
			<camel:log message="Return Federal Rapback Subscription Detail"/>
			
			<bean ref="auditRestImpl" method="returnFederalRapbackSubscriptionDetail" />
		</route>		
		
		<route id="directRetrieveFederalRapbackSubscriptionErrors">
			<from uri="direct:retrieveFederalRapbackSubscriptionErrors" />
			
			<camel:log message="Retrieve Federal Rapback Subscription Errors"/>
			
			<bean ref="auditRestImpl" method="retrieveFederalRapbackSubscriptionErrors" />
		</route>			

		<route id="directSearchForFederalRapbackNotificationsByStateSubscriptionId">
			<from uri="direct:searchForFederalRapbackNotificationsByStateSubscriptionId" />
			
			<camel:log message="Retrieve Federal Rapback Notifications by State Subscription ID"/>
			
			<bean ref="auditRestImpl" method="searchForFederalRapbackNotifications" />
		</route>	

		<route id="directRetrieveRapbackNotifications">
			<from uri="direct:retrieveRapbackNotifications" />
			
			<camel:log message="Retrieve All Federal Rapback Notifications"/>
			
			<bean ref="auditRestImpl" method="retrieveRapbackNotifications" />
		</route>	

		<route id="directRetrieveNotificationsSent">
			<from uri="direct:retrieveNotificationsSent" />
			
			<camel:log message="Retrieve All Notifications Sent"/>
			
			<bean ref="auditRestImpl" method="retrieveNotificationsSent" />
		</route>	
				
		<route id="directRetrieveAllAgencies">
			<from uri="direct:retrieveAllAgencies" />
			
			<camel:log message="Retrieve All Agencies"/>
			
			<bean ref="auditRestImpl" method="retrieveAllAgencies" />
		</route>		
		
		<route id="directRetrieveExpiredSubscriptions">
			<from uri="direct:retrieveExpiredSubscriptions" />
			
			<camel:log message="Retrieve Expired Subscriptions"/>
			
			<bean ref="auditRestImpl" method="retrieveExpiredSubscriptions" />
		</route>

		<route id="directRetrieveExpiringSubscriptions">
			<from uri="direct:retrieveExpiringSubscriptions" />
			
			<camel:log message="Retrieve Expiring Subscriptions"/>
			
			<bean ref="auditRestImpl" method="retrieveExpiringSubscriptions" />
		</route>

		<route id="directSearchForFederalRapbackSubscriptionsByStateSubscriptionId">
			<from uri="direct:searchForFederalRapbackSubscriptionsByStateSubscriptionId" />
			
			<camel:log message="Searching for federal subscriptions"/>
			
			<bean ref="auditRestImpl" method="searchForFederalRapbackSubscriptions" />
		</route>
		
		<route id="directAuditPrintResults">
			<from uri="direct:auditPrintResults" />
			<bean ref="auditRestImpl" method="auditPrintResults" />
		</route>

		<route id="directAuditUserLogin">
			<from uri="direct:auditUserLogin" />
			<bean ref="auditRestImpl" method="auditUserLogin" />
		</route>
		
		<route id="directAuditUserLogout">
			<from uri="direct:auditUserLogout" />
			<bean ref="auditRestImpl" method="auditUserLogout" />
		</route>		
		
		<route id="directAuditUserAcknowledgement">
			<from uri="direct:auditUserAcknowledgement" />
			<bean ref="auditRestImpl" method="auditUserAcknowledgement" />
		</route>			
	</camel:camelContext>
	
	<bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
 	   <constructor-arg ref="dataSourceEnhancedAudit"/>
	</bean>
	
	<bean id="namedParameterJdbcTemplate" 
      class="org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate">
 	   <constructor-arg ref="dataSourceEnhancedAudit"/>
	</bean>

	<bean id="enhancedAuditDAOImpl" class="org.ojbc.audit.enhanced.dao.EnhancedAuditDAOImpl">
		<property name="jdbcTemplate" ref="jdbcTemplate"/>
		<property name="namedParameterJdbcTemplate" ref="namedParameterJdbcTemplate"/>
	</bean>    
    
    <bean id="subscriptionSearchQueryDAO" class="org.ojbc.intermediaries.sn.dao.SubscriptionSearchQueryDAO">
        <property name="dataSource" ref="dataSourceSubscriptions"/>
		<property name="fbiSubscriptionMember" value="${publishSubscribe.fbiSubscriptionMember:true}"/>
    </bean>
    
    
    <bean id="dataSourceSubscriptions" class="org.apache.commons.dbcp.BasicDataSource"
		destroy-method="close">
		<property name="driverClassName" value="${rapbackDatastoreAdapter.dataSource.driverClass}" />
		<property name="url" value="${rapbackDatastoreAdapter.dataSource.jdbcUrl}" />
		<property name="username" value="${rapbackDatastoreAdapter.dataSource.user}" />
		<property name="password" value="${rapbackDatastoreAdapter.dataSource.password}" />
		<property name="initialSize" value="${rapbackDatastoreAdapter.dataSource.minPoolSize}" />
		<property name="maxActive" value="${rapbackDatastoreAdapter.dataSource.maxPoolSize}" />
		<property name="validationQuery" value="select 1" />
		<property name="testOnBorrow" value="true" />
	</bean>	
    
	<bean id="dataSourceEnhancedAudit" class="org.apache.commons.dbcp.BasicDataSource"
		destroy-method="close">
		<property name="driverClassName" value="${enhancedAudit.dataSource.driverClass}" />
		<property name="url" value="${enhancedAudit.dataSource.jdbcUrl}" />
		<property name="username" value="${enhancedAudit.dataSource.user}" />
		<property name="password" value="${enhancedAudit.dataSource.password}" />
		<property name="initialSize" value="${enhancedAudit.dataSource.minPoolSize}" />
		<property name="maxActive" value="${enhancedAudit.dataSource.maxPoolSize}" />
		<property name="validationQuery" value="select 1" />
		<property name="testOnBorrow" value="true" />
	</bean>	
	
	<util:map id="notificationSystemToTriggeringEvent">
        <entry key="LOTC" value="Arrest"/>
        <entry key="http://www.hawaii.gov/arrestNotificationProducer" value="Arrest"/>
    </util:map>	
</beans>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy