Class ConfigUtil


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

      Fields 
      Modifier and Type Field Description
      protected static org.slf4j.Logger log  
    • Constructor Summary

      Constructors 
      Constructor Description
      ConfigUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      protected static java.lang.String convertPropertyNameToEnvironmentParam​(java.lang.String propertyName)  
      protected static java.lang.String convertPropertyNameToJNDIPath​(java.lang.String propertyName)
      Takes a property name and splits it via / instead of .
      static java.lang.String locateProperty​(java.lang.String propertyName, java.lang.String defaultValue)
      Finds the property based on looking up the value in one of three places (in order of preference): JNDI: via java:comp/env/{propertyName/converted/to/slash} A Java system property or a Java system property prefixed with solr. OS environment variable
      • Methods inherited from class java.lang.Object

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

      • log

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

      • ConfigUtil

        public ConfigUtil()
    • Method Detail

      • locateProperty

        public static java.lang.String locateProperty​(java.lang.String propertyName,
                                                      java.lang.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 java.lang.String convertPropertyNameToJNDIPath​(java.lang.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 java.lang.String convertPropertyNameToEnvironmentParam​(java.lang.String propertyName)