當前位置: 首頁>>代碼示例>>Java>>正文


Java ConfluenceUserPreferences類代碼示例

本文整理匯總了Java中com.atlassian.confluence.user.ConfluenceUserPreferences的典型用法代碼示例。如果您正苦於以下問題:Java ConfluenceUserPreferences類的具體用法?Java ConfluenceUserPreferences怎麽用?Java ConfluenceUserPreferences使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ConfluenceUserPreferences類屬於com.atlassian.confluence.user包,在下文中一共展示了ConfluenceUserPreferences類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: newFriendlyDateFormatter

import com.atlassian.confluence.user.ConfluenceUserPreferences; //導入依賴的package包/類
protected FriendlyDateFormatter newFriendlyDateFormatter() {
	// Get current user's timezone, or default one
	User authUser = AuthenticatedUserThreadLocal.getUser();
	TimeZone timeZone;
	if (authUser == null) {
		// anonymous
		timeZone = TimeZone.getDefault();
	} else {
		ConfluenceUserPreferences prefs = userAccessor
				.getConfluenceUserPreferences(authUser);
		timeZone = prefs.getTimeZone();
	}
	// Build date formatter
	DateFormatter dateFormatter = new DateFormatter(timeZone,
			formatSettingsManager, localeManager);

	// Build "friendly" date formatter
	FriendlyDateFormatter friendlyDateFormatter = new FriendlyDateFormatter(
			new Date(), dateFormatter);
	return friendlyDateFormatter;
}
 
開發者ID:baloise,項目名稱:dashboard-plus,代碼行數:22,代碼來源:StatusLightBasedMacro.java

示例2: newNumberFormatter

import com.atlassian.confluence.user.ConfluenceUserPreferences; //導入依賴的package包/類
protected NumberFormat newNumberFormatter() {
	// Get current user's timezone, or default one
	User authUser = AuthenticatedUserThreadLocal.getUser();
	NumberFormat result = null;
	if (authUser != null) {
		ConfluenceUserPreferences prefs = userAccessor
				.getConfluenceUserPreferences(authUser);
		if (prefs != null && prefs.getLocale() != null) {
			result = NumberFormat.getNumberInstance(prefs.getLocale());
		}
	}
	if (result == null) {
		// anonymous
		result = NumberFormat.getNumberInstance();
	}
	return result;
}
 
開發者ID:baloise,項目名稱:dashboard-plus,代碼行數:18,代碼來源:StatusLightBasedMacro.java

示例3: getUserPreferencesDateFormatter

import com.atlassian.confluence.user.ConfluenceUserPreferences; //導入依賴的package包/類
public DateFormatter getUserPreferencesDateFormatter()
{
	ConfluenceUserPreferences preferences = getUserAccessor().getConfluenceUserPreferences(getRemoteUser());

	return preferences.getDateFormatter(getFormatSettingsManager());
}
 
開發者ID:strator-dev,項目名稱:greenpepper,代碼行數:7,代碼來源:ConfluenceGreenPepper.java

示例4: getUserPreferencesDateFormatter

import com.atlassian.confluence.user.ConfluenceUserPreferences; //導入依賴的package包/類
/**
 * <p>getUserPreferencesDateFormatter.</p>
 *
 * @return a {@link com.atlassian.confluence.core.DateFormatter} object.
 */
public DateFormatter getUserPreferencesDateFormatter() {
    ConfluenceUserPreferences preferences = getUserAccessor().getConfluenceUserPreferences(getRemoteUser());

    return preferences.getDateFormatter(getFormatSettingsManager());
}
 
開發者ID:strator-dev,項目名稱:greenpepper,代碼行數:11,代碼來源:ConfluenceGreenPepper.java

示例5: getCustomizedPreferencesDateFormatter

import com.atlassian.confluence.user.ConfluenceUserPreferences; //導入依賴的package包/類
public DateFormatter getCustomizedPreferencesDateFormatter(FormatSettingsManager formatSettingsManager) {
    ConfluenceUserPreferences preferences = getUserAccessor().getConfluenceUserPreferences(getRemoteUser());

    return preferences.getDateFormatter(formatSettingsManager, getLocaleManager());
}
 
開發者ID:testIT-LivingDoc,項目名稱:livingdoc-confluence,代碼行數:6,代碼來源:LivingDocConfluenceManager.java


注:本文中的com.atlassian.confluence.user.ConfluenceUserPreferences類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。