protected Optional < ExpirationPolicy > getExpirationPolicyFor ( final TicketState ticketState ) { val name = getExpirationPolicyNameFor ( ticketState ) ; LOGGER . trace ( "Received expiration policy name [{}] to activate" , name ) ; if ( StringUtils . isNotBlank ( name ) && policies . containsKey ( name ) ) { val policy = policies . get ( name ) ; LOGGER . trace ( "Located expiration policy [{}] by name [{}]" , policy , name ) ; return Optional . of ( policy ) ; } LOGGER . warn ( "No expiration policy could be found by the name [{}] for ticket state [{}]" , name , ticketState ) ; return Optional . empty ( ) ; }
Gets expiration policy by its name .