Interface ScriptService

All Known Implementing Classes:
ScriptServiceImpl

public interface ScriptService
This service will deal with logic to handle DSpaceRunnable objects
  • Method Details

    • 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 wrong
      InstantiationException - If something goes wrong