From: <pn...@hy...> - 2010-03-01 18:42:01
|
Author: pnguyen Date: 2010-03-01 10:41:48 -0800 (Mon, 01 Mar 2010) New Revision: 14337 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14337 Modified: trunk/src/org/hyperic/hq/events/server/session/PagerProcessor_events.java Log: [HHQ-3594] Add async delete check Modified: trunk/src/org/hyperic/hq/events/server/session/PagerProcessor_events.java =================================================================== --- trunk/src/org/hyperic/hq/events/server/session/PagerProcessor_events.java 2010-03-01 18:32:14 UTC (rev 14336) +++ trunk/src/org/hyperic/hq/events/server/session/PagerProcessor_events.java 2010-03-01 18:41:48 UTC (rev 14337) @@ -6,7 +6,7 @@ * normal use of the program, and does *not* fall under the heading of * "derived work". * - * Copyright (C) [2004, 2005, 2006], Hyperic, Inc. + * Copyright (C) [2004-2010], Hyperic, Inc. * This file is part of HQ. * * HQ is free software; you can redistribute it and/or modify @@ -27,6 +27,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.hyperic.hq.authz.server.session.Resource; import org.hyperic.hq.common.SystemException; import org.hyperic.hq.escalation.server.session.EscalationManagerEJBImpl; import org.hyperic.hq.events.shared.AlertValue; @@ -53,7 +54,13 @@ alert.getId(), alert.getAlertDefinition())); return aval; } else if (o instanceof AlertDefinition) { - return ((AlertDefinition) o).getAlertDefinitionValue(); + AlertDefinition def = (AlertDefinition) o; + Resource r = def.getResource(); + if (r == null || r.isInAsyncDeleteState()) { + return null; + } else { + return def.getAlertDefinitionValue(); + } } } catch (Exception e) { throw new SystemException("Error converting " + o + |