Commit 51967aa8 authored by Matija Obreza's avatar Matija Obreza
Browse files

Java package organization

parent d1f12782
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
**/ **/
package org.genesys2.rest; package org.genesys2.server;
public class ApplicationException extends Exception { public class ApplicationException extends Exception {
private static final long serialVersionUID = 7077761656242902954L; private static final long serialVersionUID = 7077761656242902954L;
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
**/ **/
package org.genesys2.rest.common.aspect; package org.genesys2.server.common.aspect;
import java.lang.annotation.Documented; import java.lang.annotation.Documented;
import java.lang.annotation.ElementType; import java.lang.annotation.ElementType;
......
...@@ -15,14 +15,14 @@ ...@@ -15,14 +15,14 @@
**/ **/
package org.genesys2.rest.common.aspect; package org.genesys2.server.common.aspect;
import java.util.Arrays; import java.util.Arrays;
import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Aspect;
import org.genesys2.rest.common.model.UserRole; import org.genesys2.server.common.model.UserRole;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.security.core.Authentication; import org.springframework.security.core.Authentication;
...@@ -43,8 +43,8 @@ public class AsAdminAspect { ...@@ -43,8 +43,8 @@ public class AsAdminAspect {
Arrays.asList(new SimpleGrantedAuthority(UserRole.ADMINISTRATOR.getName())) Arrays.asList(new SimpleGrantedAuthority(UserRole.ADMINISTRATOR.getName()))
); );
@Around("org.genesys2.rest.common.aspect.SystemArchitecture.allServices()" + @Around("org.genesys2.server.common.aspect.SystemArchitecture.allServices()" +
" && @annotation(org.genesys2.rest.common.aspect.AsAdmin)") " && @annotation(org.genesys2.server.common.aspect.AsAdmin)")
public Object authenticateAsAdmin(ProceedingJoinPoint pjp) throws Throwable { public Object authenticateAsAdmin(ProceedingJoinPoint pjp) throws Throwable {
//store previous version of auth (if any exists) //store previous version of auth (if any exists)
Authentication prevAuth = SecurityContextHolder.getContext().getAuthentication(); Authentication prevAuth = SecurityContextHolder.getContext().getAuthentication();
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
**/ **/
package org.genesys2.rest.common.aspect; package org.genesys2.server.common.aspect;
import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut; import org.aspectj.lang.annotation.Pointcut;
...@@ -31,19 +31,19 @@ public class SystemArchitecture { ...@@ -31,19 +31,19 @@ public class SystemArchitecture {
public void allServices(){ public void allServices(){
} }
@Pointcut("execution(* org.genesys2.rest.common.service.*.*(..))") @Pointcut("execution(* org.genesys2.server.common.service.*.*(..))")
public void businessServices(){ public void businessServices(){
} }
@Pointcut("execution(* org.genesys2.rest.common.listener.sample.*.*(..))") @Pointcut("execution(* org.genesys2.server.common.listener.sample.*.*(..))")
public void sampleServices(){ public void sampleServices(){
} }
@Pointcut("execution(* org.genesys2.rest.common.security.*.*(..))") @Pointcut("execution(* org.genesys2.server.common.security.*.*(..))")
public void securityServices(){ public void securityServices(){
} }
@Pointcut("execution(* org.genesys2.rest.servlet.controller.*.*(..))") @Pointcut("execution(* org.genesys2.server.servlet.controller.*.*(..))")
public void controllers(){ public void controllers(){
} }
...@@ -52,15 +52,15 @@ public class SystemArchitecture { ...@@ -52,15 +52,15 @@ public class SystemArchitecture {
*/ */
//USER //USER
@Pointcut("execution(* org.genesys2.rest.common.service.impl.UserServiceImpl.addUser(..))") @Pointcut("execution(* org.genesys2.server.common.service.impl.UserServiceImpl.addUser(..))")
public void addUserModel(){ public void addUserModel(){
} }
@Pointcut("execution(* org.genesys2.rest.common.service.impl.UserServiceImpl.updateUser(..))") @Pointcut("execution(* org.genesys2.server.common.service.impl.UserServiceImpl.updateUser(..))")
public void changeUserModel(){ public void changeUserModel(){
} }
@Pointcut("execution(* org.genesys2.rest.common.service.impl.UserServiceImpl.removeUser(..))") @Pointcut("execution(* org.genesys2.server.common.service.impl.UserServiceImpl.removeUser(..))")
public void removeUserModel(){ public void removeUserModel(){
} }
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
**/ **/
package org.genesys2.rest.common.config; package org.genesys2.server.common.config;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
**/ **/
package org.genesys2.rest.common.exception; package org.genesys2.server.common.exception;
public class NoUserFoundException extends UserException { public class NoUserFoundException extends UserException {
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
**/ **/
package org.genesys2.rest.common.exception; package org.genesys2.server.common.exception;
public class NotUniqueUserException extends UserException { public class NotUniqueUserException extends UserException {
......
...@@ -15,9 +15,9 @@ ...@@ -15,9 +15,9 @@
**/ **/
package org.genesys2.rest.common.exception; package org.genesys2.server.common.exception;
import org.genesys2.rest.ApplicationException; import org.genesys2.server.ApplicationException;
public class UserException extends ApplicationException { public class UserException extends ApplicationException {
/** /**
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
**/ **/
package org.genesys2.rest.common.factory; package org.genesys2.server.common.factory;
import org.springframework.beans.BeansException; import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContext;
......
...@@ -15,11 +15,11 @@ ...@@ -15,11 +15,11 @@
**/ **/
package org.genesys2.rest.common.listener; package org.genesys2.server.common.listener;
import java.util.concurrent.Callable; import java.util.concurrent.Callable;
import org.genesys2.rest.common.security.AsAdminInvoker; import org.genesys2.server.common.security.AsAdminInvoker;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.InitializingBean;
......
...@@ -14,15 +14,15 @@ ...@@ -14,15 +14,15 @@
* limitations under the License. * limitations under the License.
**/ **/
package org.genesys2.rest.common.listener.sample; package org.genesys2.server.common.listener.sample;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;
import org.genesys2.rest.common.listener.RunAsAdminListener; import org.genesys2.server.common.listener.RunAsAdminListener;
import org.genesys2.rest.common.model.UserRole; import org.genesys2.server.common.model.UserRole;
import org.genesys2.rest.common.model.impl.User; import org.genesys2.server.common.model.impl.User;
import org.genesys2.rest.common.service.UserService; import org.genesys2.server.common.service.UserService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
......
package org.genesys2.rest.common.lucene.genesys; package org.genesys2.server.common.lucene.genesys;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.apache.lucene.document.Document; import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field; import org.apache.lucene.document.Field;
import org.genesys2.rest.common.model.genesys.Accession; import org.genesys2.server.common.model.genesys.Accession;
import org.genesys2.rest.common.model.genesys.AllAccnames; import org.genesys2.server.common.model.genesys.AllAccnames;
import org.genesys2.rest.common.model.genesys.AllAcqBreeding; import org.genesys2.server.common.model.genesys.AllAcqBreeding;
import org.genesys2.rest.common.model.genesys.AllAcqCollect; import org.genesys2.server.common.model.genesys.AllAcqCollect;
import org.genesys2.rest.common.model.genesys.AllAcqExchange; import org.genesys2.server.common.model.genesys.AllAcqExchange;
import org.genesys2.rest.common.model.genesys.Taxonomy; import org.genesys2.server.common.model.genesys.Taxonomy;
import org.genesys2.rest.common.model.impl.Country; import org.genesys2.server.common.model.impl.Country;
import org.genesys2.rest.common.model.impl.FaoInstitute; import org.genesys2.server.common.model.impl.FaoInstitute;
import org.hibernate.search.bridge.FieldBridge; import org.hibernate.search.bridge.FieldBridge;
import org.hibernate.search.bridge.LuceneOptions; import org.hibernate.search.bridge.LuceneOptions;
......
package org.genesys2.rest.common.lucene.genesys; package org.genesys2.server.common.lucene.genesys;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.apache.lucene.document.Document; import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field; import org.apache.lucene.document.Field;
import org.genesys2.rest.common.model.impl.FaoInstitute; import org.genesys2.server.common.model.impl.FaoInstitute;
import org.hibernate.search.bridge.FieldBridge; import org.hibernate.search.bridge.FieldBridge;
import org.hibernate.search.bridge.LuceneOptions; import org.hibernate.search.bridge.LuceneOptions;
......
package org.genesys2.rest.common.lucene.genesys; package org.genesys2.server.common.lucene.genesys;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
......
...@@ -14,13 +14,13 @@ ...@@ -14,13 +14,13 @@
* limitations under the License. * limitations under the License.
**/ **/
package org.genesys2.rest.common.model; package org.genesys2.server.common.model;
import java.util.Date; import java.util.Date;
import javax.persistence.MappedSuperclass; import javax.persistence.MappedSuperclass;
import org.genesys2.rest.common.model.impl.User; import org.genesys2.server.common.model.impl.User;
@MappedSuperclass @MappedSuperclass
public abstract class AuditedModel extends OwnedModel { public abstract class AuditedModel extends OwnedModel {
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
**/ **/
package org.genesys2.rest.common.model; package org.genesys2.server.common.model;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.GeneratedValue; import javax.persistence.GeneratedValue;
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
**/ **/
package org.genesys2.rest.common.model; package org.genesys2.server.common.model;
import java.io.Serializable; import java.io.Serializable;
......
...@@ -14,12 +14,12 @@ ...@@ -14,12 +14,12 @@
* limitations under the License. * limitations under the License.
**/ **/
package org.genesys2.rest.common.model; package org.genesys2.server.common.model;
import javax.persistence.ManyToOne; import javax.persistence.ManyToOne;
import javax.persistence.MappedSuperclass; import javax.persistence.MappedSuperclass;
import org.genesys2.rest.common.model.impl.User; import org.genesys2.server.common.model.impl.User;
@MappedSuperclass @MappedSuperclass
public abstract class OwnedModel extends BusinessModel { public abstract class OwnedModel extends BusinessModel {
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
**/ **/
package org.genesys2.rest.common.model; package org.genesys2.server.common.model;
public enum Permissions { public enum Permissions {
CREATE("Create"), CREATE("Create"),
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
**/ **/
package org.genesys2.rest.common.model; package org.genesys2.server.common.model;
public enum UserRole { public enum UserRole {
USER("User"), USER("User"),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment