Class OrderBillPrintedEntityListenerContribution

java.lang.Object
ch.tocco.nice2.optional.order.api.entitylistener.OrderBillPrintedEntityListenerContribution

public class OrderBillPrintedEntityListenerContribution extends Object
example: set a field or relation to be ignored in OrderBillPrintedEntityListener or OrderPositionBillPrintedEntityListener set type="field" for fields and "relation" for relations by default contributions are used for Orders, this can be changed by setting model="Order_position"

 @Bean
 public OrderBillPrintedEntityListenerContribution orderPositionRegistrationBillPrintedEntityListenerContribution() {
     OrderBillPrintedEntityListenerContribution contribution = new OrderBillPrintedEntityListenerContribution();
     contribution.setName("relRegistration");
     contribution.setAction("ignore");
     contribution.setModel("Order_position");
     contribution.setType("relation");
     return contribution;
 }
 
Set action attribute to "warning" to remove contribution from standard modules in customer modules

 public OrderBillPrintedEntityListenerContribution removeOrderPositionRegistrationBillPrintedEntityListenerContribution() {
     OrderBillPrintedEntityListenerContribution contribution = new OrderBillPrintedEntityListenerContribution();
     contribution.setName("relRegistration");
     contribution.setAction("warning");
     contribution.setModel("Order_position");
     contribution.setType("relation");
     return contribution;
 }
 
  • Constructor Details

    • OrderBillPrintedEntityListenerContribution

      public OrderBillPrintedEntityListenerContribution()
  • Method Details

    • getType

      public String getType()
    • setType

      public void setType(String type)
    • getAction

      public String getAction()
    • setAction

      public void setAction(String action)
    • getName

      public String getName()
    • setName

      public void setName(String name)
    • getModel

      public String getModel()
    • setModel

      public void setModel(String model)