com.softwareag.centrasite.api.csom
Interface UserPreferences


public interface UserPreferences

The UserPreferences interface provides various methods that facilitate to manage the user preferences.


Method Summary
 java.util.Collection<java.lang.String> getAvailableDateFormats()
          Get the collection of available date formats as String.
 java.util.List<java.util.Locale> getAvailableDisplayLanguages()
          Get the list of available display languages sorted by name.
 java.util.List<java.util.Locale> getAvailableLocales()
          Get the list of available locales sorted by name.
 java.util.Collection<java.lang.String> getAvailableTimeFormats()
          Get the collection of available time formats as String.
 java.util.Collection<java.util.TimeZone> getAvailableTimezones()
          Get the collection of available time zones.
 java.util.Collection<NotificationOption> getNotificationSettings()
          Return the notification settings of logged in user.
 java.lang.String getPreferredDateFormat()
          Get the preferred date format as String.
 java.util.Locale getPreferredDisplayLanguage()
          Get the preferred display language.
 java.util.Locale getPreferredLocale()
          Get the preferred locale.
 java.lang.String getPreferredTimeFormat()
          Get the preferred time format as String.
 java.util.TimeZone getPreferredTimezone()
          Get the preferred time zone.
 boolean isNumberSeparatorEnabled()
          Check if the number separator is enabled or disabled.
 void setNotificationSettings(java.util.Collection<NotificationOption> notificationOptions)
          Set the given notification settings to logged in user-specific configuration.
 void setNumberSeparator(boolean isNumberSeparator)
          Enable or disable the number separator
 void setPreferredDateFormat(java.lang.String preferredDateFormat)
          Set the preferred date format as String.
 void setPreferredDisplayLanguage(java.util.Locale prefDisplayLang)
          Set the preferred display language.
 void setPreferredLocale(java.util.Locale defaultLocale)
          Set the preferred locale.
 void setPreferredTimeFormat(java.lang.String preferredTimeFormat)
          Set the preferred time format as String.
 void setPreferredTimezone(java.util.TimeZone timeZone)
          Set the preferred time zone as String.
 

Method Detail

getNotificationSettings

java.util.Collection<NotificationOption> getNotificationSettings()
                                                                 throws CLLException
Return the notification settings of logged in user.

Returns:
User's preferred NotificationOption
Throws:
CLLException - if CLL fails to return the user's notification settings

setNotificationSettings

void setNotificationSettings(java.util.Collection<NotificationOption> notificationOptions)
                             throws CLLException
Set the given notification settings to logged in user-specific configuration. If the collection is empty, then the configuration will be removed.

Parameters:
notificationOptions - Collection of NotificationOption(s) to be set
Throws:
CLLException - if CLL fails to set the notification settings for user

getAvailableDateFormats

java.util.Collection<java.lang.String> getAvailableDateFormats()
                                                               throws CLLException
Get the collection of available date formats as String.

Returns:
Collection of available date formats for the user
Throws:
CLLException - if CLL fails to return the collection of available date formats for user

getPreferredDateFormat

java.lang.String getPreferredDateFormat()
                                        throws CLLException
Get the preferred date format as String.

Returns:
User's preferred date format
Throws:
CLLException - if CLL fails to return the user's preferred date format

setPreferredDateFormat

void setPreferredDateFormat(java.lang.String preferredDateFormat)
                            throws CLLException
Set the preferred date format as String.

Parameters:
preferredDateFormat - Preferred date format
Throws:
CLLException - if CLL fails to set the preferred date format for user

getAvailableTimeFormats

java.util.Collection<java.lang.String> getAvailableTimeFormats()
                                                               throws CLLException
Get the collection of available time formats as String.

Returns:
Collection of available time formats for the user
Throws:
CLLException - if CLL fails to return the collection of available time formats for user

getPreferredTimeFormat

java.lang.String getPreferredTimeFormat()
                                        throws CLLException
Get the preferred time format as String.

Returns:
User's preferred time format
Throws:
CLLException - if CLL fails to return the user's preferred time format

setPreferredTimeFormat

void setPreferredTimeFormat(java.lang.String preferredTimeFormat)
                            throws CLLException
Set the preferred time format as String.

Parameters:
preferredTimeFormat - Preferred time format
Throws:
CLLException - if CLL fails to set the preferred time format for user

getAvailableTimezones

java.util.Collection<java.util.TimeZone> getAvailableTimezones()
                                                               throws CLLException
Get the collection of available time zones.

Returns:
Collection of available time zones
Throws:
CLLException - if CLL fails to return the collection of available time zones

getPreferredTimezone

java.util.TimeZone getPreferredTimezone()
                                        throws CLLException
Get the preferred time zone.

Returns:
User's preferred time zone
Throws:
CLLException - if CLL fails to return the user's preferred time zone

setPreferredTimezone

void setPreferredTimezone(java.util.TimeZone timeZone)
                          throws CLLException
Set the preferred time zone as String.

Parameters:
timeZone - Preferred time zone
Throws:
CLLException - if CLL fails to set the preferred time zone for user

getAvailableLocales

java.util.List<java.util.Locale> getAvailableLocales()
                                                     throws CLLException
Get the list of available locales sorted by name. If there are restricted locales defined, then they would limit the available locales.

Returns:
List of available locale sorted by name
Throws:
CLLException - if CLL fails to return the list of available locales

getPreferredLocale

java.util.Locale getPreferredLocale()
                                    throws CLLException
Get the preferred locale.

Returns:
User's preferred locale
Throws:
CLLException - if CLL fails to return the user's preferred locale

setPreferredLocale

void setPreferredLocale(java.util.Locale defaultLocale)
                        throws CLLException
Set the preferred locale.

Parameters:
defaultLocale - Preferred default locale
Throws:
CLLException - if CLL fails to set the preferred default locale for user

isNumberSeparatorEnabled

boolean isNumberSeparatorEnabled()
                                 throws CLLException
Check if the number separator is enabled or disabled.

Returns:
true if the number separator is enabled; else false.
Throws:
CLLException - if CLL fails to check for the number separator

setNumberSeparator

void setNumberSeparator(boolean isNumberSeparator)
                        throws CLLException
Enable or disable the number separator

Parameters:
isNumberSeparator -
Throws:
CLLException - if CLL fails to enable or disable the number separator

getAvailableDisplayLanguages

java.util.List<java.util.Locale> getAvailableDisplayLanguages()
                                                              throws CLLException
Get the list of available display languages sorted by name. This list would be fetched from the installed language packs.

Returns:
List of available display languages sorted by name
Throws:
CLLException - if CLL fails to return the list of available display languages

getPreferredDisplayLanguage

java.util.Locale getPreferredDisplayLanguage()
                                             throws CLLException
Get the preferred display language.

Returns:
User's preferred display language
Throws:
CLLException - if CLL fails to return the user's preferred display language

setPreferredDisplayLanguage

void setPreferredDisplayLanguage(java.util.Locale prefDisplayLang)
                                 throws CLLException
Set the preferred display language.

Parameters:
prefDisplayLang - Preferred display language
Throws:
CLLException - if CLL fails to set the preferred display language for user