Class WorkspaceUtil


  • public class WorkspaceUtil
    extends Object
    • Field Detail

      • DEFAULT_TEST_PROPERTIES

        public static final String DEFAULT_TEST_PROPERTIES
        Default workspace configuration file class path WARNING: don't push back this file to github as it contains many secrets. We do provide a sample properties files in the ./src/test/resources folder
        See Also:
        Constant Field Values
    • Method Detail

      • getSystemWorkspaceBuilder

        public static Workspace.Builder getSystemWorkspaceBuilder()
        Loads Workspace from either one and only one of the following sources, probing them first to check that all the required properties are given, in order:
        1. System Properties
        2. Environment Variables
        3. classpath:DEFAULT_TEST_PROPERTIES
        Returns:
        a Workspace.Builder loaded with the provided config
      • isOAuthConfig

        public static boolean isOAuthConfig​(Map<String,​String> configMap)
      • getSystemProperty

        public static String getSystemProperty​(String key)
      • getSystemProperty

        public static String getSystemProperty​(String key,
                                               String propertyClassPath)
        Loads a property from either one of the following sources, probing it first to check that the required property is given, in order:
        1. System Properties
        2. Environment Variables
        3. classpath:propertyClassPath
        Parameters:
        key - the property name
        propertyClassPath - the classpath of the property file
        Returns:
        the value of the property
      • getSystemWorkspaceConfig

        public static Map<String,​String> getSystemWorkspaceConfig​(String propertiesClassPath)