Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Get EditMailHandler parameters in servlet filter

GuillaumeL
October 25, 2017

Hello, 

I have a custom mail handler with my own entity. 

I want to delete related data in db when the mail handler is deleted. 

For this, i have created a servlet filter (which is called before the deletion) but i dont know to get the mail handler parameters (they contains an id used for identify data in db). 

 

is there a service for this ?

 

thanks

1 answer

1 accepted

0 votes
Answer accepted
GuillaumeL
October 27, 2017

solution

use com.atlassian.jira.service.ServiceManager


JiraServiceContainer jsc = serviceManager.getServiceWithId(handlerID)
String handlerProperties = jsc.getProperty("handler.params")

Map<String, String> propertyMap = ServiceUtils.getParameterMap(handlerProperties);

propertyMap contains all property set in configuration screen


it's posisble to autowired in servlet filter for used directly.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events