Class BwPreferences

All Implemented Interfaces:
Serializable, Comparable<BwPreferences>, OwnedEntity, PropertiesEntity, org.bedework.util.logging.Logged

public class BwPreferences extends BwOwnedDbentity<BwPreferences> implements PropertiesEntity
Account preferences for Bedework. These affect the user view of calendars.
Version:
1.0
Author:
Mike Douglass douglm rpi.edu
See Also:
  • Field Details

    • views

      protected Collection<BwView> views
      Collection of BwView
    • preferredEndTypeDuration

      public static final String preferredEndTypeDuration
      See Also:
    • preferredEndTypeDate

      public static final String preferredEndTypeDate
      See Also:
    • basicMode

      public static final int basicMode
      Value identifying an extra simple user mode - we just do stuff without asking
      See Also:
    • simpleMode

      public static final int simpleMode
      Value identifying a simple user mode - we hide some stuff but make fewer assumptions
      See Also:
    • advancedMode

      public static final int advancedMode
      Value identifying an advanced user mode - reveal it in all its glory
      See Also:
    • maxMode

      public static final int maxMode
      Max mode value
      See Also:
    • scheduleAutoCancelSetStatus

      public static int scheduleAutoCancelSetStatus
      Set status to cancelled
    • scheduleAutoCancelDelete

      public static int scheduleAutoCancelDelete
      Delete canceled meetings
    • scheduleMaxAutoCancel

      public static int scheduleMaxAutoCancel
    • scheduleAutoProcessResponsesNoAcceptNotify

      public static int scheduleAutoProcessResponsesNoAcceptNotify
      Don't leave any notification for accepts
    • scheduleAutoProcessResponsesNotifyAll

      public static int scheduleAutoProcessResponsesNotifyAll
      Notify for all responses
    • scheduleAutoProcessResponsesNoNotify

      public static int scheduleAutoProcessResponsesNoNotify
      Don't leave any notification
    • scheduleMaxAutoProcessResponses

      public static int scheduleMaxAutoProcessResponses
    • propertyPreferredLocale

      public static final String propertyPreferredLocale
      preferred locale
      See Also:
    • propertyDefaultViewMode

      public static final String propertyDefaultViewMode
      default view-mode grid, daily, list
      See Also:
    • propertyLastLocale

      public static final String propertyLastLocale
      last locale
      See Also:
    • propertyCategoryMapping

      public static final String propertyCategoryMapping
      category mapping for this calsuite
      See Also:
    • propertyCalsuiteApprovers

      public static final String propertyCalsuiteApprovers
      approvers for this calsuite
      See Also:
    • propertyAttachmentsFolder

      public static final String propertyAttachmentsFolder
      path to attachments folder
      See Also:
    • propertyDefaultTzid

      public static final String propertyDefaultTzid
      default timezone id
      See Also:
    • propertyDefaultCategory

      public static final String propertyDefaultCategory
      preferred locale
      See Also:
    • propertyScheduleMaxinstances

      public static final String propertyScheduleMaxinstances
      scheduling max-instances
      See Also:
    • propertyDefaultImageDirectory

      public static final String propertyDefaultImageDirectory
      default image directory
      See Also:
    • propertyAdminResourcesDirectory

      public static final String propertyAdminResourcesDirectory
      default admin resources directory
      See Also:
    • propertySuiteResourcesDirectory

      public static final String propertySuiteResourcesDirectory
      default suite resources directory
      See Also:
    • propertyAdminClearFormsOnSubmit

      public static final String propertyAdminClearFormsOnSubmit
      admin clear form on submit
      See Also:
    • propertyPreferredGroup

      public static final String propertyPreferredGroup
      preferred group - admin suggest event - this may occur multiple times
      See Also:
    • propertyNotificationToken

      public static final String propertyNotificationToken
      Notification token
      See Also:
    • propertySuppressNotifications

      public static final String propertySuppressNotifications
      User want notifications suppressed?
      See Also:
    • propertyMaxEntitySize

      public static final String propertyMaxEntitySize
      XXX Only here till we update schema max entity size for this user -only settable by admin
      See Also:
    • propertyQuotaUsed

      public static final String propertyQuotaUsed
      XXX Only here till we update schema current quota used
      See Also:
  • Constructor Details

    • BwPreferences

      public BwPreferences()
      Constructor
  • Method Details

    • setViews

      public void setViews(Collection<BwView> val)
      Set of views principal has defined
      Parameters:
      val - Collection of BwView
    • getViews

      public Collection<BwView> getViews()
      Get the calendars principal is subscribed to
      Returns:
      Collection of BwView
    • setEmail

      public void setEmail(String val)
      Parameters:
      val - String email
    • getEmail

      public String getEmail()
      Returns:
      String email
    • setDefaultCalendarPath

      public void setDefaultCalendarPath(String val)
      Parameters:
      val - default calendar path
    • getDefaultCalendarPath

      public String getDefaultCalendarPath()
      Returns:
      String default calendar path
    • setSkinName

      public void setSkinName(String val)
      Parameters:
      val - skin name
    • getSkinName

      public String getSkinName()
      Returns:
      String skin name
    • setSkinStyle

      public void setSkinStyle(String val)
      Parameters:
      val - skin style
    • getSkinStyle

      public String getSkinStyle()
      Returns:
      String skin style
    • setPreferredView

      public void setPreferredView(String val)
      Parameters:
      val - preferred view
    • getPreferredView

      public String getPreferredView()
      Returns:
      String preferred view
    • setPreferredViewPeriod

      public void setPreferredViewPeriod(String val)
      The value should be a non-internationalized String out of "today", "day", "week", "month", "year". The user interface can present language appropriate labels.
      Parameters:
      val - preferred view period
    • getPreferredViewPeriod

      public String getPreferredViewPeriod()
      Returns:
      String preferred view period
    • setPageSize

      public void setPageSize(int val)
      Parameters:
      val - number of results in search result page
    • getPageSize

      public int getPageSize()
      Returns:
      number of results in search result page
    • setWorkDays

      public void setWorkDays(String val)
      Parameters:
      val - work days
    • getWorkDays

      public String getWorkDays()
      Returns:
      String work days
    • setWorkdayStart

      public void setWorkdayStart(int val)
      Parameters:
      val - day number for start of week
    • getWorkdayStart

      public int getWorkdayStart()
      Returns:
      int work day start
    • setWorkdayEnd

      public void setWorkdayEnd(int val)
      Parameters:
      val - day number for end of week
    • getWorkdayEnd

      public int getWorkdayEnd()
      Returns:
      int work day end
    • setPreferredEndType

      public void setPreferredEndType(String val)
      Parameters:
      val - preferred end type
    • getPreferredEndType

      public String getPreferredEndType()
      Returns:
      String preferred end type (none, duration, date/time)
    • setUserMode

      public void setUserMode(int val)
      Parameters:
      val - user mode code
    • getUserMode

      public int getUserMode()
      Returns:
      int user mode
    • setHour24

      public void setHour24(boolean val)
      Parameters:
      val - true for 24 hour
    • getHour24

      public boolean getHour24()
      Returns:
      bool
    • setScheduleAutoRespond

      public void setScheduleAutoRespond(boolean val)
      Parameters:
      val - true for auto respond
    • getScheduleAutoRespond

      public boolean getScheduleAutoRespond()
      Returns:
      bool
    • setScheduleAutoCancelAction

      public void setScheduleAutoCancelAction(int val)
      Parameters:
      val - auto cancel action code
    • getScheduleAutoCancelAction

      public int getScheduleAutoCancelAction()
      Returns:
      int
    • setScheduleDoubleBook

      public void setScheduleDoubleBook(boolean val)
      Parameters:
      val - true if double booking allowed
    • getScheduleDoubleBook

      public boolean getScheduleDoubleBook()
      Returns:
      bool
    • setScheduleAutoProcessResponses

      public void setScheduleAutoProcessResponses(int val)
      Parameters:
      val - response action code
    • getScheduleAutoProcessResponses

      public int getScheduleAutoProcessResponses()
      Returns:
      int
    • setProperties

      public void setProperties(Set<BwProperty> val)
      Specified by:
      setProperties in interface PropertiesEntity
    • getProperties

      public Set<BwProperty> getProperties()
      Specified by:
      getProperties in interface PropertiesEntity
      Returns:
      properties
    • getProperties

      public Set<BwProperty> getProperties(String name)
      Specified by:
      getProperties in interface PropertiesEntity
      Returns:
      properties with given name
    • removeProperties

      public void removeProperties(String name)
      Description copied from interface: PropertiesEntity
      Remove all with given name
      Specified by:
      removeProperties in interface PropertiesEntity
    • getNumProperties

      public int getNumProperties()
      Specified by:
      getNumProperties in interface PropertiesEntity
      Returns:
      int
    • findProperty

      public BwProperty findProperty(String name)
      Specified by:
      findProperty in interface PropertiesEntity
      Returns:
      property or null
    • addProperty

      public void addProperty(BwProperty val)
      Specified by:
      addProperty in interface PropertiesEntity
    • removeProperty

      public boolean removeProperty(BwProperty val)
      Specified by:
      removeProperty in interface PropertiesEntity
      Returns:
      boolean
    • copyProperties

      public Set<BwProperty> copyProperties()
      Specified by:
      copyProperties in interface PropertiesEntity
      Returns:
      BwProperty
    • cloneProperties

      public Set<BwProperty> cloneProperties()
      Specified by:
      cloneProperties in interface PropertiesEntity
      Returns:
      BwProperty
    • setCategoryMapping

      public void setCategoryMapping(String val)
      Parameters:
      val - yaml style category mapping.
    • getCategoryMapping

      public String getCategoryMapping()
      Returns:
      yaml style category mapping.
    • readCategoryMappings

      public org.bedework.util.misc.response.GetEntityResponse<BwPreferences.CategoryMappings> readCategoryMappings()
    • checkCategoryMappings

      public org.bedework.util.misc.response.GetEntityResponse<BwPreferences.CategoryMappings> checkCategoryMappings(String mappings)
    • setCalsuiteApprovers

      public void setCalsuiteApprovers(String val)
      Parameters:
      val - Comma separated calsuite approvers.
    • getCalsuiteApprovers

      public String getCalsuiteApprovers()
      Returns:
      Comma separated calsuite approvers.
    • getCalsuiteApproversList

      public List<String> getCalsuiteApproversList()
      Returns:
      List from approvers.
    • setAttachmentsPath

      public void setAttachmentsPath(String val)
      Parameters:
      val - String path.
    • getAttachmentsPath

      public String getAttachmentsPath()
      Returns:
      String path.
    • setDefaultImageDirectory

      public void setDefaultImageDirectory(String val)
      Parameters:
      val - String path.
    • getDefaultImageDirectory

      public String getDefaultImageDirectory()
      Returns:
      String path.
    • setAdminResourcesDirectory

      public void setAdminResourcesDirectory(String val)
      Parameters:
      val - String path.
    • getAdminResourcesDirectory

      public String getAdminResourcesDirectory()
      Returns:
      String path.
    • setSuiteResourcesDirectory

      public void setSuiteResourcesDirectory(String val)
      Parameters:
      val - String path.
    • getSuiteResourcesDirectory

      public String getSuiteResourcesDirectory()
      Returns:
      String path.
    • setClearFormsOnSubmit

      public void setClearFormsOnSubmit(String val)
      Parameters:
      val - String clear form pref - null for default.
    • getClearFormsOnSubmit

      public String getClearFormsOnSubmit()
      Returns:
      String clear form pref.
    • setDefaultViewMode

      public void setDefaultViewMode(String val)
      Parameters:
      val - String ViewMode.
    • getDefaultViewMode

      public String getDefaultViewMode()
      Returns:
      String ViewMode.
    • setDefaultTzid

      public void setDefaultTzid(String val)
      Parameters:
      val - String tzid.
    • getDefaultTzid

      public String getDefaultTzid()
      Returns:
      String tzid.
    • setMaxEntitySize

      public void setMaxEntitySize(long val)
      XXX only till we change schema and move this into principal object
      Parameters:
      val - long max entity size.
    • getMaxEntitySize

      public long getMaxEntitySize()
      XXX only till we change schema and move this into principal object
      Returns:
      long max entity size.
    • setQuotaUsed

      public void setQuotaUsed(long val)
      XXX only till we change schema and move this into principal object
      Parameters:
      val - long quota used.
    • getQuotaUsed

      public long getQuotaUsed()
      XXX only till we change schema and move this into principal object
      Returns:
      long quota used.
    • setDefaultCategoryUids

      public void setDefaultCategoryUids(Set<String> val)
      Supply the set of default category uids. Will replace the current set.
      Parameters:
      val - Set of category uids.
    • getDefaultCategoryUids

      public Set<String> getDefaultCategoryUids()
      Get the set of default category uids.
      Returns:
      Set of category uids - always non-null.
    • getPreferredGroups

      public Set<String> getPreferredGroups()
      Get the set of preferred groups.
      Returns:
      Set of group hrefs - always non-null.
    • addPreferredGroup

      public void addPreferredGroup(String href)
      Add a preferred group.
      Parameters:
      href - group href
    • setNotificationToken

      public void setNotificationToken(String val)
      Parameters:
      val - String Notification Token.
    • getNotificationToken

      public String getNotificationToken()
      Returns:
      String Notification Token.
    • setNoNotifications

      public void setNoNotifications(boolean val)
      Parameters:
      val - No Notifications?
    • getNoNotifications

      public boolean getNoNotifications()
      Returns:
      No Notifications?
    • setHref

      public void setHref(String val)
      Set the href - ignored
      Overrides:
      setHref in class BwUnversionedDbentity<BwPreferences>
      Parameters:
      val - String href
    • getHref

      public String getHref()
      Overrides:
      getHref in class BwUnversionedDbentity<BwPreferences>
      Returns:
      non null unique href for the entity
    • addView

      public boolean addView(BwView val)
      Parameters:
      val - - the view
      Returns:
      boolean true if removed
    • setWorkdayStartTime

      public void setWorkdayStartTime(String val)
      Set the workday start minutes from a String time value
      Parameters:
      val - String time value
    • getWorkdayStartTime

      public String getWorkdayStartTime()
      Get the workday start as a 4 digit String hours and minutes value
      Returns:
      String work day start time
    • setWorkdayEndTime

      public void setWorkdayEndTime(String val)
      Set the workday end minutes from a String time value
      Parameters:
      val - String time value
    • getWorkdayEndTime

      public String getWorkdayEndTime()
      Get the workday end as a 4 digit String hours and minutes value
      Returns:
      String work day end time
    • compareTo

      public int compareTo(BwPreferences that)
      Comapre this view and an object
      Specified by:
      compareTo in interface Comparable<BwPreferences>
      Overrides:
      compareTo in class BwUnversionedDbentity<BwPreferences>
      Parameters:
      that - object to compare.
      Returns:
      int -1, 0, 1
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class BwUnversionedDbentity<BwPreferences>
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class BwUnversionedDbentity<BwPreferences>
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getRestoreCallback

      public static org.bedework.util.xml.FromXmlCallback getRestoreCallback()