mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-16 14:33:09 +00:00
Merged dspace/master into configurable_entities
This commit is contained in:
@@ -33,6 +33,7 @@ import org.dspace.authorize.service.AuthorizeService;
|
||||
import org.dspace.authorize.service.ResourcePolicyService;
|
||||
import org.dspace.content.authority.Choices;
|
||||
import org.dspace.content.dao.ItemDAO;
|
||||
import org.dspace.content.factory.ContentServiceFactory;
|
||||
import org.dspace.content.service.BitstreamFormatService;
|
||||
import org.dspace.content.service.BitstreamService;
|
||||
import org.dspace.content.service.BundleService;
|
||||
@@ -58,6 +59,7 @@ import org.dspace.identifier.service.IdentifierService;
|
||||
import org.dspace.services.ConfigurationService;
|
||||
import org.dspace.versioning.service.VersioningService;
|
||||
import org.dspace.workflow.WorkflowItemService;
|
||||
import org.dspace.workflow.factory.WorkflowServiceFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
/**
|
||||
@@ -1123,6 +1125,16 @@ prevent the generation of resource policy entry values with null dspace_object a
|
||||
if (ownCollection != null) {
|
||||
return ownCollection;
|
||||
} else {
|
||||
InProgressSubmission inprogress = ContentServiceFactory.getInstance().getWorkspaceItemService()
|
||||
.findByItem(context,
|
||||
item);
|
||||
if (inprogress == null) {
|
||||
inprogress = WorkflowServiceFactory.getInstance().getWorkflowItemService().findByItem(context, item);
|
||||
}
|
||||
|
||||
if (inprogress != null) {
|
||||
return inprogress.getCollection();
|
||||
}
|
||||
// is a template item?
|
||||
return item.getTemplateItemOf();
|
||||
}
|
||||
@@ -1251,6 +1263,12 @@ prevent the generation of resource policy entry values with null dspace_object a
|
||||
return itemDAO.countItems(context, false, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int countArchivedItems(Context context) throws SQLException {
|
||||
// return count of items in archive and also not withdrawn
|
||||
return itemDAO.countItems(context, true, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int countWithdrawnItems(Context context) throws SQLException {
|
||||
// return count of items that are not in archive and withdrawn
|
||||
@@ -1342,6 +1360,7 @@ prevent the generation of resource policy entry values with null dspace_object a
|
||||
List<MetadataValue> fullMetadataValueList = new LinkedList<>();
|
||||
if (enableVirtualMetadata) {
|
||||
fullMetadataValueList.addAll(getRelationshipMetadata(item, true));
|
||||
|
||||
}
|
||||
fullMetadataValueList.addAll(dbMetadataValues);
|
||||
|
||||
|
Reference in New Issue
Block a user