Changeset 1257
- Timestamp:
- Oct 2, 2011, 6:06:34 PM (13 years ago)
- Location:
- EDIS/trunk/java
- Files:
-
- 1 deleted
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
EDIS/trunk/java/tracking-server-core/src/main/java/gov/va/med/edp/dao/rpc/VistaLinkBigBoardDao.java
r1227 r1257 2 2 3 3 import gov.va.med.edp.dao.TrackingDao; 4 import gov.va.med.edp. rpc.VistaLinkDaoSupport;4 import gov.va.med.edp.vistalink.VistaLinkDaoSupport; 5 5 import org.springframework.dao.DataAccessException; 6 6 -
EDIS/trunk/java/tracking-server-core/src/main/java/gov/va/med/edp/dao/rpc/VistaLinkServerPackageVersionDao.java
r1227 r1257 1 1 package gov.va.med.edp.dao.rpc; 2 2 3 import gov.va.med.edp. rpc.VistaLinkDaoSupport;3 import gov.va.med.edp.vistalink.VistaLinkTemplate; 4 4 import gov.va.med.edp.vo.BigBoardDebugInfoVO; 5 5 import gov.va.med.edp.dao.ServerPackageVersionDao; … … 10 10 import java.io.IOException; 11 11 12 import gov.va.med.vistalink.adapter.spi.VistaLinkServerInfo; 12 13 import org.w3c.dom.Document; 13 14 import org.w3c.dom.Element; … … 35 36 36 37 public BigBoardDebugInfoVO getVistaLinkConnectionInfo(String stationNumber) throws DataAccessException { 37 return getRpcTemplate().getVistaLinkConnectionInfo(stationNumber, EDPTRACKING_APPLICATION_USER); 38 } 38 VistaLinkServerInfo vistaLinkServerInfo = getRpcTemplate().getConnectionInfo(stationNumber, EDPTRACKING_APPLICATION_USER, VistaLinkTemplate.USER_TYPE_APPLICATION_PROXY); 39 BigBoardDebugInfoVO bbd = new BigBoardDebugInfoVO(vistaLinkServerInfo.getAddress().toString(), new Integer(vistaLinkServerInfo.getPort()).toString()); 40 return bbd; 41 } 39 42 40 43 private String getVersion(String result) { -
EDIS/trunk/java/tracking-server-core/src/main/java/gov/va/med/edp/dao/rpc/VistaLinkTrackingDao.java
r1227 r1257 1 1 package gov.va.med.edp.dao.rpc; 2 2 3 import gov.va.med.edp.vistalink.VistaLinkDaoSupport; 3 4 import org.springframework.dao.DataAccessException; 4 5 … … 8 9 9 10 import gov.va.med.edp.dao.TrackingDao; 10 import gov.va.med.edp.rpc.VistaLinkDaoSupport;11 11 12 12 public class VistaLinkTrackingDao extends VistaLinkDaoSupport implements TrackingDao { -
EDIS/trunk/java/tracking-server-main/src/main/webapp/WEB-INF/config/data-access-config.xml
r1252 r1257 2 2 <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 3 3 xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"> 4 <bean id="trackingDao" class="gov.va.med.edp.dao.rpc.VistaLinkTrackingDao"/> 5 <bean id="bigBoardDao" class="gov.va.med.edp.dao.rpc.VistaLinkBigBoardDao"/> 6 <bean id="sessionDao" class="gov.va.med.edp.dao.rpc.VistaLinkSessionDao"/> 7 <bean id="serverPackageVersionDao" class="gov.va.med.edp.dao.rpc.VistaLinkServerPackageVersionDao"/> 8 4 <bean id="trackingDao" class="gov.va.med.edp.dao.rpc.VistaLinkTrackingDao"> 5 <property name="rpcTemplate" ref="vistaLinkRpcTemplate"/> 6 </bean> 7 <bean id="bigBoardDao" class="gov.va.med.edp.dao.rpc.VistaLinkBigBoardDao"> 8 <property name="rpcTemplate" ref="vistaLinkRpcTemplate"/> 9 </bean> 10 <bean id="sessionDao" class="gov.va.med.edp.dao.rpc.VistaLinkSessionDao"> 11 <property name="rpcTemplate" ref="vistaLinkRpcTemplate"/> 12 </bean> 13 <bean id="serverPackageVersionDao" class="gov.va.med.edp.dao.rpc.VistaLinkServerPackageVersionDao"> 14 <property name="rpcTemplate" ref="vistaLinkRpcTemplate"/> 15 </bean> 9 16 </beans> -
EDIS/trunk/java/tracking-server-main/src/main/webapp/WEB-INF/config/security-config.xml
r1253 r1257 33 33 class="gov.va.med.edp.springframework.security.userdetails.vistalink.VistaLinkUserDetailService"> 34 34 <property name="applicationName" value="${app.name}"/> 35 <property name=" connectionFactoryLocator" ref="vistaLinkConnectionFactoryLocator"/>35 <property name="rpcTemplate" ref="vistaLinkRpcTemplate"/> 36 36 </bean> 37 37 … … 60 60 <property name="filterProcessesUrl" value="/logout.html"/> 61 61 </bean> 62 63 <bean id="vistaLinkConnectionFactoryLocator"64 class="gov.va.med.edp.vistalink.locator.VistaLinkConnectorConfigConnectionFactoryLocator">65 <property name="connectors" ref="vistaAccounts"/>66 </bean>67 62 </beans> -
EDIS/trunk/java/tracking-server-main/src/main/webapp/WEB-INF/config/vistalink-config.xml
r1253 r1257 5 5 http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd"> 6 6 7 <bean id="vistaLinkConnectionFactoryLocator" 8 class="gov.va.med.edp.vistalink.locator.VistaLinkConnectorConfigConnectionFactoryLocator"> 9 <property name="connectors" ref="vistaAccounts"/> 10 </bean> 11 12 <bean id="vistaLinkRpcTemplate" class="gov.va.med.edp.vistalink.VistaLinkTemplate"> 13 <constructor-arg index="0" ref="vistaLinkConnectionFactoryLocator"/> 14 </bean> 15 7 16 <util:set id="vistaAccounts"> 8 17 <bean class="gov.va.med.edp.vistalink.locator.VistaLinkConnectorConfig"> 9 <property name="host" value="foo"/> 10 <property name="name" value="FOO"/> 18 <property name="host" value="66.206.177.84"/> 19 <property name="port" value="9310"/> 20 <property name="name" value="WORLDVISTA DEMO CLINIC"/> 11 21 <property name="primaryStation" value="500"/> 12 <property name="accessCode" value=" foo"/>13 <property name="verifyCode" value=" bar"/>22 <property name="accessCode" value="EDISUSER1"/> 23 <property name="verifyCode" value="VISTAIS#1"/> 14 24 </bean> 15 25 </util:set> -
EDIS/trunk/java/tracking-server-vista/src/main/java/gov/va/med/edp/vistalink/VistaLinkTemplate.java
r1227 r1257 4 4 import gov.va.med.vistalink.adapter.cci.VistaLinkAppProxyConnectionSpec; 5 5 import gov.va.med.vistalink.adapter.cci.VistaLinkConnection; 6 import gov.va.med.vistalink.adapter.cci.VistaLinkConnectionSpec; 6 7 import gov.va.med.vistalink.adapter.cci.VistaLinkDuzConnectionSpec; 7 8 import gov.va.med.vistalink.adapter.record.LoginsDisabledFaultException; 8 9 import gov.va.med.vistalink.adapter.record.VistaLinkFaultException; 10 import gov.va.med.vistalink.adapter.spi.VistaLinkServerInfo; 9 11 import gov.va.med.vistalink.rpc.*; 10 12 import gov.va.med.vistalink.security.m.SecurityFaultException; … … 31 33 */ 32 34 public class VistaLinkTemplate { 35 36 public static final int USER_TYPE_DUZ = 1; 37 public static final int USER_TYPE_APPLICATION_PROXY = 2; 33 38 34 39 static final int DEFAULT_TIMEOUT = 10000; … … 142 147 // return paramList; 143 148 // } 149 150 public VistaLinkServerInfo getConnectionInfo(final String division, final String user, final int userType) throws DataAccessException { 151 VistaLinkConnection conn = null; 152 ConnectionFactory connectionFactory = connectionFactoryLocator.getConnectionFactory(division); 153 try { 154 conn = (VistaLinkConnection) connectionFactory.getConnection(createConnectionSpec(division, user, userType)); 155 } catch (ResourceException e) { 156 throw new DataAccessResourceFailureException("error getting connection info", e); 157 } 158 VistaLinkServerInfo vistaLinkServerInfo = conn.getConnectionInfo(); 159 return vistaLinkServerInfo; 160 } 161 162 private VistaLinkConnectionSpec createConnectionSpec(String division, String user, int userType) { 163 switch (userType) { 164 case USER_TYPE_APPLICATION_PROXY: 165 return new VistaLinkAppProxyConnectionSpec(division, user); 166 case USER_TYPE_DUZ: 167 default: 168 return new VistaLinkDuzConnectionSpec(division, user); 169 } 170 } 144 171 }
Note:
See TracChangeset
for help on using the changeset viewer.