DS-3851 Configurable Workflow endpoints

This commit is contained in:
Luigi Andrea Pascarelli
2018-08-27 20:20:24 +02:00
committed by Andrea Bollini
parent c0066d2a2f
commit 25e3a69b8f
98 changed files with 2470 additions and 284 deletions

View File

@@ -12,6 +12,8 @@ import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.UUID;
import javax.persistence.Cacheable;
import javax.persistence.CascadeType;
import javax.persistence.Column;
@@ -25,6 +27,7 @@ import javax.persistence.Table;
import javax.persistence.Transient;
import org.dspace.authorize.AuthorizeException;
import org.dspace.browse.BrowsableDSpaceObject;
import org.dspace.content.comparator.NameAscendingComparator;
import org.dspace.content.factory.ContentServiceFactory;
import org.dspace.content.service.CollectionService;
@@ -52,7 +55,7 @@ import org.hibernate.proxy.HibernateProxyHelper;
@Table(name = "collection")
@Cacheable
@org.hibernate.annotations.Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE, include = "non-lazy")
public class Collection extends DSpaceObject implements DSpaceObjectLegacySupport {
public class Collection extends DSpaceObject implements DSpaceObjectLegacySupport, BrowsableDSpaceObject<UUID> {
@Column(name = "collection_id", insertable = false, updatable = false)
private Integer legacyId;
@@ -347,10 +350,26 @@ public class Collection extends DSpaceObject implements DSpaceObjectLegacySuppor
return legacyId;
}
private CollectionService getCollectionService() {
public CollectionService getCollectionService() {
if (collectionService == null) {
collectionService = ContentServiceFactory.getInstance().getCollectionService();
}
return collectionService;
}
@Override
public String getTypeText() {
return Constants.typeText[Constants.COLLECTION];
}
@Override
public boolean isArchived() {
return true;
}
@Override
public boolean isDiscoverable() {
return true;
}
}