Commit c9618708 authored by Matija Obreza's avatar Matija Obreza

Renamed *.rest.* packages to *.api.*

parent 00f23a64
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.genesys.catalog.server.controller.api.v0;
package org.genesys.catalog.server.controller.api;
import com.fasterxml.jackson.annotation.JsonView;
import org.genesys.blocks.model.JsonViews;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.genesys.catalog.server.controller.api.v0;
package org.genesys.catalog.server.controller.api;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
......
......@@ -32,7 +32,7 @@ import javax.persistence.TemporalType;
import org.apache.commons.lang.math.RandomUtils;
import org.genesys.blocks.model.AuditedVersionedModel;
import org.genesys2.server.servlet.controller.rest.serialization.MaterialRequestSerializer;
import org.genesys2.server.servlet.controller.api.serialization.MaterialRequestSerializer;
import org.hibernate.annotations.Type;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
......
......@@ -31,7 +31,7 @@ import javax.persistence.TemporalType;
import org.apache.commons.lang.math.RandomUtils;
import org.genesys.blocks.model.AuditedVersionedModel;
import org.genesys2.server.servlet.controller.rest.serialization.MaterialSubRequestSerializer;
import org.genesys2.server.servlet.controller.api.serialization.MaterialSubRequestSerializer;
import org.hibernate.annotations.Type;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
......
......@@ -26,7 +26,7 @@ import java.util.Locale;
import javax.persistence.*;
import org.genesys.blocks.model.BasicModel;
import org.genesys2.server.servlet.controller.rest.serialization.CountrySerializer;
import org.genesys2.server.servlet.controller.api.serialization.CountrySerializer;
import org.hibernate.annotations.Type;
import com.fasterxml.jackson.databind.JsonNode;
......
......@@ -42,7 +42,7 @@ import org.apache.commons.lang3.StringUtils;
import org.genesys.blocks.model.BasicModel;
import org.genesys.blocks.model.EntityId;
import org.genesys.blocks.security.model.AclAwareModel;
import org.genesys2.server.servlet.controller.rest.serialization.FaoInstituteSerializer;
import org.genesys2.server.servlet.controller.api.serialization.FaoInstituteSerializer;
@Cacheable
@Entity
......
......@@ -35,7 +35,7 @@ import javax.persistence.UniqueConstraint;
import org.genesys.blocks.model.AuditedVersionedModel;
import org.genesys.blocks.security.model.AclAwareModel;
import org.genesys2.server.servlet.controller.rest.serialization.TeamSerializer;
import org.genesys2.server.servlet.controller.api.serialization.TeamSerializer;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
......
......@@ -29,7 +29,7 @@ import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import org.genesys.blocks.security.model.BasicUser;
import org.genesys2.server.model.UserRole;
import org.genesys2.server.servlet.controller.rest.serialization.UserSerializer;
import org.genesys2.server.servlet.controller.api.serialization.UserSerializer;
@Cacheable
@Entity
......
......@@ -48,9 +48,9 @@ import org.genesys2.server.model.impl.Crop;
import org.genesys2.server.model.impl.FaoInstitute;
import org.genesys2.server.model.impl.Organization;
import org.genesys2.server.service.impl.FilterHandler.AppliedFilters;
import org.genesys2.server.servlet.controller.api.model.AccessionHeaderJson;
import org.genesys2.server.service.impl.NoSuchAccessionException;
import org.genesys2.server.service.impl.NonUniqueAccessionException;
import org.genesys2.server.servlet.controller.rest.model.AccessionHeaderJson;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
......
......@@ -91,7 +91,7 @@ import org.genesys2.server.service.HtmlSanitizer;
import org.genesys2.server.service.OrganizationService;
import org.genesys2.server.service.TaxonomyService;
import org.genesys2.server.service.impl.FilterHandler.AppliedFilters;
import org.genesys2.server.servlet.controller.rest.model.AccessionHeaderJson;
import org.genesys2.server.servlet.controller.api.model.AccessionHeaderJson;
import org.genesys2.util.NumberUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
......
......@@ -43,8 +43,8 @@ import org.genesys2.server.persistence.domain.FaoInstituteRepository;
import org.genesys2.server.service.GeoService;
import org.genesys2.server.service.TaxonomyService;
import org.genesys2.server.service.worker.AccessionOpResponse.UpsertResult;
import org.genesys2.server.servlet.controller.rest.PleaseRetryException;
import org.genesys2.server.servlet.controller.rest.model.AccessionHeaderJson;
import org.genesys2.server.servlet.controller.api.PleaseRetryException;
import org.genesys2.server.servlet.controller.api.model.AccessionHeaderJson;
import org.genesys2.util.PDCICalculator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
**/
package org.genesys2.server.servlet.controller.rest;
package org.genesys2.server.servlet.controller.api;
public class ExceptionJson {
public String error;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
**/
package org.genesys2.server.servlet.controller.rest;
package org.genesys2.server.servlet.controller.api;
import java.util.ArrayList;
import java.util.List;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
**/
package org.genesys2.server.servlet.controller.rest;
package org.genesys2.server.servlet.controller.api;
import java.util.Collection;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.genesys2.server.servlet.controller.rest;
package org.genesys2.server.servlet.controller.api;
import org.genesys2.server.exception.InvalidApiUsageException;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
**/
package org.genesys2.server.servlet.controller.rest;
package org.genesys2.server.servlet.controller.api;
import java.io.IOException;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
**/
package org.genesys2.server.servlet.controller.rest.model;
package org.genesys2.server.servlet.controller.api.model;
public class AccessionAliasJson {
public String name;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
**/
package org.genesys2.server.servlet.controller.rest.model;
package org.genesys2.server.servlet.controller.api.model;
import java.text.MessageFormat;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
**/
package org.genesys2.server.servlet.controller.rest.model;
package org.genesys2.server.servlet.controller.api.model;
import java.util.List;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
**/
package org.genesys2.server.servlet.controller.rest.model;
package org.genesys2.server.servlet.controller.api.model;
import java.util.ArrayList;
import java.util.Collection;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
**/
package org.genesys2.server.servlet.controller.rest.model;
package org.genesys2.server.servlet.controller.api.model;
import java.util.ArrayList;
import java.util.Collection;
......
package org.genesys2.server.servlet.controller.rest.model;
package org.genesys2.server.servlet.controller.api.model;
public class GeoJsData {
......
package org.genesys2.server.servlet.controller.rest.model;
package org.genesys2.server.servlet.controller.api.model;
import java.util.Set;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
**/
package org.genesys2.server.servlet.controller.rest.serialization;
package org.genesys2.server.servlet.controller.api.serialization;
import java.io.IOException;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
**/
package org.genesys2.server.servlet.controller.rest.serialization;
package org.genesys2.server.servlet.controller.api.serialization;
import java.io.IOException;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
**/
package org.genesys2.server.servlet.controller.rest.serialization;
package org.genesys2.server.servlet.controller.api.serialization;
import java.io.IOException;
import java.util.List;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
**/
package org.genesys2.server.servlet.controller.rest.serialization;
package org.genesys2.server.servlet.controller.api.serialization;
import java.io.IOException;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
**/
package org.genesys2.server.servlet.controller.rest.serialization;
package org.genesys2.server.servlet.controller.api.serialization;
import java.io.IOException;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
**/
package org.genesys2.server.servlet.controller.rest.serialization;
package org.genesys2.server.servlet.controller.api.serialization;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
**/
package org.genesys2.server.servlet.controller.rest.api.v0;
package org.genesys2.server.servlet.controller.api.v0;
import java.io.IOException;
import java.util.ArrayList;
......@@ -45,10 +45,10 @@ import org.genesys2.server.service.impl.RESTApiValueException;
import org.genesys2.server.service.impl.SearchException;
import org.genesys2.server.service.worker.AccessionOpResponse;
import org.genesys2.server.service.worker.AccessionOpResponse.UpsertResult;
import org.genesys2.server.servlet.controller.api.PleaseRetryException;
import org.genesys2.server.servlet.controller.api.RestController;
import org.genesys2.server.servlet.controller.api.model.AccessionHeaderJson;
import org.genesys2.server.service.worker.AccessionUploader;
import org.genesys2.server.servlet.controller.rest.PleaseRetryException;
import org.genesys2.server.servlet.controller.rest.RestController;
import org.genesys2.server.servlet.controller.rest.model.AccessionHeaderJson;
import org.genesys2.spring.ResourceNotFoundException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.CannotAcquireLockException;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
**/
package org.genesys2.server.servlet.controller.rest.api.v0;
package org.genesys2.server.servlet.controller.api.v0;
import java.util.ArrayList;
import java.util.HashMap;
......@@ -22,7 +22,7 @@ import java.util.List;
import java.util.Set;
import org.genesys2.server.service.MappingService;
import org.genesys2.server.servlet.controller.rest.RestController;
import org.genesys2.server.servlet.controller.api.RestController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.Cache;
import org.springframework.cache.CacheManager;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
**/
package org.genesys2.server.servlet.controller.rest.api.v0;
package org.genesys2.server.servlet.controller.api.v0;
import java.util.List;
......@@ -31,9 +31,9 @@ import org.genesys2.server.model.impl.CropTaxonomy;
import org.genesys2.server.service.CropService;
import org.genesys2.server.service.GenesysService;
import org.genesys2.server.service.TraitService;
import org.genesys2.server.servlet.controller.rest.ModelValidationException;
import org.genesys2.server.servlet.controller.rest.OAuth2Cleanup;
import org.genesys2.server.servlet.controller.rest.RestController;
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.genesys2.spring.ResourceNotFoundException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.i18n.LocaleContextHolder;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
**/
package org.genesys2.server.servlet.controller.rest.api.v0;
package org.genesys2.server.servlet.controller.api.v0;
import java.io.IOException;
import java.text.MessageFormat;
......@@ -47,9 +47,9 @@ import org.genesys2.server.service.GenesysService;
import org.genesys2.server.service.InstituteService;
import org.genesys2.server.service.TraitService;
import org.genesys2.server.service.impl.NonUniqueAccessionException;
import org.genesys2.server.servlet.controller.rest.ModelValidationException;
import org.genesys2.server.servlet.controller.rest.OAuth2Cleanup;
import org.genesys2.server.servlet.controller.rest.RestController;
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.genesys2.spring.ResourceNotFoundException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
......
package org.genesys2.server.servlet.controller.rest.api.v0;
package org.genesys2.server.servlet.controller.api.v0;
import java.util.ArrayList;
import java.util.List;
......@@ -6,8 +6,8 @@ import java.util.List;
import org.genesys2.server.model.impl.GeoRegion;
import org.genesys2.server.persistence.domain.CountryRepository;
import org.genesys2.server.service.GeoRegionService;
import org.genesys2.server.servlet.controller.rest.RestController;
import org.genesys2.server.servlet.controller.rest.model.GeoJsData;
import org.genesys2.server.servlet.controller.api.RestController;
import org.genesys2.server.servlet.controller.api.model.GeoJsData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.MessageSource;
import org.springframework.context.i18n.LocaleContextHolder;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
**/
package org.genesys2.server.servlet.controller.rest.api.v0;
package org.genesys2.server.servlet.controller.api.v0;
import java.io.IOException;
import java.util.List;
......@@ -35,7 +35,7 @@ import org.genesys2.server.service.GenesysService;
import org.genesys2.server.service.InstituteFilesService;
import org.genesys2.server.service.InstituteService;
import org.genesys2.server.service.impl.NonUniqueAccessionException;
import org.genesys2.server.servlet.controller.rest.RestController;
import org.genesys2.server.servlet.controller.api.RestController;
import org.genesys2.spring.ResourceNotFoundException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
**/
package org.genesys2.server.servlet.controller.rest.api.v0;
package org.genesys2.server.servlet.controller.api.v0;
import java.util.Collection;
import java.util.HashMap;
......@@ -34,10 +34,10 @@ import org.genesys2.server.model.kpi.ExecutionDimension;
import org.genesys2.server.model.kpi.KPIParameter;
import org.genesys2.server.model.kpi.Observation;
import org.genesys2.server.service.KPIService;
import org.genesys2.server.servlet.controller.rest.ModelValidationException;
import org.genesys2.server.servlet.controller.rest.RestController;
import org.genesys2.server.servlet.controller.rest.model.ExecutionDimensionJson;
import org.genesys2.server.servlet.controller.rest.model.ExecutionJson;
import org.genesys2.server.servlet.controller.api.ModelValidationException;
import org.genesys2.server.servlet.controller.api.RestController;
import org.genesys2.server.servlet.controller.api.model.ExecutionDimensionJson;
import org.genesys2.server.servlet.controller.api.model.ExecutionJson;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.PageRequest;
import org.springframework.http.MediaType;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
**/
package org.genesys2.server.servlet.controller.rest.api.v0;
package org.genesys2.server.servlet.controller.api.v0;
import java.util.List;
import java.util.Locale;
......@@ -27,7 +27,7 @@ import org.genesys2.server.service.GenesysService;
import org.genesys2.server.service.GeoService;
import org.genesys2.server.service.InstituteService;
import org.genesys2.server.service.TaxonomyService;
import org.genesys2.server.servlet.controller.rest.RestController;
import org.genesys2.server.servlet.controller.api.RestController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.security.access.prepost.PreAuthorize;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
**/
package org.genesys2.server.servlet.controller.rest.api.v0;
package org.genesys2.server.servlet.controller.api.v0;
import java.io.IOException;
import java.util.HashSet;
......@@ -32,8 +32,8 @@ import org.genesys2.server.model.impl.FaoInstitute;
import org.genesys2.server.model.impl.Organization;
import org.genesys2.server.service.CRMException;
import org.genesys2.server.service.OrganizationService;
import org.genesys2.server.servlet.controller.rest.ModelValidationException;
import org.genesys2.server.servlet.controller.rest.RestController;
import org.genesys2.server.servlet.controller.api.ModelValidationException;
import org.genesys2.server.servlet.controller.api.RestController;
import org.genesys2.spring.ResourceNotFoundException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.PageRequest;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
**/
package org.genesys2.server.servlet.controller.rest.api.v0;
package org.genesys2.server.servlet.controller.api.v0;
import java.util.HashMap;
import java.util.Map;
......@@ -26,7 +26,7 @@ import org.genesys.blocks.security.model.AclSid;
import org.genesys.blocks.security.service.CustomAclService;
import org.genesys2.server.model.impl.User;
import org.genesys2.server.service.UserService;
import org.genesys2.server.servlet.controller.rest.RestController;
import org.genesys2.server.servlet.controller.api.RestController;
import org.genesys2.server.servlet.model.PermissionJson;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
**/
package org.genesys2.server.servlet.controller.rest.api.v0;
package org.genesys2.server.servlet.controller.api.v0;
import org.genesys2.server.model.genesys.MaterialRequest;
import org.genesys2.server.model.genesys.MaterialSubRequest;
......@@ -23,7 +23,7 @@ import org.genesys2.server.service.InstituteService;
import org.genesys2.server.service.RequestService;
import org.genesys2.server.service.RequestService.NoPidException;
import org.genesys2.server.service.impl.EasySMTAException;
import org.genesys2.server.servlet.controller.rest.RestController;
import org.genesys2.server.servlet.controller.api.RestController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
**/
package org.genesys2.server.servlet.controller.rest.api.v0;
package org.genesys2.server.servlet.controller.api.v0;
import java.util.List;
......@@ -35,9 +35,9 @@ import org.genesys2.server.model.impl.Crop;
import org.genesys2.server.service.CropService;
import org.genesys2.server.service.GenesysService;
import org.genesys2.server.service.TraitService;
import org.genesys2.server.servlet.controller.rest.ModelValidationException;
import org.genesys2.server.servlet.controller.rest.OAuth2Cleanup;
import org.genesys2.server.servlet.controller.rest.RestController;
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.data.domain.Page;
import org.springframework.data.domain.PageRequest;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
**/
package org.genesys2.server.servlet.controller.rest.api.v0;
package org.genesys2.server.servlet.controller.api.v0;
import java.util.List;
......@@ -31,9 +31,9 @@ import org.genesys2.server.model.impl.User;
import org.genesys2.server.service.InstituteService;
import org.genesys2.server.service.TeamService;
import org.genesys2.server.service.UserService;
import org.genesys2.server.servlet.controller.rest.ModelValidationException;
import org.genesys2.server.servlet.controller.rest.OAuth2Cleanup;
import org.genesys2.server.servlet.controller.rest.RestController;
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.data.domain.Sort;
import org.springframework.http.MediaType;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
**/
package org.genesys2.server.servlet.controller.rest.api.v0;
package org.genesys2.server.servlet.controller.api.v0;
import java.util.HashMap;
import java.util.Map;
......@@ -27,8 +27,8 @@ import org.genesys2.server.model.impl.User;
import org.genesys2.server.service.EMailVerificationService;
import org.genesys2.server.service.TeamService;
import org.genesys2.server.service.UserService;