Commit 47b67808 authored by Matija Obreza's avatar Matija Obreza
Browse files

Renamed *.controller.* packages to *.api.* and *.mvc.*

parent 4d6774a5
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
**/ **/
package org.genesys2.server.servlet.controller.api.v0; package org.genesys2.server.api.v0;
import java.io.IOException; import java.io.IOException;
import java.util.HashSet; import java.util.HashSet;
...@@ -26,14 +26,14 @@ import javax.xml.bind.ValidationException; ...@@ -26,14 +26,14 @@ import javax.xml.bind.ValidationException;
import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.JsonProcessingException;
import org.genesys2.server.api.ModelValidationException;
import org.genesys2.server.api.RestController;
import org.genesys2.server.exception.AuthorizationException; import org.genesys2.server.exception.AuthorizationException;
import org.genesys2.server.model.impl.Article; import org.genesys2.server.model.impl.Article;
import org.genesys2.server.model.impl.FaoInstitute; import org.genesys2.server.model.impl.FaoInstitute;
import org.genesys2.server.model.impl.Organization; import org.genesys2.server.model.impl.Organization;
import org.genesys2.server.service.CRMException; import org.genesys2.server.service.CRMException;
import org.genesys2.server.service.OrganizationService; import org.genesys2.server.service.OrganizationService;
import org.genesys2.server.servlet.controller.api.ModelValidationException;
import org.genesys2.server.servlet.controller.api.RestController;
import org.genesys2.spring.ResourceNotFoundException; import org.genesys2.spring.ResourceNotFoundException;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.PageRequest;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
**/ **/
package org.genesys2.server.servlet.controller.api.v0; package org.genesys2.server.api.v0;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
...@@ -24,9 +24,9 @@ import org.genesys.blocks.oauth.service.OAuthClientDetailsService; ...@@ -24,9 +24,9 @@ import org.genesys.blocks.oauth.service.OAuthClientDetailsService;
import org.genesys.blocks.security.model.AclObjectIdentity; import org.genesys.blocks.security.model.AclObjectIdentity;
import org.genesys.blocks.security.model.AclSid; import org.genesys.blocks.security.model.AclSid;
import org.genesys.blocks.security.service.CustomAclService; import org.genesys.blocks.security.service.CustomAclService;
import org.genesys2.server.api.RestController;
import org.genesys2.server.model.impl.User; import org.genesys2.server.model.impl.User;
import org.genesys2.server.service.UserService; import org.genesys2.server.service.UserService;
import org.genesys2.server.servlet.controller.api.RestController;
import org.genesys2.server.servlet.model.PermissionJson; import org.genesys2.server.servlet.model.PermissionJson;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
......
...@@ -14,8 +14,9 @@ ...@@ -14,8 +14,9 @@
* limitations under the License. * limitations under the License.
**/ **/
package org.genesys2.server.servlet.controller.api.v0; package org.genesys2.server.api.v0;
import org.genesys2.server.api.RestController;
import org.genesys2.server.model.genesys.MaterialRequest; import org.genesys2.server.model.genesys.MaterialRequest;
import org.genesys2.server.model.genesys.MaterialSubRequest; import org.genesys2.server.model.genesys.MaterialSubRequest;
import org.genesys2.server.model.impl.FaoInstitute; import org.genesys2.server.model.impl.FaoInstitute;
...@@ -23,7 +24,6 @@ import org.genesys2.server.service.InstituteService; ...@@ -23,7 +24,6 @@ import org.genesys2.server.service.InstituteService;
import org.genesys2.server.service.RequestService; import org.genesys2.server.service.RequestService;
import org.genesys2.server.service.RequestService.NoPidException; import org.genesys2.server.service.RequestService.NoPidException;
import org.genesys2.server.service.impl.EasySMTAException; import org.genesys2.server.service.impl.EasySMTAException;
import org.genesys2.server.servlet.controller.api.RestController;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.PageRequest;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
**/ **/
package org.genesys2.server.servlet.controller.api.v0; package org.genesys2.server.api.v0;
import java.util.List; import java.util.List;
...@@ -27,6 +27,9 @@ import net.sf.oval.constraint.MinLength; ...@@ -27,6 +27,9 @@ import net.sf.oval.constraint.MinLength;
import net.sf.oval.constraint.NotBlank; import net.sf.oval.constraint.NotBlank;
import net.sf.oval.constraint.NotNull; import net.sf.oval.constraint.NotNull;
import org.genesys2.server.api.ModelValidationException;
import org.genesys2.server.api.OAuth2Cleanup;
import org.genesys2.server.api.RestController;
import org.genesys2.server.exception.AuthorizationException; import org.genesys2.server.exception.AuthorizationException;
import org.genesys2.server.model.genesys.Method; import org.genesys2.server.model.genesys.Method;
import org.genesys2.server.model.genesys.Parameter; import org.genesys2.server.model.genesys.Parameter;
...@@ -35,9 +38,6 @@ import org.genesys2.server.model.impl.Crop; ...@@ -35,9 +38,6 @@ import org.genesys2.server.model.impl.Crop;
import org.genesys2.server.service.CropService; import org.genesys2.server.service.CropService;
import org.genesys2.server.service.GenesysService; import org.genesys2.server.service.GenesysService;
import org.genesys2.server.service.TraitService; import org.genesys2.server.service.TraitService;
import org.genesys2.server.servlet.controller.api.ModelValidationException;
import org.genesys2.server.servlet.controller.api.OAuth2Cleanup;
import org.genesys2.server.servlet.controller.api.RestController;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.PageRequest;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
**/ **/
package org.genesys2.server.servlet.controller.api.v0; package org.genesys2.server.api.v0;
import java.util.List; import java.util.List;
...@@ -26,14 +26,14 @@ import net.sf.oval.constraint.NotNull; ...@@ -26,14 +26,14 @@ import net.sf.oval.constraint.NotNull;
import org.genesys.blocks.security.NoUserFoundException; import org.genesys.blocks.security.NoUserFoundException;
import org.genesys2.server.ServiceEndpoints; import org.genesys2.server.ServiceEndpoints;
import org.genesys2.server.api.ModelValidationException;
import org.genesys2.server.api.OAuth2Cleanup;
import org.genesys2.server.api.RestController;
import org.genesys2.server.exception.AuthorizationException; import org.genesys2.server.exception.AuthorizationException;
import org.genesys2.server.model.impl.User; import org.genesys2.server.model.impl.User;
import org.genesys2.server.service.InstituteService; import org.genesys2.server.service.InstituteService;
import org.genesys2.server.service.TeamService; import org.genesys2.server.service.TeamService;
import org.genesys2.server.service.UserService; import org.genesys2.server.service.UserService;
import org.genesys2.server.servlet.controller.api.ModelValidationException;
import org.genesys2.server.servlet.controller.api.OAuth2Cleanup;
import org.genesys2.server.servlet.controller.api.RestController;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Sort; import org.springframework.data.domain.Sort;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
**/ **/
package org.genesys2.server.servlet.controller.api.v0; package org.genesys2.server.api.v0;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
...@@ -23,12 +23,12 @@ import org.apache.commons.lang3.StringUtils; ...@@ -23,12 +23,12 @@ import org.apache.commons.lang3.StringUtils;
import org.genesys.blocks.security.NotUniqueUserException; import org.genesys.blocks.security.NotUniqueUserException;
import org.genesys.blocks.security.UserException; import org.genesys.blocks.security.UserException;
import org.genesys.blocks.security.service.PasswordPolicy.PasswordPolicyException; import org.genesys.blocks.security.service.PasswordPolicy.PasswordPolicyException;
import org.genesys2.server.api.RestController;
import org.genesys2.server.api.model.UserChangedDataJson;
import org.genesys2.server.model.impl.User; import org.genesys2.server.model.impl.User;
import org.genesys2.server.service.EMailVerificationService; import org.genesys2.server.service.EMailVerificationService;
import org.genesys2.server.service.TeamService; import org.genesys2.server.service.TeamService;
import org.genesys2.server.service.UserService; import org.genesys2.server.service.UserService;
import org.genesys2.server.servlet.controller.api.RestController;
import org.genesys2.server.servlet.controller.api.model.UserChangedDataJson;
import org.genesys2.server.servlet.model.UserList; import org.genesys2.server.servlet.model.UserList;
import org.genesys2.spring.ResourceNotFoundException; import org.genesys2.spring.ResourceNotFoundException;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
......
...@@ -14,15 +14,15 @@ ...@@ -14,15 +14,15 @@
* limitations under the License. * limitations under the License.
*/ */
package org.genesys2.server.servlet.controller.api.v1; package org.genesys2.server.api.v1;
import java.util.Set; import java.util.Set;
import java.util.UUID; import java.util.UUID;
import org.genesys2.server.api.RestController;
import org.genesys2.server.model.impl.Subset; import org.genesys2.server.model.impl.Subset;
import org.genesys2.server.service.SubsetService; import org.genesys2.server.service.SubsetService;
import org.genesys2.server.service.filter.SubsetFilter; import org.genesys2.server.service.filter.SubsetFilter;
import org.genesys2.server.servlet.controller.api.RestController;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.PageRequest;
...@@ -51,7 +51,7 @@ import io.swagger.annotations.Api; ...@@ -51,7 +51,7 @@ import io.swagger.annotations.Api;
public class SubsetRestController extends RestController { public class SubsetRestController extends RestController {
/** The Constant API_BASE. */ /** The Constant API_BASE. */
protected static final String API_BASE = "/api/v1/subset"; public static final String API_BASE = "/api/v1/subset";
@Autowired @Autowired
private SubsetService subsetService; private SubsetService subsetService;
......
...@@ -42,7 +42,7 @@ public class SystemArchitecture { ...@@ -42,7 +42,7 @@ public class SystemArchitecture {
public void securityServices() { public void securityServices() {
} }
@Pointcut("execution(* org.genesys2.server.servlet.controller.*.*(..))") @Pointcut("execution(* org.genesys2.server.mvc.*.*(..))")
public void controllers() { public void controllers() {
} }
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.genesys2.server.servlet.controller.brapi; package org.genesys2.server.brapi;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.genesys2.server.servlet.controller.brapi; package org.genesys2.server.brapi;
import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.JsonProcessingException;
...@@ -33,7 +33,7 @@ import org.springframework.web.context.request.WebRequest; ...@@ -33,7 +33,7 @@ import org.springframework.web.context.request.WebRequest;
* *
* @author Matija Obreza * @author Matija Obreza
*/ */
@ControllerAdvice(basePackages = { "org.genesys2.server.servlet.controller.brapi" }) @ControllerAdvice(basePackages = { "org.genesys2.server.brapi" })
public class BrAPIExceptionHandler { public class BrAPIExceptionHandler {
protected final Logger LOG = LoggerFactory.getLogger(getClass()); protected final Logger LOG = LoggerFactory.getLogger(getClass());
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.genesys2.server.servlet.controller.brapi; package org.genesys2.server.brapi;
import org.genesys2.brapi.model.BrAPIResponse; import org.genesys2.brapi.model.BrAPIResponse;
import org.genesys2.brapi.service.BrAPIService; import org.genesys2.brapi.service.BrAPIService;
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.genesys2.server.servlet.controller.brapi; package org.genesys2.server.brapi;
import java.util.UUID; import java.util.UUID;
......
...@@ -26,7 +26,7 @@ import org.genesys.blocks.oauth.model.OAuthRole; ...@@ -26,7 +26,7 @@ import org.genesys.blocks.oauth.model.OAuthRole;
import org.genesys.blocks.oauth.persistence.OAuthClientRepository; import org.genesys.blocks.oauth.persistence.OAuthClientRepository;
import org.genesys2.server.listener.RunAsAdminListener; import org.genesys2.server.listener.RunAsAdminListener;
import org.genesys2.server.model.impl.FaoInstitute; import org.genesys2.server.model.impl.FaoInstitute;
import org.genesys2.server.persistence.domain.AccessionRepository; import org.genesys2.server.persistence.AccessionRepository;
import org.genesys2.server.service.CropService; import org.genesys2.server.service.CropService;
import org.genesys2.server.service.GenesysService; import org.genesys2.server.service.GenesysService;
import org.genesys2.server.service.GeoRegionService; import org.genesys2.server.service.GeoRegionService;
......
...@@ -32,7 +32,7 @@ import javax.persistence.TemporalType; ...@@ -32,7 +32,7 @@ import javax.persistence.TemporalType;
import org.apache.commons.lang.math.RandomUtils; import org.apache.commons.lang.math.RandomUtils;
import org.genesys.blocks.model.AuditedVersionedModel; import org.genesys.blocks.model.AuditedVersionedModel;
import org.genesys2.server.servlet.controller.api.serialization.MaterialRequestSerializer; import org.genesys2.server.api.serialization.MaterialRequestSerializer;
import org.hibernate.annotations.Type; import org.hibernate.annotations.Type;
import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize;
......
...@@ -31,7 +31,7 @@ import javax.persistence.TemporalType; ...@@ -31,7 +31,7 @@ import javax.persistence.TemporalType;
import org.apache.commons.lang.math.RandomUtils; import org.apache.commons.lang.math.RandomUtils;
import org.genesys.blocks.model.AuditedVersionedModel; import org.genesys.blocks.model.AuditedVersionedModel;
import org.genesys2.server.servlet.controller.api.serialization.MaterialSubRequestSerializer; import org.genesys2.server.api.serialization.MaterialSubRequestSerializer;
import org.hibernate.annotations.Type; import org.hibernate.annotations.Type;
import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize;
......
...@@ -26,7 +26,7 @@ import java.util.Locale; ...@@ -26,7 +26,7 @@ import java.util.Locale;
import javax.persistence.*; import javax.persistence.*;
import org.genesys.blocks.model.BasicModel; import org.genesys.blocks.model.BasicModel;
import org.genesys2.server.servlet.controller.api.serialization.CountrySerializer; import org.genesys2.server.api.serialization.CountrySerializer;
import org.hibernate.annotations.Type; import org.hibernate.annotations.Type;
import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.JsonNode;
......
...@@ -111,16 +111,6 @@ public class Crop extends GlobalVersionedAuditedModel implements AclAwareModel { ...@@ -111,16 +111,6 @@ public class Crop extends GlobalVersionedAuditedModel implements AclAwareModel {
this.name = name; this.name = name;
} }
/// For compatibility with the Catalog
@Transient
public String getTitle() {
return name;
}
public void setTitle(String title) {
setName(title);
}
public String getShortName() { public String getShortName() {
return shortName; return shortName;
} }
...@@ -130,16 +120,6 @@ public class Crop extends GlobalVersionedAuditedModel implements AclAwareModel { ...@@ -130,16 +120,6 @@ public class Crop extends GlobalVersionedAuditedModel implements AclAwareModel {
} }
/// For compatibility with the Catalog
@Transient
public String getCode() {
return shortName;
}
public void setCode(final String code) {
this.shortName = code;
}
public String getDescription() { public String getDescription() {
return description; return description;
} }
......
...@@ -42,7 +42,7 @@ import org.apache.commons.lang3.StringUtils; ...@@ -42,7 +42,7 @@ import org.apache.commons.lang3.StringUtils;
import org.genesys.blocks.model.BasicModel; import org.genesys.blocks.model.BasicModel;
import org.genesys.blocks.model.EntityId; import org.genesys.blocks.model.EntityId;
import org.genesys.blocks.security.model.AclAwareModel; import org.genesys.blocks.security.model.AclAwareModel;
import org.genesys2.server.servlet.controller.api.serialization.FaoInstituteSerializer; import org.genesys2.server.api.serialization.FaoInstituteSerializer;
@Cacheable @Cacheable
@Entity @Entity
......
...@@ -35,7 +35,7 @@ import javax.persistence.UniqueConstraint; ...@@ -35,7 +35,7 @@ import javax.persistence.UniqueConstraint;
import org.genesys.blocks.model.AuditedVersionedModel; import org.genesys.blocks.model.AuditedVersionedModel;
import org.genesys.blocks.security.model.AclAwareModel; import org.genesys.blocks.security.model.AclAwareModel;
import org.genesys2.server.servlet.controller.api.serialization.TeamSerializer; import org.genesys2.server.api.serialization.TeamSerializer;
import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize;
......
...@@ -28,8 +28,8 @@ import com.fasterxml.jackson.annotation.JsonIgnore; ...@@ -28,8 +28,8 @@ import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import org.genesys.blocks.security.model.BasicUser; import org.genesys.blocks.security.model.BasicUser;
import org.genesys2.server.api.serialization.UserSerializer;
import org.genesys2.server.model.UserRole; import org.genesys2.server.model.UserRole;
import org.genesys2.server.servlet.controller.api.serialization.UserSerializer;
@Cacheable @Cacheable
@Entity @Entity
......
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