All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.activitystream.model.config.ASConfig Maven / Gradle / Ivy

Go to download

AS-SDK is a java library to allow easy interoperability with Activity Stream.

There is a newer version: 0.1.25
Show newest version
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