[TL-249] Javadoc and other small fixes

Including stripping $Revision$ from filter javadoc.
This commit is contained in:
Kim Shepherd
2023-02-08 17:03:13 +13:00
parent 555363e9b7
commit c4af5f2bff
23 changed files with 24 additions and 30 deletions

View File

@@ -67,8 +67,8 @@ public class InstallItemServiceImpl implements InstallItemService {
AuthorizeException {
Item item = is.getItem();
Collection collection = is.getCollection();
// Get map of filters to use for identifier types
Map<Class<? extends Identifier>, Filter> filters = FilterUtils.getIdentifierFilters("install");
// Get map of filters to use for identifier types.
Map<Class<? extends Identifier>, Filter> filters = FilterUtils.getIdentifierFilters(false);
try {
if (suppliedHandle == null) {
// Register with the filters we've set up

View File

@@ -177,8 +177,8 @@ public class WorkspaceItemServiceImpl implements WorkspaceItemService {
if (DSpaceServicesFactory.getInstance().getConfigurationService()
.getBooleanProperty("identifiers.submission.register", false)) {
try {
// Get map of filters to use for identifier types
Map<Class<? extends Identifier>, Filter> filters = FilterUtils.getIdentifierFilters("workspace");
// Get map of filters to use for identifier types, while the item is in progress
Map<Class<? extends Identifier>, Filter> filters = FilterUtils.getIdentifierFilters(true);
IdentifierServiceFactory.getInstance().getIdentifierService().register(context, item, filters);
// Look for a DOI and move it to PENDING
DOI doi = doiService.findDOIByDSpaceObject(context, item);

View File

@@ -18,7 +18,6 @@ import org.dspace.core.Context;
* statement as a property (unlike an operator) and takes no parameters (unlike a condition)
*
* @author Kim Shepherd
* @version $Revision$
*/
public class DefaultFilter implements Filter {
private LogicalStatement statement;

View File

@@ -61,18 +61,19 @@ public class FilterUtils {
* Get a map of identifier types and filters to use when creating workspace or archived items
* This is used by services installing new archived or workspace items to filter by identifier type
* as some filters should apply to DOI creation but not Handle creation, and so on.
*
* Status
* @param status is a suffix used when finding the appropriate filter from configuration
* The in progress or archived status will be used to load the appropriate filter from configuration
* <p>
* @param inProgress
* @return
*/
public static Map<Class<? extends Identifier>, Filter> getIdentifierFilters(String status) {
if (status == null) {
status = "install";
public static Map<Class<? extends Identifier>, Filter> getIdentifierFilters(boolean inProgress) {
String configurationSuffix = "install";
if (inProgress) {
configurationSuffix = "workspace";
}
Map<Class<? extends Identifier>, Filter> filters = new HashMap<>();
// Put DOI 'can we create DOI on install / workspace?' filter
Filter filter = FilterUtils.getFilterFromConfiguration("identifiers.submission.filter." + status);
Filter filter = FilterUtils.getFilterFromConfiguration("identifiers.submission.filter." + configurationSuffix);
// A null filter should be handled safely by the identifier provier (default, or "always true")
filters.put(DOI.class, filter);
// This won't have an affect until handle providers implement filtering, but is an example of

View File

@@ -17,7 +17,6 @@ import org.dspace.core.Context;
* used as sub-statements in other Filters and Operators.
*
* @author Kim Shepherd
* @version $Revision$
*/
public interface LogicalStatement {
/**

View File

@@ -12,7 +12,6 @@ package org.dspace.content.logic;
* defined as spring beans.
*
* @author Kim Shepherd
* @version $Revision$
*/
public class LogicalStatementException extends RuntimeException {

View File

@@ -33,7 +33,6 @@ import org.dspace.services.factory.DSpaceServicesFactory;
* A command-line runner used for testing a logical filter against an item, or all items
*
* @author Kim Shepherd
* @version $Revision$
*/
public class TestLogicRunner {

View File

@@ -23,7 +23,6 @@ import org.springframework.beans.factory.annotation.Autowired;
* Abstract class for conditions, to implement the basic getter and setter parameters
*
* @author Kim Shepherd
* @version $Revision$
*/
public abstract class AbstractCondition implements Condition {

View File

@@ -18,7 +18,6 @@ import org.dspace.core.Context;
* A condition to evaluate an item based on how many bitstreams it has in a particular bundle
*
* @author Kim Shepherd
* @version $Revision$
*/
public class BitstreamCountCondition extends AbstractCondition {
/**

View File

@@ -22,7 +22,6 @@ import org.dspace.core.Context;
* operator is not a condition but also a logical statement.
*
* @author Kim Shepherd
* @version $Revision$
*/
public interface Condition extends LogicalStatement {

View File

@@ -23,7 +23,6 @@ import org.dspace.core.Context;
* if the item belongs to any of them.
*
* @author Kim Shepherd
* @version $Revision$
*/
public class InCollectionCondition extends AbstractCondition {
private static Logger log = LogManager.getLogger(InCollectionCondition.class);

View File

@@ -24,7 +24,6 @@ import org.dspace.core.Context;
* if the item belongs to any of them.
*
* @author Kim Shepherd
* @version $Revision$
*/
public class InCommunityCondition extends AbstractCondition {
private final static Logger log = LogManager.getLogger();

View File

@@ -17,7 +17,6 @@ import org.dspace.core.Context;
* A condition that returns true if the item is archived
*
* @author Kim Shepherd
* @version $Revision$
*/
public class IsArchivedCondition extends AbstractCondition {
private final static Logger log = LogManager.getLogger();

View File

@@ -17,7 +17,6 @@ import org.dspace.core.Context;
* A condition that returns true if the item is withdrawn
*
* @author Kim Shepherd
* @version $Revision$
*/
public class IsWithdrawnCondition extends AbstractCondition {
private final static Logger log = LogManager.getLogger();

View File

@@ -23,7 +23,6 @@ import org.dspace.core.Context;
* in a given metadata field
*
* @author Kim Shepherd
* @version $Revision$
*/
public class MetadataValueMatchCondition extends AbstractCondition {

View File

@@ -23,7 +23,6 @@ import org.dspace.core.Context;
* in a given metadata field
*
* @author Kim Shepherd
* @version $Revision$
*/
public class MetadataValuesMatchCondition extends AbstractCondition {

View File

@@ -25,7 +25,6 @@ import org.dspace.core.Context;
* can perform the action on a given item
*
* @author Kim Shepherd
* @version $Revision$
*/
public class ReadableByGroupCondition extends AbstractCondition {
private final static Logger log = LogManager.getLogger();

View File

@@ -22,7 +22,6 @@ import org.dspace.core.Context;
* as a logical result
*
* @author Kim Shepherd
* @version $Revision$
*/
public abstract class AbstractOperator implements LogicalStatement {

View File

@@ -19,7 +19,6 @@ import org.dspace.core.Context;
* true if all sub-statements return true
*
* @author Kim Shepherd
* @version $Revision$
*/
public class And extends AbstractOperator {

View File

@@ -18,7 +18,6 @@ import org.dspace.core.Context;
* An operator that implements NAND by negating an AND operation
*
* @author Kim Shepherd
* @version $Revision$
*/
public class Nand extends AbstractOperator {

View File

@@ -19,7 +19,6 @@ import org.dspace.core.Context;
* Not can have one sub-statement only, while and, or, nor, ... can have multiple sub-statements.
*
* @author Kim Shepherd
* @version $Revision$
*/
public class Not implements LogicalStatement {

View File

@@ -19,7 +19,6 @@ import org.dspace.core.Context;
* true if one or more sub-statements return true
*
* @author Kim Shepherd
* @version $Revision$
*/
public class Or extends AbstractOperator {

View File

@@ -106,6 +106,10 @@ public interface IdentifierService {
void register(Context context, DSpaceObject dso) throws AuthorizeException, SQLException, IdentifierException;
/**
*
* Register identifiers for a DSO, with a map of logical filters for each Identifier class to apply
* at the time of local registration.
*
* @param context The relevant DSpace Context.
* @param dso DSpace object to be registered
* @param typeFilters If a service supports a given Identifier implementation, apply the associated filter
@@ -117,6 +121,10 @@ public interface IdentifierService {
throws AuthorizeException, SQLException, IdentifierException;
/**
*
* Register identifier(s) for the given DSO just with providers that support that Identifier class, and
* apply the given filter if that provider extends FilteredIdentifierProvider
*
* @param context The relevant DSpace Context.
* @param dso DSpace object to be registered
* @param type Type of identifier to register
@@ -129,6 +137,10 @@ public interface IdentifierService {
throws AuthorizeException, SQLException, IdentifierException;
/**
*
* Register identifier(s) for the given DSO just with providers that support that Identifier class, and
* apply the given filter if that provider extends FilteredIdentifierProvider
*
* @param context The relevant DSpace Context.
* @param dso DSpace object to be registered
* @param type Type of identifier to register