Class ServerFeatureUtil

    • Constructor Detail

      • ServerFeatureUtil

        public ServerFeatureUtil()
    • Method Detail

      • warn

        public abstract void warn​(String msg)
        Log warning
        Specified by:
        warn in interface CommonLoggerI
        Parameters:
        msg -
      • info

        public abstract void info​(String msg)
        Log info
        Specified by:
        info in interface CommonLoggerI
        Parameters:
        msg -
      • error

        public abstract void error​(String msg)
        Log error
        Specified by:
        error in interface CommonLoggerI
        Parameters:
        msg -
      • isDebugEnabled

        public abstract boolean isDebugEnabled()
        Returns whether debug is enabled by the current logger
        Specified by:
        isDebugEnabled in interface CommonLoggerI
        Returns:
        whether debug is enabled
      • setLibertyDirectoryPropertyFiles

        public void setLibertyDirectoryPropertyFiles​(Map<String,​File> libertyDirPropFiles)
      • getLibertyDirectoryPropertyFiles

        public Map<String,​File> getLibertyDirectoryPropertyFiles()
      • getServerFeatures

        public Set<String> getServerFeatures​(File serverDirectory,
                                             File serverXmlFile,
                                             Map<String,​File> libertyDirPropFiles,
                                             Set<String> dropinsFilesToIgnore)
        Get the set of features defined in the server.xml
        Parameters:
        serverDirectory - The server directory containing the server.xml
        serverXmlFile - The server.xml file
        libertyDirPropFiles - Map of Liberty directory properties to the actual File for each directory
        dropinsFilesToIgnore - A set of file names under configDropins/overrides or configDropins/defaults to ignore
        Returns:
        the set of features that should be installed from server.xml, or empty set if nothing should be installed or null if there are no valid xml files or they have no featureManager section
      • getServerFeatures

        public Set<String> getServerFeatures​(File serverDirectory,
                                             Map<String,​File> libertyDirPropFiles,
                                             Set<String> dropinsFilesToIgnore)
        Get the set of features defined in the server.xml
        Parameters:
        serverDirectory - The server directory containing the server.xml
        libertyDirPropFiles - Map of Liberty directory properties to the actual File for each directory
        dropinsFilesToIgnore - A set of file names under configDropins/overrides or configDropins/defaults to ignore
        Returns:
        the set of features that should be installed from server.xml, or empty set if nothing should be installed or null if there are no valid xml files or they have no featureManager section
      • getServerFeatures

        public Set<String> getServerFeatures​(File serverDirectory,
                                             Map<String,​File> libertyDirPropFiles)
        Get the set of features defined in the server.xml
        Parameters:
        serverDirectory - The server directory containing the server.xml
        libertyDirPropFiles - Map of Liberty directory properties to the actual File for each directory
        Returns:
        the set of features that should be installed from server.xml, or empty set if nothing should be installed or null if there are no valid xml files or they have no featureManager section
      • setLowerCaseFeatures

        public void setLowerCaseFeatures​(boolean val)
        Indicate whether the feature names should be converted to lower case. The default is to make all the names lower case.
        Parameters:
        val - boolean false to indicate names should remain mixed case as defined in Liberty. True indicates the names will be folded to lower case.
      • setSuppressLogs

        public void setSuppressLogs​(boolean val)
        Indicate whether the info and warning messages should not be displayed. Used as part of the dev mode flow to avoid flooding the console.
        Parameters:
        val - boolean true to indicate that info and warning log messages should be not displayed.
      • getServerXmlFeatures

        public Set<String> getServerXmlFeatures​(Set<String> origResult,
                                                File serverDirectory,
                                                File serverFile,
                                                Properties bootstrapProperties,
                                                List<File> parsedXmls)
        Adds features from the given server file into the origResult or a new set if origResult is null.
        Parameters:
        origResult - The features that have been parsed so far.
        serverDirectory - The server directory containing the server.xml.
        serverFile - The server XML file.
        bootstrapProperties - The properties defined in bootstrap.properties.
        parsedXmls - The list of XML files that have been parsed so far.
        Returns:
        The set of features to install, or empty set if the cumulatively parsed xml files only have featureManager sections but no features to install, or null if there are no valid xml files or they have no featureManager section
      • getUserExtensionPath

        protected File getUserExtensionPath()