Interface IPreferenceService

All Superinterfaces:
ID2fsService

public interface IPreferenceService extends ID2fsService
Preferences service. Provide access to user preferences in given context.
  • Method Details

    • getPreference

      Preference getPreference(Context context) throws Exception
      Get preferences for current user
      Parameters:
      context - Context object containing informations about client/session
      Returns:
      Preference object containing following attributes :
      • List of column object : Complex object containing following attributes :
        • name : String value of column name
        • label : String value of displayed label
        • width : Integer value of column width
        • type : Integer value of column type
        • direction : String value of direction
        • fixed : Boolean value for fixed state (not resizable)
        This list corresponds to default column
      • List of columnPreferences object : Complex object containing following attributes :
        • List of column object
        • Coltype : String value of column type
        Each columnPreferences object contains columns list for specific column type (i.e : Columns list for Search type)
      • language : String value of language name
      • folderBefore : Boolean value of is folder before document in doclist
      • folderHidden : Boolean value of is hidden folder in tree browser
      • formatDate : String value of date format (i.e : MM/dd/yyyy)
      • formatDateTime : String value of date with time format (i.e : hh:mm:ss MM/dd/yyyy)
      • thumbnailFormat : String value of thumbnail format
      • thumbnailSize : String value of thumbnail size (16x16, 32x32, 64x64)
      • contentViewMode : String value of content view mode
      This method returns empty columns and columnPreferences objects. To get full preferences with columns data, use getPreferenceWithColumn method instead.
      Throws:
      Exception
      Since:
      4.0.1
    • getColumnPreferences

      List<Column> getColumnPreferences(Context context, String colType) throws Exception
      Get column preferences for specified column type
      Parameters:
      context - Context object containing informations about client/session
      colType - String value of column type (i.e : Search type)
      Returns:
      Column list
      Throws:
      Exception
      Since:
      4.0.1
    • getPreferenceWithColumn

      Preference getPreferenceWithColumn(Context context, String colType) throws Exception
      Get preferences for current user with column objects filled
      Parameters:
      context - Context object containing informations about client/session
      colType - String value of column type (i.e : Search type)
      Returns:
      Preference
      Throws:
      Exception
      Since:
      4.0.1
    • getColumnTypeSettings

      List<Option> getColumnTypeSettings(Context context) throws Exception
      Get object type list (dm_document, ...)
      Parameters:
      context - Context object containing informations about client/session
      Returns:
      Option list of object types
      Throws:
      Exception
      Since:
      4.0.1
    • getColumnSelectSettings

      List<Option> getColumnSelectSettings(Context context, String coltype, boolean asDefault) throws Exception
      Get columns set for current user
      Parameters:
      context - Context object containing informations about client/session
      coltype - String value of column type (i.e : Search type)
      asDefault - Boolean value for default column (not user choice)
      Returns:
      Option list of columns
      Throws:
      Exception
      Since:
      4.0.1
    • getColumnSrcSettings

      List<Option> getColumnSrcSettings(Context context, String colType, String typeName) throws Exception
      Get columns list for specified object type and column type
      Parameters:
      context - Context object containing informations about client/session
      colType - String value of column type (i.e : Search type)
      typeName - String value of object type
      Returns:
      Option list of columns
      Throws:
      Exception
      Since:
      4.0.1
    • getFilters

      List<Option> getFilters(Context context, String id) throws Exception
      Get all available filters to filter children document list
      Parameters:
      context - Context object containing informations about client/session
      id - String value of parent document id
      Returns:
      Option list of filters
      Throws:
      Exception
      Since:
      4.0.1
    • setFilterActive

      boolean setFilterActive(Context context, String filterName) throws Exception
      Set active filter
      Parameters:
      context - Context object containing informations about client/session
      filterName - String value of filter name
      Returns:
      true if process performs without error
      Throws:
      Exception
      Since:
      4.0.1
    • setColumnSelectSettings

      boolean setColumnSelectSettings(Context context, List<Option> options, String colType, boolean asDefault) throws Exception
      Set columns for current user
      Parameters:
      context - Context object containing informations about client/session
      options - Option list of columns
      colType - String value of column type (i.e : Search type)
      asDefault - Boolean value for default column (not user choice)
      Returns:
      true if process performs without error
      Throws:
      Exception
      Since:
      4.0.1
    • setColumnPreference

      boolean setColumnPreference(Context context, ColumnPreference columnPreference, boolean asDefault) throws Exception
      Set columns for current user
      Parameters:
      context - Context object containing informations about client/session
      columnPreference - ColumnPreference preference for column
      asDefault - Boolean value for default column (not user choice)
      Returns:
      true if process performs without error
      Throws:
      Exception
      Since:
      4.1.0
    • getLanguage

      String getLanguage(Context context) throws Exception
      Get language preference
      Parameters:
      context - Context object containing informations about client/session
      Returns:
      String value of language name
      Throws:
      Exception
      Since:
      4.0.1
    • setTemplateViewPreference

      boolean setTemplateViewPreference(Context context, String templateView) throws Exception
      Set Template View preference
      Parameters:
      context - Context object containing informations about client/session
      Returns:
      String value of language name
      Throws:
      Exception
      Since:
      4.8
    • updatePreferences

      Preference updatePreferences(Context context, Preference updatePreferences) throws Exception
      Update user preferences
      Parameters:
      context -
      updatePreferences -
      Returns:
      Throws:
      Exception
    • updatePreferences

      default void updatePreferences(Context context, Preference updatePreferences, Map<String,String> params) throws Exception
      default implemetnetation. This approach is taken to make sure other classes who implment this interface do not need to implement this method. This is a overloaded method. It takes an extra map having the params which are are part of x3 preferences. This method updates d2c preferences as well as x3 preferences.
      Parameters:
      context -
      updatePreferences -
      params -
      Throws:
      Exception
    • setSearchHighlightEnabled

      boolean setSearchHighlightEnabled(Context context, boolean isEnabled) throws Exception
      Throws:
      Exception
    • getSearchHighlightEnabled

      boolean getSearchHighlightEnabled(Context context) throws Exception
      Throws:
      Exception
    • setSearchSummaryEnabled

      boolean setSearchSummaryEnabled(Context context, boolean isEnabled) throws Exception
      Throws:
      Exception
    • getSearchSummaryEnabled

      boolean getSearchSummaryEnabled(Context context) throws Exception
      Throws:
      Exception