Package com.logicaldoc.core.ticket

# Interface TicketListener

public interface TicketListener
This interface defines hooks called before and after a particular event occurs on the specified ticket.

Each methods has access to a dictionary map that can be used through the execution pipeline in order to carry needed informations among all listeners.

Since:
  9.2.3
Author:
  Marco Meschieri - LogicalDOC

## Method Summary

Modifier and Type
Method
Description
`void`
`afterStore(Ticket ticket, DocumentHistory transaction, Map<String,Object> dictionary)`
Called after a ticket is stored in the database
`void`
`beforeStore(Ticket ticket, DocumentHistory transaction, Map<String,Object> dictionary)`
Called before a ticket is stored in the database
`void`
`validate(Ticket ticket, Map<String,Object> dictionary)`
Called to perform required validations on a ticket

## Method Details

### beforeStore

void beforeStore(Ticket ticket, DocumentHistory transaction, Map<String,Object> dictionary) throws PersistenceException
Called before a ticket is stored in the database

Parameters:
  `ticket` - The ticket to be stored
  `transaction` - Transaction informations
  `dictionary` - Dictionary of the execution pipeline
Throws:
  `PersistenceException` - raises if some kind of error happens during execution

### afterStore

void afterStore(Ticket ticket, DocumentHistory transaction, Map<String,Object> dictionary) throws PersistenceException
Called after a ticket is stored in the database

Parameters:
  `ticket` - The ticket to be stored
  `transaction` - Transaction informations
  `dictionary` - Dictionary of the execution pipeline
Throws:
  `PersistenceException` - raises if some kind of error happens during execution

### validate

void validate(Ticket ticket, Map<String,Object> dictionary) throws PersistenceException
Called to perform required validations on a ticket

Parameters:
  `ticket` - The ticket to be evaluated
  `dictionary` - Dictionary of the execution pipeline
Throws:
  `PersistenceException` - raises if some kind of error happens during execution