Package org.dspace.scripts.service
Interface ScriptService
-
- All Known Implementing Classes:
ScriptServiceImpl
public interface ScriptServiceThis service will deal with logic to handle DSpaceRunnable objects
-
-
Method Summary
All Methods Instance Methods Abstract 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
ScriptConfiguration getScriptConfiguration(String name)
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
List<ScriptConfiguration> getScriptConfigurations(Context context)
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
-
-