Changeset 1257 for EDIS/trunk/java


Ignore:
Timestamp:
Oct 2, 2011, 6:06:34 PM (13 years ago)
Author:
Solomon Blaz
Message:

deleted duplicate classes from gov.va.med.edp.rpc package in favor of ones in gov.va.med.edp.vistalink and configured rest of application accordingly

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  
    22
    33import gov.va.med.edp.dao.TrackingDao;
    4 import gov.va.med.edp.rpc.VistaLinkDaoSupport;
     4import gov.va.med.edp.vistalink.VistaLinkDaoSupport;
    55import org.springframework.dao.DataAccessException;
    66
  • EDIS/trunk/java/tracking-server-core/src/main/java/gov/va/med/edp/dao/rpc/VistaLinkServerPackageVersionDao.java

    r1227 r1257  
    11package gov.va.med.edp.dao.rpc;
    22
    3 import gov.va.med.edp.rpc.VistaLinkDaoSupport;
     3import gov.va.med.edp.vistalink.VistaLinkTemplate;
    44import gov.va.med.edp.vo.BigBoardDebugInfoVO;
    55import gov.va.med.edp.dao.ServerPackageVersionDao;
     
    1010import java.io.IOException;
    1111
     12import gov.va.med.vistalink.adapter.spi.VistaLinkServerInfo;
    1213import org.w3c.dom.Document;
    1314import org.w3c.dom.Element;
     
    3536
    3637    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    }
    3942   
    4043    private String getVersion(String result) {
  • EDIS/trunk/java/tracking-server-core/src/main/java/gov/va/med/edp/dao/rpc/VistaLinkTrackingDao.java

    r1227 r1257  
    11package gov.va.med.edp.dao.rpc;
    22
     3import gov.va.med.edp.vistalink.VistaLinkDaoSupport;
    34import org.springframework.dao.DataAccessException;
    45
     
    89
    910import gov.va.med.edp.dao.TrackingDao;
    10 import gov.va.med.edp.rpc.VistaLinkDaoSupport;
    1111
    1212public class VistaLinkTrackingDao extends VistaLinkDaoSupport implements TrackingDao {
  • EDIS/trunk/java/tracking-server-main/src/main/webapp/WEB-INF/config/data-access-config.xml

    r1252 r1257  
    22<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    33       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>
    916</beans>
  • EDIS/trunk/java/tracking-server-main/src/main/webapp/WEB-INF/config/security-config.xml

    r1253 r1257  
    3333          class="gov.va.med.edp.springframework.security.userdetails.vistalink.VistaLinkUserDetailService">
    3434        <property name="applicationName" value="${app.name}"/>
    35         <property name="connectionFactoryLocator" ref="vistaLinkConnectionFactoryLocator"/>
     35        <property name="rpcTemplate" ref="vistaLinkRpcTemplate"/>
    3636    </bean>
    3737
     
    6060        <property name="filterProcessesUrl" value="/logout.html"/>
    6161    </bean>
    62 
    63     <bean id="vistaLinkConnectionFactoryLocator"
    64           class="gov.va.med.edp.vistalink.locator.VistaLinkConnectorConfigConnectionFactoryLocator">
    65         <property name="connectors" ref="vistaAccounts"/>
    66     </bean>
    6762</beans>
  • EDIS/trunk/java/tracking-server-main/src/main/webapp/WEB-INF/config/vistalink-config.xml

    r1253 r1257  
    55       http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd">
    66
     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
    716    <util:set id="vistaAccounts">
    817        <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"/>
    1121            <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"/>
    1424        </bean>
    1525    </util:set>
  • EDIS/trunk/java/tracking-server-vista/src/main/java/gov/va/med/edp/vistalink/VistaLinkTemplate.java

    r1227 r1257  
    44import gov.va.med.vistalink.adapter.cci.VistaLinkAppProxyConnectionSpec;
    55import gov.va.med.vistalink.adapter.cci.VistaLinkConnection;
     6import gov.va.med.vistalink.adapter.cci.VistaLinkConnectionSpec;
    67import gov.va.med.vistalink.adapter.cci.VistaLinkDuzConnectionSpec;
    78import gov.va.med.vistalink.adapter.record.LoginsDisabledFaultException;
    89import gov.va.med.vistalink.adapter.record.VistaLinkFaultException;
     10import gov.va.med.vistalink.adapter.spi.VistaLinkServerInfo;
    911import gov.va.med.vistalink.rpc.*;
    1012import gov.va.med.vistalink.security.m.SecurityFaultException;
     
    3133 */
    3234public class VistaLinkTemplate {
     35
     36    public static final int USER_TYPE_DUZ = 1;
     37    public static final int USER_TYPE_APPLICATION_PROXY = 2;
    3338
    3439    static final int DEFAULT_TIMEOUT = 10000;
     
    142147//        return paramList;
    143148//    }
     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    }
    144171}
Note: See TracChangeset for help on using the changeset viewer.