Class ScriptConfiguration<T extends DSpaceRunnable>

    • Field Detail

      • options

        protected org.apache.commons.cli.Options options
        The possible options for this script
    • Constructor Detail

      • ScriptConfiguration

        public ScriptConfiguration()
    • Method Detail

      • getDescription

        public String getDescription()
        Generic getter for the description
        Returns:
        the description value of this ScriptConfiguration
      • setDescription

        public void setDescription​(String description)
        Generic setter for the description
        Parameters:
        description - The description to be set on this ScriptConfiguration
      • getName

        public String getName()
        Generic getter for the name
        Returns:
        the name value of this ScriptConfiguration
      • setName

        public void setName​(String name)
        Generic setter for the name
        Parameters:
        name - The name to be set on this ScriptConfiguration
      • getDspaceRunnableClass

        public abstract Class<T> getDspaceRunnableClass()
        Generic getter for the dspaceRunnableClass
        Returns:
        the dspaceRunnableClass value of this ScriptConfiguration
      • setDspaceRunnableClass

        public abstract void setDspaceRunnableClass​(Class<T> dspaceRunnableClass)
        Generic setter for the dspaceRunnableClass
        Parameters:
        dspaceRunnableClass - The dspaceRunnableClass to be set on this IndexDiscoveryScriptConfiguration
      • isAllowedToExecute

        public boolean isAllowedToExecute​(Context context,
                                          List<DSpaceCommandLineParameter> commandLineParameters)
        This method will return if the script is allowed to execute in the given context. This is by default set to the currentUser in the context being an admin, however this can be overwritten by each script individually if different rules apply
        Parameters:
        context - The relevant DSpace context
        commandLineParameters - the parameters that will be used to start the process if known, null otherwise
        Returns:
        A boolean indicating whether the script is allowed to execute or not
      • getOptions

        public abstract org.apache.commons.cli.Options getOptions()
        The getter for the options of the Script
        Returns:
        the options value of this ScriptConfiguration
      • getHelpOptions

        public org.apache.commons.cli.Options getHelpOptions()
        The getter for the options of the Script (help informations)
        Returns:
        the options value of this ScriptConfiguration for help
      • setBeanName

        public void setBeanName​(String beanName)
        Specified by:
        setBeanName in interface org.springframework.beans.factory.BeanNameAware