DS-3851 cleanup the BrowsableObject interface

This commit is contained in:
Andrea Bollini
2019-03-12 22:17:22 +01:00
parent 000c47e7a3
commit 3e22142aa7
8 changed files with 0 additions and 115 deletions

View File

@@ -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();
} }

View File

@@ -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;
}
} }

View File

@@ -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;
}
} }

View File

@@ -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;
}
} }

View File

@@ -207,8 +207,4 @@ public class BasicWorkflowItem implements WorkflowItem {
return Constants.WORKFLOWITEM; return Constants.WORKFLOWITEM;
} }
@Override
public String getHandle() {
return null;
}
} }

View File

@@ -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();
}
} }

View File

@@ -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();
}
} }

View File

@@ -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;
}
} }