Package org.dspace.curate
Class CurationScriptConfiguration<T extends Curation>
java.lang.Object
org.dspace.scripts.configuration.ScriptConfiguration<T>
org.dspace.curate.CurationScriptConfiguration<T>
- All Implemented Interfaces:
Aware,BeanNameAware
- Direct Known Subclasses:
CurationCliScriptConfiguration
The
ScriptConfiguration for the Curation script- Author:
- Maria Verdonck (Atmire) on 23/06/2020
-
Field Summary
Fields inherited from class org.dspace.scripts.configuration.ScriptConfiguration
authorizeService, options -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGeneric getter for the dspaceRunnableClassorg.apache.commons.cli.OptionsThe getter for the options of the ScriptbooleanisAllowedToExecute(Context context, List<DSpaceCommandLineParameter> commandLineParameters) Only repository admins or admins of the target object can run Curation script via the scripts and processes endpoints.voidsetDspaceRunnableClass(Class<T> dspaceRunnableClass) Generic setter for the dspaceRunnableClassMethods inherited from class org.dspace.scripts.configuration.ScriptConfiguration
getDescription, getHelpOptions, getName, setBeanName, setDescription, setName
-
Constructor Details
-
CurationScriptConfiguration
public CurationScriptConfiguration()
-
-
Method Details
-
getDspaceRunnableClass
Description copied from class:ScriptConfigurationGeneric getter for the dspaceRunnableClass- Specified by:
getDspaceRunnableClassin classScriptConfiguration<T extends Curation>- Returns:
- the dspaceRunnableClass value of this ScriptConfiguration
-
setDspaceRunnableClass
Description copied from class:ScriptConfigurationGeneric setter for the dspaceRunnableClass- Specified by:
setDspaceRunnableClassin classScriptConfiguration<T extends Curation>- Parameters:
dspaceRunnableClass- The dspaceRunnableClass to be set on this IndexDiscoveryScriptConfiguration
-
isAllowedToExecute
public boolean isAllowedToExecute(Context context, List<DSpaceCommandLineParameter> commandLineParameters) Only repository admins or admins of the target object can run Curation script via the scripts and processes endpoints.- Overrides:
isAllowedToExecutein classScriptConfiguration<T extends Curation>- Parameters:
context- The relevant DSpace contextcommandLineParameters- the parameters that will be used to start the process if known,nullotherwise- Returns:
- true if the currentUser is allowed to run the script with the specified parameters or at least in some case if the parameters are not yet known
-
getOptions
public org.apache.commons.cli.Options getOptions()Description copied from class:ScriptConfigurationThe getter for the options of the Script- Specified by:
getOptionsin classScriptConfiguration<T extends Curation>- Returns:
- the options value of this ScriptConfiguration
-