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

org.teamapps.dto.UiComponent 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 class UiComponent extends UiClientObject implements UiObject {


	protected String debuggingId;
	protected boolean visible = true;
	protected Map> stylesBySelector;
	protected Map> classNamesBySelector;
	protected Map> attributesBySelector;

	public UiComponent() {
		super();
	}

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

	@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)
				.toString();
	}

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

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

	@com.fasterxml.jackson.annotation.JsonGetter("stylesBySelector")
	public Map> getStylesBySelector() {
		return stylesBySelector;
	}

	@com.fasterxml.jackson.annotation.JsonGetter("classNamesBySelector")
	public Map> getClassNamesBySelector() {
		return classNamesBySelector;
	}

	@com.fasterxml.jackson.annotation.JsonGetter("attributesBySelector")
	public Map> getAttributesBySelector() {
		return attributesBySelector;
	}

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

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

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

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

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

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



	public static class SetVisibleCommand implements UiCommand {

		@UiComponentId protected String componentId;
		protected boolean visible;

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

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

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

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

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

	}

	public static class SetStyleCommand implements UiCommand {

		@UiComponentId protected String componentId;
		protected String selector;
		protected Map styles;

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

		public SetStyleCommand(String componentId, String selector, Map styles) {
			this.componentId = componentId;
			this.selector = selector;
			this.styles = styles;
		}

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

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

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

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

	}

	public static class SetClassNamesCommand implements UiCommand {

		@UiComponentId protected String componentId;
		protected String selector;
		protected Map classNames;

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

		public SetClassNamesCommand(String componentId, String selector, Map classNames) {
			this.componentId = componentId;
			this.selector = selector;
			this.classNames = classNames;
		}

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

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

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

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

	}

	public static class SetAttributesCommand implements UiCommand {

		@UiComponentId protected String componentId;
		protected String selector;
		protected Map attributes;

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

		public SetAttributesCommand(String componentId, String selector, Map attributes) {
			this.componentId = componentId;
			this.selector = selector;
			this.attributes = attributes;
		}

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

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

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

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

	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy