List of usage examples for java.lang System getProperties
public static Properties getProperties()
From source file:com.unknown.pkg.ClientCredentialsProviderIT.java
@BeforeClass public static void setUp() { System.getProperties().remove(OAUTH2_ACCESS_TOKENS); }
From source file:com.streamsets.pipeline.lib.csv.TestOverrunCsvParser.java
@Before public void setUp() { System.getProperties().remove(OverrunReader.READ_LIMIT_SYS_PROP); }
From source file:Email.CommonsEmail.java
public CommonsEmail() throws EmailException, MalformedURLException { //--------------------------------------------------------- System.getProperties().put("http.proxySet", "true"); System.getProperties().put("http.proxyHost", "proxy.ufu.br"); System.getProperties().put("http.proxyPort", "3128"); //--------------------------------------------------------- emailConfig = this.getConfiguracao(); }
From source file:io.knotx.launcher.SystemPropsConfiguration.java
public SystemPropsConfiguration(String identifier) { envConfig = System.getProperties().entrySet().stream() .filter(entry -> onlyPropertyForIdentifier(entry, identifier)) .collect(Collectors.toMap( entry -> StringUtils.substringAfter((String) entry.getKey(), identifier + "."), entry -> new Value((String) entry.getValue()))); }
From source file:com.treesbearfruit.icloudnotes.NotesSaver.java
public NotesSaver(String username, String password, String j, String wheretosave) throws Exception { // Get system properties Properties props = System.getProperties(); Session session = Session.getDefaultInstance(props); // Get the store Store store = session.getStore("imaps"); String noteFolderLabel = ""; if (j.toLowerCase().equals("apple")) { noteFolderLabel = "Notes"; store.connect("imap.mail.me.com", username, password); // username without @icloud.com } else if (j.toLowerCase().equals("google")) { noteFolderLabel = "Notes"; store.connect("imap.gmail.com", username, password); } else {/* w w w .j a va 2 s . c o m*/ throw new Exception("Notesprovider not implemented!"); } String timestamp = new java.text.SimpleDateFormat("dd_MM_yyyy_hh_mm_ss").format(new Date()); String backup_directory = wheretosave + (wheretosave.endsWith(File.separator) ? "" : File.separator) + noteFolderLabel + "_" + timestamp + File.separator; // saves main folder save(store, backup_directory, noteFolderLabel); // folder..s Folder mainnotefolder = store.getFolder(noteFolderLabel); System.out.println("found " + mainnotefolder.list().length + " note folders"); Folder[] f = mainnotefolder.list(); for (Folder fd : f) { String backup_directory_i = backup_directory + fd.getName(); save(store, backup_directory_i, noteFolderLabel + "/" + fd.getName()); } // Close connection store.close(); }
From source file:de.hypoport.ep2.support.configuration.properties.PropertiesLoader.java
private static synchronized void initializeInternal() { if (!initialized) { String propertyLocations = System.getProperty(PROPERTY_LOCATIONS); Properties loadedProperties = loadPropertiesLocations(propertyLocations); Set<Object> loadedPropertyKeys = new HashSet<Object>(loadedProperties.keySet()); mergePropertiesIntoSystemPropertiesWithoutOverwriting(loadedProperties); replacePropertyPlaceHolder(System.getProperties()); logProperties(loadedPropertyKeys, System.getProperties()); logProperties(sslPropertiesKeys, System.getProperties()); initialized = true;/*w w w . j a va2 s . c o m*/ } }
From source file:com.streamsets.datacollector.execution.runner.common.TestProdSourceOffsetTracker.java
@AfterClass public static void afterClass() { System.getProperties().remove(RuntimeModule.SDC_PROPERTY_PREFIX + RuntimeInfo.DATA_DIR); }
From source file:ar.com.zauber.commons.spring.beans.factory.impl.BooleanSystemPropertyCaseBlockTest.java
/** ehh */ public final void testUnset() { try {/*from w ww . j av a 2 s. c om*/ final ApplicationContext ctx = new ClassPathXmlApplicationContext( "classpath:spring-test-switch-systemboolean.xml"); final String s = (String) ctx.getBean("test1"); assertEquals("mundo", s); } finally { System.getProperties().remove("babla.activar"); } }
From source file:com.weaverplatform.nifi.CreateIndividualTest.java
@BeforeClass public static void beforeClass() throws IOException { // Define property file for NiFi Properties props = System.getProperties(); props.setProperty("nifi.properties.file.path", Resources.getResource("nifi.properties").getPath()); // Read test properties Properties testProperties = new Properties(); testProperties.load(Resources.getResource("test.properties").openStream()); WEAVER_URL = testProperties.get("weaver.url").toString(); WEAVER_DATASET = testProperties.get("weaver.global.dataset").toString(); // Set Nifi Weaver properties NiFiProperties.getInstance().put(WeaverProperties.URL, WEAVER_URL); NiFiProperties.getInstance().put(WeaverProperties.DATASET, WEAVER_DATASET); }