Skip to content

Commit

Permalink
Merge branch 'release-3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Fernando Gonzalez committed Feb 11, 2014
2 parents 2e4711f + 8ca23be commit e47b4c1
Show file tree
Hide file tree
Showing 237 changed files with 54,677 additions and 108,168 deletions.
102 changes: 64 additions & 38 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,41 @@
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>nfms</artifactId>
<groupId>org.fao.unredd</groupId>
<version>2.0-SNAPSHOT</version>
</parent>
<groupId>org.fao.unredd</groupId>
<artifactId>portal</artifactId>
<version>3.0</version>
<packaging>war</packaging>
<name>UNREDD Portal</name>
<url>http://maven.apache.org</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<geotools.version>9.2</geotools.version>
</properties>
<scm>
<connection>scm:git:git://github.com/nfms4redd/nfms.git</connection>
<developerConnection>scm:git:https://github.com/nfms4redd/nfms.git</developerConnection>
<url>https://github.com/nfms4redd/nfms.git</url>
<tag>HEAD</tag>
</scm>
<distributionManagement>
<repository>
<id>nfms4redd</id>
<url>ftp://maven.nfms4redd.org/repo</url>
<uniqueVersion>false</uniqueVersion>
</repository>
</distributionManagement>
<repositories>
<repository>
<id>osgeo</id>
<name>Open Source Geospatial Foundation Repository</name>
<url>http://download.osgeo.org/webdav/geotools/</url>
</repository>
<repository>
<id>nfms4redd</id>
<name>nfms4redd maven repository</name>
<url>http://maven.nfms4redd.org/</url>
</repository>
<repository>
<id>EclipseLink</id>
<url>http://download.eclipse.org/rt/eclipselink/maven.repo</url>
Expand All @@ -28,13 +52,20 @@
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
<version>4.8.2</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.9.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.9.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.sf.json-lib</groupId>
<artifactId>json-lib</artifactId>
Expand All @@ -46,24 +77,15 @@
<artifactId>commons-io</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>3.1.1.RELEASE</version>
</dependency>
<dependency>
<groupId>net.tanesha.recaptcha4j</groupId>
<artifactId>recaptcha4j</artifactId>
<version>0.0.7</version>
</dependency>
<dependency>
<groupId>org.fao.unredd</groupId>
<artifactId>commons</artifactId>
<version>2.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity</artifactId>
<version>1.7</version>
</dependency>
<!-- Geosolutions proxy + transitive dependencies. See issue #7 -->
<dependency>
Expand All @@ -84,31 +106,10 @@
<!-- J2EE -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>2.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>taglibs</groupId>
<artifactId>standard</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>net.sf.packtag</groupId>
<artifactId>packtag-core</artifactId>
<version>3.8</version>
</dependency>
<!-- Logging: log4j and slf4j -->
<dependency>
<groupId>org.slf4j</groupId>
Expand Down Expand Up @@ -136,6 +137,24 @@
<build>
<finalName>unredd-portal</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>com.mycila.maven-license-plugin</groupId>
<artifactId>maven-license-plugin</artifactId>
<configuration>
<header>license-header.txt</header>
<includes>
<include>**/*.java</include>
</includes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
Expand All @@ -161,5 +180,12 @@
</configuration>
</plugin>
</plugins>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ftp</artifactId>
<version>2.3</version>
</extension>
</extensions>
</build>
</project>
5 changes: 4 additions & 1 deletion src/main/assembly/portal.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
languages = {"en": "English", "fr": "Fran\u00e7ais", "es": "Espa\u00f1ol"}
recaptcha.publickey = 6Ld5ydQSAAAAAGtZJG67QkQM7Z13X6MGf72RtmDE
recaptcha.privatekey = 6Ld5ydQSAAAAAJW3To_tN6czS7C-HCnsBVhENfD9
layers.rootFolder=/var/portal/indicators
layers.rootFolder=/tmp
info.queryUrl=http://demo1.geo-solutions.it/diss_geoserver/wms
info.layerUrl=http://demo1.geo-solutions.it/diss_geoserver/gwc/service/wms
client.modules=layers,communication,iso8601,error-management,map,banner,toolbar,time-slider,layer-list,info-control,info-dialog,center,zoom-bar,layer-list-selector,active-layer-list,legend-button,legend-panel
37 changes: 37 additions & 0 deletions src/main/java/org/fao/unredd/AppContextListener.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package org.fao.unredd;

import java.io.File;
import java.util.Properties;

import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

import org.fao.unredd.layers.LayerFactory;
import org.fao.unredd.layers.folder.FolderLayerFactory;
import org.fao.unredd.portal.Config;

public class AppContextListener implements ServletContextListener {

@Override
public void contextInitialized(ServletContextEvent sce) {
ServletContext servletContext = sce.getServletContext();
String rootPath = servletContext.getRealPath("/");
String configInitParameter = servletContext
.getInitParameter("PORTAL_CONFIG_DIR");
Config config = new Config(rootPath, configInitParameter);
servletContext.setAttribute("config", config);

Properties configurationProperties = config.getProperties();
String indicatorsFolder = configurationProperties
.getProperty("layers.rootFolder");
LayerFactory layerFactory = new FolderLayerFactory(new File(
indicatorsFolder));
servletContext.setAttribute("layer-factory", layerFactory);
}

@Override
public void contextDestroyed(ServletContextEvent sce) {
}

}
104 changes: 104 additions & 0 deletions src/main/java/org/fao/unredd/charts/generated/DataType.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.2-hudson-jaxb-ri-2.2-63-
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2013.10.11 at 09:17:10 AM CEST
//


package org.fao.unredd.charts.generated;

import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;


/**
* <p>Java class for DataType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="DataType">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="value" type="{http://www.w3.org/2001/XMLSchema}double" maxOccurs="unbounded"/>
* &lt;/sequence>
* &lt;attribute name="zone-id" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "DataType", propOrder = {
"value"
})
public class DataType {

@XmlElement(type = Double.class)
protected List<Double> value;
@XmlAttribute(name = "zone-id", required = true)
protected String zoneId;

/**
* Gets the value of the value property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the value property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getValue().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Double }
*
*
*/
public List<Double> getValue() {
if (value == null) {
value = new ArrayList<Double>();
}
return this.value;
}

/**
* Gets the value of the zoneId property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getZoneId() {
return zoneId;
}

/**
* Sets the value of the zoneId property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setZoneId(String value) {
this.zoneId = value;
}

}
76 changes: 76 additions & 0 deletions src/main/java/org/fao/unredd/charts/generated/LabelType.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.2-hudson-jaxb-ri-2.2-63-
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2013.10.11 at 09:17:10 AM CEST
//


package org.fao.unredd.charts.generated;

import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;


/**
* <p>Java class for LabelType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="LabelType">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="label" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "LabelType", propOrder = {
"label"
})
public class LabelType {

@XmlElement(required = true)
protected List<String> label;

/**
* Gets the value of the label property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the label property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getLabel().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link String }
*
*
*/
public List<String> getLabel() {
if (label == null) {
label = new ArrayList<String>();
}
return this.label;
}

}
Loading

0 comments on commit e47b4c1

Please sign in to comment.