Class ConfigUtil


  • public class ConfigUtil
    extends Object
    Helps with configuring and setup of Alfresco and Solr.
    Author:
    Gethin James
    • Field Detail

      • log

        protected static final org.slf4j.Logger log
    • Constructor Detail

      • ConfigUtil

        public ConfigUtil()
    • Method Detail

      • locateProperty

        public static String locateProperty​(String propertyName,
                                            String defaultValue)
        Finds the property based on looking up the value in one of three places (in order of preference):
        1. JNDI: via java:comp/env/{propertyName/converted/to/slash}
        2. A Java system property or a Java system property prefixed with solr.
        3. OS environment variable
        Returns:
        A property
      • convertPropertyNameToJNDIPath

        protected static String convertPropertyNameToJNDIPath​(String propertyName)
        Takes a property name and splits it via / instead of .
        Parameters:
        propertyName -
        Returns:
        the property name as a jndi path
      • convertPropertyNameToEnvironmentParam

        protected static String convertPropertyNameToEnvironmentParam​(String propertyName)