Commit 5b88da74 authored by Matija Obreza's avatar Matija Obreza

Rebranded to org.genesys2.server

parent c9db3e18
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.crophub.rest</name>
<name>org.genesys2.server</name>
<comment></comment>
<projects>
</projects>
......
apply plugin: "java"
//dependencies versions
def version = [
"commons" : [
"beanutils" : "1.8.3",
"collections" : "3.2.1",
"fileupload" : "1.2.2",
"io" : "2.4",
"lang" : "2.6",
"logging" : "1.1.1"
],
"slf4j" : "1.7.5",
"log4j" : "1.2.17",
"spring" : [
"core" : "3.2.2.RELEASE",
"security" : "3.1.4.RELEASE",
"data" : [
"core" : "1.5.1.RELEASE",
"jpa" : "1.3.2.RELEASE"
]
],
"hibernate" : [
"core" : "4.2.1.Final",
"annotations" : "4.0.1.Final"
],
"aspectj" : "1.7.2",
"c3p0" : "0.9.2.1",
"hsqldb" : "2.2.9",
"mysql" : "5.1.25",
"jackson" : "2.2.1",
"oval" : "1.81",
"ehcache" : "2.7.0",
"jetty" : "9.0.3.v20130506"
]
repositories {
mavenCentral()
}
dependencies {
//commons dependencies
compile "commons-beanutils:commons-beanutils:${version.commons.beanutils}"
compile "commons-collections:commons-collections:${version.commons.collections}"
compile "commons-fileupload:commons-fileupload:${version.commons.fileupload}"
compile "commons-io:commons-io:${version.commons.io}"
compile "commons-lang:commons-lang:${version.commons.lang}"
compile "commons-logging:commons-logging:${version.commons.logging}"
//logging dependencies
compile "org.slf4j:slf4j-api:${version.slf4j}"
compile "org.slf4j:slf4j-log4j12:${version.slf4j}"
compile "log4j:log4j:${version.log4j}"
//Spring dependencies
compile "org.springframework:spring-context-support:${version.spring.core}"
compile "org.springframework:spring-jdbc:${version.spring.core}"
compile "org.springframework:spring-jms:${version.spring.core}"
compile "org.springframework:spring-orm:${version.spring.core}"
compile "org.springframework:spring-oxm:${version.spring.core}"
compile "org.springframework:spring-test:${version.spring.core}"
compile "org.springframework:spring-tx:${version.spring.core}"
compile "org.springframework:spring-web:${version.spring.core}"
compile "org.springframework:spring-webmvc:${version.spring.core}"
compile "org.springframework.security:spring-security-config:${version.spring.security}"
compile "org.springframework.security:spring-security-crypto:${version.spring.security}"
compile "org.springframework.security:spring-security-taglibs:${version.spring.security}"
compile "org.springframework.data:spring-data-commons:${version.spring.data.core}"
compile "org.springframework.data:spring-data-jpa:${version.spring.data.jpa}"
compile "org.aspectj:aspectjweaver:${version.aspectj}"
//hibernate dependencies
compile "org.hibernate:hibernate-core:${version.hibernate.core}"
compile "org.hibernate.common:hibernate-commons-annotations:${version.hibernate.annotations}"
compile("org.hibernate:hibernate-c3p0:${version.hibernate.core}"){
//We have newer version of c3p0
exclude module: "c3p0:c3p0"
}
compile "org.hibernate:hibernate-entitymanager:${version.hibernate.core}"
//DB dependencies
compile "com.mchange:c3p0:${version.c3p0}"
compile "org.hsqldb:hsqldb:${version.hsqldb}"
compile "mysql:mysql-connector-java:${version.mysql}"
//other dependencies
compile "com.fasterxml.jackson.core:jackson-databind:${version.jackson}"
compile "net.sf.oval:oval:${version.oval}"
compile "net.sf.ehcache:ehcache:${version.ehcache}"
//jetty container dependencies
compile "org.eclipse.jetty:jetty-deploy:${version.jetty}"
compile "org.eclipse.jetty:jetty-jsp:${version.jetty}"
}
compileJava {
sourceCompatibility "1.6"
targetCompatibility "1.6"
}
task startJetty(type: JavaExec, dependsOn: 'compileJava') {
classpath = sourceSets.main.runtimeClasspath
main = "com.crophub.JettyMain"
}
defaultTasks 'startJetty'
\ No newline at end of file
version=0.0.4
\ No newline at end of file
......@@ -2,7 +2,7 @@
<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>
<groupId>org.crophub</groupId>
<groupId>org.genesys2</groupId>
<artifactId>crophub</artifactId>
<version>0.0.1</version>
......@@ -390,7 +390,7 @@
<version>1.2.1</version>
<configuration>
<mainClass>org.crophub.JettyMain</mainClass>
<mainClass>org.genesys2.JettyMain</mainClass>
</configuration>
<executions>
<execution>
......
......@@ -14,7 +14,7 @@
* limitations under the License.
**/
package org.crophub;
package org.genesys2;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
**/
package org.croptrust.geo.sources;
package org.genesys2.geo.sources;
import java.io.Serializable;
import java.text.MessageFormat;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
**/
package org.croptrust.geo.sources;
package org.genesys2.geo.sources;
import java.io.BufferedReader;
import java.io.IOException;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
**/
package org.croptrust.geo.sources;
package org.genesys2.geo.sources;
import java.io.BufferedReader;
import java.io.IOException;
......
......@@ -15,7 +15,7 @@
**/
package org.crophub.rest;
package org.genesys2.rest;
public class ApplicationException extends Exception {
private static final long serialVersionUID = 7077761656242902954L;
......
......@@ -15,7 +15,7 @@
**/
package org.crophub.rest.common.aspect;
package org.genesys2.rest.common.aspect;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
......
......@@ -15,14 +15,14 @@
**/
package org.crophub.rest.common.aspect;
package org.genesys2.rest.common.aspect;
import java.util.Arrays;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.crophub.rest.common.model.UserRole;
import org.genesys2.rest.common.model.UserRole;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.security.core.Authentication;
......@@ -43,8 +43,8 @@ public class AsAdminAspect {
Arrays.asList(new SimpleGrantedAuthority(UserRole.ADMINISTRATOR.getName()))
);
@Around("org.crophub.rest.common.aspect.SystemArchitecture.allServices()" +
" && @annotation(org.crophub.rest.common.aspect.AsAdmin)")
@Around("org.genesys2.rest.common.aspect.SystemArchitecture.allServices()" +
" && @annotation(org.genesys2.rest.common.aspect.AsAdmin)")
public Object authenticateAsAdmin(ProceedingJoinPoint pjp) throws Throwable {
//store previous version of auth (if any exists)
Authentication prevAuth = SecurityContextHolder.getContext().getAuthentication();
......
......@@ -15,7 +15,7 @@
**/
package org.crophub.rest.common.aspect;
package org.genesys2.rest.common.aspect;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
......@@ -31,19 +31,19 @@ public class SystemArchitecture {
public void allServices(){
}
@Pointcut("execution(* org.crophub.rest.common.service.*.*(..))")
@Pointcut("execution(* org.genesys2.rest.common.service.*.*(..))")
public void businessServices(){
}
@Pointcut("execution(* org.crophub.rest.common.listener.sample.*.*(..))")
@Pointcut("execution(* org.genesys2.rest.common.listener.sample.*.*(..))")
public void sampleServices(){
}
@Pointcut("execution(* org.crophub.rest.common.security.*.*(..))")
@Pointcut("execution(* org.genesys2.rest.common.security.*.*(..))")
public void securityServices(){
}
@Pointcut("execution(* org.crophub.rest.servlet.controller.*.*(..))")
@Pointcut("execution(* org.genesys2.rest.servlet.controller.*.*(..))")
public void controllers(){
}
......@@ -52,15 +52,15 @@ public class SystemArchitecture {
*/
//USER
@Pointcut("execution(* org.crophub.rest.common.service.impl.UserServiceImpl.addUser(..))")
@Pointcut("execution(* org.genesys2.rest.common.service.impl.UserServiceImpl.addUser(..))")
public void addUserModel(){
}
@Pointcut("execution(* org.crophub.rest.common.service.impl.UserServiceImpl.updateUser(..))")
@Pointcut("execution(* org.genesys2.rest.common.service.impl.UserServiceImpl.updateUser(..))")
public void changeUserModel(){
}
@Pointcut("execution(* org.crophub.rest.common.service.impl.UserServiceImpl.removeUser(..))")
@Pointcut("execution(* org.genesys2.rest.common.service.impl.UserServiceImpl.removeUser(..))")
public void removeUserModel(){
}
......
......@@ -15,7 +15,7 @@
**/
package org.crophub.rest.common.config;
package org.genesys2.rest.common.config;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
......
......@@ -15,7 +15,7 @@
**/
package org.crophub.rest.common.exception;
package org.genesys2.rest.common.exception;
public class NoUserFoundException extends UserException {
......
......@@ -15,7 +15,7 @@
**/
package org.crophub.rest.common.exception;
package org.genesys2.rest.common.exception;
public class NotUniqueUserException extends UserException {
......
......@@ -15,9 +15,9 @@
**/
package org.crophub.rest.common.exception;
package org.genesys2.rest.common.exception;
import org.crophub.rest.ApplicationException;
import org.genesys2.rest.ApplicationException;
public class UserException extends ApplicationException {
/**
......
......@@ -15,7 +15,7 @@
**/
package org.crophub.rest.common.factory;
package org.genesys2.rest.common.factory;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
......
......@@ -15,11 +15,11 @@
**/
package org.crophub.rest.common.listener;
package org.genesys2.rest.common.listener;
import java.util.concurrent.Callable;
import org.crophub.rest.common.security.AsAdminInvoker;
import org.genesys2.rest.common.security.AsAdminInvoker;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.InitializingBean;
......
......@@ -14,15 +14,15 @@
* limitations under the License.
**/
package org.crophub.rest.common.listener.sample;
package org.genesys2.rest.common.listener.sample;
import java.util.HashSet;
import java.util.Set;
import org.crophub.rest.common.listener.RunAsAdminListener;
import org.crophub.rest.common.model.UserRole;
import org.crophub.rest.common.model.impl.User;
import org.crophub.rest.common.service.UserService;
import org.genesys2.rest.common.listener.RunAsAdminListener;
import org.genesys2.rest.common.model.UserRole;
import org.genesys2.rest.common.model.impl.User;
import org.genesys2.rest.common.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......
package org.crophub.rest.common.lucene.genesys;
package org.genesys2.rest.common.lucene.genesys;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field;
import org.crophub.rest.common.model.genesys.Accession;
import org.crophub.rest.common.model.genesys.AllAccnames;
import org.crophub.rest.common.model.genesys.AllAcqBreeding;
import org.crophub.rest.common.model.genesys.AllAcqCollect;
import org.crophub.rest.common.model.genesys.AllAcqExchange;
import org.crophub.rest.common.model.genesys.Taxonomy;
import org.crophub.rest.common.model.impl.Country;
import org.crophub.rest.common.model.impl.FaoInstitute;
import org.genesys2.rest.common.model.genesys.Accession;
import org.genesys2.rest.common.model.genesys.AllAccnames;
import org.genesys2.rest.common.model.genesys.AllAcqBreeding;
import org.genesys2.rest.common.model.genesys.AllAcqCollect;
import org.genesys2.rest.common.model.genesys.AllAcqExchange;
import org.genesys2.rest.common.model.genesys.Taxonomy;
import org.genesys2.rest.common.model.impl.Country;
import org.genesys2.rest.common.model.impl.FaoInstitute;
import org.hibernate.search.bridge.FieldBridge;
import org.hibernate.search.bridge.LuceneOptions;
......
package org.crophub.rest.common.lucene.genesys;
package org.genesys2.rest.common.lucene.genesys;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field;
import org.crophub.rest.common.model.impl.FaoInstitute;
import org.genesys2.rest.common.model.impl.FaoInstitute;
import org.hibernate.search.bridge.FieldBridge;
import org.hibernate.search.bridge.LuceneOptions;
......
package org.crophub.rest.common.lucene.genesys;
package org.genesys2.rest.common.lucene.genesys;
import org.apache.commons.lang.StringUtils;
......
......@@ -14,13 +14,13 @@
* limitations under the License.
**/
package org.crophub.rest.common.model;
package org.genesys2.rest.common.model;
import java.util.Date;
import javax.persistence.MappedSuperclass;
import org.crophub.rest.common.model.impl.User;
import org.genesys2.rest.common.model.impl.User;
@MappedSuperclass
public abstract class AuditedModel extends OwnedModel {
......
......@@ -15,7 +15,7 @@
**/
package org.crophub.rest.common.model;
package org.genesys2.rest.common.model;
import javax.persistence.Column;
import javax.persistence.GeneratedValue;
......
......@@ -15,7 +15,7 @@
**/
package org.crophub.rest.common.model;
package org.genesys2.rest.common.model;
import java.io.Serializable;
......
......@@ -14,12 +14,12 @@
* limitations under the License.
**/
package org.crophub.rest.common.model;
package org.genesys2.rest.common.model;
import javax.persistence.ManyToOne;
import javax.persistence.MappedSuperclass;
import org.crophub.rest.common.model.impl.User;
import org.genesys2.rest.common.model.impl.User;
@MappedSuperclass
public abstract class OwnedModel extends BusinessModel {
......
......@@ -15,7 +15,7 @@
**/
package org.crophub.rest.common.model;
package org.genesys2.rest.common.model;
public enum Permissions {
CREATE("Create"),
......
......@@ -15,7 +15,7 @@
**/
package org.crophub.rest.common.model;
package org.genesys2.rest.common.model;
public enum UserRole {
USER("User"),
......
......@@ -14,7 +14,7 @@
* limitations under the License.
**/
package org.crophub.rest.common.model.genesys;
package org.genesys2.rest.common.model.genesys;
// Generated Apr 24, 2013 10:08:59 AM by Hibernate Tools 4.0.0
......@@ -29,9 +29,9 @@ import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import org.crophub.rest.common.lucene.genesys.AccessionBridge;
import org.crophub.rest.common.model.impl.Country;
import org.crophub.rest.common.model.impl.FaoInstitute;
import org.genesys2.rest.common.lucene.genesys.AccessionBridge;
import org.genesys2.rest.common.model.impl.Country;
import org.genesys2.rest.common.model.impl.FaoInstitute;
import org.hibernate.search.annotations.ClassBridge;
import org.hibernate.search.annotations.DocumentId;
import org.hibernate.search.annotations.Indexed;
......
......@@ -15,7 +15,7 @@
**/
package org.crophub.rest.common.model.genesys;
package org.genesys2.rest.common.model.genesys;
import java.io.Serializable;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
**/
package org.crophub.rest.common.model.genesys;
package org.genesys2.rest.common.model.genesys;
// Generated Apr 24, 2013 10:08:59 AM by Hibernate Tools 4.0.0
......
......@@ -14,7 +14,7 @@
* limitations under the License.
**/
package org.crophub.rest.common.model.genesys;
package org.genesys2.rest.common.model.genesys;
// Generated Apr 24, 2013 10:08:59 AM by Hibernate Tools 4.0.0
......
......@@ -14,7 +14,7 @@
* limitations under the License.
**/
package org.crophub.rest.common.model.genesys;
package org.genesys2.rest.common.model.genesys;
// Generated Apr 24, 2013 10:08:59 AM by Hibernate Tools 4.0.0
......
......@@ -14,7 +14,7 @@
* limitations under the License.
**/
package org.crophub.rest.common.model.genesys;
package org.genesys2.rest.common.model.genesys;
// Generated Apr 24, 2013 10:08:59 AM by Hibernate Tools 4.0.0
......
......@@ -14,7 +14,7 @@
* limitations under the License.
**/
package org.crophub.rest.common.model.genesys;
package org.genesys2.rest.common.model.genesys;