Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…mrsmobileforms into MOB-21
  • Loading branch information
jlkeiper committed Jan 10, 2013
2 parents a8bafd5 + 5382ce8 commit ff773ec
Show file tree
Hide file tree
Showing 16 changed files with 119 additions and 49 deletions.
17 changes: 16 additions & 1 deletion api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,23 @@
<description>API project for AMRS Mobile Forms</description>

<dependencies>


<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
</dependency>

<dependency>
<groupId>net.sf.kxml</groupId>
<artifactId>kxml2</artifactId>
</dependency>

<dependency>
<groupId>com.jcraft</groupId>
<artifactId>jzlib</artifactId>
</dependency>

<dependency>
<groupId>org.openmrs.module</groupId>
<artifactId>household-api</artifactId>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >

<hibernate-mapping package="@MODULE_PACKAGE@">
<hibernate-mapping package="org.openmrs.module.amrsmobileforms">

<class name="Economic" table="mobileformentry_economic">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >

<hibernate-mapping package="@MODULE_PACKAGE@">
<hibernate-mapping package="org.openmrs.module.amrsmobileforms">

<class name="EconomicConceptMap" table="mobileformentry_economic_concept_map">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >

<hibernate-mapping package="@MODULE_PACKAGE@">
<hibernate-mapping package="org.openmrs.module.amrsmobileforms">

<class name="EconomicObject" table="mobileformentry_economic_object">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >

<hibernate-mapping package="@MODULE_PACKAGE@">
<hibernate-mapping package="org.openmrs.module.amrsmobileforms">

<class name="HouseholdMember" table="mobileformentry_household_member">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >

<hibernate-mapping package="@MODULE_PACKAGE@">
<hibernate-mapping package="org.openmrs.module.amrsmobileforms">

<class name="MobileFormEntryError" table="mobileformentry_error">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >

<hibernate-mapping package="@MODULE_PACKAGE@">
<hibernate-mapping package="org.openmrs.module.amrsmobileforms">

<class name="MobileFormHousehold" table="mobileformentry_household">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >

<hibernate-mapping package="@MODULE_PACKAGE@">
<hibernate-mapping package="org.openmrs.module.amrsmobileforms">

<class name="Survey" table="mobileformentry_household_survey">

Expand Down
57 changes: 57 additions & 0 deletions api/src/test/resources/TestingApplicationContext.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?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"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-3.0.xsd">

<bean parent="serviceContext">
<property name="moduleService">
<list>
<value>org.openmrs.module.amrsmobileforms.MobileFormEntryService</value> <!-- service interface name -->
<bean class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
<property name="transactionManager">
<ref bean="transactionManager" />
</property>
<property name="target">
<bean class="org.openmrs.module.amrsmobileforms.impl.MobileFormEntryServiceImpl">
<property name="mobileFormEntryDAO">
<bean class="org.openmrs.module.amrsmobileforms.db.hibernate.HibernateMobileFormEntryDAO">
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>
</property>
</bean>
</property>
<property name="preInterceptors">
<ref bean="serviceInterceptors" />
</property>
<property name="transactionAttributeSource">
<bean class="org.springframework.transaction.annotation.AnnotationTransactionAttributeSource" />
</property>
</bean>
</list>
</property>
</bean>

<context:component-scan base-package="org.openmrs.module.amrsmobileforms" />

<bean id="sessionFactory" class="org.openmrs.api.db.hibernate.HibernateSessionFactoryBean">
<property name="configLocations">
<list>
<value>classpath:hibernate.cfg.xml</value>
<value>classpath:test-hibernate.cfg.xml</value>
</list>
</property>
<property name="mappingJarLocations">
<ref bean="mappingJarResources"/>
</property>
</bean>

</beans>
16 changes: 16 additions & 0 deletions api/src/test/resources/test-hibernate.cfg.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

<hibernate-configuration>
<session-factory>
<mapping resource="Economic.hbm.xml" />
<mapping resource="EconomicConceptMap.hbm.xml" />
<mapping resource="EconomicObject.hbm.xml" />
<mapping resource="HouseholdMember.hbm.xml" />
<mapping resource="MobileFormEntryError.hbm.xml" />
<mapping resource="MobileFormHousehold.hbm.xml" />
<mapping resource="Survey.hbm.xml" />
</session-factory>
</hibernate-configuration>
2 changes: 1 addition & 1 deletion omod/src/main/resources/moduleApplicationContext.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@
</property>
</bean>

<context:component-scan base-package="@MODULE_PACKAGE@" />
<context:component-scan base-package="org.openmrs.module.amrsmobileforms" />

</beans>
29 changes: 0 additions & 29 deletions omod/src/test/resources/TestingApplicationContext.xml

This file was deleted.

10 changes: 0 additions & 10 deletions omod/src/test/resources/test-hibernate.cfg.xml

This file was deleted.

23 changes: 22 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,28 @@
<dependencyManagement>
<dependencies>

<dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>1.9.0</version>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>net.sf.kxml</groupId>
<artifactId>kxml2</artifactId>
<version>2.3.0</version>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>com.jcraft</groupId>
<artifactId>jzlib</artifactId>
<version>1.1.1</version>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>org.openmrs.module</groupId>
<artifactId>xforms</artifactId>
<version>3.9.5</version>
Expand Down

0 comments on commit ff773ec

Please sign in to comment.