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

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

The 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 = UiLinkButton.class)
public class UiLinkButton extends UiComponent implements UiObject {


	protected String text;
	protected String url = null;
	protected UiLinkTarget target = UiLinkTarget.BLANK;
	protected String onClickJavaScript;

	public UiLinkButton() {
		super();
	}

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

	@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("text=" + text).append(", ")
				.append("url=" + url).append(", ")
				.append("target=" + target).append(", ")
				.append("onClickJavaScript=" + onClickJavaScript)
				.toString();
	}

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

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

	@com.fasterxml.jackson.annotation.JsonGetter("target")
	public UiLinkTarget getTarget() {
		return target;
	}

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

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

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

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

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

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

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

	@com.fasterxml.jackson.annotation.JsonSetter("text")
	public UiLinkButton setText(String text) {
		this.text = text;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("url")
	public UiLinkButton setUrl(String url) {
		this.url = url;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("target")
	public UiLinkButton setTarget(UiLinkTarget target) {
		this.target = target;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("onClickJavaScript")
	public UiLinkButton setOnClickJavaScript(String onClickJavaScript) {
		this.onClickJavaScript = onClickJavaScript;
		return this;
	}

	public static class ClickedEvent implements UiEvent {

		@UiComponentId protected String componentId;

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

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

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

		@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 UpdateCommand implements UiCommand {

		@UiComponentId protected String componentId;
		protected UiLinkButton config;

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

		public UpdateCommand(String componentId, UiLinkButton config) {
			this.componentId = componentId;
			this.config = config;
		}

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

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

		@com.fasterxml.jackson.annotation.JsonGetter("config")
		public UiLinkButton getConfig() {
			return config;
		}

	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy