Package org.dspace.scripts
Class ScriptServiceImpl
- java.lang.Object
-
- org.dspace.scripts.ScriptServiceImpl
-
- All Implemented Interfaces:
ScriptService
public class ScriptServiceImpl extends Object implements ScriptService
The implementation for theScriptService
-
-
Constructor Summary
Constructors Constructor Description ScriptServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DSpaceRunnablecreateDSpaceRunnableForScriptConfiguration(ScriptConfiguration scriptToExecute)This method will create a new instance of the DSpaceRunnable that's linked with this Scriptconfiguration It'll grab the DSpaceRunnable class from the ScriptConfiguration's variables and create a new instance of it to returnScriptConfigurationgetScriptConfiguration(String name)This method will return the ScriptConfiguration that has the name that's equal to the name given in the parametersList<ScriptConfiguration>getScriptConfigurations(Context context)This method will return a list of ScriptConfiguration objects for which the given Context is authorized
-
-
-
Method Detail
-
getScriptConfiguration
public ScriptConfiguration getScriptConfiguration(String name)
Description copied from interface:ScriptServiceThis method will return the ScriptConfiguration that has the name that's equal to the name given in the parameters- Specified by:
getScriptConfigurationin interfaceScriptService- Parameters:
name- The name that the script has to match- Returns:
- The matching ScriptConfiguration
-
getScriptConfigurations
public List<ScriptConfiguration> getScriptConfigurations(Context context)
Description copied from interface:ScriptServiceThis method will return a list of ScriptConfiguration objects for which the given Context is authorized- Specified by:
getScriptConfigurationsin interfaceScriptService- Parameters:
context- The relevant DSpace context- Returns:
- The list of accessible ScriptConfiguration scripts for this context
-
createDSpaceRunnableForScriptConfiguration
public DSpaceRunnable createDSpaceRunnableForScriptConfiguration(ScriptConfiguration scriptToExecute) throws IllegalAccessException, InstantiationException
Description copied from interface:ScriptServiceThis method will create a new instance of the DSpaceRunnable that's linked with this Scriptconfiguration It'll grab the DSpaceRunnable class from the ScriptConfiguration's variables and create a new instance of it to return- Specified by:
createDSpaceRunnableForScriptConfigurationin interfaceScriptService- Parameters:
scriptToExecute- The relevant ScriptConfiguration- Returns:
- The new instance of the DSpaceRunnable class
- Throws:
IllegalAccessException- If something goes wrongInstantiationException- If something goes wrong
-
-