
com.activitystream.model.config.ASConfig Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of as-sdk Show documentation
Show all versions of as-sdk Show documentation
AS-SDK is a java library to allow easy interoperability with Activity Stream.
package com.activitystream.model.config;
import org.joda.time.DateTimeZone;
import java.util.TimeZone;
/**
* @author ivan
*/
public class ASConfig {
private static String defaultCountryCode;
private static String defaultCurrency;
private static TimeZone defaultTimeZone;
public static void setDefaults(String countryCode, String currency, TimeZone timeZone) {
if (currency != null) {
ASConfig.defaultCurrency = currency;
}
if (countryCode != null) {
ASConfig.defaultCountryCode = countryCode;
}
if (timeZone != null) {
JacksonMapper.getMapper().setTimeZone(timeZone);
DateTimeZone.setDefault(DateTimeZone.forTimeZone(timeZone));
ASConfig.defaultTimeZone = timeZone;
}
}
public static String getDefaultCountryCode() {
return defaultCountryCode;
}
public static String getDefaultCurrency() {
return defaultCurrency;
}
public static TimeZone getDefaultTimeZone() {
return defaultTimeZone;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy