Class Agenda

  • All Implemented Interfaces:
    java.io.Serializable

    public class Agenda
    extends java.lang.Object
    implements java.io.Serializable
    Agenda instance
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String DISP_MONTH  
      static java.lang.String DISP_WEEK  
    • Constructor Summary

      Constructors 
      Constructor Description
      Agenda​(ObjectDB obj, java.lang.String id, java.lang.String name, boolean[] openDays, boolean flying, java.lang.String dateField, java.util.List<java.lang.String> labelFields, java.lang.String durationField, java.lang.String userField, java.lang.String groupField)
      Constructor
    • Method Summary

      Modifier and Type Method Description
      java.lang.String getCurrentDate()  
      java.lang.String getCurrentGroup()  
      java.lang.String getCurrentUser()  
      java.util.List<java.lang.String[]> getData​(ObjectDB object, java.lang.String start, java.lang.String end, java.lang.String login, java.lang.String group, boolean resetFilter)
      Find data for a period
      java.lang.String getDateFieldName()  
      java.util.List<java.lang.String> getDays​(java.lang.String d)
      Disposition days
      java.lang.String getDisposition()  
      java.lang.String getDurationFieldName()  
      java.lang.String getEndHour()  
      java.lang.String getGroupFieldName()  
      java.lang.String[] getGroups​(ObjectDB object)
      Groups linked to the object
      java.lang.String getId()  
      java.util.List<java.lang.String> getLabelFieldNames()  
      java.lang.String[] getLogins​(ObjectDB object)
      Logins linked to the object
      java.util.List<java.lang.String> getMonth​(java.lang.String d)
      Search a month
      java.lang.String getName()  
      int getOpenDayCount()  
      int getQuantum()  
      java.lang.String getStartHour()  
      java.lang.String getUserFieldName()  
      java.util.List<java.lang.String> getWeek​(java.lang.String d)
      Search a week
      boolean isEnabled()  
      boolean isFixed()
      First day is always the same?
      boolean isFloating()
      Is floating agenda? true=first column is the requested date or today, false=from Monday to Sunday including the requested date or today
      boolean isMonthly()  
      boolean isNavigable()  
      boolean isOpenDay​(java.lang.String date)  
      boolean isOpenDay​(java.util.Date date)  
      boolean isWeekly()  
      void setCurrentDate​(java.lang.String dt)  
      void setCurrentGroup​(java.lang.String group)  
      void setCurrentUser​(java.lang.String user)  
      void setDisposition​(java.lang.String d)  
      void setEnabled​(boolean enabled)  
      void setEndHour​(java.lang.String end)  
      void setFloating​(boolean f)
      Set floating agenda: true=first column is the requested date or today, false=from Monday to Sunday including the requested date or today
      void setLabelFieldNames​(java.util.List<java.lang.String> list)  
      void setNavigable​(boolean b)  
      void setOpenDays​(boolean[] openDays)  
      void setQuantum​(int q)
      Set the hour quantum to display (default is 30 minutes)
      void setStartHour​(java.lang.String start)  
      java.lang.String toJSON​(ObjectDB obj)
      Serialize a JSON object
      java.lang.String toString()
      Generates basic string dump for agenda (usefull for debug purposes)
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Agenda

        public Agenda​(ObjectDB obj,
                      java.lang.String id,
                      java.lang.String name,
                      boolean[] openDays,
                      boolean flying,
                      java.lang.String dateField,
                      java.util.List<java.lang.String> labelFields,
                      java.lang.String durationField,
                      java.lang.String userField,
                      java.lang.String groupField)
        Constructor
        Parameters:
        obj - Agenda Object
        id - Agenda id
        name - Agenda name
        openDays - Week open days from monday to sunday
        flying - Flying agenda: true=first column is the requested date or today, false=from monday to sunday including the requested date or today
        dateField - Field date
        labelFields - Field labels
        durationField - Field duration
        userField - Field user
        groupField - Field group
    • Method Detail

      • getId

        public java.lang.String getId()
      • getName

        public java.lang.String getName()
      • getDateFieldName

        public java.lang.String getDateFieldName()
      • getDurationFieldName

        public java.lang.String getDurationFieldName()
      • getLabelFieldNames

        public java.util.List<java.lang.String> getLabelFieldNames()
      • setLabelFieldNames

        public void setLabelFieldNames​(java.util.List<java.lang.String> list)
      • isEnabled

        public boolean isEnabled()
      • setEnabled

        public void setEnabled​(boolean enabled)
      • getUserFieldName

        public java.lang.String getUserFieldName()
      • getGroupFieldName

        public java.lang.String getGroupFieldName()
      • getCurrentDate

        public java.lang.String getCurrentDate()
      • setCurrentDate

        public void setCurrentDate​(java.lang.String dt)
      • getCurrentGroup

        public java.lang.String getCurrentGroup()
      • setCurrentGroup

        public void setCurrentGroup​(java.lang.String group)
      • getCurrentUser

        public java.lang.String getCurrentUser()
      • setCurrentUser

        public void setCurrentUser​(java.lang.String user)
      • getDisposition

        public java.lang.String getDisposition()
      • setDisposition

        public void setDisposition​(java.lang.String d)
      • isWeekly

        public boolean isWeekly()
      • isMonthly

        public boolean isMonthly()
      • isNavigable

        public boolean isNavigable()
      • setNavigable

        public void setNavigable​(boolean b)
      • isOpenDay

        public boolean isOpenDay​(java.lang.String date)
                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • isOpenDay

        public boolean isOpenDay​(java.util.Date date)
      • getOpenDayCount

        public int getOpenDayCount()
      • setOpenDays

        public void setOpenDays​(boolean[] openDays)
      • isFloating

        public boolean isFloating()
        Is floating agenda? true=first column is the requested date or today, false=from Monday to Sunday including the requested date or today
        Returns:
        is floating agenda ?
      • isFixed

        public boolean isFixed()
        First day is always the same?
      • setFloating

        public void setFloating​(boolean f)
        Set floating agenda: true=first column is the requested date or today, false=from Monday to Sunday including the requested date or today
        Parameters:
        f - floating agenda ?
      • setStartHour

        public void setStartHour​(java.lang.String start)
      • getStartHour

        public java.lang.String getStartHour()
      • setEndHour

        public void setEndHour​(java.lang.String end)
      • getEndHour

        public java.lang.String getEndHour()
      • setQuantum

        public void setQuantum​(int q)
        Set the hour quantum to display (default is 30 minutes)
        Parameters:
        q - subdivision of hour or day / list AGENDA_QUANTUM in minutes (5, 10, 15, 20, 30, 60, 90, 120, ... 720)
      • getQuantum

        public int getQuantum()
      • getDays

        public java.util.List<java.lang.String> getDays​(java.lang.String d)
        Disposition days
        Parameters:
        d - a day yyyy-MM-dd (today if null)
        Returns:
        Dates list yyyy-MM-dd (week or month)
      • getWeek

        public java.util.List<java.lang.String> getWeek​(java.lang.String d)
        Search a week
        Parameters:
        d - a day yyyy-MM-dd (today if null)
        Returns:
        Dates list (7 days flying or not) yyyy-MM-dd
      • getMonth

        public java.util.List<java.lang.String> getMonth​(java.lang.String d)
        Search a month
        Parameters:
        d - a day yyyy-MM-dd (today if null)
        Returns:
        Dates list including the day yyyy-MM-dd
      • getLogins

        public java.lang.String[] getLogins​(ObjectDB object)
        Logins linked to the object
        Parameters:
        object - Object
        Returns:
        Login list
      • getGroups

        public java.lang.String[] getGroups​(ObjectDB object)
        Groups linked to the object
        Parameters:
        object - Object
        Returns:
        Group list
      • getData

        public java.util.List<java.lang.String[]> getData​(ObjectDB object,
                                                          java.lang.String start,
                                                          java.lang.String end,
                                                          java.lang.String login,
                                                          java.lang.String group,
                                                          boolean resetFilter)
        Find data for a period
        Parameters:
        object - Business object
        start - yyyy-MM-dd
        end - yyyy-MM-dd
        login - Optional user
        group - Optional group
        resetFilter - reset Filter ?
        Returns:
        Object records
      • toString

        public java.lang.String toString()
        Generates basic string dump for agenda (usefull for debug purposes)
        Overrides:
        toString in class java.lang.Object
        Returns:
        agenda as string
      • toJSON

        public java.lang.String toJSON​(ObjectDB obj)
        Serialize a JSON object
        Parameters:
        obj - Related business objet
        Returns:
        JSON