Skip to content
This repository has been archived by the owner on May 22, 2020. It is now read-only.

Commit

Permalink
- ADD: Initial import of code to GitHub.
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastian-raubach committed Sep 19, 2017
1 parent d6bb79e commit cef0e2c
Show file tree
Hide file tree
Showing 281 changed files with 28,407 additions and 7 deletions.
27 changes: 20 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
*.class
/.idea/

# Package Files #
*.jar
*.war
/*.jar
/*.war

# gwt caches and compiled units #
war/gwt_bree/
gwt-unitCache/

# boilerplate generated classes #
Expand All @@ -14,15 +13,29 @@ gwt-unitCache/
# more caches and things from deploy #
war/WEB-INF/deploy/
war/WEB-INF/classes/
war/gatekeeper/

#compilation logs
.gwt/

#caching for already compiled files
gwt-unitCache/

#gwt junit compilation files
www-test/

#old GWT (1.5) created this dir
.gwt-tmp/

# Local configuration files
build-dev.properties
/germinate-gatekeeper.iml

# Files that are created during the compilation process
/war/WEB-INF/lib-temp/

# LaTeX files to exclude
changelog/*/*.aux
changelog/*/*.log
changelog/*/*.bbl
changelog/*/*.blg
changelog/*/*.out
changelog/*/*.toc
changelog/*/*.synctex.gz
12 changes: 12 additions & 0 deletions LICENCE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Germinate Gatekeeper is open source software and is licensed under the BSD 2-Clause License:

Copyright (c) 2013-2016, Information & Computational Sciences, The James Hutton Institute.
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
7 changes: 7 additions & 0 deletions build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Ant properties for building the GWT app
project.name=germinate-gatekeeper
project.root=jhi.gatekeeper.gatekeeper

tomcat.manager.url=http://localhost:8080/manager/text
tomcat.manager.username=username
tomcat.manager.password=password
108 changes: 108 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
<!--~
~ Copyright 2017 Sebastian Raubach, Toby Philp and Paul Shaw from the
~ Information and Computational Sciences Group at The James Hutton Institute, Dundee
~
~ Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->

<project name="Germinate Gatekeeper" basedir="." default="deploy">

<property name="src.dir" value="src"/>
<property name="res.dir" value="res"/>
<property name="build.dir" value="war"/>
<property file="build-dev.properties"/>
<property name="target" value="1.8"/>
<property name="source" value="1.8"/>

<path id="compile.classpath">
<fileset dir="${build.dir}/WEB-INF/lib">
<include name="**/*.jar"/>
<include name="**/*.xml"/>
</fileset>
<fileset dir="${build.dir}/WEB-INF/lib-dev">
<include name="**/*.jar"/>
<include name="**/*.xml"/>
</fileset>
</path>

<!-- Compile the Java code -->
<target name="build-project">
<!-- Delete old compiled code -->
<delete dir="${build.dir}/WEB-INF/classes" failonerror="false" quiet="true" verbose="true"/>

<mkdir dir="${build.dir}/WEB-INF/classes"/>

<javac debug="true" destdir="${build.dir}/WEB-INF/classes" includeantruntime="false" source="${source}" target="${target}">
<src path="src"/>
<classpath refid="compile.classpath"/>
</javac>
</target>

<target name="gwtc" depends="build-project" description="GWT compile to JavaScript">
<java classname="com.google.gwt.dev.Compiler" failonerror="true" fork="true">
<classpath>
<pathelement location="${src.dir}"/>
<path refid="compile.classpath"/>
</classpath>
<arg line="-localWorkers 2" />
<arg line="-logLevel INFO"/>
<jvmarg value="-Xmx1024M"/>
<arg value="${project.root}"/>
</java>
</target>

<target name="buildwar" depends="gwtc" description="Creates a WAR file from the compiled source">
<war basedir="war" destfile="${project.name}.war" webxml="war/WEB-INF/web.xml">
<exclude name="WEB-INF/**"/>
<!-- Include the js and css folders -->
<fileset dir="war" includes="css/**"/>
<fileset dir="war" includes="js/**"/>
<!-- Copy the properties file to a location accessible from the source -->
<zipfileset dir="." includes="config.properties" prefix="WEB-INF/classes"/>
<zipfileset dir="." includes="logging.properties" prefix="WEB-INF/classes"/>
<zipfileset dir="${res.dir}" includes="Gatekeeper**.properties" prefix="WEB-INF/classes"/>
<!-- Include necessary libraries -->
<webinf dir="war/WEB-INF/">
<include name="**/gwt-servlet.jar"/>
<include name="**/mailapi.jar"/>
<include name="**/smtp.jar"/>
<include name="**/jhi-database-commons-gwt.jar"/>
<include name="**/mysql-connector-java-**.jar"/>
<include name="**/flyway-core-**.jar"/>
<include name="**/classes/**"/>
</webinf>
</war>
</target>

<target name="testbuild" depends="buildwar" description="Runs a test build of Germinate without deploying it">
</target>

<target name="deploy" depends="buildwar">
<!-- Deploy to Tomcat -->
<taskdef name="undeploy" classname="org.apache.catalina.ant.UndeployTask" classpathref="compile.classpath"/>
<taskdef name="deploy" classname="org.apache.catalina.ant.DeployTask" classpathref="compile.classpath"/>

<undeploy failOnError="false" password="${tomcat.manager.password}" path="/${project.name}" url="${tomcat.manager.url}"
username="${tomcat.manager.username}"/>
<deploy password="${tomcat.manager.password}" path="/${project.name}" url="${tomcat.manager.url}" username="${tomcat.manager.username}"
war="${basedir}/${project.name}.war"/>
</target>

<target name="open" depends="deploy" description="Opens the deployed application in a browser window">
<!-- Open the deployed application in the browser -->
<script language="javascript"><![CDATA[
location = project.getProperty("tomcat.manager.url").toString().replace("manager/text", project.getProperty("project.name").toString());
java.awt.Desktop.getDesktop().browse(java.net.URI.create(location));
]]></script>
</target>
</project>
35 changes: 35 additions & 0 deletions changelog/3.2.0a.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/**************************************************/
/* GERMINATE GATEKEEPER */
/* CHANGELOG v3.2.0a */
/**************************************************/


/* CHANGELOG */

- ADD: Added option to delete user requests without notifying the user.
- ADD: Enabled storing of login credentials by the browser.
- CHG: Updated sql template with missing table.

/* MIGRATION */

- Migrating from 3.2.0 to 3.2.0a:

- Run this against the database:

-- ----------------------------
-- Table structure for access_requests
-- ----------------------------
DROP TABLE IF EXISTS `access_requests`;
CREATE TABLE `access_requests` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`database_system_id` int(11) NOT NULL,
`has_been_rejected` tinyint(1) NOT NULL DEFAULT '0',
`activation_key` varchar(36) DEFAULT NULL,
`created_on` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `access_requests_ibfk1` (`user_id`) USING BTREE,
KEY `access_requests_ibfk2` (`database_system_id`) USING BTREE,
CONSTRAINT `access_requests_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `access_requests_ibfk_2` FOREIGN KEY (`database_system_id`) REFERENCES `database_systems` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
17 changes: 17 additions & 0 deletions changelog/3.3.0.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/**************************************************/
/* GERMINATE GATEKEEPER */
/* CHANGELOG v3.3.0 */
/**************************************************/


/* CHANGELOG */

- CHG: Complete re-write of the web interface.
- ADD: Added user search feature to user list.
- FIX: Fixed minor bugs.
- ADD: Added internationalization (both client and server).
- CHG: Added more security by expiring all active sessions when the user changes the password.

/* MIGRATION */

- No changes required
14 changes: 14 additions & 0 deletions changelog/3.3.1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/**************************************************/
/* GERMINATE GATEKEEPER */
/* CHANGELOG v3.3.1 */
/**************************************************/


/* CHANGELOG */

- FIX: Fixed automatic user registration email missing the activation link.
- ADD: Added form to add a new database system to the database systems page.

/* MIGRATION */

- No changes required
16 changes: 16 additions & 0 deletions changelog/3.3.2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/**************************************************/
/* GERMINATE GATEKEEPER */
/* CHANGELOG v3.3.2 */
/**************************************************/


/* CHANGELOG */

- FIX: Fixed unescaped apostrophe in the i18n properties file.
- CHG: Added option to give a reason for rejecting a user registration request.

/* MIGRATION */

- Migrating from 3.3.1 to 3.3.2:

- No changes required.
23 changes: 23 additions & 0 deletions changelog/3.4.0.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**************************************************/
/* GERMINATE GATEKEEPER */
/* CHANGELOG v3.4.0 */
/**************************************************/


/* CHANGELOG */

- CHG: Updated GWT to 2.8.0.
- CHG: Made use of Java 8 Lambdas and Streams.
- ADD: Added Mexican Spanish translation.
- CHG: Changed the way pagination works so that only one database query is required at any time.
- CHG: Moved Logger configuration from code to logging.properties.
- CHG: Fixed annoying compilation warnings about "unsafe" operation.
- CHG: De-cluttered code and deleted classes that were no longer in use.
- FIX: Fixed bug where granting a user to an as yet non-existant database would fail.
- ADD: Added a page that shows all the users that are registered for access to a single database. Simply click on any of the systems on the Database System List page.

/* MIGRATION */

- Migrating from 3.3.2 to 3.4.0:

- No changes required.
31 changes: 31 additions & 0 deletions changelog/latex/3.2.0a.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
\section{Version 3.2.0a}
\label{sec:3.2.0a}

\subsection{New/Changed features}
\begin{description}
\item[ADD] Added option to delete user requests without notifying the user.
\item[ADD] Enabled storing of login credentials by the browser.
\item[CHG] Updated sql template with missing table.
\end{description}

\subsection{Migration from 3.2.0 to 3.2.0a}
\begin{itemize}

\item Run this against the database:
\begin{lstlisting}[style=SQL]
DROP TABLE IF EXISTS `access_requests`;
CREATE TABLE `access_requests` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`database_system_id` int(11) NOT NULL,
`has_been_rejected` tinyint(1) NOT NULL DEFAULT '0',
`activation_key` varchar(36) DEFAULT NULL,
`created_on` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `access_requests_ibfk1` (`user_id`) USING BTREE,
KEY `access_requests_ibfk2` (`database_system_id`) USING BTREE,
CONSTRAINT `access_requests_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `access_requests_ibfk_2` FOREIGN KEY (`database_system_id`) REFERENCES `database_systems` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
\end{lstlisting}
\end{itemize}
15 changes: 15 additions & 0 deletions changelog/latex/3.3.0.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
\section{Version 3.3.0}
\label{sec:3.3.0}

\subsection{New/Changed features}
\begin{description}
\item[CHG] Complete re-write of the web interface.
\item[ADD] Added user search feature to user list.
\item[ADD] Added internationalization.
\item[FIX] Fixed minor bugs.
\end{description}

\subsection{Migration from 3.2.0a to 3.3.0}
\begin{itemize}
\item No changes required
\end{itemize}
13 changes: 13 additions & 0 deletions changelog/latex/3.3.1.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
\section{Version 3.3.1}
\label{sec:3.3.1}

\subsection{New/Changed features}
\begin{description}
\item[FIX] Fixed automatic user registration email missing the activation link.
\item[ADD] Added form to add a new database system to the database systems page.
\end{description}

\subsection{Migration from 3.3.0 to 3.3.1}
\begin{itemize}
\item No changes required
\end{itemize}
13 changes: 13 additions & 0 deletions changelog/latex/3.3.2.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
\section{Version 3.3.2}
\label{sec:3.3.2}

\subsection{New/Changed features}
\begin{description}
\item[FIX] Fixed unescaped apostrophe in the i18n properties file.
\item[CHG] Added option to give a reason for rejecting a user registration request.
\end{description}

\subsection{Migration from 3.3.1 to 3.3.2}
\begin{itemize}
\item No changes required.
\end{itemize}
Binary file added changelog/latex/changelog.pdf
Binary file not shown.
Loading

0 comments on commit cef0e2c

Please sign in to comment.