Class PluginsHelper


  • public class PluginsHelper
    extends java.lang.Object
    Since:
    MicroStrategy Web 9.0.1
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String PLUGIN_DIRNAME  
    • Constructor Summary

      Constructors 
      Constructor Description
      PluginsHelper()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String resolvePlugin​(java.lang.String valueString)  
      static java.lang.String sanitizePluginsFolderPath​(java.lang.String folderPath)
      Sanitizes folder path by restricting access to a custom plugins folder (/plugins) only.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PluginsHelper

        public PluginsHelper()
    • Method Detail

      • resolvePlugin

        public static java.lang.String resolvePlugin​(java.lang.String valueString)
      • sanitizePluginsFolderPath

        public static java.lang.String sanitizePluginsFolderPath​(java.lang.String folderPath)
                                                          throws java.lang.IllegalArgumentException
        Sanitizes folder path by restricting access to a custom plugins folder (/plugins) only.
        Adds a plugins/ prefix if not already provided.
        Ex. Following all path points to same directory: plugins/BulletChart or /BulletChart or BulletChart
        Parameters:
        folderPath - Name of the custom plugin folder
        Returns:
        Relative path to the plugins folder location
        Throws:
        java.lang.IllegalArgumentException - if folderPath is invalid/not-allowed