Class AbstractCalendarEvent

    • Constructor Detail

      • AbstractCalendarEvent

        public AbstractCalendarEvent()
      • AbstractCalendarEvent

        public AbstractCalendarEvent​(Content other)
    • Method Detail

      • overlapWith

        public boolean overlapWith​(java.util.Date startDate,
                                   java.util.Date endDate)
        Description copied from interface: CalendarEventInterface
        Check if calendar event overlap with given interval
        Specified by:
        overlapWith in interface CalendarEventInterface
        Parameters:
        startDate - the start date of the interval to check
        endDate - the end date of the interval to check
        Returns:
        true if event overlap with given interval, false otherwise
      • isAttendee

        public boolean isAttendee​(Member mbr)
        Description copied from interface: CalendarEventInterface
        Check if a given member attends this calendar event (Warning: read right are not checked), either because he is in a group attending the event or else if he is in the list of attendees
        Specified by:
        isAttendee in interface CalendarEventInterface
        Parameters:
        mbr - the member to check
        Returns:
        true if the member attends the event, false otherwise
      • isAttendee

        public boolean isAttendee​(Member mbr,
                                  boolean checkReadRight)
        Description copied from interface: CalendarEventInterface
        Check if a given member attends this calendar event, either because he is in a group attending the event or else if he is in the list of attendees
        Specified by:
        isAttendee in interface CalendarEventInterface
        Parameters:
        mbr - the member to check
        checkReadRight - set to true if read right should be checked (in which case a member is considered attendee only when is can read the event), set to false if read right should not be checked (in which case a member is considered attendee event if he cannot read the event)
        Returns:
        true if the member attends the event, false otherwise
      • getCalendarEventAttendeeListSelector

        public static AbstractCalendarEvent.CalendarEventAttendeeSelector getCalendarEventAttendeeListSelector​(java.util.List<Member> mbrList)
        Parameters:
        mbrList - the member List to select the calendar event
        Returns:
        a new instance of CalendarEventAttendeeSelector initialiazed with the given member
        Since:
        jcms-9.0
      • getCalendarEventAttendeeListSelector

        public static AbstractCalendarEvent.CalendarEventAttendeeSelector getCalendarEventAttendeeListSelector​(java.util.List<Member> mbrList,
                                                                                                               boolean checkReadRight)
        Parameters:
        mbrList - the member List to select the calendar event
        checkReadRight - set to true if read right should be checked, false if all CalendarEvent should be included even if Member is not able to read the event
        Returns:
        a new instance of CalendarEventAttendeeSelector initialiazed with the given member
        Since:
        jcms-9.0
      • getCalendarEventAttendeeSelector

        public static AbstractCalendarEvent.CalendarEventAttendeeSelector getCalendarEventAttendeeSelector​(Member mbr)
        Parameters:
        mbr - the member to select the calendar event
        Returns:
        a new instance of CalendarEventAttendeeSelector initialiazed with the given member
      • getCalendarEventAttendeeSelector

        public static AbstractCalendarEvent.CalendarEventAttendeeSelector getCalendarEventAttendeeSelector​(Member mbr,
                                                                                                           boolean checkReadRight)
        Parameters:
        mbr - the member to select the calendar event
        checkReadRight - set to true if read right should be checked, false if all CalendarEvent should be included even if Member is not able to read the event
        Returns:
        a new instance of CalendarEventAttendeeSelector initialiazed with the given member
        Since:
        jcms-6.1.3, jcms-7.0
      • getAllAttendingMembersSet

        public java.util.TreeSet<Member> getAllAttendingMembersSet()
        Description copied from interface: CalendarEventInterface
        Return a set containing all the members attending this event. Contains all members from the attendees groups and the attendees member, who can read this calendar event (this set is built and cached on create/update of event).
        Specified by:
        getAllAttendingMembersSet in interface CalendarEventInterface
        Returns:
        a TreeSet of all member attending to this event
      • getAllAttendingMembersSet

        public java.util.TreeSet<Member> getAllAttendingMembersSet​(boolean checkReadRight)
        Description copied from interface: CalendarEventInterface
        Return a set containing all the members attending this event checking for readright or not. Contains all members from the attendees groups and the attendees member, (this set is built and cached on create/update of event).
        Specified by:
        getAllAttendingMembersSet in interface CalendarEventInterface
        Parameters:
        checkReadRight - set to true if read right should be checked, false if all attendee should be included even Member not able to read the event
        Returns:
        a TreeSet of all member attending to this event
      • getAttendingMemberSet

        public java.util.TreeSet<Member> getAttendingMemberSet()
        Description copied from interface: CalendarEventInterface
        Retrieve the attending members as a Set, with the author included.
        Specified by:
        getAttendingMemberSet in interface CalendarEventInterface
        Returns:
        the set of attending members corresponding to attenginmembers with author added, never return null
      • removeAttendee

        public boolean removeAttendee​(Member mbr)
        Description copied from interface: CalendarEventInterface
        Remove given member from the attending members, updates the all member set. Note: Does not perform update in store, this method must be called on the clone to be updated.
        Specified by:
        removeAttendee in interface CalendarEventInterface
        Parameters:
        mbr - the Member to remove
        Returns:
        true if a modification was made
      • checkIntegrity

        public ControllerStatus checkIntegrity()
        Checks whether or not data integrity constraints are respected.
        Overrides:
        checkIntegrity in class Publication
        Returns:
        a ControllerStatus
        Since:
        jcms-5.0.0
      • performCreate

        public void performCreate​(Member mbr,
                                  java.util.Map context)
        Performs additionnal task during creation of CalendarEvent. - Synchronize the SDate with the StartDate.
        Overrides:
        performCreate in class Publication
        Parameters:
        mbr - the member which requests the write operation
        context - a map which contains context parameters (may be null)
        Since:
        jcms-5.5.0
      • performUpdate

        public void performUpdate​(Member mbr,
                                  java.util.Map context)
        Performs additionnal task during update of CalendarEvent. - Synchronize the SDate with the StartDate.
        Overrides:
        performUpdate in class Publication
        Parameters:
        mbr - the member which requests the write operation
        context - a map which contains context parameters (may be null)
        Since:
        jcms-5.5.0
      • getDataIcon

        public java.lang.String getDataIcon()
        Description copied from class: Data
        Returns source information for the icon associated to this Data, either a relative path or sprite classes name.

        If this method behavior has not been overriden by subclass, the default icon can be declared using property types.{Type}.icon, where {Type} is the short class name of the type concerned.

        • Either by specifying a relative image path :
          types.Article.icon: images/jalios/icon/abstract.gif 
        • or else by using a sprite icon :
          types.Article.icon: ss_sprite ss_date
        Overrides:
        getDataIcon in class Publication
        Returns:
        a relative path (eg images/jalios/icon/abstract.gif) or sprite classes name (eg ss_sprite ss_date).
        See Also:
        Data.getDataIconHtml(String)
      • getNotDeclinedAttendeeSet

        public abstract java.util.Set<Member> getNotDeclinedAttendeeSet()
        Retrieves the Set of attendees which has not declined (accepted ou pending attendees)
        Returns:
        the Set of attendees which has not declined
      • getAttendeeSelector

        public static DataSelector getAttendeeSelector​(CalendarEventInterface event,
                                                       boolean checkReadRights)
        Get Attendee DataSelector Return true is user is enabled and can read event (if checkReadRights parameter is true)
        Parameters:
        event - the event used to check rights
        checkReadRights - true if the read rights should be checked.
        Returns:
        the DataSelector