-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
614 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,15 @@ | ||
|
||
.project | ||
api/.project | ||
omod/.project | ||
|
||
.settings | ||
api/.settings | ||
omod/.settings | ||
|
||
.classpath | ||
api/.classpath | ||
omod/.classpath | ||
|
||
target | ||
api/target | ||
omod/target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>org.openmrs.module</groupId> | ||
<artifactId>movehtmlformcontent</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>movehtmlformcontent-api</artifactId> | ||
<packaging>jar</packaging> | ||
<name>Move HTML Form Content Module API</name> | ||
<description>API project for MoveHTMLFormContent</description> | ||
|
||
<build> | ||
<resources> | ||
<resource> | ||
<directory>src/main/resources</directory> | ||
<filtering>true</filtering> | ||
</resource> | ||
</resources> | ||
|
||
<testResources> | ||
<testResource> | ||
<directory>src/test/resources</directory> | ||
<filtering>true</filtering> | ||
</testResource> | ||
</testResources> | ||
</build> | ||
|
||
</project> |
70 changes: 70 additions & 0 deletions
70
api/src/main/java/org/openmrs/module/movehtmlformcontent/MoveHTMLFormContentActivator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
/** | ||
* The contents of this file are subject to the OpenMRS Public License | ||
* Version 1.0 (the "License"); you may not use this file except in | ||
* compliance with the License. You may obtain a copy of the License at | ||
* http://license.openmrs.org | ||
* | ||
* Software distributed under the License is distributed on an "AS IS" | ||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing rights and limitations | ||
* under the License. | ||
* | ||
* Copyright (C) OpenMRS, LLC. All Rights Reserved. | ||
*/ | ||
package org.openmrs.module.movehtmlformcontent; | ||
|
||
|
||
import org.apache.commons.logging.Log; | ||
import org.apache.commons.logging.LogFactory; | ||
import org.openmrs.module.ModuleActivator; | ||
|
||
/** | ||
* This class contains the logic that is run every time this module is either started or stopped. | ||
*/ | ||
public class MoveHTMLFormContentActivator implements ModuleActivator { | ||
|
||
protected Log log = LogFactory.getLog(getClass()); | ||
|
||
/** | ||
* @see ModuleActivator#willRefreshContext() | ||
*/ | ||
public void willRefreshContext() { | ||
log.info("Refreshing Move HTML Form Content Module"); | ||
} | ||
|
||
/** | ||
* @see ModuleActivator#contextRefreshed() | ||
*/ | ||
public void contextRefreshed() { | ||
log.info("Move HTML Form Content Module refreshed"); | ||
} | ||
|
||
/** | ||
* @see ModuleActivator#willStart() | ||
*/ | ||
public void willStart() { | ||
log.info("Starting Move HTML Form Content Module"); | ||
} | ||
|
||
/** | ||
* @see ModuleActivator#started() | ||
*/ | ||
public void started() { | ||
log.info("Move HTML Form Content Module started"); | ||
} | ||
|
||
/** | ||
* @see ModuleActivator#willStop() | ||
*/ | ||
public void willStop() { | ||
log.info("Stopping Move HTML Form Content Module"); | ||
} | ||
|
||
/** | ||
* @see ModuleActivator#stopped() | ||
*/ | ||
public void stopped() { | ||
log.info("Move HTML Form Content Module stopped"); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
${project.parent.artifactId}.title=Move HTML Form Content Module | ||
${project.parent.artifactId}.manage=Manage module |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?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:p="http://www.springframework.org/schema/p" | ||
xmlns:context="http://www.springframework.org/schema/context" | ||
xmlns:jee="http://www.springframework.org/schema/jee" xmlns:tx="http://www.springframework.org/schema/tx" | ||
xmlns:aop="http://www.springframework.org/schema/aop" 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/jee | ||
http://www.springframework.org/schema/jee/spring-jee-3.0.xsd | ||
http://www.springframework.org/schema/tx | ||
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd | ||
http://www.springframework.org/schema/aop | ||
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd | ||
http://www.springframework.org/schema/util | ||
http://www.springframework.org/schema/util/spring-util-3.0.xsd"> | ||
|
||
<!-- Add here beans related to the API context --> | ||
|
||
|
||
</beans> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,151 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>org.openmrs.module</groupId> | ||
<artifactId>movehtmlformcontent</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>movehtmlformcontent-omod</artifactId> | ||
<packaging>jar</packaging> | ||
<name>Move HTML Form Content Module OMOD</name> | ||
<description>OMOD project for MoveHTMLFormContent</description> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>${project.parent.groupId}</groupId> | ||
<artifactId>${project.parent.artifactId}-api</artifactId> | ||
<version>${project.parent.version}</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<finalName>${project.parent.artifactId}-${project.parent.version}</finalName> | ||
<resources> | ||
<resource> | ||
<directory>src/main/resources</directory> | ||
<filtering>true</filtering> | ||
</resource> | ||
<resource> | ||
<directory>src/main/webapp</directory> | ||
<filtering>false</filtering> | ||
<excludes> | ||
<exclude>resources</exclude> | ||
</excludes> | ||
<targetPath>web/module</targetPath> | ||
</resource> | ||
<resource> | ||
<directory>src/main/webapp</directory> | ||
<filtering>false</filtering> | ||
<includes> | ||
<include>resources</include> | ||
</includes> | ||
<targetPath>web/module</targetPath> | ||
</resource> | ||
</resources> | ||
|
||
<testResources> | ||
<testResource> | ||
<directory>src/test/resources</directory> | ||
<filtering>true</filtering> | ||
</testResource> | ||
</testResources> | ||
|
||
<pluginManagement> | ||
<plugins> | ||
<plugin> | ||
<artifactId>maven-resources-plugin</artifactId> | ||
<configuration> | ||
<includeEmptyDirs>true</includeEmptyDirs> | ||
</configuration> | ||
</plugin> | ||
<!--This plugin's configuration is used to store Eclipse m2e settings | ||
only. It has no influence on the Maven build itself. --> | ||
<plugin> | ||
<groupId>org.eclipse.m2e</groupId> | ||
<artifactId>lifecycle-mapping</artifactId> | ||
<version>1.0.0</version> | ||
<configuration> | ||
<lifecycleMappingMetadata> | ||
<pluginExecutions> | ||
<pluginExecution> | ||
<pluginExecutionFilter> | ||
<groupId>org.openmrs.maven.plugins</groupId> | ||
<artifactId>maven-openmrs-plugin</artifactId> | ||
<versionRange>[1.0.1,)</versionRange> | ||
<goals> | ||
<goal>initialize-module</goal> | ||
</goals> | ||
</pluginExecutionFilter> | ||
<action> | ||
<ignore></ignore> | ||
</action> | ||
</pluginExecution> | ||
<pluginExecution> | ||
<pluginExecutionFilter> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-dependency-plugin</artifactId> | ||
<versionRange>[2.4,)</versionRange> | ||
<goals> | ||
<goal>unpack-dependencies</goal> | ||
</goals> | ||
</pluginExecutionFilter> | ||
<action> | ||
<ignore></ignore> | ||
</action> | ||
</pluginExecution> | ||
</pluginExecutions> | ||
</lifecycleMappingMetadata> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</pluginManagement> | ||
|
||
<plugins> | ||
<plugin> | ||
<groupId>org.openmrs.maven.plugins</groupId> | ||
<artifactId>maven-openmrs-plugin</artifactId> | ||
<extensions>true</extensions> | ||
<executions> | ||
<execution> | ||
<id>init</id> | ||
<phase>initialize</phase> | ||
<goals> | ||
<goal>initialize-module</goal> | ||
</goals> | ||
</execution> | ||
<execution> | ||
<id>pack</id> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>package-module</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-dependency-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>Expand moduleApplicationContext and messages</id> | ||
<goals> | ||
<goal>unpack-dependencies</goal> | ||
</goals> | ||
<phase>generate-resources</phase> | ||
<configuration> | ||
<includeGroupIds>${project.parent.groupId}</includeGroupIds> | ||
<includeArtifactIds>${project.parent.artifactId}-api</includeArtifactIds> | ||
<excludeTransitive>true</excludeTransitive> | ||
<includes>**/*</includes> | ||
<outputDirectory>${project.build.directory}/classes</outputDirectory> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
51 changes: 51 additions & 0 deletions
51
omod/src/main/java/org/openmrs/module/movehtmlformcontent/extension/html/AdminList.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/** | ||
* The contents of this file are subject to the OpenMRS Public License | ||
* Version 1.0 (the "License"); you may not use this file except in | ||
* compliance with the License. You may obtain a copy of the License at | ||
* http://license.openmrs.org | ||
* | ||
* Software distributed under the License is distributed on an "AS IS" | ||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing rights and limitations | ||
* under the License. | ||
* | ||
* Copyright (C) OpenMRS, LLC. All Rights Reserved. | ||
*/ | ||
package org.openmrs.module.movehtmlformcontent.extension.html; | ||
|
||
import java.util.LinkedHashMap; | ||
import java.util.Map; | ||
|
||
import org.openmrs.module.Extension; | ||
import org.openmrs.module.web.extension.AdministrationSectionExt; | ||
|
||
/** | ||
* This class defines the links that will appear on the administration page under the | ||
* "movehtmlformcontent.title" heading. | ||
*/ | ||
public class AdminList extends AdministrationSectionExt { | ||
|
||
/** | ||
* @see AdministrationSectionExt#getMediaType() | ||
*/ | ||
public Extension.MEDIA_TYPE getMediaType() { | ||
return Extension.MEDIA_TYPE.html; | ||
} | ||
|
||
/** | ||
* @see AdministrationSectionExt#getTitle() | ||
*/ | ||
public String getTitle() { | ||
return "movehtmlformcontent.title"; | ||
} | ||
|
||
/** | ||
* @see AdministrationSectionExt#getLinks() | ||
*/ | ||
public Map<String, String> getLinks() { | ||
LinkedHashMap<String, String> map = new LinkedHashMap<String, String>(); | ||
map.put("/module/movehtmlformcontent/move.form", "Move HTML Forms"); | ||
return map; | ||
} | ||
|
||
} |
Oops, something went wrong.