Issue #1931 Implemented REST binding for registry
Change-Id: I604c02dc849e380f70e2d27fa1f2b30dadcf0776 Former-commit-id:9a7971c872
[formerly9065ebcb65
] [formerly9a7971c872
[formerly9065ebcb65
] [formerly3d2e073dd7
[formerly daef43d8947f690d15f9314f85b8cf31d30c06ab]]] Former-commit-id:3d2e073dd7
Former-commit-id:6edfda46bf
[formerlycf7da4b001
] Former-commit-id:a45aba204f
This commit is contained in:
parent
5cadb52fff
commit
90d4a9daec
29 changed files with 1030 additions and 615 deletions
|
@ -24,6 +24,8 @@ Bundle-ClassPath: cxf-2.5.0.jar,
|
||||||
Export-Package: javax.servlet,
|
Export-Package: javax.servlet,
|
||||||
javax.servlet.http,
|
javax.servlet.http,
|
||||||
javax.ws.rs,
|
javax.ws.rs,
|
||||||
|
javax.ws.rs.core,
|
||||||
|
javax.ws.rs.ext,
|
||||||
org.apache.cxf.annotations,
|
org.apache.cxf.annotations,
|
||||||
org.apache.cxf.binding.soap,
|
org.apache.cxf.binding.soap,
|
||||||
org.apache.cxf.binding.soap.blueprint,
|
org.apache.cxf.binding.soap.blueprint,
|
||||||
|
|
|
@ -28,7 +28,6 @@ export DATADELIVERY_PORT=9588
|
||||||
# Currently the registry is hosted on datadelivery, but this could be changed in the future
|
# Currently the registry is hosted on datadelivery, but this could be changed in the future
|
||||||
export EBXML_REGISTRY_HOST=${DATADELIVERY_HOST}
|
export EBXML_REGISTRY_HOST=${DATADELIVERY_HOST}
|
||||||
export EBXML_REGISTRY_PORT=${DATADELIVERY_PORT}
|
export EBXML_REGISTRY_PORT=${DATADELIVERY_PORT}
|
||||||
export EBXML_REGISTRY_SOAP_PORT=10144
|
|
||||||
export EBXML_REGISTRY_REPLICATION=1
|
export EBXML_REGISTRY_REPLICATION=1
|
||||||
|
|
||||||
# moved here from environment.xml
|
# moved here from environment.xml
|
||||||
|
@ -39,8 +38,8 @@ export JMS_SERVER=tcp://localhost:5672
|
||||||
export RADAR_SERVER=tcp://localhost:8813
|
export RADAR_SERVER=tcp://localhost:8813
|
||||||
export DATADELIVERY_SERVER=http://${DATADELIVERY_HOST}:${DATADELIVERY_PORT}/services
|
export DATADELIVERY_SERVER=http://${DATADELIVERY_HOST}:${DATADELIVERY_PORT}/services
|
||||||
export EBXML_REGISTRY_SERVICE=http://${EBXML_REGISTRY_HOST}:${EBXML_REGISTRY_PORT}/services
|
export EBXML_REGISTRY_SERVICE=http://${EBXML_REGISTRY_HOST}:${EBXML_REGISTRY_PORT}/services
|
||||||
export EBXML_REGISTRY_LCM_SERVICE=http://${EBXML_REGISTRY_HOST}:${EBXML_REGISTRY_SOAP_PORT}/lifecycleManager?WSDL
|
export EBXML_REGISTRY_LCM_SERVICE=http://${EBXML_REGISTRY_HOST}:${EBXML_REGISTRY_PORT}/lifecycleManager?WSDL
|
||||||
export EBXML_REGISTRY_QUERY_SERVICE=http://${EBXML_REGISTRY_HOST}:${EBXML_REGISTRY_SOAP_PORT}/queryManager?WSDL
|
export EBXML_REGISTRY_QUERY_SERVICE=http://${EBXML_REGISTRY_HOST}:${EBXML_REGISTRY_PORT}/queryManager?WSDL
|
||||||
export NCF_BANDWIDTH_MANAGER_SERVICE=http://${DATADELIVERY_HOST}:9590/services
|
export NCF_BANDWIDTH_MANAGER_SERVICE=http://${DATADELIVERY_HOST}:9590/services
|
||||||
|
|
||||||
# set the AWIPS II shared directory
|
# set the AWIPS II shared directory
|
||||||
|
|
54
edexOsgi/build.edex/esb/conf/spring/edex-db.xml
Normal file
54
edexOsgi/build.edex/esb/conf/spring/edex-db.xml
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
<?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:context="http://www.springframework.org/schema/context"
|
||||||
|
xmlns:util="http://www.springframework.org/schema/util" xmlns:tx="http://www.springframework.org/schema/tx"
|
||||||
|
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
|
||||||
|
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
|
||||||
|
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
|
||||||
|
http://www.springframework.org/schema/util
|
||||||
|
http://www.springframework.org/schema/util/spring-util-2.5.xsd
|
||||||
|
http://www.springframework.org/schema/tx
|
||||||
|
http://www.springframework.org/schema/tx/spring-tx.xsd">
|
||||||
|
|
||||||
|
<tx:annotation-driven transaction-manager="metadataTxManager"
|
||||||
|
proxy-target-class="true" />
|
||||||
|
|
||||||
|
<bean id="metadataDbSessionConfig"
|
||||||
|
class="com.raytheon.uf.edex.database.DatabaseSessionConfiguration">
|
||||||
|
<property name="excludes">
|
||||||
|
<list>
|
||||||
|
<value>com.raytheon.uf.common.dataplugin.text</value>
|
||||||
|
<value>com.raytheon.edex.plugin.shef</value>
|
||||||
|
</list>
|
||||||
|
</property>
|
||||||
|
</bean>
|
||||||
|
<bean id="metadataSessionFactory"
|
||||||
|
class="com.raytheon.uf.edex.database.DatabaseSessionFactoryBean">
|
||||||
|
<property name="configLocation">
|
||||||
|
<value>file:///${edex.home}/conf/db/hibernateConfig/metadata/hibernate.cfg.xml
|
||||||
|
</value>
|
||||||
|
</property>
|
||||||
|
<!-- >property name="dataSource"><ref bean="datasourceMetadata"/></property -->
|
||||||
|
<property name="databaseSessionConfiguration" ref="metadataDbSessionConfig" />
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<bean id="metadataTxManager"
|
||||||
|
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
|
||||||
|
<property name="sessionFactory" ref="metadataSessionFactory" />
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<bean id="mapsSessionFactory"
|
||||||
|
class="com.raytheon.uf.edex.database.DatabaseSessionFactoryBean">
|
||||||
|
<!-- no annotations to load, so no databaseSessionConfig -->
|
||||||
|
<property name="configLocation">
|
||||||
|
<value>file:///${edex.home}/conf/db/hibernateConfig/maps/hibernate.cfg.xml
|
||||||
|
</value>
|
||||||
|
</property>
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<bean id="mapsTxManager"
|
||||||
|
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
|
||||||
|
<property name="sessionFactory" ref="mapsSessionFactory" />
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
</beans>
|
|
@ -12,8 +12,9 @@
|
||||||
http://www.springframework.org/schema/util/spring-util-2.5.xsd
|
http://www.springframework.org/schema/util/spring-util-2.5.xsd
|
||||||
http://www.springframework.org/schema/tx
|
http://www.springframework.org/schema/tx
|
||||||
http://www.springframework.org/schema/tx/spring-tx.xsd">
|
http://www.springframework.org/schema/tx/spring-tx.xsd">
|
||||||
|
|
||||||
<tx:annotation-driven transaction-manager="metadataTxManager" proxy-target-class="true" />
|
<!-- Separated out database specific beans to seperate file so they can be loaded by themselves if necessary -->
|
||||||
|
<import resource="file:///${edex.home}/conf/spring/edex-db.xml"/>
|
||||||
|
|
||||||
<!-- specify the connection to the broker (qpid) -->
|
<!-- specify the connection to the broker (qpid) -->
|
||||||
<!-- MaxPrefetch set at 0, due to DataPool routers getting messages backed up behind long running tasks -->
|
<!-- MaxPrefetch set at 0, due to DataPool routers getting messages backed up behind long running tasks -->
|
||||||
|
@ -279,41 +280,6 @@
|
||||||
<!--
|
<!--
|
||||||
<commandAgent xmlns="http://activemq.apache.org/schema/core" brokerUrl="vm://localhost"/>
|
<commandAgent xmlns="http://activemq.apache.org/schema/core" brokerUrl="vm://localhost"/>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<bean id="metadataDbSessionConfig" class="com.raytheon.uf.edex.database.DatabaseSessionConfiguration">
|
|
||||||
<property name="excludes">
|
|
||||||
<list>
|
|
||||||
<value>com.raytheon.uf.common.dataplugin.text</value>
|
|
||||||
<value>com.raytheon.edex.plugin.shef</value>
|
|
||||||
</list>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
<bean id="metadataSessionFactory"
|
|
||||||
class="com.raytheon.uf.edex.database.DatabaseSessionFactoryBean">
|
|
||||||
<property name="configLocation">
|
|
||||||
<value>file:///${edex.home}/conf/db/hibernateConfig/metadata/hibernate.cfg.xml</value>
|
|
||||||
</property>
|
|
||||||
<!-- >property name="dataSource"><ref bean="datasourceMetadata"/></property-->
|
|
||||||
<property name="databaseSessionConfiguration" ref="metadataDbSessionConfig"/>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="metadataTxManager"
|
|
||||||
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
|
|
||||||
<property name="sessionFactory" ref="metadataSessionFactory" />
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="mapsSessionFactory"
|
|
||||||
class="com.raytheon.uf.edex.database.DatabaseSessionFactoryBean">
|
|
||||||
<!-- no annotations to load, so no databaseSessionConfig -->
|
|
||||||
<property name="configLocation">
|
|
||||||
<value>file:///${edex.home}/conf/db/hibernateConfig/maps/hibernate.cfg.xml</value>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="mapsTxManager"
|
|
||||||
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
|
|
||||||
<property name="sessionFactory" ref="mapsSessionFactory" />
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<!-- Redirect geotools log -->
|
<!-- Redirect geotools log -->
|
||||||
<bean class="com.raytheon.uf.common.geospatial.LogRedirector" factory-method="getInstance"/>
|
<bean class="com.raytheon.uf.common.geospatial.LogRedirector" factory-method="getInstance"/>
|
||||||
|
|
|
@ -1,96 +0,0 @@
|
||||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://www.springframework.org/schema/tx"
|
|
||||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
|
|
||||||
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
|
|
||||||
http://www.springframework.org/schema/tx
|
|
||||||
http://www.springframework.org/schema/tx/spring-tx.xsd">
|
|
||||||
|
|
||||||
<!-- This file should only contain beans used on a running EDEX instance. -->
|
|
||||||
|
|
||||||
<bean id="ebxmlDbValidationStrategy"
|
|
||||||
class="com.raytheon.uf.edex.registry.ebxml.dao.EbxmlPostgresValidationStrategy" />
|
|
||||||
|
|
||||||
<bean id="registrySubscriptionManagerInvoker"
|
|
||||||
class="com.raytheon.uf.edex.registry.ebxml.dao.EsbRouteRegistrySubscriptionManagerInvocation" />
|
|
||||||
|
|
||||||
<!-- start service -->
|
|
||||||
<bean id="queryServiceFactory" class="org.apache.cxf.jaxws.JaxWsServerFactoryBean"
|
|
||||||
init-method="create">
|
|
||||||
<property name="serviceClass"
|
|
||||||
value="oasis.names.tc.ebxml.regrep.wsdl.registry.services.v4.QueryManager" />
|
|
||||||
<property name="address">
|
|
||||||
<bean factory-bean="ServiceUrlFactory" factory-method="getServiceAddress">
|
|
||||||
<constructor-arg value="queryManager" />
|
|
||||||
<constructor-arg value="${EBXML_QUERY_SERVICE_SOAP_PORT}" />
|
|
||||||
</bean>
|
|
||||||
</property>
|
|
||||||
<property name="serviceBean" ref="queryServiceSoapImpl" />
|
|
||||||
<property name="inInterceptors">
|
|
||||||
<list>
|
|
||||||
<ref bean="XACMLPolicyEnforcementPoint" />
|
|
||||||
</list>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<!-- start service -->
|
|
||||||
<bean id="notificationServiceFactory" class="org.apache.cxf.jaxws.JaxWsServerFactoryBean"
|
|
||||||
init-method="create">
|
|
||||||
<property name="serviceClass"
|
|
||||||
value="oasis.names.tc.ebxml.regrep.wsdl.registry.services.v4.NotificationListener" />
|
|
||||||
<property name="address">
|
|
||||||
<bean factory-bean="ServiceUrlFactory" factory-method="getServiceAddress">
|
|
||||||
<constructor-arg value="notificationListener" />
|
|
||||||
<constructor-arg value="${EBXML_QUERY_SERVICE_SOAP_PORT}" />
|
|
||||||
</bean>
|
|
||||||
</property>
|
|
||||||
<property name="serviceBean" ref="notificationServiceImpl" />
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<!-- start service -->
|
|
||||||
<bean id="lcmServiceFactory" class="org.apache.cxf.jaxws.JaxWsServerFactoryBean"
|
|
||||||
init-method="create">
|
|
||||||
<property name="serviceClass"
|
|
||||||
value="oasis.names.tc.ebxml.regrep.wsdl.registry.services.v4.LifecycleManager" />
|
|
||||||
<property name="address">
|
|
||||||
<bean factory-bean="ServiceUrlFactory" factory-method="getServiceAddress">
|
|
||||||
<constructor-arg value="lifecycleManager" />
|
|
||||||
<constructor-arg value="${EBXML_QUERY_SERVICE_SOAP_PORT}" />
|
|
||||||
</bean>
|
|
||||||
</property>
|
|
||||||
<property name="serviceBean" ref="lcmServiceImpl" />
|
|
||||||
<property name="inInterceptors">
|
|
||||||
<list>
|
|
||||||
<ref bean="XACMLPolicyEnforcementPoint" />
|
|
||||||
</list>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<!-- start service -->
|
|
||||||
<bean id="validatorServiceFactory" class="org.apache.cxf.jaxws.JaxWsServerFactoryBean"
|
|
||||||
init-method="create">
|
|
||||||
<property name="serviceClass"
|
|
||||||
value="oasis.names.tc.ebxml.regrep.wsdl.registry.services.v4.Validator" />
|
|
||||||
<property name="address">
|
|
||||||
<bean factory-bean="ServiceUrlFactory" factory-method="getServiceAddress">
|
|
||||||
<constructor-arg value="validator" />
|
|
||||||
<constructor-arg value="${EBXML_QUERY_SERVICE_SOAP_PORT}" />
|
|
||||||
</bean>
|
|
||||||
</property>
|
|
||||||
<property name="serviceBean" ref="validatorServiceImpl" />
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<!-- start service -->
|
|
||||||
<bean id="catalogerServiceFactory" class="org.apache.cxf.jaxws.JaxWsServerFactoryBean"
|
|
||||||
init-method="create">
|
|
||||||
<property name="serviceClass"
|
|
||||||
value="oasis.names.tc.ebxml.regrep.wsdl.registry.services.v4.Cataloger" />
|
|
||||||
<property name="address">
|
|
||||||
<bean factory-bean="ServiceUrlFactory" factory-method="getServiceAddress">
|
|
||||||
<constructor-arg value="cataloger" />
|
|
||||||
<constructor-arg value="${EBXML_QUERY_SERVICE_SOAP_PORT}" />
|
|
||||||
</bean>
|
|
||||||
</property>
|
|
||||||
<property name="serviceBean" ref="catalogerServiceImpl" />
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
</beans>
|
|
|
@ -4,57 +4,6 @@
|
||||||
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
|
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
|
||||||
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
|
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
|
||||||
|
|
||||||
<!-- <bean id="metadataSessionFactory" class="org.hibernate.impl.SessionFactoryImpl"
|
|
||||||
/> -->
|
|
||||||
<!-- QUERY -->
|
|
||||||
<!-- Define concrete implementation of the service -->
|
|
||||||
<bean id="queryServiceImpl"
|
|
||||||
class="com.raytheon.uf.edex.registry.ebxml.services.query.QueryManagerImpl">
|
|
||||||
<property name="queryTypeMgr" ref="queryTypeManager" />
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="queryServiceSoapImpl"
|
|
||||||
class="com.raytheon.uf.edex.registry.ebxml.services.query.QueryManagerImpl">
|
|
||||||
<property name="eagerFetch" value="true" />
|
|
||||||
<property name="queryTypeMgr" ref="queryTypeManager" />
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<!-- NOTIFICATION LISTENER -->
|
|
||||||
<!-- Define concrete implementation of the service -->
|
|
||||||
<bean id="notificationServiceImpl"
|
|
||||||
class="com.raytheon.uf.edex.registry.ebxml.services.notification.NotificationListenerImpl">
|
|
||||||
<property name="lcm" ref="lcmServiceImpl" />
|
|
||||||
<property name="registryObjectDao" ref="registryObjectDao"/>
|
|
||||||
<property name="classificationNodeDao" ref="classificationNodeDao"/>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- LIFE CYCLE MANAGER -->
|
|
||||||
<!-- Define concrete implementation of the service -->
|
|
||||||
<bean id="lcmServiceImpl"
|
|
||||||
class="com.raytheon.uf.edex.registry.ebxml.services.lifecycle.LifecycleManagerImpl">
|
|
||||||
<property name="queryManager" ref="queryServiceImpl" />
|
|
||||||
<property name="validator" ref="validatorServiceImpl" />
|
|
||||||
<property name="registryObjectDao" ref="registryObjectDao" />
|
|
||||||
<property name="auditableEventDao" ref="AuditableEventTypeDao" />
|
|
||||||
<property name="cataloger" ref="catalogerServiceImpl" />
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<!-- VALIDATOR -->
|
|
||||||
<!-- Define concrete implementation of the service -->
|
|
||||||
<bean id="validatorServiceImpl"
|
|
||||||
class="com.raytheon.uf.edex.registry.ebxml.services.validator.ValidatorImpl">
|
|
||||||
<property name="queryManager" ref="queryServiceImpl" />
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- CATALOGER -->
|
|
||||||
<!-- Define concrete implementation of the service -->
|
|
||||||
<bean id="catalogerServiceImpl"
|
|
||||||
class="com.raytheon.uf.edex.registry.ebxml.services.cataloger.CatalogerImpl">
|
|
||||||
<property name="registryObjectDao" ref="registryObjectDao" />
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="edexRegistryManager"
|
<bean id="edexRegistryManager"
|
||||||
class="com.raytheon.uf.edex.registry.ebxml.util.EDEXRegistryManager">
|
class="com.raytheon.uf.edex.registry.ebxml.util.EDEXRegistryManager">
|
||||||
<property name="xacmlPep" ref="XACMLPolicyEnforcementPoint" />
|
<property name="xacmlPep" ref="XACMLPolicyEnforcementPoint" />
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
|
||||||
|
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
|
||||||
|
|
||||||
|
<bean id="DbInit" class="com.raytheon.uf.edex.registry.ebxml.dao.DbInit">
|
||||||
|
<property name="dbValidationStrategy" ref="ebxmlDbValidationStrategy" />
|
||||||
|
<property name="lcm" ref="lcmServiceImpl" />
|
||||||
|
<property name="sessionFactory" ref="metadataSessionFactory" />
|
||||||
|
<property name="xacmlAdmin" ref="XACMLPolicyAdministrator" />
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<bean id="ebxmlDbValidationStrategy"
|
||||||
|
class="com.raytheon.uf.edex.registry.ebxml.dao.EbxmlPostgresValidationStrategy" />
|
||||||
|
|
||||||
|
</beans>
|
|
@ -37,7 +37,7 @@
|
||||||
<property name="handlers">
|
<property name="handlers">
|
||||||
<list>
|
<list>
|
||||||
<bean class="org.eclipse.jetty.webapp.WebAppContext">
|
<bean class="org.eclipse.jetty.webapp.WebAppContext">
|
||||||
<property name="contextPath" value="/registryEbxml" />
|
<property name="contextPath" value="/" />
|
||||||
<property name="war"
|
<property name="war"
|
||||||
value="file:///${edex.home}/webapps/registryEbxml" />
|
value="file:///${edex.home}/webapps/registryEbxml" />
|
||||||
</bean>
|
</bean>
|
||||||
|
@ -52,16 +52,4 @@
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="RegistryWebUtil" class="com.raytheon.uf.edex.registry.ebxml.web.RegistryWebUtil">
|
|
||||||
<property name="lcm" ref="lcmServiceImpl" />
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="RegistryWebAdmin"
|
|
||||||
class="com.raytheon.uf.edex.registry.ebxml.web.RegistryWebAdmin">
|
|
||||||
<property name="partyDao" ref="partyDao" />
|
|
||||||
<property name="classificationNodeDao" ref="classificationNodeDao" />
|
|
||||||
<property name="organizationDao" ref="organizationDao" />
|
|
||||||
<property name="personDao" ref="personDao" />
|
|
||||||
<property name="roleDao" ref="roleDao" />
|
|
||||||
</bean>
|
|
||||||
</beans>
|
</beans>
|
|
@ -0,0 +1,102 @@
|
||||||
|
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||||
|
xmlns:amq="http://activemq.apache.org/schema/core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
|
||||||
|
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
|
||||||
|
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
|
||||||
|
|
||||||
|
<!-- QUERY -->
|
||||||
|
<!-- Define concrete implementation of the service -->
|
||||||
|
<bean id="queryServiceImpl"
|
||||||
|
class="com.raytheon.uf.edex.registry.ebxml.services.query.QueryManagerImpl">
|
||||||
|
<property name="queryTypeMgr" ref="queryTypeManager" />
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<!-- NOTIFICATION LISTENER -->
|
||||||
|
<!-- Define concrete implementation of the service -->
|
||||||
|
<bean id="notificationServiceImpl"
|
||||||
|
class="com.raytheon.uf.edex.registry.ebxml.services.notification.NotificationListenerImpl">
|
||||||
|
<property name="lcm" ref="lcmServiceImpl" />
|
||||||
|
<property name="registryObjectDao" ref="registryObjectDao" />
|
||||||
|
<property name="classificationNodeDao" ref="classificationNodeDao" />
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- LIFE CYCLE MANAGER -->
|
||||||
|
<!-- Define concrete implementation of the service -->
|
||||||
|
<bean id="lcmServiceImpl"
|
||||||
|
class="com.raytheon.uf.edex.registry.ebxml.services.lifecycle.LifecycleManagerImpl">
|
||||||
|
<property name="queryManager" ref="queryServiceImpl" />
|
||||||
|
<property name="validator" ref="validatorServiceImpl" />
|
||||||
|
<property name="registryObjectDao" ref="registryObjectDao" />
|
||||||
|
<property name="auditableEventDao" ref="AuditableEventTypeDao" />
|
||||||
|
<property name="cataloger" ref="catalogerServiceImpl" />
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<!-- VALIDATOR -->
|
||||||
|
<!-- Define concrete implementation of the service -->
|
||||||
|
<bean id="validatorServiceImpl"
|
||||||
|
class="com.raytheon.uf.edex.registry.ebxml.services.validator.ValidatorImpl">
|
||||||
|
<property name="queryManager" ref="queryServiceImpl" />
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- CATALOGER -->
|
||||||
|
<!-- Define concrete implementation of the service -->
|
||||||
|
<bean id="catalogerServiceImpl"
|
||||||
|
class="com.raytheon.uf.edex.registry.ebxml.services.cataloger.CatalogerImpl">
|
||||||
|
<property name="registryObjectDao" ref="registryObjectDao" />
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<!-- REST Service Beans -->
|
||||||
|
<bean name="AddRegistryParty"
|
||||||
|
class="com.raytheon.uf.edex.registry.ebxml.web.AddRegistryParty">
|
||||||
|
<property name="partyDao" ref="partyDao" />
|
||||||
|
<property name="lcm" ref="lcmServiceImpl" />
|
||||||
|
<property name="webUtil" ref="RegistryWebUtil" />
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<bean name="ModifyRegistryParty"
|
||||||
|
class="com.raytheon.uf.edex.registry.ebxml.web.ModifyRegistryParty">
|
||||||
|
<property name="partyDao" ref="partyDao" />
|
||||||
|
<property name="lcm" ref="lcmServiceImpl" />
|
||||||
|
<property name="webUtil" ref="RegistryWebUtil" />
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<bean name="DeleteRegistryParty"
|
||||||
|
class="com.raytheon.uf.edex.registry.ebxml.web.DeleteRegistryParty">
|
||||||
|
<property name="partyDao" ref="partyDao" />
|
||||||
|
<property name="webUtil" ref="RegistryWebUtil" />
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<bean id="registryObjectsRestService"
|
||||||
|
class="com.raytheon.uf.edex.registry.ebxml.services.rest.RegistryObjectsRestService">
|
||||||
|
<property name="registryObjectDao" ref="registryObjectDao" />
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<bean id="repositoryObjectsRestService"
|
||||||
|
class="com.raytheon.uf.edex.registry.ebxml.services.rest.RepositoryItemsRestService">
|
||||||
|
<property name="extrinsicObjectDao" ref="extrinsicObjectDao" />
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<bean id="queryProtocolRestService"
|
||||||
|
class="com.raytheon.uf.edex.registry.ebxml.services.rest.QueryProtocolRestService" >
|
||||||
|
<property name="queryManager" ref="queryServiceImpl"/>
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<bean id="RegistryWebUtil" class="com.raytheon.uf.edex.registry.ebxml.web.RegistryWebUtil">
|
||||||
|
<property name="lcm" ref="lcmServiceImpl" />
|
||||||
|
<property name="personDao" ref="personDao" />
|
||||||
|
<property name="classificationNodeDao" ref="classificationNodeDao" />
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<bean id="RegistryWebAdmin"
|
||||||
|
class="com.raytheon.uf.edex.registry.ebxml.web.RegistryWebAdmin">
|
||||||
|
<property name="partyDao" ref="partyDao" />
|
||||||
|
<property name="classificationNodeDao" ref="classificationNodeDao" />
|
||||||
|
<property name="organizationDao" ref="organizationDao" />
|
||||||
|
<property name="personDao" ref="personDao" />
|
||||||
|
<property name="roleDao" ref="roleDao" />
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
|
||||||
|
</beans>
|
|
@ -4,6 +4,24 @@
|
||||||
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
|
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
|
||||||
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
|
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
|
||||||
|
|
||||||
|
<bean id="XACMLPolicyEnforcementPoint"
|
||||||
|
class="com.raytheon.uf.edex.registry.acp.xacml.XACMLPolicyEnforcementPoint">
|
||||||
|
<property name="xacmlContextHandler" ref="XACMLContextHandler" />
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<bean id="XACMLContextHandler"
|
||||||
|
class="com.raytheon.uf.edex.registry.acp.xacml.XACMLContextHandler">
|
||||||
|
<property name="queryManager" ref="queryServiceImpl" />
|
||||||
|
<property name="registryObjectDao" ref="registryObjectDao" />
|
||||||
|
<property name="xacmlPolicyAdmin" ref="XACMLPolicyAdministrator" />
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<bean id="XACMLPolicyAdministrator"
|
||||||
|
class="com.raytheon.uf.edex.registry.acp.xacml.XACMLPolicyAdministrator">
|
||||||
|
<property name="extrinsicObjectDao" ref="extrinsicObjectDao" />
|
||||||
|
<property name="lcm" ref="lcmServiceImpl" />
|
||||||
|
</bean>
|
||||||
|
|
||||||
<bean id="functionEvaluator"
|
<bean id="functionEvaluator"
|
||||||
class="com.raytheon.uf.edex.registry.acp.xacml.engine.function.XACMLFunctionEvaluator">
|
class="com.raytheon.uf.edex.registry.acp.xacml.engine.function.XACMLFunctionEvaluator">
|
||||||
<property name="functionList">
|
<property name="functionList">
|
||||||
|
|
|
@ -1,50 +1,26 @@
|
||||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://www.springframework.org/schema/tx"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://www.springframework.org/schema/tx"
|
||||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
|
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
|
||||||
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
|
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
|
||||||
http://www.springframework.org/schema/tx
|
http://www.springframework.org/schema/tx
|
||||||
http://www.springframework.org/schema/tx/spring-tx.xsd">
|
http://www.springframework.org/schema/tx/spring-tx.xsd">
|
||||||
|
|
||||||
<bean id="ServiceUrlFactory"
|
<bean id="registrySubscriptionManagerInvoker"
|
||||||
class="com.raytheon.uf.edex.registry.ebxml.util.ServiceUrlFactory" />
|
class="com.raytheon.uf.edex.registry.ebxml.dao.EsbRouteRegistrySubscriptionManagerInvocation" />
|
||||||
<bean id="DbInit" class="com.raytheon.uf.edex.registry.ebxml.dao.DbInit">
|
|
||||||
<property name="dbValidationStrategy" ref="ebxmlDbValidationStrategy" />
|
|
||||||
<property name="lcm" ref="lcmServiceImpl" />
|
|
||||||
<property name="sessionFactory" ref="metadataSessionFactory" />
|
|
||||||
<property name="xacmlAdmin" ref="XACMLPolicyAdministrator" />
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="pwCallback"
|
<bean id="pwCallback"
|
||||||
class="com.raytheon.uf.edex.registry.ebxml.acp.PasswordCallback" />
|
class="com.raytheon.uf.edex.registry.ebxml.acp.PasswordCallback" />
|
||||||
|
|
||||||
<bean id="WsSecurity" class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
|
<bean id="WsSecurity" class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
|
||||||
<constructor-arg>
|
<constructor-arg>
|
||||||
<map>
|
<map>
|
||||||
<entry key="action" value="UsernameToken" />
|
<entry key="action" value="UsernameToken" />
|
||||||
<entry key="passwordType" value="PasswordText" />
|
<entry key="passwordType" value="PasswordText" />
|
||||||
<entry key="passwordCallbackRef">
|
<entry key="passwordCallbackRef">
|
||||||
<ref bean="pwCallback" />
|
<ref bean="pwCallback" />
|
||||||
</entry>
|
</entry>
|
||||||
</map>
|
</map>
|
||||||
</constructor-arg>
|
</constructor-arg>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="XACMLPolicyEnforcementPoint"
|
|
||||||
class="com.raytheon.uf.edex.registry.acp.xacml.XACMLPolicyEnforcementPoint">
|
|
||||||
<property name="xacmlContextHandler" ref="XACMLContextHandler" />
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="XACMLContextHandler"
|
|
||||||
class="com.raytheon.uf.edex.registry.acp.xacml.XACMLContextHandler">
|
|
||||||
<property name="queryManager" ref="queryServiceImpl" />
|
|
||||||
<property name="registryObjectDao" ref="registryObjectDao" />
|
|
||||||
<property name="xacmlPolicyAdmin" ref="XACMLPolicyAdministrator" />
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="XACMLPolicyAdministrator"
|
|
||||||
class="com.raytheon.uf.edex.registry.acp.xacml.XACMLPolicyAdministrator">
|
|
||||||
<property name="extrinsicObjectDao" ref="extrinsicObjectDao" />
|
|
||||||
<property name="lcm" ref="lcmServiceImpl" />
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
</beans>
|
</beans>
|
||||||
|
|
|
@ -202,15 +202,7 @@ public class QueryManagerImpl implements QueryManager {
|
||||||
|
|
||||||
if (lang != null) {
|
if (lang != null) {
|
||||||
// TODO: Add support for specifying the lang attribute
|
// TODO: Add support for specifying the lang attribute
|
||||||
response.getException()
|
statusHandler.warn("Lang attribute currently not supported.");
|
||||||
.add(EbxmlExceptionUtil
|
|
||||||
.createRegistryException(
|
|
||||||
UnsupportedCapabilityExceptionType.class,
|
|
||||||
"",
|
|
||||||
"lang attribute not currently supported",
|
|
||||||
"This EBXML registry does not currently support the lang attribute on the QueryRequest object",
|
|
||||||
ErrorSeverity.WARNING, statusHandler));
|
|
||||||
response.setStatus(RegistryResponseStatus.PARTIAL_SUCCESS);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
IRegistryQuery query = getQuery(queryType);
|
IRegistryQuery query = getQuery(queryType);
|
||||||
|
|
|
@ -36,7 +36,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||||
import com.raytheon.uf.common.registry.constants.ErrorSeverity;
|
import com.raytheon.uf.common.registry.constants.ErrorSeverity;
|
||||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||||
import com.raytheon.uf.common.status.UFStatus;
|
import com.raytheon.uf.common.status.UFStatus;
|
||||||
import com.raytheon.uf.edex.registry.ebxml.dao.RegistryObjectTypeDao;
|
import com.raytheon.uf.edex.registry.ebxml.dao.RegistryObjectDao;
|
||||||
import com.raytheon.uf.edex.registry.ebxml.exception.EbxmlRegistryException;
|
import com.raytheon.uf.edex.registry.ebxml.exception.EbxmlRegistryException;
|
||||||
import com.raytheon.uf.edex.registry.ebxml.services.query.QueryManagerImpl;
|
import com.raytheon.uf.edex.registry.ebxml.services.query.QueryManagerImpl;
|
||||||
import com.raytheon.uf.edex.registry.ebxml.services.query.QueryManagerImpl.RETURN_TYPE;
|
import com.raytheon.uf.edex.registry.ebxml.services.query.QueryManagerImpl.RETURN_TYPE;
|
||||||
|
@ -79,7 +79,7 @@ public abstract class AbstractEbxmlQuery implements IRegistryQuery {
|
||||||
|
|
||||||
protected RETURN_TYPE returnType;
|
protected RETURN_TYPE returnType;
|
||||||
|
|
||||||
protected RegistryObjectTypeDao<RegistryObjectType> registryObjectDao;
|
protected RegistryObjectDao registryObjectDao;
|
||||||
|
|
||||||
public void executeQuery(QueryRequest queryRequest,
|
public void executeQuery(QueryRequest queryRequest,
|
||||||
QueryResponse queryResponse) throws EbxmlRegistryException {
|
QueryResponse queryResponse) throws EbxmlRegistryException {
|
||||||
|
@ -218,8 +218,7 @@ public abstract class AbstractEbxmlQuery implements IRegistryQuery {
|
||||||
return filterResults(results, null);
|
return filterResults(results, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setRegistryObjectDao(
|
public void setRegistryObjectDao(RegistryObjectDao registryObjectDao) {
|
||||||
RegistryObjectTypeDao<RegistryObjectType> registryObjectDao) {
|
|
||||||
this.registryObjectDao = registryObjectDao;
|
this.registryObjectDao = registryObjectDao;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,8 @@ import oasis.names.tc.ebxml.regrep.xsd.query.v4.QueryResponse;
|
||||||
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.ObjectRefListType;
|
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.ObjectRefListType;
|
||||||
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.ObjectRefType;
|
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.ObjectRefType;
|
||||||
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.QueryType;
|
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.QueryType;
|
||||||
|
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.RegistryObjectListType;
|
||||||
|
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.RegistryObjectType;
|
||||||
|
|
||||||
import com.raytheon.uf.common.registry.constants.CanonicalQueryTypes;
|
import com.raytheon.uf.common.registry.constants.CanonicalQueryTypes;
|
||||||
import com.raytheon.uf.edex.registry.ebxml.exception.EbxmlRegistryException;
|
import com.raytheon.uf.edex.registry.ebxml.exception.EbxmlRegistryException;
|
||||||
|
@ -49,7 +51,7 @@ import com.raytheon.uf.edex.registry.ebxml.services.query.types.CanonicalEbxmlQu
|
||||||
* Jan 18, 2012 bphillip Initial creation
|
* Jan 18, 2012 bphillip Initial creation
|
||||||
* 3/18/2013 1802 bphillip Modified to use transaction boundaries and spring dao injection
|
* 3/18/2013 1802 bphillip Modified to use transaction boundaries and spring dao injection
|
||||||
* 4/9/2013 1802 bphillip Changed abstract method signature, modified return processing, and changed static variables
|
* 4/9/2013 1802 bphillip Changed abstract method signature, modified return processing, and changed static variables
|
||||||
*
|
* 4/19/2013 1931 bphillip Fixed null pointer issue
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author bphillip
|
* @author bphillip
|
||||||
|
@ -88,7 +90,6 @@ public class GetObjectById extends CanonicalEbxmlQuery {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ids.addAll(matchingIds);
|
ids.addAll(matchingIds);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
ids.add(id);
|
ids.add(id);
|
||||||
}
|
}
|
||||||
|
@ -102,8 +103,15 @@ public class GetObjectById extends CanonicalEbxmlQuery {
|
||||||
}
|
}
|
||||||
queryResponse.setObjectRefList(objectRefList);
|
queryResponse.setObjectRefList(objectRefList);
|
||||||
} else {
|
} else {
|
||||||
queryResponse.getRegistryObjectList().getRegistryObject()
|
List<RegistryObjectType> results = new ArrayList<RegistryObjectType>();
|
||||||
.addAll(registryObjectDao.getById(ids));
|
if (ids.size() == 1) {
|
||||||
|
results.add(registryObjectDao.getById(ids.get(0)));
|
||||||
|
} else {
|
||||||
|
results.addAll(registryObjectDao.getById(ids));
|
||||||
|
}
|
||||||
|
RegistryObjectListType objList = new RegistryObjectListType();
|
||||||
|
objList.getRegistryObject().addAll(results);
|
||||||
|
queryResponse.setRegistryObjectList(objList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,217 @@
|
||||||
|
/**
|
||||||
|
* This software was developed and / or modified by Raytheon Company,
|
||||||
|
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
|
*
|
||||||
|
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
|
* This software product contains export-restricted data whose
|
||||||
|
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
|
* to non-U.S. persons whether in the United States or abroad requires
|
||||||
|
* an export license or other authorization.
|
||||||
|
*
|
||||||
|
* Contractor Name: Raytheon Company
|
||||||
|
* Contractor Address: 6825 Pine Street, Suite 340
|
||||||
|
* Mail Stop B8
|
||||||
|
* Omaha, NE 68106
|
||||||
|
* 402.291.0100
|
||||||
|
*
|
||||||
|
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
|
* further licensing information.
|
||||||
|
**/
|
||||||
|
package com.raytheon.uf.edex.registry.ebxml.services.rest;
|
||||||
|
|
||||||
|
import java.math.BigInteger;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.ws.rs.GET;
|
||||||
|
import javax.ws.rs.Path;
|
||||||
|
import javax.ws.rs.Produces;
|
||||||
|
import javax.ws.rs.core.Context;
|
||||||
|
import javax.ws.rs.core.MultivaluedMap;
|
||||||
|
import javax.ws.rs.core.UriInfo;
|
||||||
|
import javax.xml.bind.JAXBException;
|
||||||
|
|
||||||
|
import oasis.names.tc.ebxml.regrep.wsdl.registry.services.v4.MsgRegistryException;
|
||||||
|
import oasis.names.tc.ebxml.regrep.wsdl.registry.services.v4.QueryManager;
|
||||||
|
import oasis.names.tc.ebxml.regrep.xsd.query.v4.QueryRequest;
|
||||||
|
import oasis.names.tc.ebxml.regrep.xsd.query.v4.QueryResponse;
|
||||||
|
import oasis.names.tc.ebxml.regrep.xsd.query.v4.ResponseOptionType;
|
||||||
|
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.QueryType;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import com.raytheon.uf.common.registry.constants.Languages;
|
||||||
|
import com.raytheon.uf.common.registry.constants.QueryReturnTypes;
|
||||||
|
import com.raytheon.uf.common.serialization.JAXBManager;
|
||||||
|
import com.raytheon.uf.edex.registry.ebxml.util.EbxmlObjectUtil;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* REST service implementation for the Query Protocol according to
|
||||||
|
* specifications in Section 12.2 of the ebRS specification
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
*
|
||||||
|
* SOFTWARE HISTORY
|
||||||
|
*
|
||||||
|
* Date Ticket# Engineer Description
|
||||||
|
* ------------ ---------- ----------- --------------------------
|
||||||
|
* 4/19/2013 1931 bphillip Initial implementation
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
* @author bphillip
|
||||||
|
* @version 1
|
||||||
|
*/
|
||||||
|
@Path("/rest/search")
|
||||||
|
@Service
|
||||||
|
@Transactional
|
||||||
|
public class QueryProtocolRestService {
|
||||||
|
|
||||||
|
/** The queryID canonical query parameter name */
|
||||||
|
private static final String QUERY_ID = "queryId";
|
||||||
|
|
||||||
|
/** The depth canonical query parameter name */
|
||||||
|
private static final String DEPTH = "depth";
|
||||||
|
|
||||||
|
/** The format canonical query parameter name */
|
||||||
|
private static final String FORMAT = "format";
|
||||||
|
|
||||||
|
/** The federated canonical query parameter name */
|
||||||
|
private static final String FEDERATED = "federated";
|
||||||
|
|
||||||
|
/** The federation canonical query parameter name */
|
||||||
|
private static final String FEDERATION = "federation";
|
||||||
|
|
||||||
|
/** The matchOlderVersion canonical query parameter name */
|
||||||
|
private static final String MATCH_OLDER_VERSIONS = "matchOlderVersions";
|
||||||
|
|
||||||
|
/** The startIndex canonical query parameter name */
|
||||||
|
private static final String START_INDEX = "startIndex";
|
||||||
|
|
||||||
|
/** The lang canonical query parameter name */
|
||||||
|
private static final String LANG = "lang";
|
||||||
|
|
||||||
|
/** The maxResults canonical query parameter name */
|
||||||
|
private static final String MAX_RESULTS = "maxResults";
|
||||||
|
|
||||||
|
/** Convenience list of all the canonical query parameter names */
|
||||||
|
private static final List<String> CANONICAL_QUERY_PARAMETERS;
|
||||||
|
|
||||||
|
static {
|
||||||
|
CANONICAL_QUERY_PARAMETERS = new ArrayList<String>();
|
||||||
|
CANONICAL_QUERY_PARAMETERS.add(QUERY_ID);
|
||||||
|
CANONICAL_QUERY_PARAMETERS.add(DEPTH);
|
||||||
|
CANONICAL_QUERY_PARAMETERS.add(FORMAT);
|
||||||
|
CANONICAL_QUERY_PARAMETERS.add(FEDERATED);
|
||||||
|
CANONICAL_QUERY_PARAMETERS.add(FEDERATION);
|
||||||
|
CANONICAL_QUERY_PARAMETERS.add(MATCH_OLDER_VERSIONS);
|
||||||
|
CANONICAL_QUERY_PARAMETERS.add(START_INDEX);
|
||||||
|
CANONICAL_QUERY_PARAMETERS.add(LANG);
|
||||||
|
CANONICAL_QUERY_PARAMETERS.add(MAX_RESULTS);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/** The local query manager */
|
||||||
|
private QueryManager queryManager;
|
||||||
|
|
||||||
|
/** Jaxb Manager for marshalling the response */
|
||||||
|
private JAXBManager responseJaxb;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new QueryProtocolRestService instance
|
||||||
|
*
|
||||||
|
* @throws JAXBException
|
||||||
|
* If errors occur while initializing the JAXBManager
|
||||||
|
*/
|
||||||
|
public QueryProtocolRestService() throws JAXBException {
|
||||||
|
responseJaxb = new JAXBManager(QueryResponse.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Executes a query based on the submitted query parameters
|
||||||
|
*
|
||||||
|
* @param info
|
||||||
|
* The UriInfo containing the query parameters
|
||||||
|
* @return The marshalled QueryResponse
|
||||||
|
* @throws JAXBException
|
||||||
|
* If errors occur while marshalling the response
|
||||||
|
* @throws MsgRegistryException
|
||||||
|
* If errors occur in the registry while querying for the
|
||||||
|
* objects
|
||||||
|
*/
|
||||||
|
@GET
|
||||||
|
@Produces("text/xml")
|
||||||
|
public String executeQuery(@Context UriInfo info) throws JAXBException,
|
||||||
|
MsgRegistryException {
|
||||||
|
/*
|
||||||
|
* Extract out the canonical query parameters
|
||||||
|
*/
|
||||||
|
MultivaluedMap<String, String> queryParameters = info
|
||||||
|
.getQueryParameters();
|
||||||
|
String queryId = queryParameters.getFirst(QUERY_ID) == null ? "urn:oasis:names:tc:ebxml-regrep:query:GetObjectById"
|
||||||
|
: queryParameters.getFirst(QUERY_ID);
|
||||||
|
|
||||||
|
BigInteger depth = queryParameters.getFirst(DEPTH) == null ? null
|
||||||
|
: new BigInteger(queryParameters.getFirst(DEPTH));
|
||||||
|
|
||||||
|
String format = queryParameters.getFirst(FORMAT);
|
||||||
|
|
||||||
|
boolean federated = queryParameters.getFirst(FEDERATED) == null ? false
|
||||||
|
: Boolean.parseBoolean(queryParameters.getFirst(FEDERATED));
|
||||||
|
|
||||||
|
String federation = queryParameters.getFirst(FEDERATION);
|
||||||
|
|
||||||
|
boolean matchOlderVersions = queryParameters
|
||||||
|
.getFirst(MATCH_OLDER_VERSIONS) == null ? true : Boolean
|
||||||
|
.parseBoolean(queryParameters.getFirst(MATCH_OLDER_VERSIONS));
|
||||||
|
|
||||||
|
BigInteger startIndex = queryParameters.getFirst(START_INDEX) == null ? new BigInteger(
|
||||||
|
"0") : new BigInteger(queryParameters.getFirst(START_INDEX));
|
||||||
|
|
||||||
|
String lang = queryParameters.getFirst(LANG) == null ? Languages.EN_US
|
||||||
|
: queryParameters.getFirst(LANG);
|
||||||
|
|
||||||
|
BigInteger maxResults = queryParameters.getFirst(MAX_RESULTS) == null ? new BigInteger(
|
||||||
|
"0") : new BigInteger(queryParameters.getFirst(MAX_RESULTS));
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Create the query request object
|
||||||
|
*/
|
||||||
|
QueryRequest restQueryRequest = new QueryRequest();
|
||||||
|
ResponseOptionType responseOption = new ResponseOptionType();
|
||||||
|
responseOption.setReturnType(QueryReturnTypes.REGISTRY_OBJECT);
|
||||||
|
responseOption.setReturnComposedObjects(true);
|
||||||
|
QueryType queryType = new QueryType();
|
||||||
|
queryType.setQueryDefinition(queryId);
|
||||||
|
|
||||||
|
restQueryRequest.setDepth(depth);
|
||||||
|
restQueryRequest.setFormat(format);
|
||||||
|
restQueryRequest.setFederated(federated);
|
||||||
|
restQueryRequest.setFederation(federation);
|
||||||
|
restQueryRequest.setMatchOlderVersions(matchOlderVersions);
|
||||||
|
restQueryRequest.setStartIndex(startIndex);
|
||||||
|
restQueryRequest.setLang(lang);
|
||||||
|
restQueryRequest.setMaxResults(maxResults);
|
||||||
|
restQueryRequest.setQuery(queryType);
|
||||||
|
restQueryRequest.setResponseOption(responseOption);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Extract out any non-canonical query parameters and assign them as
|
||||||
|
* slots to be used as query specific arguments
|
||||||
|
*/
|
||||||
|
for (String key : queryParameters.keySet()) {
|
||||||
|
if (!CANONICAL_QUERY_PARAMETERS.contains(key)) {
|
||||||
|
EbxmlObjectUtil.addStringSlot(queryType, key,
|
||||||
|
queryParameters.getFirst(key), false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return responseJaxb.marshalToXml(queryManager
|
||||||
|
.executeQuery(restQueryRequest));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQueryManager(QueryManager queryManager) {
|
||||||
|
this.queryManager = queryManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,137 @@
|
||||||
|
/**
|
||||||
|
* This software was developed and / or modified by Raytheon Company,
|
||||||
|
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
|
*
|
||||||
|
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
|
* This software product contains export-restricted data whose
|
||||||
|
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
|
* to non-U.S. persons whether in the United States or abroad requires
|
||||||
|
* an export license or other authorization.
|
||||||
|
*
|
||||||
|
* Contractor Name: Raytheon Company
|
||||||
|
* Contractor Address: 6825 Pine Street, Suite 340
|
||||||
|
* Mail Stop B8
|
||||||
|
* Omaha, NE 68106
|
||||||
|
* 402.291.0100
|
||||||
|
*
|
||||||
|
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
|
* further licensing information.
|
||||||
|
**/
|
||||||
|
package com.raytheon.uf.edex.registry.ebxml.services.rest;
|
||||||
|
|
||||||
|
import javax.ws.rs.GET;
|
||||||
|
import javax.ws.rs.Path;
|
||||||
|
import javax.ws.rs.PathParam;
|
||||||
|
import javax.ws.rs.Produces;
|
||||||
|
import javax.ws.rs.WebApplicationException;
|
||||||
|
import javax.xml.bind.JAXBException;
|
||||||
|
|
||||||
|
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.AssociationType;
|
||||||
|
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.AuditableEventType;
|
||||||
|
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.ClassificationNodeType;
|
||||||
|
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.ClassificationSchemeType;
|
||||||
|
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.ClassificationType;
|
||||||
|
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.CommentType;
|
||||||
|
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.ExternalIdentifierType;
|
||||||
|
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.ExternalLinkType;
|
||||||
|
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.ExtrinsicObjectType;
|
||||||
|
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.FederationType;
|
||||||
|
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.NotificationType;
|
||||||
|
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.OrganizationType;
|
||||||
|
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.PartyType;
|
||||||
|
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.PersonType;
|
||||||
|
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.QueryDefinitionType;
|
||||||
|
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.RegistryObjectType;
|
||||||
|
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.RegistryPackageType;
|
||||||
|
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.RegistryType;
|
||||||
|
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.RoleType;
|
||||||
|
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.ServiceBindingType;
|
||||||
|
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.ServiceEndpointType;
|
||||||
|
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.ServiceInterfaceType;
|
||||||
|
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.ServiceType;
|
||||||
|
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.SubscriptionType;
|
||||||
|
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.TaxonomyElementType;
|
||||||
|
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.WorkflowActionType;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import com.raytheon.uf.common.serialization.JAXBManager;
|
||||||
|
import com.raytheon.uf.edex.registry.ebxml.dao.RegistryObjectDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* REST service implementation for getting registry objects according to
|
||||||
|
* specifications in Section 12.1.1 of the ebRS specification
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
*
|
||||||
|
* SOFTWARE HISTORY
|
||||||
|
*
|
||||||
|
* Date Ticket# Engineer Description
|
||||||
|
* ------------ ---------- ----------- --------------------------
|
||||||
|
* 4/19/2013 1931 bphillip Initial implementation
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
* @author bphillip
|
||||||
|
* @version 1
|
||||||
|
*/
|
||||||
|
@Path("/rest/registryObjects/{objectId}")
|
||||||
|
@Service
|
||||||
|
@Transactional
|
||||||
|
public class RegistryObjectsRestService {
|
||||||
|
|
||||||
|
/** The data access object for getting registry objects */
|
||||||
|
private RegistryObjectDao registryObjectDao;
|
||||||
|
|
||||||
|
/** The jaxbManager used to marshal the response */
|
||||||
|
private JAXBManager jaxbManager;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new RegistryObjectRestService instance
|
||||||
|
*
|
||||||
|
* @throws JAXBException
|
||||||
|
* If errors occur while initializing the jaxb manager
|
||||||
|
*/
|
||||||
|
public RegistryObjectsRestService() throws JAXBException {
|
||||||
|
jaxbManager = new JAXBManager(RegistryObjectType.class,
|
||||||
|
AssociationType.class, AuditableEventType.class,
|
||||||
|
ClassificationType.class, ExternalIdentifierType.class,
|
||||||
|
ExternalLinkType.class, ExtrinsicObjectType.class,
|
||||||
|
CommentType.class, FederationType.class,
|
||||||
|
NotificationType.class, PartyType.class,
|
||||||
|
OrganizationType.class, PersonType.class,
|
||||||
|
QueryDefinitionType.class, RegistryPackageType.class,
|
||||||
|
RegistryType.class, RoleType.class, ServiceBindingType.class,
|
||||||
|
ServiceEndpointType.class, ServiceInterfaceType.class,
|
||||||
|
ServiceType.class, SubscriptionType.class,
|
||||||
|
TaxonomyElementType.class, ClassificationNodeType.class,
|
||||||
|
ClassificationSchemeType.class, WorkflowActionType.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets a registry object based on the object ID specified in the path
|
||||||
|
*
|
||||||
|
* @param objectId
|
||||||
|
* The object Id of the object
|
||||||
|
* @return The marshalled object
|
||||||
|
* @throws JAXBException
|
||||||
|
* If errors occur marshalling the object
|
||||||
|
*/
|
||||||
|
@GET
|
||||||
|
@Produces("text/xml")
|
||||||
|
public String getRegistryObject(@PathParam("objectId") String objectId)
|
||||||
|
throws JAXBException {
|
||||||
|
Object obj = registryObjectDao.getById(objectId);
|
||||||
|
if (obj == null) {
|
||||||
|
throw new WebApplicationException(404);
|
||||||
|
}
|
||||||
|
return jaxbManager.marshalToXml(obj);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRegistryObjectDao(RegistryObjectDao registryObjectDao) {
|
||||||
|
this.registryObjectDao = registryObjectDao;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,88 @@
|
||||||
|
/**
|
||||||
|
* This software was developed and / or modified by Raytheon Company,
|
||||||
|
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
|
*
|
||||||
|
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
|
* This software product contains export-restricted data whose
|
||||||
|
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
|
* to non-U.S. persons whether in the United States or abroad requires
|
||||||
|
* an export license or other authorization.
|
||||||
|
*
|
||||||
|
* Contractor Name: Raytheon Company
|
||||||
|
* Contractor Address: 6825 Pine Street, Suite 340
|
||||||
|
* Mail Stop B8
|
||||||
|
* Omaha, NE 68106
|
||||||
|
* 402.291.0100
|
||||||
|
*
|
||||||
|
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
|
* further licensing information.
|
||||||
|
**/
|
||||||
|
package com.raytheon.uf.edex.registry.ebxml.services.rest;
|
||||||
|
|
||||||
|
import javax.ws.rs.GET;
|
||||||
|
import javax.ws.rs.Path;
|
||||||
|
import javax.ws.rs.PathParam;
|
||||||
|
import javax.ws.rs.Produces;
|
||||||
|
import javax.ws.rs.WebApplicationException;
|
||||||
|
|
||||||
|
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.ExtrinsicObjectType;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import com.raytheon.uf.edex.registry.ebxml.dao.ExtrinsicObjectDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* REST service implementation for getting repository items according to
|
||||||
|
* specifications in Section 12.1.2 of the ebRS specification
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
*
|
||||||
|
* SOFTWARE HISTORY
|
||||||
|
*
|
||||||
|
* Date Ticket# Engineer Description
|
||||||
|
* ------------ ---------- ----------- --------------------------
|
||||||
|
* 4/19/2013 1931 bphillip Initial implementation
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
* @author bphillip
|
||||||
|
* @version 1
|
||||||
|
*/
|
||||||
|
@Path("/rest/repositoryItems/{repositoryItemId}")
|
||||||
|
@Service
|
||||||
|
@Transactional
|
||||||
|
public class RepositoryItemsRestService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The data access object for getting extrinsic objects containing
|
||||||
|
* repository items
|
||||||
|
*/
|
||||||
|
private ExtrinsicObjectDao extrinsicObjectDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the repository item for the object with the id specified in the url
|
||||||
|
*
|
||||||
|
* @param repositoryItemId
|
||||||
|
* The id of the object containing the repository item
|
||||||
|
* @return The repository item for the object specified
|
||||||
|
*/
|
||||||
|
@GET
|
||||||
|
@Produces("application/octet-stream")
|
||||||
|
public byte[] getRegistryObject(
|
||||||
|
@PathParam("repositoryItemId") String repositoryItemId) {
|
||||||
|
ExtrinsicObjectType obj = extrinsicObjectDao.getById(repositoryItemId);
|
||||||
|
if (obj == null) {
|
||||||
|
throw new WebApplicationException(404);
|
||||||
|
}
|
||||||
|
if (obj.getRepositoryItem() == null) {
|
||||||
|
throw new WebApplicationException(404);
|
||||||
|
}
|
||||||
|
return obj.getRepositoryItem();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setExtrinsicObjectDao(ExtrinsicObjectDao extrinsicObjectDao) {
|
||||||
|
this.extrinsicObjectDao = extrinsicObjectDao;
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,69 +0,0 @@
|
||||||
/**
|
|
||||||
* This software was developed and / or modified by Raytheon Company,
|
|
||||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
|
||||||
*
|
|
||||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
|
||||||
* This software product contains export-restricted data whose
|
|
||||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
|
||||||
* to non-U.S. persons whether in the United States or abroad requires
|
|
||||||
* an export license or other authorization.
|
|
||||||
*
|
|
||||||
* Contractor Name: Raytheon Company
|
|
||||||
* Contractor Address: 6825 Pine Street, Suite 340
|
|
||||||
* Mail Stop B8
|
|
||||||
* Omaha, NE 68106
|
|
||||||
* 402.291.0100
|
|
||||||
*
|
|
||||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
|
||||||
* further licensing information.
|
|
||||||
**/
|
|
||||||
package com.raytheon.uf.edex.registry.ebxml.util;
|
|
||||||
|
|
||||||
import java.net.InetAddress;
|
|
||||||
import java.net.MalformedURLException;
|
|
||||||
import java.net.URL;
|
|
||||||
import java.net.UnknownHostException;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* Bean used to dynamically assign the URL for a registry service via the spring
|
|
||||||
* configuration
|
|
||||||
*
|
|
||||||
* <pre>
|
|
||||||
*
|
|
||||||
* SOFTWARE HISTORY
|
|
||||||
*
|
|
||||||
* Date Ticket# Engineer Description
|
|
||||||
* ------------ ---------- ----------- --------------------------
|
|
||||||
* Feb 22, 2012 #184 bphillip Initial creation
|
|
||||||
*
|
|
||||||
* </pre>
|
|
||||||
*
|
|
||||||
* @author bphillip
|
|
||||||
* @version 1.0
|
|
||||||
*/
|
|
||||||
public class ServiceUrlFactory {
|
|
||||||
|
|
||||||
public ServiceUrlFactory() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets a service address for the given service
|
|
||||||
*
|
|
||||||
* @param service
|
|
||||||
* The name of the service
|
|
||||||
* @param port
|
|
||||||
* The port on which the service will listen
|
|
||||||
* @return The URL String of the service endpoint
|
|
||||||
* @throws UnknownHostException
|
|
||||||
* If problems occur determining the host name
|
|
||||||
* @throws MalformedURLException
|
|
||||||
*/
|
|
||||||
public String getServiceAddress(String serviceName, int servicePort)
|
|
||||||
throws UnknownHostException, MalformedURLException {
|
|
||||||
URL url = new URL("http", InetAddress.getLocalHost().getHostAddress(),
|
|
||||||
servicePort, "/" + serviceName);
|
|
||||||
return url.toString();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -21,26 +21,30 @@ package com.raytheon.uf.edex.registry.ebxml.web;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import javax.servlet.ServletException;
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.ws.rs.POST;
|
||||||
|
import javax.ws.rs.Path;
|
||||||
|
import javax.ws.rs.Produces;
|
||||||
|
import javax.ws.rs.core.Context;
|
||||||
|
import javax.ws.rs.core.Response;
|
||||||
|
|
||||||
import oasis.names.tc.ebxml.regrep.xsd.lcm.v4.SubmitObjectsRequest;
|
import oasis.names.tc.ebxml.regrep.xsd.lcm.v4.SubmitObjectsRequest;
|
||||||
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.PartyType;
|
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.PartyType;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import com.raytheon.uf.common.registry.ebxml.RegistryUtil;
|
import com.raytheon.uf.common.registry.ebxml.RegistryUtil;
|
||||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||||
import com.raytheon.uf.common.status.UFStatus;
|
import com.raytheon.uf.common.status.UFStatus;
|
||||||
import com.raytheon.uf.edex.core.EDEXUtil;
|
|
||||||
import com.raytheon.uf.edex.registry.ebxml.dao.PartyDao;
|
import com.raytheon.uf.edex.registry.ebxml.dao.PartyDao;
|
||||||
import com.raytheon.uf.edex.registry.ebxml.exception.EbxmlRegistryException;
|
import com.raytheon.uf.edex.registry.ebxml.exception.EbxmlRegistryException;
|
||||||
import com.raytheon.uf.edex.registry.ebxml.services.lifecycle.LifecycleManagerImpl;
|
import com.raytheon.uf.edex.registry.ebxml.services.lifecycle.LifecycleManagerImpl;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Servlet implementation used to add a user or organization to the registry
|
* Servlet implementation used to add a user or organization to the registry.
|
||||||
|
* FIXME: This class will be refactored in a later ticket
|
||||||
*
|
*
|
||||||
* <pre>
|
* <pre>
|
||||||
*
|
*
|
||||||
|
@ -50,15 +54,17 @@ import com.raytheon.uf.edex.registry.ebxml.services.lifecycle.LifecycleManagerIm
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* 7/31/2012 #724 bphillip Initial creation
|
* 7/31/2012 #724 bphillip Initial creation
|
||||||
* 3/13/2013 1082 bphillip Made transactional
|
* 3/13/2013 1082 bphillip Made transactional
|
||||||
|
* 4/19/2013 1931 bphillip Refactored to use web application spring container and cxf services
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author bphillip
|
* @author bphillip
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
*/
|
*/
|
||||||
|
@Path("/AddRegistryParty")
|
||||||
|
@Service
|
||||||
@Transactional
|
@Transactional
|
||||||
public class AddRegistryParty extends javax.servlet.http.HttpServlet implements
|
public class AddRegistryParty {
|
||||||
javax.servlet.Servlet {
|
|
||||||
|
|
||||||
/** Serial */
|
/** Serial */
|
||||||
private static final long serialVersionUID = 1422748054768442033L;
|
private static final long serialVersionUID = 1422748054768442033L;
|
||||||
|
@ -73,93 +79,87 @@ public class AddRegistryParty extends javax.servlet.http.HttpServlet implements
|
||||||
/** the page to display upon failure */
|
/** the page to display upon failure */
|
||||||
private static final String ERROR_RESPONSE_PAGE = "addPartyFailure";
|
private static final String ERROR_RESPONSE_PAGE = "addPartyFailure";
|
||||||
|
|
||||||
// FIXME: Add spring support to servlets
|
private PartyDao partyDao;
|
||||||
|
|
||||||
private PartyDao partyDao = (PartyDao) EDEXUtil.getESBComponent("partyDao");
|
private LifecycleManagerImpl lcm;
|
||||||
|
|
||||||
private LifecycleManagerImpl lcm = (LifecycleManagerImpl) EDEXUtil
|
private RegistryWebUtil webUtil;
|
||||||
.getESBComponent("lcmServiceImpl");
|
|
||||||
|
|
||||||
private RegistryWebUtil webUtil = (RegistryWebUtil) EDEXUtil
|
@POST
|
||||||
.getESBComponent("webUtil");
|
@Produces("text/html")
|
||||||
|
public Response doPost(@Context HttpServletRequest request)
|
||||||
@Override
|
throws IOException {
|
||||||
protected void doPost(HttpServletRequest request,
|
|
||||||
HttpServletResponse response) throws IOException {
|
|
||||||
String partyId = request.getParameter(WebFields.ID.fieldName());
|
String partyId = request.getParameter(WebFields.ID.fieldName());
|
||||||
String objectType = request
|
String objectType = request
|
||||||
.getParameter(WebFields.OBJ_TYPE.fieldName());
|
.getParameter(WebFields.OBJ_TYPE.fieldName());
|
||||||
PartyType existingParty = null;
|
PartyType existingParty = null;
|
||||||
|
|
||||||
try {
|
// The EDEX internal user cannot be modified
|
||||||
// The EDEX internal user cannot be modified
|
if (partyId.equals(RegistryUtil.DEFAULT_OWNER)) {
|
||||||
if (partyId.equals(RegistryUtil.DEFAULT_OWNER)) {
|
return Response.serverError().build();
|
||||||
webUtil.sendErrorResponse(request, response,
|
// webUtil.sendErrorResponse(request, response,
|
||||||
ERROR_RESPONSE_PAGE, partyId, objectType,
|
// ERROR_RESPONSE_PAGE, partyId, objectType,
|
||||||
"Cannot modify EDEX Internal User");
|
// "Cannot modify EDEX Internal User");
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Check to see if the party already exists. If so, the user cannot
|
|
||||||
* be added
|
|
||||||
*/
|
|
||||||
existingParty = partyDao.getById(partyId);
|
|
||||||
|
|
||||||
if (existingParty != null) {
|
|
||||||
statusHandler.error("Error adding " + objectType
|
|
||||||
+ " to registry. " + objectType + " " + partyId
|
|
||||||
+ " already exists");
|
|
||||||
webUtil.sendErrorResponse(request, response,
|
|
||||||
ERROR_RESPONSE_PAGE, partyId, objectType, objectType
|
|
||||||
+ " Already Exists");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Create a new submit request containing the new party
|
|
||||||
*/
|
|
||||||
SubmitObjectsRequest submitRequest = null;
|
|
||||||
try {
|
|
||||||
submitRequest = webUtil.createParty(request);
|
|
||||||
} catch (EbxmlRegistryException e) {
|
|
||||||
statusHandler.error("Error creating " + objectType, e);
|
|
||||||
webUtil.sendErrorResponse(
|
|
||||||
request,
|
|
||||||
response,
|
|
||||||
ERROR_RESPONSE_PAGE,
|
|
||||||
partyId,
|
|
||||||
objectType,
|
|
||||||
"Error creating " + objectType + "\n"
|
|
||||||
+ e.getLocalizedMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
// Submit the objects to the registry
|
|
||||||
try {
|
|
||||||
lcm.submitObjects(submitRequest);
|
|
||||||
webUtil.updatePC(request);
|
|
||||||
} catch (Exception e) {
|
|
||||||
statusHandler.error("Error submitting new " + objectType
|
|
||||||
+ " to the registry", e);
|
|
||||||
webUtil.sendErrorResponse(
|
|
||||||
request,
|
|
||||||
response,
|
|
||||||
ERROR_RESPONSE_PAGE,
|
|
||||||
partyId,
|
|
||||||
objectType,
|
|
||||||
"Error submitting new " + objectType
|
|
||||||
+ " to the registry\n"
|
|
||||||
+ e.getLocalizedMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
// Send success response back to the caller
|
|
||||||
webUtil.sendSuccessResponse(request, response,
|
|
||||||
SUCCESS_RESPONSE_PAGE, partyId, objectType);
|
|
||||||
|
|
||||||
} catch (ServletException e) {
|
|
||||||
statusHandler.error("Error generating response", e);
|
|
||||||
response.sendError(1,
|
|
||||||
"Error generating response: " + e.getLocalizedMessage());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Check to see if the party already exists. If so, the user cannot be
|
||||||
|
* added
|
||||||
|
*/
|
||||||
|
existingParty = partyDao.getById(partyId);
|
||||||
|
|
||||||
|
if (existingParty != null) {
|
||||||
|
statusHandler.error("Error adding " + objectType + " to registry. "
|
||||||
|
+ objectType + " " + partyId + " already exists");
|
||||||
|
return Response.serverError().build();
|
||||||
|
// webUtil.sendErrorResponse(request, response,
|
||||||
|
// ERROR_RESPONSE_PAGE, partyId, objectType, objectType
|
||||||
|
// + " Already Exists");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Create a new submit request containing the new party
|
||||||
|
*/
|
||||||
|
SubmitObjectsRequest submitRequest = null;
|
||||||
|
try {
|
||||||
|
submitRequest = webUtil.createParty(request);
|
||||||
|
} catch (EbxmlRegistryException e) {
|
||||||
|
statusHandler.error("Error creating " + objectType, e);
|
||||||
|
return Response.serverError().build();
|
||||||
|
// webUtil.sendErrorResponse(
|
||||||
|
// request,
|
||||||
|
// response,
|
||||||
|
// ERROR_RESPONSE_PAGE,
|
||||||
|
// partyId,
|
||||||
|
// objectType,
|
||||||
|
// "Error creating " + objectType + "\n"
|
||||||
|
// + e.getLocalizedMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Submit the objects to the registry
|
||||||
|
try {
|
||||||
|
lcm.submitObjects(submitRequest);
|
||||||
|
webUtil.updatePC(request);
|
||||||
|
} catch (Exception e) {
|
||||||
|
statusHandler.error("Error submitting new " + objectType
|
||||||
|
+ " to the registry", e);
|
||||||
|
return Response.serverError().build();
|
||||||
|
// webUtil.sendErrorResponse(
|
||||||
|
// request,
|
||||||
|
// response,
|
||||||
|
// ERROR_RESPONSE_PAGE,
|
||||||
|
// partyId,
|
||||||
|
// objectType,
|
||||||
|
// "Error submitting new " + objectType
|
||||||
|
// + " to the registry\n"
|
||||||
|
// + e.getLocalizedMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Send success response back to the caller
|
||||||
|
return Response.ok().build();
|
||||||
|
// webUtil.sendSuccessResponse(request, response, SUCCESS_RESPONSE_PAGE,
|
||||||
|
// partyId, objectType);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setWebUtil(RegistryWebUtil webUtil) {
|
public void setWebUtil(RegistryWebUtil webUtil) {
|
||||||
|
|
|
@ -21,24 +21,27 @@ package com.raytheon.uf.edex.registry.ebxml.web;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import javax.servlet.ServletException;
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.ws.rs.POST;
|
||||||
|
import javax.ws.rs.Path;
|
||||||
|
import javax.ws.rs.Produces;
|
||||||
|
import javax.ws.rs.core.Context;
|
||||||
|
import javax.ws.rs.core.Response;
|
||||||
|
|
||||||
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.PartyType;
|
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.PartyType;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import com.raytheon.uf.common.registry.ebxml.RegistryUtil;
|
import com.raytheon.uf.common.registry.ebxml.RegistryUtil;
|
||||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||||
import com.raytheon.uf.common.status.UFStatus;
|
import com.raytheon.uf.common.status.UFStatus;
|
||||||
import com.raytheon.uf.edex.core.EDEXUtil;
|
|
||||||
import com.raytheon.uf.edex.registry.ebxml.dao.PartyDao;
|
import com.raytheon.uf.edex.registry.ebxml.dao.PartyDao;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Servlet implementation used to delete a user or organization from the
|
* Servlet implementation used to delete a user or organization from the
|
||||||
* registry
|
* registry. FIXME: This class will be refactored in a later ticket
|
||||||
*
|
*
|
||||||
* <pre>
|
* <pre>
|
||||||
*
|
*
|
||||||
|
@ -48,15 +51,17 @@ import com.raytheon.uf.edex.registry.ebxml.dao.PartyDao;
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* 7/31/2012 #724 bphillip Initial creation
|
* 7/31/2012 #724 bphillip Initial creation
|
||||||
* 3/13/2013 1082 bphillip Made transactional
|
* 3/13/2013 1082 bphillip Made transactional
|
||||||
|
* 4/19/2013 1931 bphillip Refactored to use web application spring container and cxf services
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author bphillip
|
* @author bphillip
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
*/
|
*/
|
||||||
|
@Path("/DeleteRegistryParty")
|
||||||
|
@Service
|
||||||
@Transactional
|
@Transactional
|
||||||
public class DeleteRegistryParty extends javax.servlet.http.HttpServlet
|
public class DeleteRegistryParty {
|
||||||
implements javax.servlet.Servlet {
|
|
||||||
|
|
||||||
/** The serial ID */
|
/** The serial ID */
|
||||||
private static final long serialVersionUID = -9009661529309992652L;
|
private static final long serialVersionUID = -9009661529309992652L;
|
||||||
|
@ -67,69 +72,65 @@ public class DeleteRegistryParty extends javax.servlet.http.HttpServlet
|
||||||
/** The page to display upon failure */
|
/** The page to display upon failure */
|
||||||
private static final String ERROR_RESPONSE_PAGE = "deletePartyFailure";
|
private static final String ERROR_RESPONSE_PAGE = "deletePartyFailure";
|
||||||
|
|
||||||
// FIXME: Add spring support to servlets
|
private PartyDao partyDao;
|
||||||
|
|
||||||
private PartyDao partyDao = (PartyDao) EDEXUtil.getESBComponent("partyDao");
|
private RegistryWebUtil webUtil;
|
||||||
|
|
||||||
private RegistryWebUtil webUtil = (RegistryWebUtil) EDEXUtil
|
|
||||||
.getESBComponent("webUtil");
|
|
||||||
|
|
||||||
/** The logger */
|
/** The logger */
|
||||||
private static final transient IUFStatusHandler statusHandler = UFStatus
|
private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||||
.getHandler(DeleteRegistryParty.class);
|
.getHandler(DeleteRegistryParty.class);
|
||||||
|
|
||||||
@Override
|
@POST
|
||||||
protected void doPost(HttpServletRequest request,
|
@Produces("text/html")
|
||||||
HttpServletResponse response) throws IOException {
|
public Response doPost(@Context HttpServletRequest request)
|
||||||
try {
|
throws IOException {
|
||||||
String partyId = request.getParameter(WebFields.ID.fieldName());
|
String partyId = request.getParameter(WebFields.ID.fieldName());
|
||||||
String objectType = request.getParameter(WebFields.OBJ_TYPE
|
String objectType = request
|
||||||
.fieldName());
|
.getParameter(WebFields.OBJ_TYPE.fieldName());
|
||||||
PartyType existingParty = null;
|
PartyType existingParty = null;
|
||||||
|
|
||||||
// The EDEX internal user cannot be modified
|
// The EDEX internal user cannot be modified
|
||||||
if (partyId.equals(RegistryUtil.DEFAULT_OWNER)) {
|
if (partyId.equals(RegistryUtil.DEFAULT_OWNER)) {
|
||||||
webUtil.sendErrorResponse(request, response,
|
return Response.serverError().build();
|
||||||
ERROR_RESPONSE_PAGE, partyId, objectType,
|
// webUtil.sendErrorResponse(request, response,
|
||||||
"Cannot remove EDEX Internal User");
|
// ERROR_RESPONSE_PAGE, partyId, objectType,
|
||||||
}
|
// "Cannot remove EDEX Internal User");
|
||||||
|
|
||||||
/*
|
|
||||||
* Check if the party exists. If not, the party obviously cannot be
|
|
||||||
* deleted
|
|
||||||
*/
|
|
||||||
|
|
||||||
existingParty = partyDao.getById(partyId);
|
|
||||||
|
|
||||||
if (existingParty == null) {
|
|
||||||
webUtil.sendErrorResponse(request, response,
|
|
||||||
ERROR_RESPONSE_PAGE, partyId, objectType,
|
|
||||||
"Unable to delete " + objectType + " " + partyId + ". "
|
|
||||||
+ objectType + " does not exist");
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Remove any associations to the party
|
|
||||||
*/
|
|
||||||
try {
|
|
||||||
webUtil.removeAssociations(existingParty);
|
|
||||||
webUtil.removeParty(existingParty);
|
|
||||||
} catch (Exception e) {
|
|
||||||
statusHandler.error("Error modifying user", e);
|
|
||||||
webUtil.sendErrorResponse(request, response,
|
|
||||||
ERROR_RESPONSE_PAGE, partyId, objectType,
|
|
||||||
"Error removing associations to " + objectType + "\n"
|
|
||||||
+ e.getLocalizedMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
// Send back a successful response to the requester
|
|
||||||
webUtil.sendSuccessResponse(request, response,
|
|
||||||
SUCCESS_RESPONSE_PAGE, partyId, objectType);
|
|
||||||
} catch (ServletException e) {
|
|
||||||
statusHandler.error("Error generating response", e);
|
|
||||||
response.sendError(1,
|
|
||||||
"Error generating response: " + e.getLocalizedMessage());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Check if the party exists. If not, the party obviously cannot be
|
||||||
|
* deleted
|
||||||
|
*/
|
||||||
|
|
||||||
|
existingParty = partyDao.getById(partyId);
|
||||||
|
|
||||||
|
if (existingParty == null) {
|
||||||
|
return Response.serverError().build();
|
||||||
|
// webUtil.sendErrorResponse(request, response,
|
||||||
|
// ERROR_RESPONSE_PAGE, partyId, objectType,
|
||||||
|
// "Unable to delete " + objectType + " " + partyId + ". "
|
||||||
|
// + objectType + " does not exist");
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Remove any associations to the party
|
||||||
|
*/
|
||||||
|
try {
|
||||||
|
webUtil.removeAssociations(existingParty);
|
||||||
|
webUtil.removeParty(existingParty);
|
||||||
|
} catch (Exception e) {
|
||||||
|
statusHandler.error("Error modifying user", e);
|
||||||
|
return Response.serverError().build();
|
||||||
|
// webUtil.sendErrorResponse(request, response,
|
||||||
|
// ERROR_RESPONSE_PAGE, partyId, objectType,
|
||||||
|
// "Error removing associations to " + objectType + "\n"
|
||||||
|
// + e.getLocalizedMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Send back a successful response to the requester
|
||||||
|
// webUtil.sendSuccessResponse(request, response,
|
||||||
|
// SUCCESS_RESPONSE_PAGE, partyId, objectType);
|
||||||
|
return Response.ok().build();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPartyDao(PartyDao partyDao) {
|
public void setPartyDao(PartyDao partyDao) {
|
||||||
|
|
|
@ -21,19 +21,22 @@ package com.raytheon.uf.edex.registry.ebxml.web;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import javax.servlet.ServletException;
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.ws.rs.POST;
|
||||||
|
import javax.ws.rs.Path;
|
||||||
|
import javax.ws.rs.Produces;
|
||||||
|
import javax.ws.rs.core.Context;
|
||||||
|
import javax.ws.rs.core.Response;
|
||||||
|
|
||||||
import oasis.names.tc.ebxml.regrep.xsd.lcm.v4.SubmitObjectsRequest;
|
import oasis.names.tc.ebxml.regrep.xsd.lcm.v4.SubmitObjectsRequest;
|
||||||
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.PartyType;
|
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.PartyType;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import com.raytheon.uf.common.registry.ebxml.RegistryUtil;
|
import com.raytheon.uf.common.registry.ebxml.RegistryUtil;
|
||||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||||
import com.raytheon.uf.common.status.UFStatus;
|
import com.raytheon.uf.common.status.UFStatus;
|
||||||
import com.raytheon.uf.edex.core.EDEXUtil;
|
|
||||||
import com.raytheon.uf.edex.registry.ebxml.dao.PartyDao;
|
import com.raytheon.uf.edex.registry.ebxml.dao.PartyDao;
|
||||||
import com.raytheon.uf.edex.registry.ebxml.exception.EbxmlRegistryException;
|
import com.raytheon.uf.edex.registry.ebxml.exception.EbxmlRegistryException;
|
||||||
import com.raytheon.uf.edex.registry.ebxml.services.lifecycle.LifecycleManagerImpl;
|
import com.raytheon.uf.edex.registry.ebxml.services.lifecycle.LifecycleManagerImpl;
|
||||||
|
@ -41,6 +44,7 @@ import com.raytheon.uf.edex.registry.ebxml.services.lifecycle.LifecycleManagerIm
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Servlet implementation used to modify a user or organization in the registry
|
* Servlet implementation used to modify a user or organization in the registry
|
||||||
|
* FIXME: This class will be refactored in a later ticket
|
||||||
*
|
*
|
||||||
* <pre>
|
* <pre>
|
||||||
*
|
*
|
||||||
|
@ -50,15 +54,17 @@ import com.raytheon.uf.edex.registry.ebxml.services.lifecycle.LifecycleManagerIm
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* 7/31/2012 #724 bphillip Initial creation
|
* 7/31/2012 #724 bphillip Initial creation
|
||||||
* 3/13/2013 1082 bphillip Made transactional
|
* 3/13/2013 1082 bphillip Made transactional
|
||||||
|
* 4/19/2013 1931 bphillip Refactored to use web application spring container and cxf services
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author bphillip
|
* @author bphillip
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
*/
|
*/
|
||||||
|
@Path("/DeleteRegistryParty")
|
||||||
|
@Service
|
||||||
@Transactional
|
@Transactional
|
||||||
public class ModifyRegistryParty extends javax.servlet.http.HttpServlet
|
public class ModifyRegistryParty {
|
||||||
implements javax.servlet.Servlet {
|
|
||||||
|
|
||||||
/** The serial ID */
|
/** The serial ID */
|
||||||
private static final long serialVersionUID = -2361555059266130462L;
|
private static final long serialVersionUID = -2361555059266130462L;
|
||||||
|
@ -69,93 +75,88 @@ public class ModifyRegistryParty extends javax.servlet.http.HttpServlet
|
||||||
/** Page to display upon failure */
|
/** Page to display upon failure */
|
||||||
private static final String ERROR_RESPONSE_PAGE = "modifyPartyFailure";
|
private static final String ERROR_RESPONSE_PAGE = "modifyPartyFailure";
|
||||||
|
|
||||||
// FIXME: Add spring support to servlets
|
private PartyDao partyDao;
|
||||||
|
|
||||||
private PartyDao partyDao = (PartyDao) EDEXUtil.getESBComponent("partyDao");
|
private LifecycleManagerImpl lcm;
|
||||||
|
|
||||||
private LifecycleManagerImpl lcm = (LifecycleManagerImpl) EDEXUtil
|
private RegistryWebUtil webUtil;
|
||||||
.getESBComponent("lcmServiceImpl");
|
|
||||||
|
|
||||||
private RegistryWebUtil webUtil = (RegistryWebUtil) EDEXUtil
|
|
||||||
.getESBComponent("webUtil");
|
|
||||||
|
|
||||||
/** The logger */
|
/** The logger */
|
||||||
private static final transient IUFStatusHandler statusHandler = UFStatus
|
private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||||
.getHandler(ModifyRegistryParty.class);
|
.getHandler(ModifyRegistryParty.class);
|
||||||
|
|
||||||
@Override
|
@POST
|
||||||
protected void doPost(HttpServletRequest request,
|
@Produces("text/html")
|
||||||
HttpServletResponse response) throws IOException {
|
public Response doPost(@Context HttpServletRequest request)
|
||||||
|
throws IOException {
|
||||||
|
|
||||||
try {
|
String partyId = request.getParameter(WebFields.ID.fieldName());
|
||||||
String partyId = request.getParameter(WebFields.ID.fieldName());
|
String objectType = request
|
||||||
String objectType = request.getParameter(WebFields.OBJ_TYPE
|
.getParameter(WebFields.OBJ_TYPE.fieldName());
|
||||||
.fieldName());
|
PartyType existingParty = null;
|
||||||
PartyType existingParty = null;
|
|
||||||
|
|
||||||
// The EDEX internal user cannot be modified
|
// The EDEX internal user cannot be modified
|
||||||
if (partyId.equals(RegistryUtil.DEFAULT_OWNER)) {
|
if (partyId.equals(RegistryUtil.DEFAULT_OWNER)) {
|
||||||
webUtil.sendErrorResponse(request, response,
|
return Response.serverError().build();
|
||||||
ERROR_RESPONSE_PAGE, partyId, objectType,
|
// webUtil.sendErrorResponse(request, response,
|
||||||
"Cannot modify EDEX Internal User");
|
// ERROR_RESPONSE_PAGE, partyId, objectType,
|
||||||
}
|
// "Cannot modify EDEX Internal User");
|
||||||
|
|
||||||
/*
|
|
||||||
* Check if the party already exists. If the party does not exist,
|
|
||||||
* the party cannot be modified. An error response is sent to the
|
|
||||||
* requester
|
|
||||||
*/
|
|
||||||
existingParty = partyDao.getById(partyId);
|
|
||||||
|
|
||||||
if (existingParty == null) {
|
|
||||||
webUtil.sendErrorResponse(request, response,
|
|
||||||
ERROR_RESPONSE_PAGE, partyId, objectType,
|
|
||||||
"Unable to modify " + objectType + " " + partyId + ". "
|
|
||||||
+ objectType + " does not exist");
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Create the submit request
|
|
||||||
*/
|
|
||||||
SubmitObjectsRequest submitRequest = null;
|
|
||||||
try {
|
|
||||||
submitRequest = webUtil.createParty(request);
|
|
||||||
} catch (EbxmlRegistryException e) {
|
|
||||||
statusHandler.error("Error modifying user", e);
|
|
||||||
webUtil.sendErrorResponse(
|
|
||||||
request,
|
|
||||||
response,
|
|
||||||
ERROR_RESPONSE_PAGE,
|
|
||||||
partyId,
|
|
||||||
objectType,
|
|
||||||
"Error modifying " + objectType + "\n"
|
|
||||||
+ e.getLocalizedMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Remove any associations originating from the modified party
|
|
||||||
*/
|
|
||||||
try {
|
|
||||||
webUtil.removeAssociationsFrom(existingParty);
|
|
||||||
lcm.submitObjects(submitRequest);
|
|
||||||
webUtil.updatePC(request);
|
|
||||||
} catch (Exception e) {
|
|
||||||
statusHandler.error("Error modifying user", e);
|
|
||||||
webUtil.sendErrorResponse(request, response,
|
|
||||||
ERROR_RESPONSE_PAGE, partyId, objectType,
|
|
||||||
"Error removing associations to " + objectType + "\n"
|
|
||||||
+ e.getLocalizedMessage());
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
* Send back success message to the requester
|
|
||||||
*/
|
|
||||||
webUtil.sendSuccessResponse(request, response,
|
|
||||||
SUCCESS_RESPONSE_PAGE, partyId, objectType);
|
|
||||||
} catch (ServletException e) {
|
|
||||||
statusHandler.error("Error generating response", e);
|
|
||||||
response.sendError(1,
|
|
||||||
"Error generating response: " + e.getLocalizedMessage());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Check if the party already exists. If the party does not exist, the
|
||||||
|
* party cannot be modified. An error response is sent to the requester
|
||||||
|
*/
|
||||||
|
existingParty = partyDao.getById(partyId);
|
||||||
|
|
||||||
|
if (existingParty == null) {
|
||||||
|
return Response.serverError().build();
|
||||||
|
// webUtil.sendErrorResponse(request, response,
|
||||||
|
// ERROR_RESPONSE_PAGE, partyId, objectType,
|
||||||
|
// "Unable to modify " + objectType + " " + partyId + ". "
|
||||||
|
// + objectType + " does not exist");
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Create the submit request
|
||||||
|
*/
|
||||||
|
SubmitObjectsRequest submitRequest = null;
|
||||||
|
try {
|
||||||
|
submitRequest = webUtil.createParty(request);
|
||||||
|
} catch (EbxmlRegistryException e) {
|
||||||
|
statusHandler.error("Error modifying user", e);
|
||||||
|
return Response.serverError().build();
|
||||||
|
// webUtil.sendErrorResponse(
|
||||||
|
// request,
|
||||||
|
// response,
|
||||||
|
// ERROR_RESPONSE_PAGE,
|
||||||
|
// partyId,
|
||||||
|
// objectType,
|
||||||
|
// "Error modifying " + objectType + "\n"
|
||||||
|
// + e.getLocalizedMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Remove any associations originating from the modified party
|
||||||
|
*/
|
||||||
|
try {
|
||||||
|
webUtil.removeAssociationsFrom(existingParty);
|
||||||
|
lcm.submitObjects(submitRequest);
|
||||||
|
webUtil.updatePC(request);
|
||||||
|
} catch (Exception e) {
|
||||||
|
statusHandler.error("Error modifying user", e);
|
||||||
|
return Response.serverError().build();
|
||||||
|
// webUtil.sendErrorResponse(request, response,
|
||||||
|
// ERROR_RESPONSE_PAGE, partyId, objectType,
|
||||||
|
// "Error removing associations to " + objectType + "\n"
|
||||||
|
// + e.getLocalizedMessage());
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
* Send back success message to the requester
|
||||||
|
*/
|
||||||
|
// webUtil.sendSuccessResponse(request, response, SUCCESS_RESPONSE_PAGE,
|
||||||
|
// partyId, objectType);
|
||||||
|
return Response.ok().build();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPartyDao(PartyDao partyDao) {
|
public void setPartyDao(PartyDao partyDao) {
|
||||||
|
|
|
@ -77,6 +77,10 @@ public class RegistryWebUtil {
|
||||||
|
|
||||||
private LifecycleManagerImpl lcm;
|
private LifecycleManagerImpl lcm;
|
||||||
|
|
||||||
|
private ClassificationNodeDao classificationNodeDao;
|
||||||
|
|
||||||
|
private PersonDao personDao;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a party (user or organization) based on parameters contained in
|
* Creates a party (user or organization) based on parameters contained in
|
||||||
* the servlet request
|
* the servlet request
|
||||||
|
@ -91,7 +95,6 @@ public class RegistryWebUtil {
|
||||||
throws EbxmlRegistryException {
|
throws EbxmlRegistryException {
|
||||||
|
|
||||||
List<RegistryObjectType> objectList = new ArrayList<RegistryObjectType>();
|
List<RegistryObjectType> objectList = new ArrayList<RegistryObjectType>();
|
||||||
ClassificationNodeDao dao = new ClassificationNodeDao();
|
|
||||||
|
|
||||||
String partyId = request.getParameter("id");
|
String partyId = request.getParameter("id");
|
||||||
PartyType party = null;
|
PartyType party = null;
|
||||||
|
@ -146,7 +149,6 @@ public class RegistryWebUtil {
|
||||||
}
|
}
|
||||||
// Creating an organization
|
// Creating an organization
|
||||||
else {
|
else {
|
||||||
PersonDao personDao = new PersonDao();
|
|
||||||
party = new OrganizationType();
|
party = new OrganizationType();
|
||||||
party.setLid(partyId);
|
party.setLid(partyId);
|
||||||
party.setOwner(RegistryUtil.DEFAULT_OWNER);
|
party.setOwner(RegistryUtil.DEFAULT_OWNER);
|
||||||
|
@ -173,7 +175,7 @@ public class RegistryWebUtil {
|
||||||
|
|
||||||
// Assign the postal address
|
// Assign the postal address
|
||||||
PostalAddressType address = new PostalAddressType();
|
PostalAddressType address = new PostalAddressType();
|
||||||
address.setType(dao.getNodeFromCode(request
|
address.setType(classificationNodeDao.getNodeFromCode(request
|
||||||
.getParameter(WebFields.ADDRESS_TYPE.fieldName())));
|
.getParameter(WebFields.ADDRESS_TYPE.fieldName())));
|
||||||
address.setStreet(request.getParameter(WebFields.ADDRESS_1.fieldName()));
|
address.setStreet(request.getParameter(WebFields.ADDRESS_1.fieldName()));
|
||||||
address.setStreetNumber(request.getParameter(WebFields.ADDRESS_2
|
address.setStreetNumber(request.getParameter(WebFields.ADDRESS_2
|
||||||
|
@ -188,7 +190,7 @@ public class RegistryWebUtil {
|
||||||
|
|
||||||
// Assign the telephone number
|
// Assign the telephone number
|
||||||
TelephoneNumberType phone = new TelephoneNumberType();
|
TelephoneNumberType phone = new TelephoneNumberType();
|
||||||
phone.setType(dao.getNodeFromCode(request
|
phone.setType(classificationNodeDao.getNodeFromCode(request
|
||||||
.getParameter(WebFields.TELEPHONE_TYPE.fieldName())));
|
.getParameter(WebFields.TELEPHONE_TYPE.fieldName())));
|
||||||
phone.setAreaCode(request.getParameter(WebFields.AREA_CODE.fieldName()));
|
phone.setAreaCode(request.getParameter(WebFields.AREA_CODE.fieldName()));
|
||||||
phone.setNumber(request.getParameter(WebFields.PHONE_1.fieldName())
|
phone.setNumber(request.getParameter(WebFields.PHONE_1.fieldName())
|
||||||
|
@ -198,7 +200,7 @@ public class RegistryWebUtil {
|
||||||
|
|
||||||
// Assign the email address
|
// Assign the email address
|
||||||
EmailAddressType email = new EmailAddressType();
|
EmailAddressType email = new EmailAddressType();
|
||||||
email.setType(dao.getNodeFromCode(request
|
email.setType(classificationNodeDao.getNodeFromCode(request
|
||||||
.getParameter(WebFields.EMAIL_TYPE.fieldName())));
|
.getParameter(WebFields.EMAIL_TYPE.fieldName())));
|
||||||
email.setAddress(request.getParameter(WebFields.EMAIL.fieldName()));
|
email.setAddress(request.getParameter(WebFields.EMAIL.fieldName()));
|
||||||
party.getEmailAddress().add(email);
|
party.getEmailAddress().add(email);
|
||||||
|
@ -537,4 +539,13 @@ public class RegistryWebUtil {
|
||||||
this.lcm = lcm;
|
this.lcm = lcm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setClassificationNodeDao(
|
||||||
|
ClassificationNodeDao classificationNodeDao) {
|
||||||
|
this.classificationNodeDao = classificationNodeDao;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPersonDao(PersonDao personDao) {
|
||||||
|
this.personDao = personDao;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,11 +11,11 @@
|
||||||
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||||
<link rel="stylesheet" type="text/css" media="screen, projection" href="dataDelivery.css"/>
|
<link rel="stylesheet" type="text/css" media="screen, projection" href="dataDelivery.css"/>
|
||||||
<script type="text/javascript" src='/registryEbxml/dwr/engine.js'></script>
|
<script type="text/javascript" src='/dwr/engine.js'></script>
|
||||||
<script type="text/javascript" src='/registryEbxml/dwr/util.js'></script>
|
<script type="text/javascript" src='/dwr/util.js'></script>
|
||||||
<script type='text/javascript' src='/registryEbxml/dwr/interface/RegistryWeb.js'></script>
|
<script type='text/javascript' src='/dwr/interface/RegistryWeb.js'></script>
|
||||||
<script type='text/javascript' src='/registryEbxml/dataDeliveryUtil.js'></script>
|
<script type='text/javascript' src='/dataDeliveryUtil.js'></script>
|
||||||
<script type='text/javascript' src='/registryEbxml/validateForm.js'></script>
|
<script type='text/javascript' src='/validateForm.js'></script>
|
||||||
<title>Data Delivery Registry Admin: Add New Organization</title>
|
<title>Data Delivery Registry Admin: Add New Organization</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
|
@ -11,10 +11,10 @@
|
||||||
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||||
<link rel="stylesheet" type="text/css" media="screen, projection" href="dataDelivery.css"/>
|
<link rel="stylesheet" type="text/css" media="screen, projection" href="dataDelivery.css"/>
|
||||||
<script type="text/javascript" src='/registryEbxml/dwr/engine.js'></script>
|
<script type="text/javascript" src='/dwr/engine.js'></script>
|
||||||
<script type="text/javascript" src='/registryEbxml/dwr/util.js'></script>
|
<script type="text/javascript" src='/dwr/util.js'></script>
|
||||||
<script type='text/javascript' src='/registryEbxml/dwr/interface/RegistryWeb.js'></script>
|
<script type='text/javascript' src='/dwr/interface/RegistryWeb.js'></script>
|
||||||
<script type='text/javascript' src='/registryEbxml/dataDeliveryUtil.js'></script>
|
<script type='text/javascript' src='/dataDeliveryUtil.js'></script>
|
||||||
<title>Data Delivery Registry Organization Admin</title>
|
<title>Data Delivery Registry Organization Admin</title>
|
||||||
</head>
|
</head>
|
||||||
<body onload="getOrgs()">
|
<body onload="getOrgs()">
|
||||||
|
|
|
@ -11,11 +11,11 @@
|
||||||
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||||
<link rel="stylesheet" type="text/css" media="screen, projection" href="dataDelivery.css"/>
|
<link rel="stylesheet" type="text/css" media="screen, projection" href="dataDelivery.css"/>
|
||||||
<script type="text/javascript" src='/registryEbxml/dwr/engine.js'></script>
|
<script type="text/javascript" src='/dwr/engine.js'></script>
|
||||||
<script type="text/javascript" src='/registryEbxml/dwr/util.js'></script>
|
<script type="text/javascript" src='/dwr/util.js'></script>
|
||||||
<script type='text/javascript' src='/registryEbxml/dwr/interface/RegistryWeb.js'></script>
|
<script type='text/javascript' src='/dwr/interface/RegistryWeb.js'></script>
|
||||||
<script type='text/javascript' src='/registryEbxml/dataDeliveryUtil.js'></script>
|
<script type='text/javascript' src='/dataDeliveryUtil.js'></script>
|
||||||
<script type='text/javascript' src='/registryEbxml/validateForm.js'></script>
|
<script type='text/javascript' src='/validateForm.js'></script>
|
||||||
<title>Data Delivery Registry Admin: Add New User</title>
|
<title>Data Delivery Registry Admin: Add New User</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
|
@ -11,10 +11,10 @@
|
||||||
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||||
<link rel="stylesheet" type="text/css" media="screen, projection" href="dataDelivery.css"/>
|
<link rel="stylesheet" type="text/css" media="screen, projection" href="dataDelivery.css"/>
|
||||||
<script type="text/javascript" src='/registryEbxml/dwr/engine.js'></script>
|
<script type="text/javascript" src='/dwr/engine.js'></script>
|
||||||
<script type="text/javascript" src='/registryEbxml/dwr/util.js'></script>
|
<script type="text/javascript" src='/dwr/util.js'></script>
|
||||||
<script type='text/javascript' src='/registryEbxml/dwr/interface/RegistryWeb.js'></script>
|
<script type='text/javascript' src='/dwr/interface/RegistryWeb.js'></script>
|
||||||
<script type='text/javascript' src='/registryEbxml/dataDeliveryUtil.js'></script>
|
<script type='text/javascript' src='/dataDeliveryUtil.js'></script>
|
||||||
<title>Data Delivery Registry Admin</title>
|
<title>Data Delivery Registry Admin</title>
|
||||||
</head>
|
</head>
|
||||||
<body onload="getUsers()">
|
<body onload="getUsers()">
|
||||||
|
|
|
@ -13,31 +13,30 @@
|
||||||
<display-name>Data Delivery</display-name>
|
<display-name>Data Delivery</display-name>
|
||||||
|
|
||||||
<servlet>
|
<servlet>
|
||||||
<description><![CDATA[Add users to the registry]]></description>
|
<servlet-name>RegistryWebServiceServlet</servlet-name>
|
||||||
<display-name>AddRegistryParty</display-name>
|
<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
|
||||||
<servlet-name>AddRegistryParty</servlet-name>
|
<init-param>
|
||||||
<servlet-class>com.raytheon.uf.edex.registry.ebxml.web.AddRegistryParty
|
<param-name>config-location</param-name>
|
||||||
</servlet-class>
|
<param-value>/webServiceBeans.xml</param-value>
|
||||||
|
</init-param>
|
||||||
|
<init-param>
|
||||||
|
<param-name>static-welcome-file</param-name>
|
||||||
|
<param-value>/RegistryUserMenu.html</param-value>
|
||||||
|
</init-param>
|
||||||
|
<init-param>
|
||||||
|
<param-name>static-resources-list</param-name>
|
||||||
|
<param-value>.*\.html .*\.js .*\.css</param-value>
|
||||||
|
</init-param>
|
||||||
|
<load-on-startup>1</load-on-startup>
|
||||||
</servlet>
|
</servlet>
|
||||||
|
|
||||||
<servlet>
|
<servlet-mapping>
|
||||||
<description><![CDATA[Modify existing users in the registry]]></description>
|
<servlet-name>RegistryWebServiceServlet</servlet-name>
|
||||||
<display-name>ModifyRegistryParty</display-name>
|
<url-pattern>/*</url-pattern>
|
||||||
<servlet-name>ModifyRegistryParty</servlet-name>
|
</servlet-mapping>
|
||||||
<servlet-class>com.raytheon.uf.edex.registry.ebxml.web.ModifyRegistryParty
|
|
||||||
</servlet-class>
|
|
||||||
</servlet>
|
|
||||||
|
|
||||||
<servlet>
|
<servlet>
|
||||||
<description><![CDATA[Delete users from the registry]]></description>
|
<display-name>DWR Servlet</display-name>
|
||||||
<display-name>DeleteRegistryParty</display-name>
|
|
||||||
<servlet-name>DeleteRegistryParty</servlet-name>
|
|
||||||
<servlet-class>com.raytheon.uf.edex.registry.ebxml.web.DeleteRegistryParty
|
|
||||||
</servlet-class>
|
|
||||||
</servlet>
|
|
||||||
|
|
||||||
<servlet>
|
|
||||||
<display-name>DWR Servlet</display-name>
|
|
||||||
<servlet-name>dwr-invoker</servlet-name>
|
<servlet-name>dwr-invoker</servlet-name>
|
||||||
<servlet-class>uk.ltd.getahead.dwr.DWRServlet</servlet-class>
|
<servlet-class>uk.ltd.getahead.dwr.DWRServlet</servlet-class>
|
||||||
</servlet>
|
</servlet>
|
||||||
|
@ -47,22 +46,7 @@
|
||||||
<url-pattern>/dwr/*</url-pattern>
|
<url-pattern>/dwr/*</url-pattern>
|
||||||
</servlet-mapping>
|
</servlet-mapping>
|
||||||
|
|
||||||
<servlet-mapping>
|
|
||||||
<servlet-name>AddRegistryParty</servlet-name>
|
|
||||||
<url-pattern>/AddRegistryParty</url-pattern>
|
|
||||||
</servlet-mapping>
|
|
||||||
|
|
||||||
<servlet-mapping>
|
|
||||||
<servlet-name>ModifyRegistryParty</servlet-name>
|
|
||||||
<url-pattern>/ModifyRegistryParty</url-pattern>
|
|
||||||
</servlet-mapping>
|
|
||||||
|
|
||||||
<servlet-mapping>
|
|
||||||
<servlet-name>DeleteRegistryParty</servlet-name>
|
|
||||||
<url-pattern>/DeleteRegistryParty</url-pattern>
|
|
||||||
</servlet-mapping>
|
|
||||||
|
|
||||||
<welcome-file-list>
|
<welcome-file-list>
|
||||||
<welcome-file>/RegistryUserMenu.html</welcome-file>
|
<welcome-file>RegistryUserMenu.html</welcome-file>
|
||||||
</welcome-file-list>
|
</welcome-file-list>
|
||||||
</web-app>
|
</web-app>
|
||||||
|
|
|
@ -0,0 +1,71 @@
|
||||||
|
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xmlns:jaxws="http://cxf.apache.org/jaxws"
|
||||||
|
xmlns:jaxrs="http://cxf.apache.org/jaxrs"
|
||||||
|
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||||
|
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
|
||||||
|
http://camel.apache.org/schema/spring
|
||||||
|
http://camel.apache.org/schema/spring/camel-spring.xsd
|
||||||
|
http://cxf.apache.org/jaxws
|
||||||
|
http://cxf.apache.org/schemas/jaxws.xsd
|
||||||
|
http://cxf.apache.org/jaxrs
|
||||||
|
http://cxf.apache.org/schemas/jaxrs.xsd">
|
||||||
|
|
||||||
|
<import resource="file:///${edex.home}/conf/spring/edex-db.xml" />
|
||||||
|
<import resource="classpath:res/spring/ebxml.xml"/>
|
||||||
|
<import resource="classpath:res/spring/ebxml-webservices.xml" />
|
||||||
|
<import resource="classpath:res/spring/ebxml-querytypes.xml" />
|
||||||
|
<import resource="classpath:res/spring/ebxml-registry-dao.xml" />
|
||||||
|
|
||||||
|
|
||||||
|
<import resource="classpath:META-INF/cxf/cxf.xml" />
|
||||||
|
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
|
||||||
|
<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
|
||||||
|
|
||||||
|
|
||||||
|
<!-- SOAP Service definitions -->
|
||||||
|
<jaxws:server id="QueryService" address="/queryManager">
|
||||||
|
<jaxws:serviceBean>
|
||||||
|
<ref bean="queryServiceImpl" />
|
||||||
|
</jaxws:serviceBean>
|
||||||
|
</jaxws:server>
|
||||||
|
|
||||||
|
<jaxws:server id="NotificationListenerService" address="/notificationListener">
|
||||||
|
<jaxws:serviceBean>
|
||||||
|
<ref bean="notificationServiceImpl" />
|
||||||
|
</jaxws:serviceBean>
|
||||||
|
</jaxws:server>
|
||||||
|
|
||||||
|
<jaxws:server id="LifecycleManagerServiceService" address="/lifecycleManager">
|
||||||
|
<jaxws:serviceBean>
|
||||||
|
<ref bean="lcmServiceImpl" />
|
||||||
|
</jaxws:serviceBean>
|
||||||
|
</jaxws:server>
|
||||||
|
|
||||||
|
<jaxws:server id="ValidatorService" address="/validator">
|
||||||
|
<jaxws:serviceBean>
|
||||||
|
<ref bean="validatorServiceImpl" />
|
||||||
|
</jaxws:serviceBean>
|
||||||
|
</jaxws:server>
|
||||||
|
|
||||||
|
<jaxws:server id="CatalogerService" address="/cataloger">
|
||||||
|
<jaxws:serviceBean>
|
||||||
|
<ref bean="catalogerServiceImpl" />
|
||||||
|
</jaxws:serviceBean>
|
||||||
|
</jaxws:server>
|
||||||
|
<!-- End Soap Service Definitions -->
|
||||||
|
|
||||||
|
<!-- REST Service Definitions -->
|
||||||
|
<jaxrs:server id="registryRestServices" address="/">
|
||||||
|
<jaxrs:serviceBeans>
|
||||||
|
<ref bean="registryObjectsRestService" />
|
||||||
|
<ref bean="repositoryObjectsRestService" />
|
||||||
|
<ref bean="queryProtocolRestService" />
|
||||||
|
<ref bean="AddRegistryParty" />
|
||||||
|
<ref bean="ModifyRegistryParty" />
|
||||||
|
<ref bean="DeleteRegistryParty" />
|
||||||
|
</jaxrs:serviceBeans>
|
||||||
|
</jaxrs:server>
|
||||||
|
<!-- End REST Endpoint definitions -->
|
||||||
|
|
||||||
|
</beans>
|
|
@ -71,7 +71,8 @@ import com.raytheon.uf.edex.database.dao.DatabaseUtil;
|
||||||
*/
|
*/
|
||||||
@RunWith(SpringJUnit4ClassRunner.class)
|
@RunWith(SpringJUnit4ClassRunner.class)
|
||||||
@ContextConfiguration(locations = { DatabaseUtil.UNIT_TEST_DB_BEANS_XML,
|
@ContextConfiguration(locations = { DatabaseUtil.UNIT_TEST_DB_BEANS_XML,
|
||||||
"/spring/ebxml.xml", "/spring/ebxml-impl.xml",
|
"/spring/ebxml.xml", "/spring/ebxml-xacml.xml",
|
||||||
|
"/spring/ebxml-webservices.xml", "/spring/ebxml-impl.xml",
|
||||||
"/spring/ebxml-querytypes.xml", "/spring/ebxml-registry-dao.xml",
|
"/spring/ebxml-querytypes.xml", "/spring/ebxml-registry-dao.xml",
|
||||||
"/ebxml/unit-test-ebxml-beans.xml", "/unit-test-localization-beans.xml" })
|
"/ebxml/unit-test-ebxml-beans.xml", "/unit-test-localization-beans.xml" })
|
||||||
@DirtiesContext(classMode = ClassMode.AFTER_EACH_TEST_METHOD)
|
@DirtiesContext(classMode = ClassMode.AFTER_EACH_TEST_METHOD)
|
||||||
|
|
Loading…
Add table
Reference in a new issue