All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.teamapps.dto.UiCalendar Maven / Gradle / Ivy

There is a newer version: 0.9.191
Show newest version
package org.teamapps.dto;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.function.Supplier;
import java.util.stream.Collectors;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonTypeIdResolver;

/**
 * THIS IS GENERATED CODE!
 * PLEASE DO NOT MODIFY - ALL YOUR WORK WOULD BE LOST!
 */
@JsonTypeInfo(use = JsonTypeInfo.Id.CUSTOM, property = "_type", defaultImpl = UiCalendar.class)
public class UiCalendar extends UiComponent implements UiObject {


	protected Map templates;
	protected List initialData;
	protected UiCalendarViewMode activeViewMode = UiCalendarViewMode.MONTH;
	protected long displayedDate = System.currentTimeMillis();
	protected boolean showHeader = true;
	protected boolean tableBorder = true;
	protected boolean showWeekNumbers = true;
	protected int businessHoursStart = 8;
	protected int businessHoursEnd = 17;
	protected UiWeekDay firstDayOfWeek = null;
	protected List workingDays = java.util.Arrays.asList(UiWeekDay.MONDAY, UiWeekDay.TUESDAY, UiWeekDay.WEDNESDAY, UiWeekDay.THURSDAY, UiWeekDay.FRIDAY);
	protected String tableHeaderBackgroundColor = "rgb(255, 255, 255)";
	protected String defaultBackgroundColor = "rgb(154, 204, 228)";
	protected String defaultBorderColor = "rgb(154, 204, 228)";
	protected boolean navigateOnHeaderClicks = true;
	protected int minYearViewMonthTileWidth = 175;
	protected int maxYearViewMonthTileWidth = 0;
	protected String locale;
	protected String timeZoneId = "UTC";

	public UiCalendar() {
		super();
	}

	@com.fasterxml.jackson.annotation.JsonIgnore
	public UiObjectType getUiObjectType() {
		return UiObjectType.UI_CALENDAR;
	}

	@SuppressWarnings("unchecked")
	public String toString() {
		return new StringBuilder(getClass().getSimpleName()).append(": ")
				.append("id=" + id).append(", ")
				.append("debuggingId=" + debuggingId).append(", ")
				.append("timeZoneId=" + timeZoneId).append(", ")
				.append("classNamesBySelector=" + classNamesBySelector).append(", ")
				.append("visible=" + visible).append(", ")
				.append("stylesBySelector=" + stylesBySelector).append(", ")
				.append("attributesBySelector=" + attributesBySelector).append(", ")
				.append(templates != null ? "templates={" + templates.toString() + "}" : "").append(", ")
				.append("activeViewMode=" + activeViewMode).append(", ")
				.append("displayedDate=" + displayedDate).append(", ")
				.append("showHeader=" + showHeader).append(", ")
				.append("tableBorder=" + tableBorder).append(", ")
				.append("showWeekNumbers=" + showWeekNumbers).append(", ")
				.append("businessHoursStart=" + businessHoursStart).append(", ")
				.append("businessHoursEnd=" + businessHoursEnd).append(", ")
				.append("firstDayOfWeek=" + firstDayOfWeek).append(", ")
				.append("workingDays=" + workingDays).append(", ")
				.append("tableHeaderBackgroundColor=" + tableHeaderBackgroundColor).append(", ")
				.append("defaultBackgroundColor=" + defaultBackgroundColor).append(", ")
				.append("defaultBorderColor=" + defaultBorderColor).append(", ")
				.append("navigateOnHeaderClicks=" + navigateOnHeaderClicks).append(", ")
				.append("minYearViewMonthTileWidth=" + minYearViewMonthTileWidth).append(", ")
				.append("maxYearViewMonthTileWidth=" + maxYearViewMonthTileWidth).append(", ")
				.append("locale=" + locale).append(", ")
				.append(initialData != null ? "initialData={" + initialData.toString() + "}" : "")
				.toString();
	}

	@com.fasterxml.jackson.annotation.JsonGetter("templates")
	public Map getTemplates() {
		return templates;
	}

	@com.fasterxml.jackson.annotation.JsonGetter("initialData")
	public List getInitialData() {
		return initialData;
	}

	@com.fasterxml.jackson.annotation.JsonGetter("activeViewMode")
	public UiCalendarViewMode getActiveViewMode() {
		return activeViewMode;
	}

	@com.fasterxml.jackson.annotation.JsonGetter("displayedDate")
	public long getDisplayedDate() {
		return displayedDate;
	}

	@com.fasterxml.jackson.annotation.JsonGetter("showHeader")
	public boolean getShowHeader() {
		return showHeader;
	}

	@com.fasterxml.jackson.annotation.JsonGetter("tableBorder")
	public boolean getTableBorder() {
		return tableBorder;
	}

	@com.fasterxml.jackson.annotation.JsonGetter("showWeekNumbers")
	public boolean getShowWeekNumbers() {
		return showWeekNumbers;
	}

	@com.fasterxml.jackson.annotation.JsonGetter("businessHoursStart")
	public int getBusinessHoursStart() {
		return businessHoursStart;
	}

	@com.fasterxml.jackson.annotation.JsonGetter("businessHoursEnd")
	public int getBusinessHoursEnd() {
		return businessHoursEnd;
	}

	@com.fasterxml.jackson.annotation.JsonGetter("firstDayOfWeek")
	public UiWeekDay getFirstDayOfWeek() {
		return firstDayOfWeek;
	}

	@com.fasterxml.jackson.annotation.JsonGetter("workingDays")
	public List getWorkingDays() {
		return workingDays;
	}

	@com.fasterxml.jackson.annotation.JsonGetter("tableHeaderBackgroundColor")
	public String getTableHeaderBackgroundColor() {
		return tableHeaderBackgroundColor;
	}

	@com.fasterxml.jackson.annotation.JsonGetter("defaultBackgroundColor")
	public String getDefaultBackgroundColor() {
		return defaultBackgroundColor;
	}

	@com.fasterxml.jackson.annotation.JsonGetter("defaultBorderColor")
	public String getDefaultBorderColor() {
		return defaultBorderColor;
	}

	@com.fasterxml.jackson.annotation.JsonGetter("navigateOnHeaderClicks")
	public boolean getNavigateOnHeaderClicks() {
		return navigateOnHeaderClicks;
	}

	@com.fasterxml.jackson.annotation.JsonGetter("minYearViewMonthTileWidth")
	public int getMinYearViewMonthTileWidth() {
		return minYearViewMonthTileWidth;
	}

	@com.fasterxml.jackson.annotation.JsonGetter("maxYearViewMonthTileWidth")
	public int getMaxYearViewMonthTileWidth() {
		return maxYearViewMonthTileWidth;
	}

	@com.fasterxml.jackson.annotation.JsonGetter("locale")
	public String getLocale() {
		return locale;
	}

	@com.fasterxml.jackson.annotation.JsonGetter("timeZoneId")
	public String getTimeZoneId() {
		return timeZoneId;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("id")
	public UiCalendar setId(String id) {
		this.id = id;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("debuggingId")
	public UiCalendar setDebuggingId(String debuggingId) {
		this.debuggingId = debuggingId;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("visible")
	public UiCalendar setVisible(boolean visible) {
		this.visible = visible;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("stylesBySelector")
	public UiCalendar setStylesBySelector(Map> stylesBySelector) {
		this.stylesBySelector = stylesBySelector;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("classNamesBySelector")
	public UiCalendar setClassNamesBySelector(Map> classNamesBySelector) {
		this.classNamesBySelector = classNamesBySelector;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("attributesBySelector")
	public UiCalendar setAttributesBySelector(Map> attributesBySelector) {
		this.attributesBySelector = attributesBySelector;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("templates")
	public UiCalendar setTemplates(Map templates) {
		this.templates = templates;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("initialData")
	public UiCalendar setInitialData(List initialData) {
		this.initialData = initialData;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("activeViewMode")
	public UiCalendar setActiveViewMode(UiCalendarViewMode activeViewMode) {
		this.activeViewMode = activeViewMode;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("displayedDate")
	public UiCalendar setDisplayedDate(long displayedDate) {
		this.displayedDate = displayedDate;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("showHeader")
	public UiCalendar setShowHeader(boolean showHeader) {
		this.showHeader = showHeader;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("tableBorder")
	public UiCalendar setTableBorder(boolean tableBorder) {
		this.tableBorder = tableBorder;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("showWeekNumbers")
	public UiCalendar setShowWeekNumbers(boolean showWeekNumbers) {
		this.showWeekNumbers = showWeekNumbers;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("businessHoursStart")
	public UiCalendar setBusinessHoursStart(int businessHoursStart) {
		this.businessHoursStart = businessHoursStart;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("businessHoursEnd")
	public UiCalendar setBusinessHoursEnd(int businessHoursEnd) {
		this.businessHoursEnd = businessHoursEnd;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("firstDayOfWeek")
	public UiCalendar setFirstDayOfWeek(UiWeekDay firstDayOfWeek) {
		this.firstDayOfWeek = firstDayOfWeek;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("workingDays")
	public UiCalendar setWorkingDays(List workingDays) {
		this.workingDays = workingDays;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("tableHeaderBackgroundColor")
	public UiCalendar setTableHeaderBackgroundColor(String tableHeaderBackgroundColor) {
		this.tableHeaderBackgroundColor = tableHeaderBackgroundColor;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("defaultBackgroundColor")
	public UiCalendar setDefaultBackgroundColor(String defaultBackgroundColor) {
		this.defaultBackgroundColor = defaultBackgroundColor;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("defaultBorderColor")
	public UiCalendar setDefaultBorderColor(String defaultBorderColor) {
		this.defaultBorderColor = defaultBorderColor;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("navigateOnHeaderClicks")
	public UiCalendar setNavigateOnHeaderClicks(boolean navigateOnHeaderClicks) {
		this.navigateOnHeaderClicks = navigateOnHeaderClicks;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("minYearViewMonthTileWidth")
	public UiCalendar setMinYearViewMonthTileWidth(int minYearViewMonthTileWidth) {
		this.minYearViewMonthTileWidth = minYearViewMonthTileWidth;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("maxYearViewMonthTileWidth")
	public UiCalendar setMaxYearViewMonthTileWidth(int maxYearViewMonthTileWidth) {
		this.maxYearViewMonthTileWidth = maxYearViewMonthTileWidth;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("locale")
	public UiCalendar setLocale(String locale) {
		this.locale = locale;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("timeZoneId")
	public UiCalendar setTimeZoneId(String timeZoneId) {
		this.timeZoneId = timeZoneId;
		return this;
	}

	public static class EventClickedEvent implements UiEvent {

		@UiComponentId protected String componentId;
		protected int eventId;
		protected boolean isDoubleClick;

		/**
		 * @deprecated Only for Jackson deserialization. Use the other constructor instead.
		 */
		@Deprecated
		public EventClickedEvent() {
			// default constructor for Jackson
		}

		public EventClickedEvent(String componentId, int eventId, boolean isDoubleClick) {
			this.componentId = componentId;
			this.eventId = eventId;
			this.isDoubleClick = isDoubleClick;
		}

		public UiEventType getUiEventType() {
			return UiEventType.UI_CALENDAR_EVENT_CLICKED;
		}

		@SuppressWarnings("unchecked")
		public String toString() {
			return new StringBuilder(getClass().getSimpleName()).append(": ")
					.append("componentId=" + componentId).append(", ")
					.append("eventId=" + eventId).append(", ")
					.append("isDoubleClick=" + isDoubleClick)
					.toString();
		}

		@com.fasterxml.jackson.annotation.JsonGetter("componentId")
		public String getComponentId() {
			return componentId;
		}

		@com.fasterxml.jackson.annotation.JsonGetter("eventId")
		public int getEventId() {
			return eventId;
		}

		@com.fasterxml.jackson.annotation.JsonGetter("isDoubleClick")
		public boolean getIsDoubleClick() {
			return isDoubleClick;
		}

	}

	public static class EventMovedEvent implements UiEvent {

		@UiComponentId protected String componentId;
		protected int eventId;
		protected long newStart;
		protected long newEnd;

		/**
		 * @deprecated Only for Jackson deserialization. Use the other constructor instead.
		 */
		@Deprecated
		public EventMovedEvent() {
			// default constructor for Jackson
		}

		public EventMovedEvent(String componentId, int eventId, long newStart, long newEnd) {
			this.componentId = componentId;
			this.eventId = eventId;
			this.newStart = newStart;
			this.newEnd = newEnd;
		}

		public UiEventType getUiEventType() {
			return UiEventType.UI_CALENDAR_EVENT_MOVED;
		}

		@SuppressWarnings("unchecked")
		public String toString() {
			return new StringBuilder(getClass().getSimpleName()).append(": ")
					.append("componentId=" + componentId).append(", ")
					.append("eventId=" + eventId).append(", ")
					.append("newStart=" + newStart).append(", ")
					.append("newEnd=" + newEnd)
					.toString();
		}

		@com.fasterxml.jackson.annotation.JsonGetter("componentId")
		public String getComponentId() {
			return componentId;
		}

		@com.fasterxml.jackson.annotation.JsonGetter("eventId")
		public int getEventId() {
			return eventId;
		}

		@com.fasterxml.jackson.annotation.JsonGetter("newStart")
		public long getNewStart() {
			return newStart;
		}

		@com.fasterxml.jackson.annotation.JsonGetter("newEnd")
		public long getNewEnd() {
			return newEnd;
		}

	}

	public static class DayClickedEvent implements UiEvent {

		@UiComponentId protected String componentId;
		protected long date;
		protected boolean isDoubleClick;

		/**
		 * @deprecated Only for Jackson deserialization. Use the other constructor instead.
		 */
		@Deprecated
		public DayClickedEvent() {
			// default constructor for Jackson
		}

		public DayClickedEvent(String componentId, long date, boolean isDoubleClick) {
			this.componentId = componentId;
			this.date = date;
			this.isDoubleClick = isDoubleClick;
		}

		public UiEventType getUiEventType() {
			return UiEventType.UI_CALENDAR_DAY_CLICKED;
		}

		@SuppressWarnings("unchecked")
		public String toString() {
			return new StringBuilder(getClass().getSimpleName()).append(": ")
					.append("componentId=" + componentId).append(", ")
					.append("date=" + date).append(", ")
					.append("isDoubleClick=" + isDoubleClick)
					.toString();
		}

		@com.fasterxml.jackson.annotation.JsonGetter("componentId")
		public String getComponentId() {
			return componentId;
		}

		@com.fasterxml.jackson.annotation.JsonGetter("date")
		public long getDate() {
			return date;
		}

		@com.fasterxml.jackson.annotation.JsonGetter("isDoubleClick")
		public boolean getIsDoubleClick() {
			return isDoubleClick;
		}

	}

	public static class IntervalSelectedEvent implements UiEvent {

		@UiComponentId protected String componentId;
		protected long start;
		protected long end;
		protected boolean allDay;

		/**
		 * @deprecated Only for Jackson deserialization. Use the other constructor instead.
		 */
		@Deprecated
		public IntervalSelectedEvent() {
			// default constructor for Jackson
		}

		public IntervalSelectedEvent(String componentId, long start, long end, boolean allDay) {
			this.componentId = componentId;
			this.start = start;
			this.end = end;
			this.allDay = allDay;
		}

		public UiEventType getUiEventType() {
			return UiEventType.UI_CALENDAR_INTERVAL_SELECTED;
		}

		@SuppressWarnings("unchecked")
		public String toString() {
			return new StringBuilder(getClass().getSimpleName()).append(": ")
					.append("componentId=" + componentId).append(", ")
					.append("start=" + start).append(", ")
					.append("end=" + end).append(", ")
					.append("allDay=" + allDay)
					.toString();
		}

		@com.fasterxml.jackson.annotation.JsonGetter("componentId")
		public String getComponentId() {
			return componentId;
		}

		@com.fasterxml.jackson.annotation.JsonGetter("start")
		public long getStart() {
			return start;
		}

		@com.fasterxml.jackson.annotation.JsonGetter("end")
		public long getEnd() {
			return end;
		}

		@com.fasterxml.jackson.annotation.JsonGetter("allDay")
		public boolean getAllDay() {
			return allDay;
		}

	}

	public static class DayHeaderClickedEvent implements UiEvent {

		@UiComponentId protected String componentId;
		protected long date;

		/**
		 * @deprecated Only for Jackson deserialization. Use the other constructor instead.
		 */
		@Deprecated
		public DayHeaderClickedEvent() {
			// default constructor for Jackson
		}

		public DayHeaderClickedEvent(String componentId, long date) {
			this.componentId = componentId;
			this.date = date;
		}

		public UiEventType getUiEventType() {
			return UiEventType.UI_CALENDAR_DAY_HEADER_CLICKED;
		}

		@SuppressWarnings("unchecked")
		public String toString() {
			return new StringBuilder(getClass().getSimpleName()).append(": ")
					.append("componentId=" + componentId).append(", ")
					.append("date=" + date)
					.toString();
		}

		@com.fasterxml.jackson.annotation.JsonGetter("componentId")
		public String getComponentId() {
			return componentId;
		}

		@com.fasterxml.jackson.annotation.JsonGetter("date")
		public long getDate() {
			return date;
		}

	}

	public static class WeekHeaderClickedEvent implements UiEvent {

		@UiComponentId protected String componentId;
		protected int year;
		protected int week;
		protected long weekStartDate;

		/**
		 * @deprecated Only for Jackson deserialization. Use the other constructor instead.
		 */
		@Deprecated
		public WeekHeaderClickedEvent() {
			// default constructor for Jackson
		}

		public WeekHeaderClickedEvent(String componentId, int year, int week, long weekStartDate) {
			this.componentId = componentId;
			this.year = year;
			this.week = week;
			this.weekStartDate = weekStartDate;
		}

		public UiEventType getUiEventType() {
			return UiEventType.UI_CALENDAR_WEEK_HEADER_CLICKED;
		}

		@SuppressWarnings("unchecked")
		public String toString() {
			return new StringBuilder(getClass().getSimpleName()).append(": ")
					.append("componentId=" + componentId).append(", ")
					.append("year=" + year).append(", ")
					.append("week=" + week).append(", ")
					.append("weekStartDate=" + weekStartDate)
					.toString();
		}

		@com.fasterxml.jackson.annotation.JsonGetter("componentId")
		public String getComponentId() {
			return componentId;
		}

		@com.fasterxml.jackson.annotation.JsonGetter("year")
		public int getYear() {
			return year;
		}

		@com.fasterxml.jackson.annotation.JsonGetter("week")
		public int getWeek() {
			return week;
		}

		@com.fasterxml.jackson.annotation.JsonGetter("weekStartDate")
		public long getWeekStartDate() {
			return weekStartDate;
		}

	}

	public static class MonthHeaderClickedEvent implements UiEvent {

		@UiComponentId protected String componentId;
		protected int year;
		protected int month;
		protected long monthStartDate;

		/**
		 * @deprecated Only for Jackson deserialization. Use the other constructor instead.
		 */
		@Deprecated
		public MonthHeaderClickedEvent() {
			// default constructor for Jackson
		}

		public MonthHeaderClickedEvent(String componentId, int year, int month, long monthStartDate) {
			this.componentId = componentId;
			this.year = year;
			this.month = month;
			this.monthStartDate = monthStartDate;
		}

		public UiEventType getUiEventType() {
			return UiEventType.UI_CALENDAR_MONTH_HEADER_CLICKED;
		}

		@SuppressWarnings("unchecked")
		public String toString() {
			return new StringBuilder(getClass().getSimpleName()).append(": ")
					.append("componentId=" + componentId).append(", ")
					.append("year=" + year).append(", ")
					.append("month=" + month).append(", ")
					.append("monthStartDate=" + monthStartDate)
					.toString();
		}

		@com.fasterxml.jackson.annotation.JsonGetter("componentId")
		public String getComponentId() {
			return componentId;
		}

		@com.fasterxml.jackson.annotation.JsonGetter("year")
		public int getYear() {
			return year;
		}

		@com.fasterxml.jackson.annotation.JsonGetter("month")
		public int getMonth() {
			return month;
		}

		@com.fasterxml.jackson.annotation.JsonGetter("monthStartDate")
		public long getMonthStartDate() {
			return monthStartDate;
		}

	}

	public static class ViewChangedEvent implements UiEvent {

		@UiComponentId protected String componentId;
		protected UiCalendarViewMode viewMode;
		protected long mainIntervalStart;
		protected long mainIntervalEnd;
		protected long displayedIntervalStart;
		protected long displayedIntervalEnd;

		/**
		 * @deprecated Only for Jackson deserialization. Use the other constructor instead.
		 */
		@Deprecated
		public ViewChangedEvent() {
			// default constructor for Jackson
		}

		public ViewChangedEvent(String componentId, UiCalendarViewMode viewMode, long mainIntervalStart, long mainIntervalEnd, long displayedIntervalStart, long displayedIntervalEnd) {
			this.componentId = componentId;
			this.viewMode = viewMode;
			this.mainIntervalStart = mainIntervalStart;
			this.mainIntervalEnd = mainIntervalEnd;
			this.displayedIntervalStart = displayedIntervalStart;
			this.displayedIntervalEnd = displayedIntervalEnd;
		}

		public UiEventType getUiEventType() {
			return UiEventType.UI_CALENDAR_VIEW_CHANGED;
		}

		@SuppressWarnings("unchecked")
		public String toString() {
			return new StringBuilder(getClass().getSimpleName()).append(": ")
					.append("componentId=" + componentId).append(", ")
					.append("viewMode=" + viewMode).append(", ")
					.append("mainIntervalStart=" + mainIntervalStart).append(", ")
					.append("mainIntervalEnd=" + mainIntervalEnd).append(", ")
					.append("displayedIntervalStart=" + displayedIntervalStart).append(", ")
					.append("displayedIntervalEnd=" + displayedIntervalEnd)
					.toString();
		}

		@com.fasterxml.jackson.annotation.JsonGetter("componentId")
		public String getComponentId() {
			return componentId;
		}

		@com.fasterxml.jackson.annotation.JsonGetter("viewMode")
		public UiCalendarViewMode getViewMode() {
			return viewMode;
		}

		@com.fasterxml.jackson.annotation.JsonGetter("mainIntervalStart")
		public long getMainIntervalStart() {
			return mainIntervalStart;
		}

		@com.fasterxml.jackson.annotation.JsonGetter("mainIntervalEnd")
		public long getMainIntervalEnd() {
			return mainIntervalEnd;
		}

		@com.fasterxml.jackson.annotation.JsonGetter("displayedIntervalStart")
		public long getDisplayedIntervalStart() {
			return displayedIntervalStart;
		}

		@com.fasterxml.jackson.annotation.JsonGetter("displayedIntervalEnd")
		public long getDisplayedIntervalEnd() {
			return displayedIntervalEnd;
		}

	}

	public static class DataNeededEvent implements UiEvent {

		@UiComponentId protected String componentId;
		protected long requestIntervalStart;
		protected long requestIntervalEnd;

		/**
		 * @deprecated Only for Jackson deserialization. Use the other constructor instead.
		 */
		@Deprecated
		public DataNeededEvent() {
			// default constructor for Jackson
		}

		public DataNeededEvent(String componentId, long requestIntervalStart, long requestIntervalEnd) {
			this.componentId = componentId;
			this.requestIntervalStart = requestIntervalStart;
			this.requestIntervalEnd = requestIntervalEnd;
		}

		public UiEventType getUiEventType() {
			return UiEventType.UI_CALENDAR_DATA_NEEDED;
		}

		@SuppressWarnings("unchecked")
		public String toString() {
			return new StringBuilder(getClass().getSimpleName()).append(": ")
					.append("componentId=" + componentId).append(", ")
					.append("requestIntervalStart=" + requestIntervalStart).append(", ")
					.append("requestIntervalEnd=" + requestIntervalEnd)
					.toString();
		}

		@com.fasterxml.jackson.annotation.JsonGetter("componentId")
		public String getComponentId() {
			return componentId;
		}

		@com.fasterxml.jackson.annotation.JsonGetter("requestIntervalStart")
		public long getRequestIntervalStart() {
			return requestIntervalStart;
		}

		@com.fasterxml.jackson.annotation.JsonGetter("requestIntervalEnd")
		public long getRequestIntervalEnd() {
			return requestIntervalEnd;
		}

	}


	public static class SetViewModeCommand implements UiCommand {

		@UiComponentId protected String componentId;
		protected UiCalendarViewMode viewMode;

		/**
		 * @deprecated Only for Jackson deserialization. Use the other constructor instead.
		 */
		@Deprecated
		public SetViewModeCommand() {
			// default constructor for Jackson
		}

		public SetViewModeCommand(String componentId, UiCalendarViewMode viewMode) {
			this.componentId = componentId;
			this.viewMode = viewMode;
		}

		@SuppressWarnings("unchecked")
		public String toString() {
			return new StringBuilder(getClass().getSimpleName()).append(": ")
					.append("componentId=" + componentId).append(", ")
					.append("viewMode=" + viewMode)
					.toString();
		}

		@com.fasterxml.jackson.annotation.JsonGetter("componentId")
		public String getComponentId() {
			return componentId;
		}

		@com.fasterxml.jackson.annotation.JsonGetter("viewMode")
		public UiCalendarViewMode getViewMode() {
			return viewMode;
		}

	}

	public static class SetDisplayedDateCommand implements UiCommand {

		@UiComponentId protected String componentId;
		protected long date;

		/**
		 * @deprecated Only for Jackson deserialization. Use the other constructor instead.
		 */
		@Deprecated
		public SetDisplayedDateCommand() {
			// default constructor for Jackson
		}

		public SetDisplayedDateCommand(String componentId, long date) {
			this.componentId = componentId;
			this.date = date;
		}

		@SuppressWarnings("unchecked")
		public String toString() {
			return new StringBuilder(getClass().getSimpleName()).append(": ")
					.append("componentId=" + componentId).append(", ")
					.append("date=" + date)
					.toString();
		}

		@com.fasterxml.jackson.annotation.JsonGetter("componentId")
		public String getComponentId() {
			return componentId;
		}

		@com.fasterxml.jackson.annotation.JsonGetter("date")
		public long getDate() {
			return date;
		}

	}

	public static class AddEventCommand implements UiCommand {

		@UiComponentId protected String componentId;
		protected UiCalendarEventClientRecord theEvent;

		/**
		 * @deprecated Only for Jackson deserialization. Use the other constructor instead.
		 */
		@Deprecated
		public AddEventCommand() {
			// default constructor for Jackson
		}

		public AddEventCommand(String componentId, UiCalendarEventClientRecord theEvent) {
			this.componentId = componentId;
			this.theEvent = theEvent;
		}

		@SuppressWarnings("unchecked")
		public String toString() {
			return new StringBuilder(getClass().getSimpleName()).append(": ")
					.append("componentId=" + componentId).append(", ")
					.append(theEvent != null ? "theEvent={" + theEvent.toString() + "}" : "")
					.toString();
		}

		@com.fasterxml.jackson.annotation.JsonGetter("componentId")
		public String getComponentId() {
			return componentId;
		}

		@com.fasterxml.jackson.annotation.JsonGetter("theEvent")
		public UiCalendarEventClientRecord getTheEvent() {
			return theEvent;
		}

	}

	public static class RemoveEventCommand implements UiCommand {

		@UiComponentId protected String componentId;
		protected int eventId;

		/**
		 * @deprecated Only for Jackson deserialization. Use the other constructor instead.
		 */
		@Deprecated
		public RemoveEventCommand() {
			// default constructor for Jackson
		}

		public RemoveEventCommand(String componentId, int eventId) {
			this.componentId = componentId;
			this.eventId = eventId;
		}

		@SuppressWarnings("unchecked")
		public String toString() {
			return new StringBuilder(getClass().getSimpleName()).append(": ")
					.append("componentId=" + componentId).append(", ")
					.append("eventId=" + eventId)
					.toString();
		}

		@com.fasterxml.jackson.annotation.JsonGetter("componentId")
		public String getComponentId() {
			return componentId;
		}

		@com.fasterxml.jackson.annotation.JsonGetter("eventId")
		public int getEventId() {
			return eventId;
		}

	}

	public static class SetCalendarDataCommand implements UiCommand {

		@UiComponentId protected String componentId;
		protected List events;

		/**
		 * @deprecated Only for Jackson deserialization. Use the other constructor instead.
		 */
		@Deprecated
		public SetCalendarDataCommand() {
			// default constructor for Jackson
		}

		public SetCalendarDataCommand(String componentId, List events) {
			this.componentId = componentId;
			this.events = events;
		}

		@SuppressWarnings("unchecked")
		public String toString() {
			return new StringBuilder(getClass().getSimpleName()).append(": ")
					.append("componentId=" + componentId).append(", ")
					.append(events != null ? "events={" + events.toString() + "}" : "")
					.toString();
		}

		@com.fasterxml.jackson.annotation.JsonGetter("componentId")
		public String getComponentId() {
			return componentId;
		}

		@com.fasterxml.jackson.annotation.JsonGetter("events")
		public List getEvents() {
			return events;
		}

	}

	public static class ClearCalendarCommand implements UiCommand {

		@UiComponentId protected String componentId;

		/**
		 * @deprecated Only for Jackson deserialization. Use the other constructor instead.
		 */
		@Deprecated
		public ClearCalendarCommand() {
			// default constructor for Jackson
		}

		public ClearCalendarCommand(String componentId) {
			this.componentId = componentId;
		}

		@SuppressWarnings("unchecked")
		public String toString() {
			return new StringBuilder(getClass().getSimpleName()).append(": ")
					.append("componentId=" + componentId)
					.toString();
		}

		@com.fasterxml.jackson.annotation.JsonGetter("componentId")
		public String getComponentId() {
			return componentId;
		}

	}

	public static class RegisterTemplateCommand implements UiCommand {

		@UiComponentId protected String componentId;
		protected String id;
		protected UiTemplate template;

		/**
		 * @deprecated Only for Jackson deserialization. Use the other constructor instead.
		 */
		@Deprecated
		public RegisterTemplateCommand() {
			// default constructor for Jackson
		}

		public RegisterTemplateCommand(String componentId, String id, UiTemplate template) {
			this.componentId = componentId;
			this.id = id;
			this.template = template;
		}

		@SuppressWarnings("unchecked")
		public String toString() {
			return new StringBuilder(getClass().getSimpleName()).append(": ")
					.append("id=" + id).append(", ")
					.append("componentId=" + componentId).append(", ")
					.append(template != null ? "template={" + template.toString() + "}" : "")
					.toString();
		}

		@com.fasterxml.jackson.annotation.JsonGetter("componentId")
		public String getComponentId() {
			return componentId;
		}

		@com.fasterxml.jackson.annotation.JsonGetter("id")
		public String getId() {
			return id;
		}

		@com.fasterxml.jackson.annotation.JsonGetter("template")
		public UiTemplate getTemplate() {
			return template;
		}

	}

	public static class SetTimeZoneIdCommand implements UiCommand {

		@UiComponentId protected String componentId;
		protected String timeZoneId;

		/**
		 * @deprecated Only for Jackson deserialization. Use the other constructor instead.
		 */
		@Deprecated
		public SetTimeZoneIdCommand() {
			// default constructor for Jackson
		}

		public SetTimeZoneIdCommand(String componentId, String timeZoneId) {
			this.componentId = componentId;
			this.timeZoneId = timeZoneId;
		}

		@SuppressWarnings("unchecked")
		public String toString() {
			return new StringBuilder(getClass().getSimpleName()).append(": ")
					.append("componentId=" + componentId).append(", ")
					.append("timeZoneId=" + timeZoneId)
					.toString();
		}

		@com.fasterxml.jackson.annotation.JsonGetter("componentId")
		public String getComponentId() {
			return componentId;
		}

		@com.fasterxml.jackson.annotation.JsonGetter("timeZoneId")
		public String getTimeZoneId() {
			return timeZoneId;
		}

	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy