Package org.dspace.submit.migration
Class SubmissionFormsMigrationScriptConfiguration<T extends SubmissionFormsMigration>
java.lang.Object
org.dspace.scripts.configuration.ScriptConfiguration<T>
org.dspace.submit.migration.SubmissionFormsMigrationScriptConfiguration<T>
- All Implemented Interfaces:
Aware,BeanNameAware
public class SubmissionFormsMigrationScriptConfiguration<T extends SubmissionFormsMigration>
extends ScriptConfiguration<T>
Subclass of
SubmissionFormsMigrationCliScriptConfiguration to be use in rest/scripts.xml configuration so
this script is not runnable from REST- Author:
- Maria Verdonck (Atmire) on 05/01/2021
-
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) This method will return if the script is allowed to execute in the given context.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
-
SubmissionFormsMigrationScriptConfiguration
public SubmissionFormsMigrationScriptConfiguration()
-
-
Method Details
-
getDspaceRunnableClass
Description copied from class:ScriptConfigurationGeneric getter for the dspaceRunnableClass- Specified by:
getDspaceRunnableClassin classScriptConfiguration<T extends SubmissionFormsMigration>- Returns:
- the dspaceRunnableClass value of this ScriptConfiguration
-
setDspaceRunnableClass
Description copied from class:ScriptConfigurationGeneric setter for the dspaceRunnableClass- Specified by:
setDspaceRunnableClassin classScriptConfiguration<T extends SubmissionFormsMigration>- Parameters:
dspaceRunnableClass- The dspaceRunnableClass to be set on this IndexDiscoveryScriptConfiguration
-
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 SubmissionFormsMigration>- Returns:
- the options value of this ScriptConfiguration
-
isAllowedToExecute
public boolean isAllowedToExecute(Context context, List<DSpaceCommandLineParameter> commandLineParameters) Description copied from class:ScriptConfigurationThis method will return if the script is allowed to execute in the given context. This is by default set to the currentUser in the context being an admin, however this can be overwritten by each script individually if different rules apply- Overrides:
isAllowedToExecutein classScriptConfiguration<T extends SubmissionFormsMigration>- Parameters:
context- The relevant DSpace contextcommandLineParameters- the parameters that will be used to start the process if known,nullotherwise- Returns:
- A boolean indicating whether the script is allowed to execute or not
-