Class PluginUtils


  • public class PluginUtils
    extends java.lang.Object
    The Class PluginUtils.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String CORE_PLUGIN_NAME1
      The Constant CORE_PLUGIN_NAME1.
      static java.lang.String CORE_PLUGIN_NAME2
      The Constant CORE_PLUGIN_NAME2.
    • Constructor Summary

      Constructors 
      Constructor Description
      PluginUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getAppInfoFile​(java.lang.String strBasePath)
      Gets the app info file.
      static java.lang.String getCoreXMLFile​(java.lang.String strComponentPath)
      Gets the core XML file.
      static java.lang.String[] getPluginXMLFile​(java.lang.String strComponentPath)
      Gets the plugin XML file.
      static boolean isCore​(java.lang.String strPluginName)
      Checks if is core.
      static boolean updateAppInfoFile​(java.lang.String strFile, java.lang.String strVersion, CommandResult commandResult)
      Update app info file.
      static java.lang.String updatePluginXMLVersion​(java.lang.String strFile, java.lang.String strNewVersion, CommandResult commandResult)
      Update plugin XML version.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • CORE_PLUGIN_NAME1

        public static final java.lang.String CORE_PLUGIN_NAME1
        The Constant CORE_PLUGIN_NAME1.
        See Also:
        Constant Field Values
      • CORE_PLUGIN_NAME2

        public static final java.lang.String CORE_PLUGIN_NAME2
        The Constant CORE_PLUGIN_NAME2.
        See Also:
        Constant Field Values
    • Constructor Detail

      • PluginUtils

        public PluginUtils()
    • Method Detail

      • isCore

        public static boolean isCore​(java.lang.String strPluginName)
        Checks if is core.
        Parameters:
        strPluginName - plugin name
        Returns:
        true if core or lutece-core, false otherwise.
      • getCoreXMLFile

        public static java.lang.String getCoreXMLFile​(java.lang.String strComponentPath)
        Gets the core XML file.
        Parameters:
        strComponentPath - the str component path
        Returns:
        the core XML file
      • getPluginXMLFile

        public static java.lang.String[] getPluginXMLFile​(java.lang.String strComponentPath)
        Gets the plugin XML file.
        Parameters:
        strComponentPath - the str component path
        Returns:
        the plugin XML file
      • getAppInfoFile

        public static java.lang.String getAppInfoFile​(java.lang.String strBasePath)
        Gets the app info file.
        Parameters:
        strBasePath - the str base path
        Returns:
        the app info file
      • updateAppInfoFile

        public static boolean updateAppInfoFile​(java.lang.String strFile,
                                                java.lang.String strVersion,
                                                CommandResult commandResult)
        Update app info file.
        Parameters:
        strFile - the str file
        strVersion - the str version
        commandResult - the command result
        Returns:
        true, if successful
      • updatePluginXMLVersion

        public static java.lang.String updatePluginXMLVersion​(java.lang.String strFile,
                                                              java.lang.String strNewVersion,
                                                              CommandResult commandResult)
        Update plugin XML version.
        Parameters:
        strFile - the str file
        strNewVersion - the str new version
        commandResult - the command result
        Returns:
        the string