Commit f3500cf1 authored by Matija Obreza's avatar Matija Obreza

Merge branch 'ui-99-remove-licenses-selector-from-subsets' into 'master'

removed rights from subset model

See merge request genesys-pgr/genesys-server!268
parents 64a8e983 b185e85e
...@@ -77,9 +77,6 @@ public class Subset extends UuidModel implements AclAwareModel, SelfCleaning { ...@@ -77,9 +77,6 @@ public class Subset extends UuidModel implements AclAwareModel, SelfCleaning {
@Column(length = 100) @Column(length = 100)
protected String dateCreated; protected String dateCreated;
/** The rights. */
@Column(length = 100)
protected String rights;
/** The wiews code. */ /** The wiews code. */
@Column(name = "wiews_code", length = 8, nullable = false) @Column(name = "wiews_code", length = 8, nullable = false)
...@@ -252,24 +249,6 @@ public class Subset extends UuidModel implements AclAwareModel, SelfCleaning { ...@@ -252,24 +249,6 @@ public class Subset extends UuidModel implements AclAwareModel, SelfCleaning {
this.dateCreated = dateCreated; this.dateCreated = dateCreated;
} }
/**
* Gets the subset rights.
*
* @return the subset rights
*/
public String getRights() {
return rights;
}
/**
* Sets the subset rights.
*
* @param rights the new subset rights
*/
public void setRights(final String rights) {
this.rights = rights;
}
/** /**
* Gets the accessionRefs. * Gets the accessionRefs.
* *
...@@ -284,8 +263,8 @@ public class Subset extends UuidModel implements AclAwareModel, SelfCleaning { ...@@ -284,8 +263,8 @@ public class Subset extends UuidModel implements AclAwareModel, SelfCleaning {
* *
* @param accessionRefs the new accessionRefs * @param accessionRefs the new accessionRefs
*/ */
public void setAccessionRefs(Set<AccessionRef> accessions) { public void setAccessionRefs(Set<AccessionRef> accessionRefs) {
this.accessionRefs = accessions; this.accessionRefs = accessionRefs;
} }
/** /**
......
...@@ -48,8 +48,6 @@ public class SubsetFilter extends UuidModelFilter<SubsetFilter, Subset> { ...@@ -48,8 +48,6 @@ public class SubsetFilter extends UuidModelFilter<SubsetFilter, Subset> {
/** The date created. */ /** The date created. */
public StringFilter dateCreated; public StringFilter dateCreated;
/** The rights. */
public Set<String> rights;
/** Institutes. */ /** Institutes. */
public Set<String> institutes; public Set<String> institutes;
...@@ -83,9 +81,6 @@ public class SubsetFilter extends UuidModelFilter<SubsetFilter, Subset> { ...@@ -83,9 +81,6 @@ public class SubsetFilter extends UuidModelFilter<SubsetFilter, Subset> {
if (dateCreated != null) { if (dateCreated != null) {
and.and(dateCreated.buildQuery(subset.dateCreated)); and.and(dateCreated.buildQuery(subset.dateCreated));
} }
if ((rights != null) && !rights.isEmpty()) {
and.and(subset.rights.in(rights));
}
if (state != null && !state.isEmpty()) { if (state != null && !state.isEmpty()) {
and.and(subset.state.in(state)); and.and(subset.state.in(state));
} }
......
...@@ -178,7 +178,6 @@ public class SubsetServiceImpl implements SubsetService { ...@@ -178,7 +178,6 @@ public class SubsetServiceImpl implements SubsetService {
target.setDescription(source.getDescription()); target.setDescription(source.getDescription());
target.setPublisher(source.getPublisher()); target.setPublisher(source.getPublisher());
target.setDateCreated(source.getDateCreated()); target.setDateCreated(source.getDateCreated());
target.setRights(source.getRights());
target.setUuid(source.getUuid()); target.setUuid(source.getUuid());
target.setDate(source.getDate()); target.setDate(source.getDate());
target.setSource(source.getSource()); target.setSource(source.getSource());
......
...@@ -4439,6 +4439,15 @@ databaseChangeLog: ...@@ -4439,6 +4439,15 @@ databaseChangeLog:
tableName: kpidimension tableName: kpidimension
- changeSet:
id: 1540486364926-1
author: vpavlov
changes:
- dropColumn:
tableName: subset
columnName: rights
# ENABLE AFTER SOME TIME # ENABLE AFTER SOME TIME
# - changeSet: # - changeSet:
# id: 1537463144763-folder # id: 1537463144763-folder
......
...@@ -81,7 +81,6 @@ public class SubsetRestControllerTest extends AbstractApiTest { ...@@ -81,7 +81,6 @@ public class SubsetRestControllerTest extends AbstractApiTest {
private static final String DESCRIPTION_2 = "Subset test description 2"; private static final String DESCRIPTION_2 = "Subset test description 2";
private static final String PUBLISHER = "Test publisher"; private static final String PUBLISHER = "Test publisher";
private static final String DATE_CREATED = "2018-02-01"; private static final String DATE_CREATED = "2018-02-01";
private static final String RIGHTS = "Test rights";
@Rule @Rule
public final JUnitRestDocumentation restDocumentation = new JUnitRestDocumentation("target/generated-snippets"); public final JUnitRestDocumentation restDocumentation = new JUnitRestDocumentation("target/generated-snippets");
...@@ -164,7 +163,6 @@ public class SubsetRestControllerTest extends AbstractApiTest { ...@@ -164,7 +163,6 @@ public class SubsetRestControllerTest extends AbstractApiTest {
.andExpect(jsonPath("$.description", is(DESCRIPTION))) .andExpect(jsonPath("$.description", is(DESCRIPTION)))
.andExpect(jsonPath("$.publisher", is(PUBLISHER))) .andExpect(jsonPath("$.publisher", is(PUBLISHER)))
.andExpect(jsonPath("$.dateCreated", is(DATE_CREATED))) .andExpect(jsonPath("$.dateCreated", is(DATE_CREATED)))
.andExpect(jsonPath("$.rights", is(RIGHTS)))
.andExpect(jsonPath("$.accessionRefs", hasSize(2))); .andExpect(jsonPath("$.accessionRefs", hasSize(2)));
/*@formatter:on*/ /*@formatter:on*/
} }
...@@ -366,7 +364,6 @@ public class SubsetRestControllerTest extends AbstractApiTest { ...@@ -366,7 +364,6 @@ public class SubsetRestControllerTest extends AbstractApiTest {
subset.setDescription(DESCRIPTION); subset.setDescription(DESCRIPTION);
subset.setPublisher(PUBLISHER); subset.setPublisher(PUBLISHER);
subset.setDateCreated(DATE_CREATED); subset.setDateCreated(DATE_CREATED);
subset.setRights(RIGHTS);
subset.setAccessionRefs(setUpAccessions()); subset.setAccessionRefs(setUpAccessions());
......
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