Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## jet.server.api.rmi
Interface RemoteUserPreferenceManager

All Superinterfaces:
  java.rmi.Remote

    public interface RemoteUserPreferenceManager

extends java.rmi.Remote

Interface `RemoteUserPrefernceManager` manages the user preferences.

Method Summary
`java.lang.String` | `get(java.lang.String userName, java.lang.String key)` Gets the user preference item value by user name and preference key.
`java.util.Properties` | `getDefaultUserPreference()` Gets the default user preference setting.
`java.util.Properties` | `getUserPreference(java.lang.String userName)` Gets the user preference by user name
`java.util.Properties` | `getUserPreference(java.lang.String userName, java.lang.String keyPrefix)` Gets the user preference by user name and preference key prefix, such as "dhtml." or "dsb."
`void` | `saveDefaultUserPreference(java.util.Properties defaultPreference)` Saves the specific user preference setting as default.
`void` | `saveUserPreference(java.lang.String userName, java.util.Properties preference)` Saves the user preference by user name.
`void` | `set(java.lang.String userName, java.lang.String key, java.lang.String value)` Sets the user preference item value.
`boolean` | `useDefaultUserPreference(java.lang.String userName)` Changes the specific user preference setting to default.
`boolean` | `useDefaultUserPreference(java.lang.String userName, java.util.List<java.lang.String> keys)` Changes the specific user preference setting which specified by the keys to default.

Method Detail

### getUserPreference

    java.util.Properties getUserPreference(java.lang.String userName)
                                           throws java.rmi.RemoteException

  Gets the user preference by user name

  Parameters:
    `userName` - the user name, same as user ID.
  Returns:
    the user preference properties which include: the preference items, for example, APIConst.PREFERENCE_NAME_DEFAULT_VIEW_FORMAT, used to set default format for viewing reports, its values are defined in APIConst, such as APIConst.HTML, APIConst.PDF, APIConst.TEXT, APIConst.EXCEL, APIConst.PS, APIConst.RTF, APIConst.XML and given run report parameter. APIConst.POPUP_DHTML_WINDOW, used to specify whether to pop up a new window for DHTML, its values are true or false, true means to pop up new window. APIConst.PREFERENCE_NAME_DAYS_DEFINITION_FOR_COMPLETED, used to specify the number of days that JReport Server must keep the completed tasks in the completed task list, a setting of 0 will keep all completed tasks. etc, and the column's name, used to set which columns will be shown when you log on JReport Server, for example, 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_VERSION_VERSION_DATE etc, all of their value will be changed into boolean, if the value is true, the column will be shown on the web page.
  Throws:
    `java.rmi.RemoteException` - if communication-related error occurs during RMI call execution.

### saveUserPreference

    void saveUserPreference(java.lang.String userName,
                            java.util.Properties preference)
                            throws java.rmi.RemoteException,
                                   java.io.IOException

  Saves 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 include: the preference items, for example, APIConst.PREFERENCE_NAME_DEFAULT_VIEW_FORMAT, APIConst.POPUP_DHTML_WINDOW, APIConst.PREFERENCE_NAME_DAYS_DEFINITION_FOR_COMPLETED etc, and the column's name, for example, 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_VERSION_VERSION_DATE etc.
  Throws:
    `java.rmi.RemoteException` - if communication-related error occurs during RMI call execution.
    `java.io.IOException` - if an IOException occurs.

### getDefaultUserPreference

    java.util.Properties getDefaultUserPreference()
                                                  throws java.rmi.RemoteException

  Gets the default user preference setting.

  Returns:
    the default user preference properties.
  Throws:
    `java.rmi.RemoteException` - if communication-related error occurs during RMI call execution.

### saveDefaultUserPreference

    void saveDefaultUserPreference(java.util.Properties defaultPreference)
                                   throws java.rmi.RemoteException,
                                          java.io.IOException

  Saves the specific user preference setting as default.

  Parameters:
    `defaultPreference` - the specific user preference properties.
  Throws:
    `java.rmi.RemoteException` - if communication-related error occurs during RMI call execution.
    `java.io.IOException` - if an IOException occurs.

### useDefaultUserPreference

    boolean useDefaultUserPreference(java.lang.String userName)
                                     throws java.rmi.RemoteException

  Changes the specific 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 failed.
  Throws:
    `java.rmi.RemoteException` - if communication-related error occurs during RMI call execution.

### useDefaultUserPreference

    boolean useDefaultUserPreference(java.lang.String userName,
                                     java.util.List<java.lang.String> keys)
                                     throws java.rmi.RemoteException

  Changes the specific user preference setting which specified by the keys to default.

  Parameters:
    `userName` - the user name, same as user ID.
    `keys` - the property keys to reset to default setting.
  Returns:
    true if the operation is successful, false if the operation failed.
  Throws:
    `java.rmi.RemoteException` - if communication-related error occurs during RMI call execution.

### getUserPreference

    java.util.Properties getUserPreference(java.lang.String userName,
                                           java.lang.String keyPrefix)
                                           throws java.rmi.RemoteException

  Gets the user preference by user name and preference key prefix, such as "dhtml." or "dsb."

  Parameters:
    `userName` - the user name, same as user ID.
    `keyPrefix` - same as property value.
  Returns:
    the user preference properties.
  Throws:
    `java.rmi.RemoteException` - if communication-related error occurs during RMI call execution.

### get

    java.lang.String get(java.lang.String userName,
                         java.lang.String key)
                         throws java.rmi.RemoteException

  Gets the user preference item value by user name and preference key.

  Parameters:
    `userName` - the user name, same as user ID.
    `key` - same as property key.
  Returns:
    the preference item value.
  Throws:
    `java.rmi.RemoteException` - if communication-related error occurs during RMI call execution.

### set

    void set(java.lang.String userName,
             java.lang.String key,
             java.lang.String value)
             throws java.rmi.RemoteException,
                    java.io.IOException

  Sets the user preference item value.

  Parameters:
    `userName` - the user name, same as user ID.
    `key` - same as property key.
    `value` - same as property value.
  Throws:
    `java.rmi.RemoteException` - if communication-related error occurs during RMI call execution.
    `java.io.IOException` - if an IOException occurs.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD