protected Map < String , Map < String , String > > loadConfigData ( final ExecutionContext context , final Map < String , Object > instanceData , final Map < String , Map < String , String > > localDataContext , final Description description , final String serviceName ) throws ConfigurationException { final PropertyResolver resolver = PropertyResolverFactory . createPluginRuntimeResolver ( context , instanceData , serviceName , getProvider ( ) . getName ( ) ) ; final Map < String , Object > config = PluginAdapterUtility . mapDescribedProperties ( resolver , description , PropertyScope . Instance ) ; //expand properties Map < String , Object > expanded = DataContextUtils . replaceDataReferences ( config , localDataContext ) ; Map < String , String > data = MapData . toStringStringMap ( expanded ) ; loadContentConversionPropertyValues ( data , context , description . getProperties ( ) ) ; Map < String , Map < String , String > > newLocalDataContext = localDataContext ; VersionCompare pluginVersion = VersionCompare . forString ( provider . getPluginMeta ( ) . getRundeckPluginVersion ( ) ) ; if ( pluginVersion . atLeast ( VersionCompare . forString ( ScriptPluginProviderLoader . VERSION_2_0 ) ) ) { //new context variable name newLocalDataContext = DataContextUtils . addContext ( serviceName . toLowerCase ( ) , data , localDataContext ) ; } //using "config" name to old plugins return DataContextUtils . addContext ( "config" , data , newLocalDataContext ) ; }
Loads the plugin configuration values stored in project or framework properties also