Author: pnguyen
Date: 2010-02-05 10:33:41 -0800 (Fri, 05 Feb 2010)
New Revision: 14257
URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14257
Modified:
trunk/src/org/hyperic/hq/hqu/rendit/metaclass/AlertCategory.groovy
Log:
[HHQ-3481] Add HQApi support to fix alerts with a reason/comment and with proper permission checks
Modified: trunk/src/org/hyperic/hq/hqu/rendit/metaclass/AlertCategory.groovy
===================================================================
--- trunk/src/org/hyperic/hq/hqu/rendit/metaclass/AlertCategory.groovy 2010-02-05 09:27:52 UTC (rev 14256)
+++ trunk/src/org/hyperic/hq/hqu/rendit/metaclass/AlertCategory.groovy 2010-02-05 18:33:41 UTC (rev 14257)
@@ -3,7 +3,9 @@
import org.hyperic.hq.appdef.shared.AppdefEntityConstants
import org.hyperic.hq.authz.server.session.AuthzSubject
import org.hyperic.hq.authz.server.session.AuthzSubjectManagerEJBImpl
+import org.hyperic.hq.escalation.server.session.EscalationManagerEJBImpl
import org.hyperic.hq.events.server.session.Alert
+import org.hyperic.hq.events.server.session.ClassicEscalationAlertType
import org.hyperic.hq.galerts.server.session.GalertDef
import org.hyperic.hq.galerts.server.session.GalertLog
@@ -40,4 +42,12 @@
AuthzSubjectManagerEJBImpl.one.getSubjectById(id.toInteger())
}
+
+ static void fix(Alert a, AuthzSubject subject, String reason) {
+ EscalationManagerEJBImpl.one.fixAlert(
+ subject,
+ ClassicEscalationAlertType.CLASSIC,
+ a.id,
+ reason)
+ }
}
|