Package org.dspace.scripts.configuration
Class ScriptConfiguration<T extends DSpaceRunnable>
- java.lang.Object
-
- org.dspace.scripts.configuration.ScriptConfiguration<T>
-
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware
- Direct Known Subclasses:
CurationScriptConfiguration,HarvestScriptConfiguration,IndexDiscoveryScriptConfiguration,MetadataDeletionScriptConfiguration,MetadataExportScriptConfiguration,MetadataImportScriptConfiguration,RetryFailedOpenUrlTrackerScriptConfiguration,SubmissionFormsMigrationCliScriptConfiguration
public abstract class ScriptConfiguration<T extends DSpaceRunnable> extends Object implements org.springframework.beans.factory.BeanNameAware
This class represents an Abstract class that a ScriptConfiguration can inherit to further implement this and represent a script's configuration
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.commons.cli.OptionsoptionsThe possible options for this script
-
Constructor Summary
Constructors Constructor Description ScriptConfiguration()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description StringgetDescription()Generic getter for the descriptionabstract Class<T>getDspaceRunnableClass()Generic getter for the dspaceRunnableClassStringgetName()Generic getter for the nameabstract org.apache.commons.cli.OptionsgetOptions()The getter for the options of the Scriptabstract booleanisAllowedToExecute(Context context)This method will return if the script is allowed to execute in the given context.voidsetBeanName(String beanName)voidsetDescription(String description)Generic setter for the descriptionabstract voidsetDspaceRunnableClass(Class<T> dspaceRunnableClass)Generic setter for the dspaceRunnableClassvoidsetName(String name)Generic setter for the name
-
-
-
Method Detail
-
getDescription
public String getDescription()
Generic getter for the description- Returns:
- the description value of this ScriptConfiguration
-
setDescription
public void setDescription(String description)
Generic setter for the description- Parameters:
description- The description to be set on this ScriptConfiguration
-
getName
public String getName()
Generic getter for the name- Returns:
- the name value of this ScriptConfiguration
-
setName
public void setName(String name)
Generic setter for the name- Parameters:
name- The name to be set on this ScriptConfiguration
-
getDspaceRunnableClass
public abstract Class<T> getDspaceRunnableClass()
Generic getter for the dspaceRunnableClass- Returns:
- the dspaceRunnableClass value of this ScriptConfiguration
-
setDspaceRunnableClass
public abstract void setDspaceRunnableClass(Class<T> dspaceRunnableClass)
Generic setter for the dspaceRunnableClass- Parameters:
dspaceRunnableClass- The dspaceRunnableClass to be set on this IndexDiscoveryScriptConfiguration
-
isAllowedToExecute
public abstract boolean isAllowedToExecute(Context context)
This 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- Parameters:
context- The relevant DSpace context- Returns:
- A boolean indicating whether the script is allowed to execute or not
-
getOptions
public abstract org.apache.commons.cli.Options getOptions()
The getter for the options of the Script- Returns:
- the options value of this ScriptConfiguration
-
setBeanName
public void setBeanName(String beanName)
- Specified by:
setBeanNamein interfaceorg.springframework.beans.factory.BeanNameAware
-
-