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

io.mateu.dtos.Crud Maven / Gradle / Ivy

The newest version!
package io.mateu.dtos;

import java.util.Collections;
import java.util.List;

/**
 * A crud
 *
 * @param title The title
 * @param subtitle The subtitle
 * @param canEdit If records can be edited. This make the Edit button visible
 * @param searchable If list can be searched
 * @param searchForm The form for searching. It can include several filters
 * @param columns The columns
 * @param actions The actions which can be run for this crud. They end up as buttons
 * @param child This crud is a child of another view. This makes the title smaller
 */
public record Crud(
    String title,
    String subtitle,
    boolean canEdit,
    boolean selectionListened,
    boolean hasActionOnSelectedRow,
    boolean multipleRowSelectionEnabled,
    boolean searchable,
    boolean showCards,
    Component searchForm,
    List columns,
    List actions,
    boolean child)
    implements ComponentMetadata {

  public Crud {
    columns = Collections.unmodifiableList(columns);
    actions = Collections.unmodifiableList(actions);
  }

  @Override
  public List columns() {
    return Collections.unmodifiableList(columns);
  }

  @Override
  public List actions() {
    return Collections.unmodifiableList(actions);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy