@Test public void testEnvironment() { assertThat(XACMLProperties.resolveEnvironmentProperty(null)).isNull(); assertThat(XACMLProperties.resolveEnvironmentProperty("MY_PROPERTY")).isNull(); assertThat(XACMLProperties.resolveEnvironmentProperty("${envd:MY_PROPERTY")).isNull(); assertThat(XACMLProperties.resolveEnvironmentProperty("${envd:}")).isNull(); assertThat(XACMLProperties.resolveEnvironmentProperty("${envd:MY_PROPERTY}")).isNull(); assertThat(XACMLProperties.resolveEnvironmentProperty("${envd:PATH}")).isNotNull(); }
public static String resolveEnvironmentProperty(String input) { if (input == null || !input.startsWith("${envd:") || !input.endsWith("}")) { return null; } return System.getenv(input.substring(7, input.length() - 1)); }
XACMLProperties { public static String resolveEnvironmentProperty(String input) { if (input == null || !input.startsWith("${envd:") || !input.endsWith("}")) { return null; } return System.getenv(input.substring(7, input.length() - 1)); } }
XACMLProperties { public static String resolveEnvironmentProperty(String input) { if (input == null || !input.startsWith("${envd:") || !input.endsWith("}")) { return null; } return System.getenv(input.substring(7, input.length() - 1)); } protected  XACMLProperties(); }
XACMLProperties { public static String resolveEnvironmentProperty(String input) { if (input == null || !input.startsWith("${envd:") || !input.endsWith("}")) { return null; } return System.getenv(input.substring(7, input.length() - 1)); } protected  XACMLProperties(); static Properties getProperties(); static void reloadProperties(); static String getProperty(String propertyName, String defaultValue); static void setProperty(String propertyName, String propertyValue); static String getProperty(String propertyName); static Properties getPolicyProperties(Properties current, boolean checkURLs); static Properties getPolicyProperties(); static Set<String> getRootPolicyIDs(Properties props); static Set<String> getReferencedPolicyIDs(Properties props); static Set<String> getPolicyIDs(Properties props); static Properties setXacmlRootProperties(Properties properties, Path rootPolicyPath); static Properties setXacmlReferencedProperties(Properties properties, Path... referencedPolicies); static Properties clearPolicyProperties(Properties properties, String strField); static Properties getPipProperties(Properties current); static Properties getPipProperties(); static String resolveEnvironmentProperty(String input); }
XACMLProperties { public static String resolveEnvironmentProperty(String input) { if (input == null || !input.startsWith("${envd:") || !input.endsWith("}")) { return null; } return System.getenv(input.substring(7, input.length() - 1)); } protected  XACMLProperties(); static Properties getProperties(); static void reloadProperties(); static String getProperty(String propertyName, String defaultValue); static void setProperty(String propertyName, String propertyValue); static String getProperty(String propertyName); static Properties getPolicyProperties(Properties current, boolean checkURLs); static Properties getPolicyProperties(); static Set<String> getRootPolicyIDs(Properties props); static Set<String> getReferencedPolicyIDs(Properties props); static Set<String> getPolicyIDs(Properties props); static Properties setXacmlRootProperties(Properties properties, Path rootPolicyPath); static Properties setXacmlReferencedProperties(Properties properties, Path... referencedPolicies); static Properties clearPolicyProperties(Properties properties, String strField); static Properties getPipProperties(Properties current); static Properties getPipProperties(); static String resolveEnvironmentProperty(String input); static final String XACML_PROPERTIES_NAME; static final String XACML_PROPERTIES_FILE; static final String PROP_DATATYPEFACTORY; static final String PROP_PDPENGINEFACTORY; static final String PROP_PEPENGINEFACTORY; static final String PROP_PIPFINDERFACTORY; static final String PROP_TRACEENGINEFACTORY; static final String PROP_ROOTPOLICIES; static final String PROP_REFERENCEDPOLICIES; static final String PROP_PDP_BEHAVIOR; static final String PROP_PIP_ENGINES; static final String PROP_PAP_PAPENGINEFACTORY; static final String PROP_AC_PAPENGINEFACTORY; }