Class SetExpirationDateOnOutputJobEntityListener

java.lang.Object
ch.tocco.nice2.outputcenter.impl.entitylistener.SetExpirationDateOnOutputJobEntityListener
All Implemented Interfaces:
EntityFacadeListener, EventListener

public class SetExpirationDateOnOutputJobEntityListener extends Object implements EntityFacadeListener
Sets the 'expiration_date' field depending on the boolean field 'archive'. On false set the date to (now + daysTillExpiration). On true set the date to null.
  • Constructor Details

    • SetExpirationDateOnOutputJobEntityListener

      public SetExpirationDateOnOutputJobEntityListener(CommandExecutor commandExecutor)
  • Method Details

    • entityRelationChanging

      public void entityRelationChanging(EntityRelationChangedEvent event)
      Description copied from interface: EntityFacadeListener
      Fired when a relation of an entity has been changed.
      Specified by:
      entityRelationChanging in interface EntityFacadeListener
      Parameters:
      event - The event object.
    • setDaysTillExpiration

      @Value("${nice2.outputcenter.daysTillExpiration}") public void setDaysTillExpiration(int daysTillExpiration)