Package org.dspace.scripts.service
Interface ScriptService
- All Known Implementing Classes:
ScriptServiceImpl
public interface ScriptService
This service will deal with logic to handle DSpaceRunnable objects
-
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
-
Method Details
-
getScriptConfiguration
This method will return the ScriptConfiguration that has the name that's equal to the name given in the parameters- Parameters:
name- The name that the script has to match- Returns:
- The matching ScriptConfiguration
-
getScriptConfigurations
This method will return a list of ScriptConfiguration objects for which the given Context is authorized- Parameters:
context- The relevant DSpace context- Returns:
- The list of accessible ScriptConfiguration scripts for this context
-
createDSpaceRunnableForScriptConfiguration
DSpaceRunnable createDSpaceRunnableForScriptConfiguration(ScriptConfiguration scriptToExecute) throws IllegalAccessException, InstantiationException 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 return- Parameters:
scriptToExecute- The relevant ScriptConfiguration- Returns:
- The new instance of the DSpaceRunnable class
- Throws:
IllegalAccessException- If something goes wrongInstantiationException- If something goes wrong
-