我在添加自定义“通知类型”时遇到问题(页面上可见的第二列 - http://host:port/secure/admin/AddNotification!default.jspa)。我正在使用 jira 4.2,我发现在 Jira 中负责此任务的接口是http://docs.atlassian.com/software/jira/docs/api/4.2/com/atlassian/jira/notification/NotificationType .html,但是我不知道下一步该做什么。请提供任何帮助:)
问问题
412 次
1 回答
0
好的,解决方案是扩展类 AbstractNotificationType - 扩展类 ex。MyNotificationType 然后创建另一个类,如下面的代码:
public MyNotificationUpdater() {
NotificationTypeManager notificationTypeManager = ComponentManager
.getComponentInstanceOfType(NotificationTypeManager.class);
Map types = notificationTypeManager.getTypes();
if (types == null) {
types = new HashMap<String, Object>();
}
types.put("MyNotificationType", new MyNotificationType());
notificationTypeManager.setSchemeTypes(types);
}
于 2012-04-20T12:54:12.680 回答