Commit 52f3a6bc authored by Matija Obreza's avatar Matija Obreza
Browse files

[maven-release-plugin] prepare release genesys-catalog-1.3

parent 297b6aff
# Changelog
## 1.3 Release
- 24be818 Using `BasicUserService` from app-blocks
- 6351311 Crops model and controller
- 79a31e2 Added `VocabularyTerms` to Descriptor
- 46f1660 Import descriptors to the Catalog
- 15e50e7 Keep descriptors in descriptor list ordered
- 287793f Fixed bug in `listDescriptorListsForCurrentUser`
- 6535cd6 Updates for `SCALE` and `CODED` Descriptors
- ae22921 Updates to Partner API
- 34828a0 Better default sorting for /me/... lists
- 7658c08 Descriptor, DescriptorList, Dataset require unmodifiable owning Partner
- 3a18e0e `DescriptorService` security improved
- 0b4e31a Added API endpoints descriptorlist/add-descriptor and /remove-descriptor
- bddca12 Improved Descriptor List support
- 107ae77 Use `UuidModel` instead of `UuidEntity` class from app-blocks
## 1.2 Release
- 6f17377 Must use old `UuidEntity` class
......
......@@ -20,7 +20,7 @@
<groupId>org.genesys-pgr</groupId>
<artifactId>genesys-catalog-parent</artifactId>
<relativePath>../genesys-catalog-parent/pom.xml</relativePath>
<version>1.3-SNAPSHOT</version>
<version>1.3</version>
</parent>
<artifactId>genesys-catalog-core</artifactId>
<packaging>jar</packaging>
......@@ -290,13 +290,13 @@
<dependency>
<groupId>org.genesys-pgr</groupId>
<artifactId>application-blocks-core</artifactId>
<version>1.4-SNAPSHOT</version>
<version>1.3.1</version>
</dependency>
<dependency>
<groupId>org.genesys-pgr</groupId>
<artifactId>application-blocks-security</artifactId>
<version>1.4-SNAPSHOT</version>
<version>1.3.1</version>
<exclusions>
<exclusion>
<artifactId>hsqldb</artifactId>
......@@ -309,7 +309,7 @@
<dependency>
<groupId>org.genesys-pgr</groupId>
<artifactId>file-repository-core</artifactId>
<version>1.0-SNAPSHOT</version>
<version>0.9</version>
<exclusions>
<exclusion>
<artifactId>application-blocks-core</artifactId>
......
......@@ -55,7 +55,7 @@ public interface DescriptorListService {
* Remove descriptor of descriptorList.
*
* @param descriptorList descriptorList
* @param descriptor removable descriptor
* @param descriptors the descriptors
* @return updated descriptorList
*/
@PreAuthorize("hasRole('ADMINISTRATOR') or hasPermission(#descriptorList, 'WRITE')")
......@@ -65,7 +65,7 @@ public interface DescriptorListService {
* Add new descriptor to descriptorList.
*
* @param descriptorList descriptorList
* @param descriptor new descriptor
* @param descriptors the descriptors
* @return updated descriptorList
*/
@PreAuthorize("hasRole('ADMINISTRATOR') or hasPermission(#descriptorList, 'WRITE')")
......@@ -118,9 +118,9 @@ public interface DescriptorListService {
Page<DescriptorList> listDescriptorLists(DescriptorListFilter filters, Pageable page);
/**
* List Descriptor Lists for current user
* List Descriptor Lists for current user.
*
* @param filters filters
* @param descriptorListFilter the descriptor list filter
* @param page page
* @return page with DescriptorList
*/
......@@ -163,11 +163,11 @@ public interface DescriptorListService {
DescriptorList unpublishDescriptorList(DescriptorList descriptorList);
/**
* Completely update the descriptor list (including order)
*
* @param descriptorList
* @param descriptors
* @return
* Completely update the descriptor list (including order).
*
* @param descriptorList the descriptor list
* @param descriptors the descriptors
* @return the descriptor list
*/
@PreAuthorize("hasRole('ADMINISTRATOR') or hasPermission(#descriptor, 'WRITE')")
DescriptorList setDescriptors(DescriptorList descriptorList, Descriptor[] descriptors);
......
......@@ -19,7 +19,7 @@
<parent>
<groupId>org.genesys-pgr</groupId>
<artifactId>genesys-catalog</artifactId>
<version>1.3-SNAPSHOT</version>
<version>1.3</version>
</parent>
<artifactId>genesys-catalog-parent</artifactId>
<packaging>pom</packaging>
......
......@@ -4,7 +4,7 @@
<groupId>org.genesys-pgr</groupId>
<artifactId>genesys-catalog-parent</artifactId>
<relativePath>../genesys-catalog-parent/pom.xml</relativePath>
<version>1.3-SNAPSHOT</version>
<version>1.3</version>
</parent>
<artifactId>genesys-catalog-server</artifactId>
<packaging>war</packaging>
......@@ -93,7 +93,7 @@
<dependency>
<groupId>org.genesys-pgr</groupId>
<artifactId>genesys-catalog-core</artifactId>
<version>1.3-SNAPSHOT</version>
<version>1.3</version>
</dependency>
<dependency>
<groupId>org.springframework.security.oauth</groupId>
......@@ -166,7 +166,7 @@
<dependency>
<groupId>org.genesys-pgr</groupId>
<artifactId>genesys-catalog-core</artifactId>
<version>1.3-SNAPSHOT</version>
<version>1.3</version>
<exclusions>
<exclusion>
<artifactId>commons-lang3</artifactId>
......@@ -464,12 +464,12 @@
<dependency>
<groupId>org.genesys-pgr</groupId>
<artifactId>application-blocks-auditlog</artifactId>
<version>1.4-SNAPSHOT</version>
<version>1.3.1</version>
</dependency>
<dependency>
<groupId>org.genesys-pgr</groupId>
<artifactId>application-blocks-security</artifactId>
<version>1.4-SNAPSHOT</version>
<version>1.3.1</version>
<exclusions>
<exclusion>
<artifactId>tomcat-jdbc</artifactId>
......
......@@ -41,12 +41,16 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/**
* The Class DescriptorListController.
*
* @author Matija Obreza
*/
@RestController
@RequestMapping(DescriptorListController.API_BASE)
@PreAuthorize("isAuthenticated()")
public class DescriptorListController {
/** The Constant API_BASE. */
public static final String API_BASE = "/api/v0/descriptorlist";
@Autowired
......@@ -55,6 +59,12 @@ public class DescriptorListController {
@Autowired
private DescriptorListService descriptorListService;
/**
* Gets the descriptor list.
*
* @param uuid the uuid
* @return the descriptor list
*/
@GetMapping(value = "/{UUID}")
public DescriptorList getDescriptorList(@PathVariable("UUID") final UUID uuid) {
final DescriptorList descriptorList = descriptorListService.getDescriptorList(uuid);
......@@ -81,23 +91,52 @@ public class DescriptorListController {
return descriptorListService.unpublishDescriptorList(descriptorList);
}
/**
* Delete descriptor list.
*
* @param uuid the uuid
* @param version the version
* @return the descriptor list
*/
@DeleteMapping(value = "/{UUID},{version}")
public DescriptorList deleteDescriptorList(@PathVariable("UUID") final UUID uuid, @PathVariable("version") final int version) {
return descriptorListService.deleteDescriptorList(descriptorListService.getDescriptorList(uuid, version));
}
/**
* Creates the descriptor list.
*
* @param source the source
* @return the descriptor list
*/
@PostMapping(value = "/create")
public DescriptorList createDescriptorList(@RequestBody final DescriptorList source) {
final DescriptorList descriptorList = descriptorListService.createDescriptorList(source);
return descriptorList;
}
/**
* Update descriptor list.
*
* @param source the source
* @return the descriptor list
*/
@PostMapping(value = "/update")
public DescriptorList updateDescriptorList(@RequestBody final DescriptorList source) {
final DescriptorList descriptorList = descriptorListService.updateDescriptorList(source);
return descriptorList;
}
/**
* List descriptor lists.
*
* @param page the page
* @param pageSize the page size
* @param direction the direction
* @param sort the sort
* @param descriptorListFilter the descriptor list filter
* @return the page
*/
@PostMapping(value = "/list")
public Page<DescriptorList> listDescriptorLists(@RequestParam(name = "p", required = false, defaultValue = "0") final int page,
@RequestParam(name = "l", required = false, defaultValue = "50") final int pageSize,
......@@ -109,10 +148,12 @@ public class DescriptorListController {
/**
* Add descriptor to descriptor list
*
* @param source
* @return
* Add descriptor to descriptor list.
*
* @param uuid the uuid
* @param version the version
* @param descriptorUuids the descriptor uuids
* @return the descriptor list
*/
@PostMapping(value = "/add-descriptors/{UUID},{version}")
public DescriptorList addDescriptor(@PathVariable("UUID") final UUID uuid, @PathVariable("version") final int version, @RequestBody final List<UUID> descriptorUuids) {
......@@ -123,10 +164,12 @@ public class DescriptorListController {
/**
* Set descriptors in the descriptor list
*
* @param source
* @return
* Set descriptors in the descriptor list.
*
* @param uuid the uuid
* @param version the version
* @param descriptorUuids the descriptor uuids
* @return the descriptor list
*/
@PostMapping(value = "/set-descriptors/{UUID},{version}")
public DescriptorList setDescriptor(@PathVariable("UUID") final UUID uuid, @PathVariable("version") final int version, @RequestBody final List<UUID> descriptorUuids) {
......@@ -137,10 +180,12 @@ public class DescriptorListController {
/**
* Remove descriptor from descriptor list
*
* @param source
* @return
* Remove descriptor from descriptor list.
*
* @param uuid the uuid
* @param version the version
* @param descriptorUuids the descriptor uuids
* @return the descriptor list
*/
@PostMapping(value = "/remove-descriptors/{UUID},{version}")
public DescriptorList removeDescriptor(@PathVariable("UUID") final UUID uuid, @PathVariable("version") final int version, @RequestBody final Set<UUID> descriptorUuids) {
......
......@@ -18,7 +18,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.genesys-pgr</groupId>
<artifactId>genesys-catalog</artifactId>
<version>1.3-SNAPSHOT</version>
<version>1.3</version>
<packaging>pom</packaging>
<name>The Genesys Catalog</name>
<description>This is the shared project pom.</description>
......@@ -39,7 +39,7 @@
<connection>scm:https://gitlab.croptrust.org/genesys-pgr/genesys-catalog</connection>
<developerConnection>scm:git:git@gitlab.croptrust.org:genesys-pgr/genesys-catalog.git</developerConnection>
<url>git@gitlab.croptrust.org:genesys-pgr/genesys-catalog.git</url>
<tag>HEAD</tag>
<tag>genesys-catalog-1.3</tag>
</scm>
<issueManagement>
......
Supports Markdown
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