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

io.mateu.jpa.domain.ui.cruds.JpaMDDOpenCrudActionViewBuilder Maven / Gradle / Ivy

There is a newer version: 3.0-alpha.63
Show newest version
package io.mateu.jpa.domain.ui.cruds;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import io.mateu.core.domain.model.reflection.ReflectionService;
import io.mateu.uidl.app.MDDOpenCRUDAction;
import io.mateu.uidl.app.MDDOpenCRUDActionViewBuilder;
import io.mateu.uidl.interfaces.Crud;
import lombok.RequiredArgsConstructor;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;

@Service
@RequiredArgsConstructor
@Primary
@SuppressFBWarnings({"EI_EXPOSE_REP2", "EI_EXPOSE_REP"})
public class JpaMDDOpenCrudActionViewBuilder implements MDDOpenCRUDActionViewBuilder {

  final ReflectionService reflectionService;

  @Override
  public Crud buildView(MDDOpenCRUDAction action) throws Exception {
    JpaRpcCrudView jpaRpcCrudView = reflectionService.newInstance(JpaRpcCrudView.class);
    jpaRpcCrudView.setAction(action);
    return jpaRpcCrudView;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy