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

de.knightsoftnet.gwtp.spring.annotation.processor.BackofficeWidget Maven / Gradle / Ivy

There is a newer version: 2.2.2
Show newest version
package de.knightsoftnet.gwtp.spring.annotation.processor;

import java.util.List;
import java.util.Objects;

/**
 * Widget data used for generating ui binder and view.
 */
public class BackofficeWidget {

  private String name;
  private List imports;
  private String widgetName;
  private List parameters;
  private boolean provided;
  private String providedConstruction;

  /**
   * Default constructor.
   */
  public BackofficeWidget() {
    super();
  }

  /**
   * Constructor initializing fields.
   *
   * @param name field name
   * @param imports list of required imports
   * @param widgetName widget name
   * @param parameters list of parameters
   * @param provided create widget as provided
   * @param providedConstruction construction used when provided
   */
  public BackofficeWidget(final String name, final List imports, final String widgetName,
      final List parameters, final boolean provided,
      final String providedConstruction) {
    super();
    this.name = name;
    this.imports = imports;
    this.widgetName = widgetName;
    this.parameters = parameters;
    this.provided = provided;
    this.providedConstruction = providedConstruction;
  }

  public static BackofficeWidget of(final String name, final List imports,
      final String widgetName, final List parameters,
      final boolean provided, final String providedConstruction) {
    return new BackofficeWidget(name, imports, widgetName, parameters, provided,
        providedConstruction);
  }

  public String getName() {
    return name;
  }

  public void setName(final String name) {
    this.name = name;
  }

  public List getImports() {
    return imports;
  }

  public void setImports(final List imports) {
    this.imports = imports;
  }

  public String getWidgetName() {
    return widgetName;
  }

  public void setWidgetName(final String widgetName) {
    this.widgetName = widgetName;
  }

  public List getParameters() {
    return parameters;
  }

  public void setParameters(final List parameters) {
    this.parameters = parameters;
  }

  public boolean isProvided() {
    return provided;
  }

  public void setProvided(final boolean provided) {
    this.provided = provided;
  }

  public String getProvidedConstruction() {
    return providedConstruction;
  }

  public void setProvidedConstruction(final String providedConstruction) {
    this.providedConstruction = providedConstruction;
  }

  @Override
  public int hashCode() {
    return Objects.hash(name);
  }

  @Override
  public boolean equals(final Object obj) {
    if (this == obj) {
      return true;
    }
    if (obj == null) {
      return false;
    }
    if (getClass() != obj.getClass()) {
      return false;
    }
    final BackofficeWidget other = (BackofficeWidget) obj;
    return Objects.equals(name, other.name);
  }

  @Override
  public String toString() {
    return "BackofficeWidget [name=" + name + ", imports=" + imports + ", widgetName=" + widgetName
        + ", parameters=" + parameters + ", provided=" + provided + ", providedConstruction="
        + providedConstruction + "]";
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy