Package org.dspace.app.bulkaccesscontrol
Class BulkAccessControl
java.lang.Object
org.dspace.scripts.DSpaceRunnable<BulkAccessControlScriptConfiguration<BulkAccessControl>>
org.dspace.app.bulkaccesscontrol.BulkAccessControl
- All Implemented Interfaces:
Runnable
- Direct Known Subclasses:
BulkAccessControlCli
public class BulkAccessControl
extends DSpaceRunnable<BulkAccessControlScriptConfiguration<BulkAccessControl>>
Implementation of
DSpaceRunnable to perform a bulk access control via json file.- Author:
- Mohamed Eskander (mohamed.eskander at 4science.it)
-
Nested Class Summary
Nested classes/interfaces inherited from class org.dspace.scripts.DSpaceRunnable
DSpaceRunnable.StepResult -
Field Summary
FieldsFields inherited from class org.dspace.scripts.DSpaceRunnable
commandLine, handler, helpCommandLine -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThis method will return the Configuration that the implementing DSpaceRunnable usesvoidThis method has to be included in every script and this will be the main execution block for the script that'll contain all the logic neededprotected booleanisAuthorized(Context context) protected voidsetEPerson(Context context) Set the eperson in the contextvoidsetup()This method has to be included in every script and handles the setup of the script by parsing the CommandLine and setting the variablesMethods inherited from class org.dspace.scripts.DSpaceRunnable
getEpersonIdentifier, getFileNamesFromInputStreamOptions, initialize, printHelp, run, setEpersonIdentifier
-
Field Details
-
epersonService
-
eperson
-
-
Constructor Details
-
BulkAccessControl
public BulkAccessControl()
-
-
Method Details
-
setup
public void setup() throws org.apache.commons.cli.ParseExceptionDescription copied from class:DSpaceRunnableThis method has to be included in every script and handles the setup of the script by parsing the CommandLine and setting the variables- Specified by:
setupin classDSpaceRunnable<BulkAccessControlScriptConfiguration<BulkAccessControl>>- Throws:
org.apache.commons.cli.ParseException- If something goes wrong
-
internalRun
Description copied from class:DSpaceRunnableThis method has to be included in every script and this will be the main execution block for the script that'll contain all the logic needed- Specified by:
internalRunin classDSpaceRunnable<BulkAccessControlScriptConfiguration<BulkAccessControl>>- Throws:
Exception- If something goes wrong
-
setEPerson
Set the eperson in the context- Parameters:
context- the context- Throws:
SQLException- if database error
-
isAuthorized
-
getScriptConfiguration
Description copied from class:DSpaceRunnableThis method will return the Configuration that the implementing DSpaceRunnable uses- Specified by:
getScriptConfigurationin classDSpaceRunnable<BulkAccessControlScriptConfiguration<BulkAccessControl>>- Returns:
- The
ScriptConfigurationthat this implementing DspaceRunnable uses
-