mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-18 23:43:06 +00:00
[TL-249] Javadoc and other small fixes
Including stripping $Revision$ from filter javadoc.
This commit is contained in:
@@ -67,8 +67,8 @@ public class InstallItemServiceImpl implements InstallItemService {
|
|||||||
AuthorizeException {
|
AuthorizeException {
|
||||||
Item item = is.getItem();
|
Item item = is.getItem();
|
||||||
Collection collection = is.getCollection();
|
Collection collection = is.getCollection();
|
||||||
// Get map of filters to use for identifier types
|
// Get map of filters to use for identifier types.
|
||||||
Map<Class<? extends Identifier>, Filter> filters = FilterUtils.getIdentifierFilters("install");
|
Map<Class<? extends Identifier>, Filter> filters = FilterUtils.getIdentifierFilters(false);
|
||||||
try {
|
try {
|
||||||
if (suppliedHandle == null) {
|
if (suppliedHandle == null) {
|
||||||
// Register with the filters we've set up
|
// Register with the filters we've set up
|
||||||
|
@@ -177,8 +177,8 @@ public class WorkspaceItemServiceImpl implements WorkspaceItemService {
|
|||||||
if (DSpaceServicesFactory.getInstance().getConfigurationService()
|
if (DSpaceServicesFactory.getInstance().getConfigurationService()
|
||||||
.getBooleanProperty("identifiers.submission.register", false)) {
|
.getBooleanProperty("identifiers.submission.register", false)) {
|
||||||
try {
|
try {
|
||||||
// Get map of filters to use for identifier types
|
// Get map of filters to use for identifier types, while the item is in progress
|
||||||
Map<Class<? extends Identifier>, Filter> filters = FilterUtils.getIdentifierFilters("workspace");
|
Map<Class<? extends Identifier>, Filter> filters = FilterUtils.getIdentifierFilters(true);
|
||||||
IdentifierServiceFactory.getInstance().getIdentifierService().register(context, item, filters);
|
IdentifierServiceFactory.getInstance().getIdentifierService().register(context, item, filters);
|
||||||
// Look for a DOI and move it to PENDING
|
// Look for a DOI and move it to PENDING
|
||||||
DOI doi = doiService.findDOIByDSpaceObject(context, item);
|
DOI doi = doiService.findDOIByDSpaceObject(context, item);
|
||||||
|
@@ -18,7 +18,6 @@ import org.dspace.core.Context;
|
|||||||
* statement as a property (unlike an operator) and takes no parameters (unlike a condition)
|
* statement as a property (unlike an operator) and takes no parameters (unlike a condition)
|
||||||
*
|
*
|
||||||
* @author Kim Shepherd
|
* @author Kim Shepherd
|
||||||
* @version $Revision$
|
|
||||||
*/
|
*/
|
||||||
public class DefaultFilter implements Filter {
|
public class DefaultFilter implements Filter {
|
||||||
private LogicalStatement statement;
|
private LogicalStatement statement;
|
||||||
|
@@ -61,18 +61,19 @@ public class FilterUtils {
|
|||||||
* Get a map of identifier types and filters to use when creating workspace or archived items
|
* 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
|
* 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.
|
* as some filters should apply to DOI creation but not Handle creation, and so on.
|
||||||
*
|
* The in progress or archived status will be used to load the appropriate filter from configuration
|
||||||
* Status
|
* <p>
|
||||||
* @param status is a suffix used when finding the appropriate filter from configuration
|
* @param inProgress
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public static Map<Class<? extends Identifier>, Filter> getIdentifierFilters(String status) {
|
public static Map<Class<? extends Identifier>, Filter> getIdentifierFilters(boolean inProgress) {
|
||||||
if (status == null) {
|
String configurationSuffix = "install";
|
||||||
status = "install";
|
if (inProgress) {
|
||||||
|
configurationSuffix = "workspace";
|
||||||
}
|
}
|
||||||
Map<Class<? extends Identifier>, Filter> filters = new HashMap<>();
|
Map<Class<? extends Identifier>, Filter> filters = new HashMap<>();
|
||||||
// Put DOI 'can we create DOI on install / workspace?' filter
|
// 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")
|
// A null filter should be handled safely by the identifier provier (default, or "always true")
|
||||||
filters.put(DOI.class, filter);
|
filters.put(DOI.class, filter);
|
||||||
// This won't have an affect until handle providers implement filtering, but is an example of
|
// This won't have an affect until handle providers implement filtering, but is an example of
|
||||||
|
@@ -17,7 +17,6 @@ import org.dspace.core.Context;
|
|||||||
* used as sub-statements in other Filters and Operators.
|
* used as sub-statements in other Filters and Operators.
|
||||||
*
|
*
|
||||||
* @author Kim Shepherd
|
* @author Kim Shepherd
|
||||||
* @version $Revision$
|
|
||||||
*/
|
*/
|
||||||
public interface LogicalStatement {
|
public interface LogicalStatement {
|
||||||
/**
|
/**
|
||||||
|
@@ -12,7 +12,6 @@ package org.dspace.content.logic;
|
|||||||
* defined as spring beans.
|
* defined as spring beans.
|
||||||
*
|
*
|
||||||
* @author Kim Shepherd
|
* @author Kim Shepherd
|
||||||
* @version $Revision$
|
|
||||||
*/
|
*/
|
||||||
public class LogicalStatementException extends RuntimeException {
|
public class LogicalStatementException extends RuntimeException {
|
||||||
|
|
||||||
|
@@ -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
|
* A command-line runner used for testing a logical filter against an item, or all items
|
||||||
*
|
*
|
||||||
* @author Kim Shepherd
|
* @author Kim Shepherd
|
||||||
* @version $Revision$
|
|
||||||
*/
|
*/
|
||||||
public class TestLogicRunner {
|
public class TestLogicRunner {
|
||||||
|
|
||||||
|
@@ -23,7 +23,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
* Abstract class for conditions, to implement the basic getter and setter parameters
|
* Abstract class for conditions, to implement the basic getter and setter parameters
|
||||||
*
|
*
|
||||||
* @author Kim Shepherd
|
* @author Kim Shepherd
|
||||||
* @version $Revision$
|
|
||||||
*/
|
*/
|
||||||
public abstract class AbstractCondition implements Condition {
|
public abstract class AbstractCondition implements Condition {
|
||||||
|
|
||||||
|
@@ -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
|
* A condition to evaluate an item based on how many bitstreams it has in a particular bundle
|
||||||
*
|
*
|
||||||
* @author Kim Shepherd
|
* @author Kim Shepherd
|
||||||
* @version $Revision$
|
|
||||||
*/
|
*/
|
||||||
public class BitstreamCountCondition extends AbstractCondition {
|
public class BitstreamCountCondition extends AbstractCondition {
|
||||||
/**
|
/**
|
||||||
|
@@ -22,7 +22,6 @@ import org.dspace.core.Context;
|
|||||||
* operator is not a condition but also a logical statement.
|
* operator is not a condition but also a logical statement.
|
||||||
*
|
*
|
||||||
* @author Kim Shepherd
|
* @author Kim Shepherd
|
||||||
* @version $Revision$
|
|
||||||
*/
|
*/
|
||||||
public interface Condition extends LogicalStatement {
|
public interface Condition extends LogicalStatement {
|
||||||
|
|
||||||
|
@@ -23,7 +23,6 @@ import org.dspace.core.Context;
|
|||||||
* if the item belongs to any of them.
|
* if the item belongs to any of them.
|
||||||
*
|
*
|
||||||
* @author Kim Shepherd
|
* @author Kim Shepherd
|
||||||
* @version $Revision$
|
|
||||||
*/
|
*/
|
||||||
public class InCollectionCondition extends AbstractCondition {
|
public class InCollectionCondition extends AbstractCondition {
|
||||||
private static Logger log = LogManager.getLogger(InCollectionCondition.class);
|
private static Logger log = LogManager.getLogger(InCollectionCondition.class);
|
||||||
|
@@ -24,7 +24,6 @@ import org.dspace.core.Context;
|
|||||||
* if the item belongs to any of them.
|
* if the item belongs to any of them.
|
||||||
*
|
*
|
||||||
* @author Kim Shepherd
|
* @author Kim Shepherd
|
||||||
* @version $Revision$
|
|
||||||
*/
|
*/
|
||||||
public class InCommunityCondition extends AbstractCondition {
|
public class InCommunityCondition extends AbstractCondition {
|
||||||
private final static Logger log = LogManager.getLogger();
|
private final static Logger log = LogManager.getLogger();
|
||||||
|
@@ -17,7 +17,6 @@ import org.dspace.core.Context;
|
|||||||
* A condition that returns true if the item is archived
|
* A condition that returns true if the item is archived
|
||||||
*
|
*
|
||||||
* @author Kim Shepherd
|
* @author Kim Shepherd
|
||||||
* @version $Revision$
|
|
||||||
*/
|
*/
|
||||||
public class IsArchivedCondition extends AbstractCondition {
|
public class IsArchivedCondition extends AbstractCondition {
|
||||||
private final static Logger log = LogManager.getLogger();
|
private final static Logger log = LogManager.getLogger();
|
||||||
|
@@ -17,7 +17,6 @@ import org.dspace.core.Context;
|
|||||||
* A condition that returns true if the item is withdrawn
|
* A condition that returns true if the item is withdrawn
|
||||||
*
|
*
|
||||||
* @author Kim Shepherd
|
* @author Kim Shepherd
|
||||||
* @version $Revision$
|
|
||||||
*/
|
*/
|
||||||
public class IsWithdrawnCondition extends AbstractCondition {
|
public class IsWithdrawnCondition extends AbstractCondition {
|
||||||
private final static Logger log = LogManager.getLogger();
|
private final static Logger log = LogManager.getLogger();
|
||||||
|
@@ -23,7 +23,6 @@ import org.dspace.core.Context;
|
|||||||
* in a given metadata field
|
* in a given metadata field
|
||||||
*
|
*
|
||||||
* @author Kim Shepherd
|
* @author Kim Shepherd
|
||||||
* @version $Revision$
|
|
||||||
*/
|
*/
|
||||||
public class MetadataValueMatchCondition extends AbstractCondition {
|
public class MetadataValueMatchCondition extends AbstractCondition {
|
||||||
|
|
||||||
|
@@ -23,7 +23,6 @@ import org.dspace.core.Context;
|
|||||||
* in a given metadata field
|
* in a given metadata field
|
||||||
*
|
*
|
||||||
* @author Kim Shepherd
|
* @author Kim Shepherd
|
||||||
* @version $Revision$
|
|
||||||
*/
|
*/
|
||||||
public class MetadataValuesMatchCondition extends AbstractCondition {
|
public class MetadataValuesMatchCondition extends AbstractCondition {
|
||||||
|
|
||||||
|
@@ -25,7 +25,6 @@ import org.dspace.core.Context;
|
|||||||
* can perform the action on a given item
|
* can perform the action on a given item
|
||||||
*
|
*
|
||||||
* @author Kim Shepherd
|
* @author Kim Shepherd
|
||||||
* @version $Revision$
|
|
||||||
*/
|
*/
|
||||||
public class ReadableByGroupCondition extends AbstractCondition {
|
public class ReadableByGroupCondition extends AbstractCondition {
|
||||||
private final static Logger log = LogManager.getLogger();
|
private final static Logger log = LogManager.getLogger();
|
||||||
|
@@ -22,7 +22,6 @@ import org.dspace.core.Context;
|
|||||||
* as a logical result
|
* as a logical result
|
||||||
*
|
*
|
||||||
* @author Kim Shepherd
|
* @author Kim Shepherd
|
||||||
* @version $Revision$
|
|
||||||
*/
|
*/
|
||||||
public abstract class AbstractOperator implements LogicalStatement {
|
public abstract class AbstractOperator implements LogicalStatement {
|
||||||
|
|
||||||
|
@@ -19,7 +19,6 @@ import org.dspace.core.Context;
|
|||||||
* true if all sub-statements return true
|
* true if all sub-statements return true
|
||||||
*
|
*
|
||||||
* @author Kim Shepherd
|
* @author Kim Shepherd
|
||||||
* @version $Revision$
|
|
||||||
*/
|
*/
|
||||||
public class And extends AbstractOperator {
|
public class And extends AbstractOperator {
|
||||||
|
|
||||||
|
@@ -18,7 +18,6 @@ import org.dspace.core.Context;
|
|||||||
* An operator that implements NAND by negating an AND operation
|
* An operator that implements NAND by negating an AND operation
|
||||||
*
|
*
|
||||||
* @author Kim Shepherd
|
* @author Kim Shepherd
|
||||||
* @version $Revision$
|
|
||||||
*/
|
*/
|
||||||
public class Nand extends AbstractOperator {
|
public class Nand extends AbstractOperator {
|
||||||
|
|
||||||
|
@@ -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.
|
* Not can have one sub-statement only, while and, or, nor, ... can have multiple sub-statements.
|
||||||
*
|
*
|
||||||
* @author Kim Shepherd
|
* @author Kim Shepherd
|
||||||
* @version $Revision$
|
|
||||||
*/
|
*/
|
||||||
public class Not implements LogicalStatement {
|
public class Not implements LogicalStatement {
|
||||||
|
|
||||||
|
@@ -19,7 +19,6 @@ import org.dspace.core.Context;
|
|||||||
* true if one or more sub-statements return true
|
* true if one or more sub-statements return true
|
||||||
*
|
*
|
||||||
* @author Kim Shepherd
|
* @author Kim Shepherd
|
||||||
* @version $Revision$
|
|
||||||
*/
|
*/
|
||||||
public class Or extends AbstractOperator {
|
public class Or extends AbstractOperator {
|
||||||
|
|
||||||
|
@@ -106,6 +106,10 @@ public interface IdentifierService {
|
|||||||
void register(Context context, DSpaceObject dso) throws AuthorizeException, SQLException, IdentifierException;
|
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 context The relevant DSpace Context.
|
||||||
* @param dso DSpace object to be registered
|
* @param dso DSpace object to be registered
|
||||||
* @param typeFilters If a service supports a given Identifier implementation, apply the associated filter
|
* @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;
|
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 context The relevant DSpace Context.
|
||||||
* @param dso DSpace object to be registered
|
* @param dso DSpace object to be registered
|
||||||
* @param type Type of identifier to register
|
* @param type Type of identifier to register
|
||||||
@@ -129,6 +137,10 @@ public interface IdentifierService {
|
|||||||
throws AuthorizeException, SQLException, IdentifierException;
|
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 context The relevant DSpace Context.
|
||||||
* @param dso DSpace object to be registered
|
* @param dso DSpace object to be registered
|
||||||
* @param type Type of identifier to register
|
* @param type Type of identifier to register
|
||||||
|
Reference in New Issue
Block a user