Package org.dspace.scripts
Class ScriptServiceImpl
java.lang.Object
org.dspace.scripts.ScriptServiceImpl
- All Implemented Interfaces:
ScriptService
The implementation for the
ScriptService-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateDSpaceRunnableForScriptConfiguration(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 returngetScriptConfiguration(String name) This method will return the ScriptConfiguration that has the name that's equal to the name given in the parametersgetScriptConfigurations(Context context) This method will return a list of ScriptConfiguration objects for which the given Context is authorized
-
Constructor Details
-
ScriptServiceImpl
public ScriptServiceImpl()
-
-
Method Details
-
getScriptConfiguration
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
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
-