Class ScriptPluginProviderLoader

    • Field Detail

      • SUPPORTS_RESOURCES_PLUGIN_VERSION

        public static final VersionCompare SUPPORTS_RESOURCES_PLUGIN_VERSION
      • SUPPORTED_PLUGIN_VERSIONS

        public static final java.util.List<java.lang.String> SUPPORTED_PLUGIN_VERSIONS
    • Constructor Detail

      • ScriptPluginProviderLoader

        public ScriptPluginProviderLoader​(java.io.File file,
                                          java.io.File cachedir)
    • Method Detail

      • canLoadForService

        public boolean canLoadForService​(FrameworkSupportService service)
        Specified by:
        canLoadForService in interface ProviderLoader
        Parameters:
        service - service
        Returns:
        true if the service can be used to load with this loader, e.g. if it implements any necessary interface
      • openResourceStreamFor

        public java.io.InputStream openResourceStreamFor​(java.lang.String name)
                                                  throws PluginException,
                                                         java.io.IOException
        Description copied from interface: PluginResourceLoader
        Open a stream to load a resource
        Specified by:
        openResourceStreamFor in interface PluginResourceLoader
        Parameters:
        name - resource path and name
        Returns:
        input stream for the resources, must be closed when finished, or null if the plugin does not support resources
        Throws:
        PluginException - if a path is requested that was not in the plugin
        java.io.IOException - if an error occurs
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • getDefaultMergeEnvVars

        public static boolean getDefaultMergeEnvVars​(PluginMeta pluginMeta)
        Return default value for "mergeEnvironment" based on plugin type version
        Parameters:
        pluginMeta -
        Returns:
      • supportsResources

        public static boolean supportsResources​(PluginMeta pluginMeta)
        Return true if the plugin version supports resources
        Parameters:
        pluginMeta -
        Returns:
      • getPluginResourcesList

        public java.util.List<java.lang.String> getPluginResourcesList()
                                                                throws java.io.IOException
        Throws:
        java.io.IOException
      • getResourcesBasePath

        public java.lang.String getResourcesBasePath()
                                              throws java.io.IOException
        Throws:
        java.io.IOException
      • getResourcesBasePath

        public static java.lang.String getResourcesBasePath​(PluginMeta metadata)
                                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • getFilename

        public java.lang.String getFilename()
        Specified by:
        getFilename in interface PluginMetadata
        Returns:
        Name of file on disk
      • getFile

        public java.io.File getFile()
        Specified by:
        getFile in interface PluginMetadata
        Returns:
        Source file on disk
      • getPluginArtifactName

        public java.lang.String getPluginArtifactName()
        Specified by:
        getPluginArtifactName in interface PluginMetadata
        Returns:
        The name in plugin.yaml or the Rundeck-Plugin-Name attribute in the jar manifest
      • getPluginAuthor

        public java.lang.String getPluginAuthor()
        Specified by:
        getPluginAuthor in interface PluginMetadata
        Returns:
        author metadata
      • getPluginVersion

        public java.lang.String getPluginVersion()
        Specified by:
        getPluginVersion in interface PluginMetadata
        Returns:
        rundeck plugin format version
      • getPluginUrl

        public java.lang.String getPluginUrl()
        Specified by:
        getPluginUrl in interface PluginMetadata
        Returns:
        plugin URL
      • getPluginDate

        public java.util.Date getPluginDate()
        Specified by:
        getPluginDate in interface PluginMetadata
        Returns:
        build date of plugin
      • getPluginName

        public java.lang.String getPluginName()
        Specified by:
        getPluginName in interface PluginMetadata
        Returns:
        plugin name
      • getPluginId

        public java.lang.String getPluginId()
        Description copied from interface: PluginMetadata
        This id is generated off of the plugin name. It is the first 12 characters of the sha256 of the plugin name. This is set automatically by the system. No need to add it manually.
        Specified by:
        getPluginId in interface PluginMetadata
        Returns:
        plugin id
      • getRundeckCompatibilityVersion

        public java.lang.String getRundeckCompatibilityVersion()
        Specified by:
        getRundeckCompatibilityVersion in interface PluginMetadata
        Returns:
        version of Rundeck with which this plugin is compatible
      • getTargetHostCompatibility

        public java.lang.String getTargetHostCompatibility()
        Specified by:
        getTargetHostCompatibility in interface PluginMetadata
        Returns:
        os family with which this plugin is compatible
      • getTags

        public java.util.List<java.lang.String> getTags()
        Specified by:
        getTags in interface PluginMetadata
        Returns:
        tags
      • getPluginDocsLink

        public java.lang.String getPluginDocsLink()
        Specified by:
        getPluginDocsLink in interface PluginMetadata
        Returns:
        link to plugin docs
      • getPluginType

        public java.lang.String getPluginType()
        Specified by:
        getPluginType in interface PluginMetadata
        Returns:
        plugin type