Hyperic HQ Plugin API v. 4.4.0.2

org.hyperic.hq.bizapp.server.session
Class GalertBossEJBImpl

java.lang.Object
  extended by org.hyperic.hq.bizapp.server.session.GalertBossEJBImpl
All Implemented Interfaces:
java.io.Serializable, javax.ejb.EnterpriseBean, javax.ejb.SessionBean

public class GalertBossEJBImpl
extends java.lang.Object
implements javax.ejb.SessionBean

The BizApp's interface to the Events Subsystem

See Also:
Serialized Form

Constructor Summary
GalertBossEJBImpl()
           
 
Method Summary
 ExecutionStrategyInfo addPartition(int sessionId, GalertDef def, GalertDefPartition partition, ExecutionStrategyTypeInfo stratType, ConfigResponse stratConfig)
           
 void configureTriggers(int sessionId, GalertDef def, GalertDefPartition partition, java.util.List triggerInfos, java.util.List configs)
           
 int countAlertLogs(int sessionId, java.lang.Integer gid, long begin, long end)
          Count the total number of galerts in the time frame
 GalertDef createAlertDef(int sessionId, java.lang.String name, java.lang.String description, AlertSeverity severity, boolean enabled, ResourceGroup group)
           
 void ejbActivate()
           
 void ejbCreate()
           
 void ejbPassivate()
           
 void ejbRemove()
           
 void enable(int sessionId, GalertDef[] defs, boolean enable)
          Bulk enable or disable GalertDefs
 org.json.JSONObject findAlertLogs(int sessionId, java.lang.Integer gid, long begin, long end, PageControl pc)
          retrieve all escalation policy names as a Array of JSONObject.
 GalertDef findDefinition(int sessionId, java.lang.Integer id)
           
 PageList findDefinitions(int sessionId, java.lang.Integer gid, PageControl pc)
          Find all the group alert definitions for a given appdef group.
 Escalatable findEscalatableAlert(int sessionId, java.lang.Integer id)
           
 ExecutionStrategyTypeInfo findStrategyType(int sessionId, ExecutionStrategyType type)
           
 GtriggerTypeInfo findTriggerType(int sessionId, GtriggerType type)
           
 java.lang.String getLastFix(int sessionID, GalertDef def)
          Get the last fix if available
 void markDefsDeleted(int sessionId, GalertDef def)
           
 void markDefsDeleted(int sessionId, java.lang.Integer[] defIds)
           
 ExecutionStrategyTypeInfo registerExecutionStrategy(int sessionId, ExecutionStrategyType stratType)
           
 GtriggerTypeInfo registerTriggerType(int sessionId, GtriggerType type)
           
 void setSessionContext(javax.ejb.SessionContext ctx)
           
 void update(int sessionId, GalertDef def, Escalation escalation)
           
 void update(int sessionId, GalertDef def, java.lang.String name, java.lang.String desc, AlertSeverity severity, java.lang.Boolean enabled)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GalertBossEJBImpl

public GalertBossEJBImpl()
Method Detail

registerExecutionStrategy

public ExecutionStrategyTypeInfo registerExecutionStrategy(int sessionId,
                                                           ExecutionStrategyType stratType)
                                                    throws PermissionException,
                                                           SessionException
Throws:
PermissionException
SessionException

findStrategyType

public ExecutionStrategyTypeInfo findStrategyType(int sessionId,
                                                  ExecutionStrategyType type)
                                           throws PermissionException,
                                                  SessionException
Throws:
PermissionException
SessionException

findTriggerType

public GtriggerTypeInfo findTriggerType(int sessionId,
                                        GtriggerType type)
                                 throws SessionException
Throws:
SessionException

registerTriggerType

public GtriggerTypeInfo registerTriggerType(int sessionId,
                                            GtriggerType type)
                                     throws SessionException
Throws:
SessionException

addPartition

public ExecutionStrategyInfo addPartition(int sessionId,
                                          GalertDef def,
                                          GalertDefPartition partition,
                                          ExecutionStrategyTypeInfo stratType,
                                          ConfigResponse stratConfig)
                                   throws SessionException
Throws:
SessionException

createAlertDef

public GalertDef createAlertDef(int sessionId,
                                java.lang.String name,
                                java.lang.String description,
                                AlertSeverity severity,
                                boolean enabled,
                                ResourceGroup group)
                         throws SessionException
Throws:
SessionException

configureTriggers

public void configureTriggers(int sessionId,
                              GalertDef def,
                              GalertDefPartition partition,
                              java.util.List triggerInfos,
                              java.util.List configs)
                       throws SessionException
Throws:
SessionException

findDefinitions

public PageList findDefinitions(int sessionId,
                                java.lang.Integer gid,
                                PageControl pc)
                         throws SessionException,
                                PermissionException
Find all the group alert definitions for a given appdef group.

Returns:
a collection of AlertDefinitionBeans
Throws:
PermissionException
SessionException

markDefsDeleted

public void markDefsDeleted(int sessionId,
                            GalertDef def)
                     throws SessionException
Throws:
SessionException

markDefsDeleted

public void markDefsDeleted(int sessionId,
                            java.lang.Integer[] defIds)
                     throws SessionException
Throws:
SessionException

findDefinition

public GalertDef findDefinition(int sessionId,
                                java.lang.Integer id)
                         throws SessionException
Throws:
SessionException

findEscalatableAlert

public Escalatable findEscalatableAlert(int sessionId,
                                        java.lang.Integer id)
                                 throws SessionException,
                                        PermissionException
Throws:
SessionException
PermissionException

update

public void update(int sessionId,
                   GalertDef def,
                   java.lang.String name,
                   java.lang.String desc,
                   AlertSeverity severity,
                   java.lang.Boolean enabled)
            throws SessionException
Throws:
SessionException

update

public void update(int sessionId,
                   GalertDef def,
                   Escalation escalation)
            throws SessionException
Throws:
SessionException

enable

public void enable(int sessionId,
                   GalertDef[] defs,
                   boolean enable)
            throws SessionException
Bulk enable or disable GalertDefs

Throws:
SessionException - if user session cannot be authenticated

countAlertLogs

public int countAlertLogs(int sessionId,
                          java.lang.Integer gid,
                          long begin,
                          long end)
                   throws SessionTimeoutException,
                          SessionNotFoundException,
                          PermissionException
Count the total number of galerts in the time frame

Throws:
SessionTimeoutException
SessionNotFoundException
PermissionException

findAlertLogs

public org.json.JSONObject findAlertLogs(int sessionId,
                                         java.lang.Integer gid,
                                         long begin,
                                         long end,
                                         PageControl pc)
                                  throws org.json.JSONException,
                                         SessionTimeoutException,
                                         SessionNotFoundException,
                                         PermissionException
retrieve all escalation policy names as a Array of JSONObject. Escalation json finders begin with json* to be consistent with DAO finder convention

Throws:
org.json.JSONException
SessionTimeoutException
SessionNotFoundException
PermissionException

getLastFix

public java.lang.String getLastFix(int sessionID,
                                   GalertDef def)
                            throws SessionNotFoundException,
                                   SessionTimeoutException
Get the last fix if available

Throws:
SessionNotFoundException
SessionTimeoutException

ejbCreate

public void ejbCreate()

ejbRemove

public void ejbRemove()
Specified by:
ejbRemove in interface javax.ejb.SessionBean

ejbActivate

public void ejbActivate()
Specified by:
ejbActivate in interface javax.ejb.SessionBean

ejbPassivate

public void ejbPassivate()
Specified by:
ejbPassivate in interface javax.ejb.SessionBean

setSessionContext

public void setSessionContext(javax.ejb.SessionContext ctx)
Specified by:
setSessionContext in interface javax.ejb.SessionBean

Hyperic HQ Plugin API v. 4.4.0.2

Copyright © 2004-2006 Hyperic, Inc. support@hyperic.net, All Rights Reserved.