Skip to content

Instantly share code, notes, and snippets.

@gauravpaliwal
Created July 7, 2012 18:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gauravpaliwal/3067580 to your computer and use it in GitHub Desktop.
Save gauravpaliwal/3067580 to your computer and use it in GitHub Desktop.
Diff file of helloworld module to make it run on netbeans without any workaround.
Index: omod/src/main/resources/HelloWorld.hbm.xml
===================================================================
--- omod/src/main/resources/HelloWorld.hbm.xml (revision 28269)
+++ omod/src/main/resources/HelloWorld.hbm.xml (working copy)
@@ -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.helloworld">
<class name="HelloWorldResponse" table="hello_world_response">
Index: omod/src/main/resources/messages.properties
===================================================================
--- omod/src/main/resources/messages.properties (revision 28269)
+++ omod/src/main/resources/messages.properties (working copy)
@@ -1,7 +1,7 @@
-@MODULE_ID@.title=Hello World Module
-@MODULE_ID@.manage=Manage Hello World
-@MODULE_ID@.helloWorld=Hello World!
-@MODULE_ID@.view=View Hello World
-@MODULE_ID@.addResponse=Add Response
-@MODULE_ID@.response=Response
-@MODULE_ID@.responses=Responses
\ No newline at end of file
+helloworld.title=Hello World Module
+helloworld.manage=Manage Hello World
+helloworld.helloWorld=Hello World!
+helloworld.view=View Hello World
+helloworld.addResponse=Add Response
+helloworld.response=Response
+helloworld.responses=Responses
\ No newline at end of file
Index: omod/src/main/resources/config.xml
===================================================================
--- omod/src/main/resources/config.xml (revision 28269)
+++ omod/src/main/resources/config.xml (working copy)
@@ -4,16 +4,16 @@
<module configVersion="1.0">
<!-- Basic Module Properties -->
- <id>@MODULE_ID@</id>
- <name>@MODULE_NAME@</name>
- <version>@MODULE_VERSION@</version>
- <package>@MODULE_PACKAGE@</package>
+ <id>helloworld</id>
+ <name>helloworld</name>
+ <version>1.0</version>
+ <package>org.openmrs.module.helloworld</package>
<author>Ben Wolfe</author>
<description>
Basic OpenMRS Sample Module
</description>
- <activator>@MODULE_PACKAGE@.HelloWorldActivator</activator>
+ <activator>org.openmrs.module.helloworld.HelloWorldActivator</activator>
<require_version>1.0.0</require_version>
<require_database_version>1.0.0</require_database_version>
@@ -29,7 +29,7 @@
<!-- Extensions -->
<extension>
<point>org.openmrs.admin.list</point>
- <class>@MODULE_PACKAGE@.extension.html.AdminList</class>
+ <class>org.openmrs.module.helloworld.extension.html.AdminList</class>
</extension>
<!-- /Extensions -->
@@ -38,17 +38,17 @@
<!-- AOP Advice descriptors -->
<advice>
<point>org.openmrs.api.UserService</point>
- <class>@MODULE_PACKAGE@.advice.CountingBeforeAdvice</class>
+ <class>org.openmrs.module.helloworld.advice.CountingBeforeAdvice</class>
</advice>
<advice>
<point>org.openmrs.api.PatientService</point>
- <class>@MODULE_PACKAGE@.advice.CountingAfterAdvice</class>
+ <class>org.openmrs.module.helloworld.advice.CountingAfterAdvice</class>
</advice>
<advice>
<point>org.openmrs.api.ConceptService</point>
- <class>@MODULE_PACKAGE@.advice.PrintingAroundAdvisor</class>
+ <class>org.openmrs.module.helloworld.advice.PrintingAroundAdvisor</class>
</advice>
<!-- /AOP Advice -->
@@ -68,7 +68,7 @@
<!-- Required Global Properties -->
<globalProperty>
- <property>@MODULE_ID@.repeatNumber</property>
+ <property>helloworld.repeatNumber</property>
<defaultValue>3</defaultValue>
<description>Number of repetitions of the phrase "Hello World"</description>
</globalProperty>
@@ -79,7 +79,7 @@
<!-- Accessed through the url /pageContext()/moduleServlet/<moduleId>/<servlet-name> -->
<servlet>
<servlet-name>sayHelloThroughServlet</servlet-name>
- <servlet-class>@MODULE_PACKAGE@.web.HelloWorldServlet</servlet-class>
+ <servlet-class>org.openmrs.module.helloworld.web.HelloWorldServlet</servlet-class>
</servlet>
<!-- Internationalization -->
Index: omod/src/main/resources/messages_es.properties
===================================================================
--- omod/src/main/resources/messages_es.properties (revision 28269)
+++ omod/src/main/resources/messages_es.properties (working copy)
@@ -1,3 +1,3 @@
-@MODULE_ID@.title=Hola Mundo Módulo
-@MODULE_ID@.manage=Maneje Hola Mundo
-@MODULE_ID@.helloWorld=Hola Mundo!
\ No newline at end of file
+helloworld.title=Hola Mundo M\u00f3dulo
+helloworld.manage=Maneje Hola Mundo
+helloworld.helloWorld=Hola Mundo!
\ No newline at end of file
Index: omod/src/main/resources/messages_fr.properties
===================================================================
--- omod/src/main/resources/messages_fr.properties (revision 28269)
+++ omod/src/main/resources/messages_fr.properties (working copy)
@@ -1,3 +1,3 @@
-@MODULE_ID@.title=Bonjour Monde Module
-@MODULE_ID@.manage=Contrôlez Bonjour Monde
-@MODULE_ID@.helloWorld=Bonjour Monde!
\ No newline at end of file
+helloworld.title=Bonjour Monde Module
+helloworld.manage=Contr\u00f4lez Bonjour Monde
+helloworld.helloWorld=Bonjour Monde!
\ No newline at end of file
Index: omod/src/main/resources/moduleApplicationContext.xml
===================================================================
--- omod/src/main/resources/moduleApplicationContext.xml (revision 28269)
+++ omod/src/main/resources/moduleApplicationContext.xml (working copy)
@@ -8,37 +8,35 @@
<bean id="helloworldUrlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="mappings">
<props>
- <prop key="/module/@MODULE_ID@/addResponse.form">addResponseForm</prop>
+ <prop key="/module/helloworld/addResponse.form">addResponseForm</prop>
</props>
</property>
</bean>
- <bean id="addResponseForm" class="@MODULE_PACKAGE@.web.AddResponseFormController">
+ <bean id="addResponseForm" class="org.openmrs.module.helloworld.web.AddResponseFormController">
<property name="commandName"><value>helloWorldObject</value></property>
- <property name="formView"><value>/module/@MODULE_ID@/addResponseForm</value></property>
- <property name="successView"><value>addResponse.form</value></property>
+ <property name="formView"><value>/module/helloworld/addResponseForm</value></property>
+ <property name="successView"><value>redirect:addResponse.form</value></property>
</bean>
<bean parent="serviceContext">
<property name="moduleService">
<list>
- <value>@MODULE_PACKAGE@.HelloWorldService</value> <!-- service interface name -->
+ <value>org.openmrs.module.helloworld.HelloWorldService</value> <!-- service interface name -->
<bean class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
<property name="transactionManager"><ref bean="transactionManager"/></property>
<property name="target">
- <bean class="@MODULE_PACKAGE@.impl.HelloWorldServiceImpl">
+ <bean class="org.openmrs.module.helloworld.impl.HelloWorldServiceImpl">
<property name="helloWorldDAO">
- <bean class="@MODULE_PACKAGE@.db.hibernate.HibernateHelloWorldDAO">
+ <bean class="org.openmrs.module.helloworld.db.hibernate.HibernateHelloWorldDAO">
<property name="sessionFactory"><ref bean="sessionFactory"/></property>
</bean>
</property>
</bean>
</property>
<property name="preInterceptors">
- <list>
- <ref bean="authorizationInterceptor"/>
- </list>
- </property>
+ <ref bean="serviceInterceptors"/>
+ </property>
<property name="transactionAttributeSource">
<bean class="org.springframework.transaction.annotation.AnnotationTransactionAttributeSource"/>
</property>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment