Skip to content

Commit

Permalink
Fetched right files from origin/dtq-dev
Browse files Browse the repository at this point in the history
milanmajchrak committed Jun 19, 2024
1 parent 9349a9a commit b89eb6f
Showing 10 changed files with 19 additions and 347 deletions.
5 changes: 0 additions & 5 deletions dspace-api/src/main/java/org/dspace/app/util/DCInput.java
Original file line number Diff line number Diff line change
@@ -153,11 +153,6 @@ public class DCInput {
*/
private ACL acl = null;

/**
* the computed pattern, null if nothing
*/
private Pattern pattern = null;

/**
* allowed document types
*/
Original file line number Diff line number Diff line change
@@ -300,11 +300,6 @@ public Iterator<Item> findAllRegularItems(Context context) throws SQLException {
return itemDAO.findAllRegularItems(context);
}

@Override
public Iterator<Item> findAllRegularItems(Context context) throws SQLException {
return itemDAO.findAllRegularItems(context);
}

@Override
public Iterator<Item> findBySubmitter(Context context, EPerson eperson) throws SQLException {
return itemDAO.findBySubmitter(context, eperson);
Original file line number Diff line number Diff line change
@@ -224,7 +224,6 @@ private void logReceiveEventException(UsageEvent usageEvent, Exception e) {
for (int x = 1; x <= context.getEvents().size(); x++) {
LOGGER.error(" Context Event " + x + ": " + context.getEvents().get(x));
}
return allowedBundles.stream().anyMatch(bitstreamBundles::contains);
}
}

11 changes: 0 additions & 11 deletions dspace-api/src/test/data/dspaceFolder/config/local.cfg
Original file line number Diff line number Diff line change
@@ -87,17 +87,6 @@ handle.hide.listhandles = false
# Set is to null because of failing some IT
handle.additional.prefixes =

# Whether to enable the DSpace handle resolver endpoints necessary for
# https://github.com/DSpace/Remote-Handle-Resolver
# Defaults to "false" which means these handle resolver endpoints are not available.
handle.remote-resolver.enabled = true

# Whether to enable the DSpace listhandles resolver that lists all available
# handles for this DSpace installation.
# Defaults to "false" which means is possible to obtain the list of handles
# of this DSpace installation, whenever the `handle.remote-resolver.enabled = true`.
handle.hide.listhandles = false

#####################
# LOGLEVEL SETTINGS #
#####################
Original file line number Diff line number Diff line change
@@ -83,7 +83,7 @@ public class EPersonRestRepository extends DSpaceObjectRestRepository<EPerson, E
private ValidatePasswordService validatePasswordService;

@Autowired
private GroupService groupService;
private RegistrationDataService registrationDataService;

@Autowired
private GroupService groupService;
Original file line number Diff line number Diff line change
@@ -71,7 +71,7 @@ public class RequestItemRepository
protected RequestItemConverter requestItemConverter;

@Autowired(required = true)
protected RequestItemEmailNotifier requestItemEmailNotifier;
protected ConfigurationService configurationService;

@Autowired(required = true)
protected RequestItemEmailNotifier requestItemEmailNotifier;
Original file line number Diff line number Diff line change
@@ -19,8 +19,6 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import static org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors.csrf;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
@@ -51,7 +49,6 @@
import org.dspace.app.rest.matcher.EPersonMatcher;
import org.dspace.app.rest.matcher.GroupMatcher;
import org.dspace.app.rest.matcher.HalMatcher;
import org.dspace.app.rest.model.AuthnRest;
import org.dspace.app.rest.model.EPersonRest;
import org.dspace.app.rest.projection.DefaultProjection;
import org.dspace.app.rest.test.AbstractControllerIntegrationTest;
Original file line number Diff line number Diff line change
@@ -733,7 +733,7 @@ public void findBrowseBySubjectItemsWithScopeAsAdmin() throws Exception {
}

@Test
public void findBrowseByTitleItemsWithScope() throws Exception {
public void findBrowseByTitleItems() throws Exception {
context.turnOffAuthorisationSystem();

//** GIVEN **
@@ -763,7 +763,7 @@ public void findBrowseByTitleItemsWithScope() throws Exception {
.build();

//3. An item that has been made private
Item privateItem = ItemBuilder.createItem(context, col2)
Item privateItem = ItemBuilder.createItem(context, col1)
.withTitle("This is a private item")
.withIssueDate("2015-03-12")
.withAuthor("Duck, Donald")
@@ -799,7 +799,6 @@ public void findBrowseByTitleItemsWithScope() throws Exception {
//An anonymous user browses the items in the Browse by item endpoint
//sorted descending by tile
getClient().perform(get("/api/discover/browses/title/items")
.param("scope", String.valueOf(col2.getID()))
.param("sort", "title,desc"))

//** THEN **
@@ -809,14 +808,17 @@ public void findBrowseByTitleItemsWithScope() throws Exception {
.andExpect(content().contentType(contentType))

.andExpect(jsonPath("$.page.size", is(20)))
.andExpect(jsonPath("$.page.totalElements", is(1)))
.andExpect(jsonPath("$.page.totalElements", is(2)))
.andExpect(jsonPath("$.page.totalPages", is(1)))
.andExpect(jsonPath("$.page.number", is(0)))

.andExpect(jsonPath("$._embedded.items",
contains(ItemMatcher.matchItemWithTitleAndDateIssued(publicItem2,
"Public item 2",
"2016-02-13"))))
"2016-02-13"),
ItemMatcher.matchItemWithTitleAndDateIssued(publicItem1,
"Public item 1",
"2017-10-17"))))

//The private and internal items must not be present
.andExpect(jsonPath("$._embedded.items[*].metadata", Matchers.allOf(
Loading

0 comments on commit b89eb6f

Please sign in to comment.