Class RequestCopyFeature
java.lang.Object
org.dspace.app.rest.authorization.impl.RequestCopyFeature
- All Implemented Interfaces:
AuthorizationFeature
@Component
@AuthorizationFeatureDocumentation(name="canRequestACopy",
description="It can be used to verify if the user can request a copy of a bitstream")
public class RequestCopyFeature
extends Object
implements AuthorizationFeature
The can request a copy feature. It can be used to verify if a copy can be requested of a bitstream or of a bitstream
in an item.
Authorization is granted for a bitstream if the user has no access to the bitstream
and the bitstream is part of an archived item.
Authorization is granted for an item if the user has no access to a bitstream in the item, and the item is archived.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionString[]Return the supported object type according to theRestAddressableModel.getUniqueType()booleanisAuthorized(Context context, BaseObjectRest object) Check if the user is authorized to request a copy of a bitstream belonging to a given itemMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.dspace.app.rest.authorization.AuthorizationFeature
getDescription, getName
-
Field Details
-
NAME
- See Also:
-
-
Constructor Details
-
RequestCopyFeature
public RequestCopyFeature()
-
-
Method Details
-
isAuthorized
Check if the user is authorized to request a copy of a bitstream belonging to a given item- Specified by:
isAuthorizedin interfaceAuthorizationFeature- Parameters:
context- the DSpace Contextobject- the item for which we are requesting a copy- Returns:
- Throws:
SQLException
-
getSupportedTypes
Description copied from interface:AuthorizationFeatureReturn the supported object type according to theRestAddressableModel.getUniqueType()- Specified by:
getSupportedTypesin interfaceAuthorizationFeature- Returns:
- the supported object type, required to be not null
-