jet.server.api
Interface UserPreferenceManager


public interface UserPreferenceManager

Interface UserPrefernceManager manages the user preferences.


Method Summary
 java.util.Properties getDefaultUserPreference()
          Get default user preference setting.
 java.util.Properties getUserPreference(java.lang.String userName)
          Get the user preference by user name
 void saveDefaultUserPreference(java.util.Properties defaultPreference)
          Save specific user preference as default.
 void saveUserPreference(java.lang.String userName, java.util.Properties preference)
          Save the user preference by user name
 boolean useDefaultUserPreference(java.lang.String userName)
          Change specify user preference setting to default.
 

Method Detail

getUserPreference

java.util.Properties getUserPreference(java.lang.String userName)
Get the user preference by user name

Parameters:
userName - the user name, same as user ID
Returns:
the user preference properties which included: the preference items, APIConst.PREFERENCE_NAME_KEEP_LEFT_BAR, its value will be changed into boolean, if the value is true, the main form left bar would be shown when the user log on. APIConst.PREFERENCE_NAME_DEFAULT_VIEW_FORMAT, its value will be changed into int which defined in APIConst, included: APIConst.HTML, APIConst.PDF, APIConst.TEXT, APIConst.EXCEL, APIConst.PS, APIConst.RTF, APIConst.XML and give run report parameter. APIConst.PREFERENCE_NAME_DAYS_DEFINITION_FOR_COMPLETED, its value will be changed into int which is the days definition for completed. APIConst.PREFERENCE_NAME_FOLDER_SELECTOR_FORMAT its value will be changed into int which defined in APIConst, included: APIConst.JSCRIPT_SELECTOR, APIConst.VBSCRIPT_SELECTOR, APIConst.JSP_SELECTOR and provide folder selector type. and the column's name, like: APIConst.COLUMN_NAME_REPORTS_NAME, APIConst.COLUMN_NAME_SCHEDULED_TASK_ID, APIConst.COLUMN_NAME_ACTIVE_TASK_ID, APIConst.COLUMN_NAME_COMPLETED_REPORT, APIConst.COLUMN_NAME_LARGEREPORTS_TIME_ELAPSE, APIConst.COLUMN_NAME_VERSION_VERSION_DATE etc all of them value will be changed into boolean, if the value is true, the column would be shown on the web page.

saveUserPreference

void saveUserPreference(java.lang.String userName,
                        java.util.Properties preference)
                        throws java.io.IOException
Save the user preference by user name

Parameters:
userName - the user name, same as user ID
preference - a subset of all preference items, the preference properties which included: the preference items, like: APIConst.PREFERENCE_NAME_KEEP_LEFT_BAR, APIConst.PREFERENCE_NAME_DEFAULT_VIEW_FORMAT, APIConst.PREFERENCE_NAME_DAYS_DEFINITION_FOR_COMPLETED, APIConst.PREFERENCE_NAME_FOLDER_SELECTOR_FORMAT, and the column's name, like: APIConst.COLUMN_NAME_REPORTS_NAME, APIConst.COLUMN_NAME_SCHEDULED_TASK_ID, APIConst.COLUMN_NAME_ACTIVE_TASK_ID, APIConst.COLUMN_NAME_COMPLETED_REPORT, APIConst.COLUMN_NAME_LARGEREPORTS_TIME_ELAPSE, APIConst.COLUMN_NAME_VERSION_VERSION_DATE etc
Throws:
java.io.IOException - will be thrown if saving failed

getDefaultUserPreference

java.util.Properties getDefaultUserPreference()
Get default user preference setting.

Returns:
the default user preference properties.

saveDefaultUserPreference

void saveDefaultUserPreference(java.util.Properties defaultPreference)
                               throws java.io.IOException
Save specific user preference as default.

Throws:
java.io.IOException - will be thrown if saving failed

useDefaultUserPreference

boolean useDefaultUserPreference(java.lang.String userName)
Change specify user preference setting to default.

Parameters:
userName - the user name, same as user ID
Returns:
true if the operation is successful false if the operation is failed