mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-17 15:03:18 +00:00
DS-3851 cleanup the BrowsableObject interface
This commit is contained in:
@@ -8,8 +8,6 @@
|
|||||||
package org.dspace.browse;
|
package org.dspace.browse;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import org.dspace.core.Constants;
|
import org.dspace.core.Constants;
|
||||||
|
|
||||||
@@ -22,32 +20,6 @@ import org.dspace.core.Constants;
|
|||||||
* the Class of the primary key
|
* the Class of the primary key
|
||||||
*/
|
*/
|
||||||
public interface BrowsableObject<PK extends Serializable> {
|
public interface BrowsableObject<PK extends Serializable> {
|
||||||
Map<String, Object> extraInfo = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A map of additional information exposed by the Entity to the browse/retrieve system
|
|
||||||
*
|
|
||||||
* @return a map of extra information, by default an empty map is returned
|
|
||||||
*/
|
|
||||||
default public Map<String, Object> getExtraInfo() {
|
|
||||||
return extraInfo;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @return true if the Entity should be considered finalized (archived in terms of DSpace Item)
|
|
||||||
*/
|
|
||||||
default public boolean isArchived() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @return true if the Entity should be included in the public discovery system (search/browse)
|
|
||||||
*/
|
|
||||||
default public boolean isDiscoverable() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -77,9 +49,4 @@ public interface BrowsableObject<PK extends Serializable> {
|
|||||||
return Constants.typeText[getType()];
|
return Constants.typeText[getType()];
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @return the handle, if any of the object
|
|
||||||
*/
|
|
||||||
public String getHandle();
|
|
||||||
}
|
}
|
||||||
|
@@ -334,14 +334,4 @@ public class Collection extends DSpaceObject implements DSpaceObjectLegacySuppor
|
|||||||
return Constants.typeText[Constants.COLLECTION];
|
return Constants.typeText[Constants.COLLECTION];
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isArchived() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isDiscoverable() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -276,14 +276,4 @@ public class Community extends DSpaceObject implements DSpaceObjectLegacySupport
|
|||||||
return communityService;
|
return communityService;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isArchived() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isDiscoverable() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
@@ -259,24 +259,9 @@ public class WorkspaceItem
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getHandle() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getType() {
|
public int getType() {
|
||||||
return Constants.WORKSPACEITEM;
|
return Constants.WORKSPACEITEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isArchived() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isDiscoverable() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -207,8 +207,4 @@ public class BasicWorkflowItem implements WorkflowItem {
|
|||||||
return Constants.WORKFLOWITEM;
|
return Constants.WORKFLOWITEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getHandle() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -129,18 +129,4 @@ public class ClaimedTask implements ReloadableEntity<Integer>, BrowsableObject<I
|
|||||||
return Constants.WORKFLOW_CLAIMED;
|
return Constants.WORKFLOW_CLAIMED;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isArchived() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isDiscoverable() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getHandle() {
|
|
||||||
return getType() + "-" + getID();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -144,18 +144,4 @@ public class PoolTask implements ReloadableEntity<Integer>, BrowsableObject<Inte
|
|||||||
return Constants.WORKFLOW_POOL;
|
return Constants.WORKFLOW_POOL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isArchived() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isDiscoverable() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getHandle() {
|
|
||||||
return getType() + "-" + getID();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -165,19 +165,4 @@ public class XmlWorkflowItem implements WorkflowItem, ReloadableEntity<Integer>,
|
|||||||
return Constants.WORKFLOWITEM;
|
return Constants.WORKFLOWITEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isArchived() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isDiscoverable() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getHandle() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user