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

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

There is a newer version: 0.9.194
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")
@JsonTypeIdResolver(TeamAppsJacksonTypeIdResolver.class)
@JsonInclude(JsonInclude.Include.NON_NULL)
public abstract class AbstractUiToolContainer extends UiComponent implements UiObject {


	protected List leftButtonGroups;
	protected List rightButtonGroups;
	protected String backgroundColor = "rgba(255, 255, 255, 0.84)";

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

	public AbstractUiToolContainer(List leftButtonGroups, List rightButtonGroups) {
		super();
		this.leftButtonGroups = leftButtonGroups;
		this.rightButtonGroups = rightButtonGroups;
	}


	@SuppressWarnings("unchecked")
	public String toString() {
		return new StringBuilder(getClass().getSimpleName()).append(": ")
				.append("id=" + id).append(", ")
				.append("debuggingId=" + debuggingId).append(", ")
				.append("classNamesBySelector=" + classNamesBySelector).append(", ")
				.append("visible=" + visible).append(", ")
				.append("stylesBySelector=" + stylesBySelector).append(", ")
				.append("attributesBySelector=" + attributesBySelector).append(", ")
				.append("backgroundColor=" + backgroundColor).append(", ")
				.append(leftButtonGroups != null ? "leftButtonGroups={" + leftButtonGroups.toString() + "}" : "").append(", ")
				.append(rightButtonGroups != null ? "rightButtonGroups={" + rightButtonGroups.toString() + "}" : "")
				.toString();
	}

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

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

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

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

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

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

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

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

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

	@com.fasterxml.jackson.annotation.JsonSetter("backgroundColor")
	public AbstractUiToolContainer setBackgroundColor(String backgroundColor) {
		this.backgroundColor = backgroundColor;
		return this;
	}

	public static class ToolbarButtonClickEvent implements UiEvent {

		@UiComponentId protected String componentId;
		protected String groupId;
		protected String buttonId;
		protected UiDropDownButtonClickInfo dropDownClickInfo;

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

		public ToolbarButtonClickEvent(String componentId, String groupId, String buttonId, UiDropDownButtonClickInfo dropDownClickInfo) {
			this.componentId = componentId;
			this.groupId = groupId;
			this.buttonId = buttonId;
			this.dropDownClickInfo = dropDownClickInfo;
		}

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

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

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

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

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

		@com.fasterxml.jackson.annotation.JsonGetter("dropDownClickInfo")
		public UiDropDownButtonClickInfo getDropDownClickInfo() {
			return dropDownClickInfo;
		}

	}


	public static class SetButtonVisibleCommand implements UiCommand {

		@UiComponentId protected String componentId;
		protected String groupId;
		protected String buttonId;
		protected boolean visible;

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

		public SetButtonVisibleCommand(String componentId, String groupId, String buttonId, boolean visible) {
			this.componentId = componentId;
			this.groupId = groupId;
			this.buttonId = buttonId;
			this.visible = visible;
		}

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

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

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

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

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

	}

	public static class SetButtonColorsCommand implements UiCommand {

		@UiComponentId protected String componentId;
		protected String groupId;
		protected String buttonId;
		protected String backgroundColor;
		protected String hoverBackgroundColor;

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

		public SetButtonColorsCommand(String componentId, String groupId, String buttonId, String backgroundColor, String hoverBackgroundColor) {
			this.componentId = componentId;
			this.groupId = groupId;
			this.buttonId = buttonId;
			this.backgroundColor = backgroundColor;
			this.hoverBackgroundColor = hoverBackgroundColor;
		}

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

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

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

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

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

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

	}

	public static class SetButtonGroupVisibleCommand implements UiCommand {

		@UiComponentId protected String componentId;
		protected String groupId;
		protected boolean visible;

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

		public SetButtonGroupVisibleCommand(String componentId, String groupId, boolean visible) {
			this.componentId = componentId;
			this.groupId = groupId;
			this.visible = visible;
		}

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

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

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

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

	}

	public static class AddButtonCommand implements UiCommand {

		@UiComponentId protected String componentId;
		protected String groupId;
		protected UiToolbarButton button;
		protected String neighborButtonId;
		protected boolean beforeNeighbor;

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

		public AddButtonCommand(String componentId, String groupId, UiToolbarButton button, String neighborButtonId, boolean beforeNeighbor) {
			this.componentId = componentId;
			this.groupId = groupId;
			this.button = button;
			this.neighborButtonId = neighborButtonId;
			this.beforeNeighbor = beforeNeighbor;
		}

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

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

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

		@com.fasterxml.jackson.annotation.JsonGetter("button")
		public UiToolbarButton getButton() {
			return button;
		}

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

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

	}

	public static class RemoveButtonCommand implements UiCommand {

		@UiComponentId protected String componentId;
		protected String groupId;
		protected String buttonId;

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

		public RemoveButtonCommand(String componentId, String groupId, String buttonId) {
			this.componentId = componentId;
			this.groupId = groupId;
			this.buttonId = buttonId;
		}

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

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

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

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

	}

	public static class AddButtonGroupCommand implements UiCommand {

		@UiComponentId protected String componentId;
		protected UiToolbarButtonGroup group;
		protected boolean rightSide;

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

		public AddButtonGroupCommand(String componentId, UiToolbarButtonGroup group, boolean rightSide) {
			this.componentId = componentId;
			this.group = group;
			this.rightSide = rightSide;
		}

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

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

		@com.fasterxml.jackson.annotation.JsonGetter("group")
		public UiToolbarButtonGroup getGroup() {
			return group;
		}

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

	}

	public static class RemoveButtonGroupCommand implements UiCommand {

		@UiComponentId protected String componentId;
		protected String groupId;

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

		public RemoveButtonGroupCommand(String componentId, String groupId) {
			this.componentId = componentId;
			this.groupId = groupId;
		}

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

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

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

	}

	public static class SetButtonHasDropDownCommand implements UiCommand {

		@UiComponentId protected String componentId;
		protected String groupId;
		protected String buttonId;
		protected boolean hasDropDown;

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

		public SetButtonHasDropDownCommand(String componentId, String groupId, String buttonId, boolean hasDropDown) {
			this.componentId = componentId;
			this.groupId = groupId;
			this.buttonId = buttonId;
			this.hasDropDown = hasDropDown;
		}

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

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

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

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

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

	}

	public static class SetDropDownComponentCommand implements UiCommand {

		@UiComponentId protected String componentId;
		protected String groupId;
		protected String buttonId;
		protected UiClientObjectReference component;

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

		public SetDropDownComponentCommand(String componentId, String groupId, String buttonId, UiClientObjectReference component) {
			this.componentId = componentId;
			this.groupId = groupId;
			this.buttonId = buttonId;
			this.component = component;
		}

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

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

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

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

		@com.fasterxml.jackson.annotation.JsonGetter("component")
		public UiClientObjectReference getComponent() {
			return component;
		}

	}

	public static class CloseDropDownCommand implements UiCommand {

		@UiComponentId protected String componentId;
		protected String groupId;
		protected String buttonId;

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

		public CloseDropDownCommand(String componentId, String groupId, String buttonId) {
			this.componentId = componentId;
			this.groupId = groupId;
			this.buttonId = buttonId;
		}

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

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

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

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

	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy