|
Hyperic HQ Plugin API v. 4.4.0.2 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hyperic.hq.events.server.session.SessionBase
org.hyperic.hq.events.server.session.AlertManagerEJBImpl
public class AlertManagerEJBImpl
Field Summary |
---|
Fields inherited from class org.hyperic.hq.events.server.session.SessionBase |
---|
DATASOURCE, log, SEQUENCE_INTERVAL |
Constructor Summary | |
---|---|
AlertManagerEJBImpl()
|
Method Summary | |
---|---|
void |
addConditionLogs(Alert alert,
AlertConditionLogValue[] logs)
|
Alert |
createAlert(AlertDefinition def,
long ctime)
Create a new alert. |
int |
deleteAlerts(AuthzSubject subj,
AlertDefinition ad)
Remove alerts for an alert definition |
int |
deleteAlerts(AuthzSubject subj,
AppdefEntityID id)
Remove alerts for an appdef entity |
void |
deleteAlerts(java.lang.Integer[] ids)
Remove alerts |
int |
deleteAlerts(long begin,
long end)
Remove alerts for a range of time |
void |
ejbActivate()
|
void |
ejbCreate()
|
void |
ejbPassivate()
|
void |
ejbRemove()
|
Alert |
findAlertById(java.lang.Integer id)
Find an alert pojo by ID |
PageList |
findAlerts(AuthzSubject subj,
AppdefEntityID id,
long begin,
long end,
PageControl pc)
Get a collection of alerts for an AppdefEntityID and time range |
PageList |
findAlerts(AuthzSubject subj,
AppdefEntityID id,
PageControl pc)
Get a collection of alerts for an AppdefEntityID |
java.util.List |
findAlerts(AuthzSubject subj,
int count,
int priority,
long timeRange,
long endTime,
java.util.List includes)
Search alerts given a set of criteria |
java.util.List |
findAlerts(java.lang.Integer subj,
int priority,
long timeRange,
long endTime,
boolean inEsc,
boolean notFixed,
java.lang.Integer groupId,
java.lang.Integer alertDefId,
PageInfo pageInfo)
A more optimized look up which includes the permission checking |
java.util.List |
findAlerts(java.lang.Integer subj,
int priority,
long timeRange,
long endTime,
boolean inEsc,
boolean notFixed,
java.lang.Integer groupId,
PageInfo pageInfo)
A more optimized look up which includes the permission checking |
PageList |
findAllAlerts()
Get a collection of all alerts |
java.util.Map |
findAllLastUnfixed()
Find all last unfixed alerts |
java.util.List |
findEscalatables(AuthzSubject subj,
int count,
int priority,
long timeRange,
long endTime,
java.util.List includes)
Find escalatables for a resource in a given time range. |
Alert |
findLastByDefinition(java.lang.Integer id)
Find the last alert by definition ID |
java.util.Map |
findLastByResource(AuthzSubject subj,
Resource r,
boolean includeDescendants,
boolean fixed)
Find the last alerts for the given resource |
Alert |
findLastFixedByDefinition(AlertDefinition def)
Find the last alert by definition ID |
Alert |
findLastUnfixedByDefinition(AuthzSubject subj,
java.lang.Integer id)
Find the last unfixed alert by definition ID |
void |
fireAlert(AlertConditionsSatisfiedZEvent event)
Processes AlertConditionSatisfiedZEvent that indicate that an alert should be created
To minimize StaleStateExceptions, this method should only be called once in one transaction. |
Alert |
getAlertById(java.lang.Integer id)
|
java.lang.Number |
getAlertCount()
Get the # of alerts within HQ inventory |
int[] |
getAlertCount(AppdefEntityID[] ids)
Get the number of alerts for the given array of AppdefEntityID's |
AlertValue |
getById(java.lang.Integer id)
Find an alert by ID |
java.lang.String |
getLongReason(Alert alert)
Get the long reason for an alert |
static org.hyperic.hq.events.shared.AlertManagerLocal |
getOne()
|
java.lang.String |
getShortReason(Alert alert)
Get the long reason for an alert |
int |
getUnfixedCount(java.lang.Integer subj,
long timeRange,
long endTime,
java.lang.Integer groupId)
A more optimized look up which includes the permission checking |
void |
handleSubjectRemoval(AuthzSubject subject)
|
void |
logActionDetail(Alert alert,
Action action,
java.lang.String detail,
AuthzSubject subject)
Log the details of an action's execution |
void |
setAlertFixed(Alert alert)
Simply mark an alert object as fixed |
void |
setSessionContext(javax.ejb.SessionContext ctx)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AlertManagerEJBImpl()
Method Detail |
---|
public Alert createAlert(AlertDefinition def, long ctime)
def
- The alert definition.ctime
- The alert creation time.public void setAlertFixed(Alert alert)
public void logActionDetail(Alert alert, Action action, java.lang.String detail, AuthzSubject subject)
public void addConditionLogs(Alert alert, AlertConditionLogValue[] logs)
public void deleteAlerts(java.lang.Integer[] ids)
public int deleteAlerts(AuthzSubject subj, AppdefEntityID id) throws PermissionException
PermissionException
public int deleteAlerts(AuthzSubject subj, AlertDefinition ad) throws javax.ejb.RemoveException, PermissionException
PermissionException
javax.ejb.RemoveException
public int deleteAlerts(long begin, long end)
public AlertValue getById(java.lang.Integer id)
public Alert getAlertById(java.lang.Integer id)
public Alert findAlertById(java.lang.Integer id)
public Alert findLastUnfixedByDefinition(AuthzSubject subj, java.lang.Integer id)
public java.util.Map findAllLastUnfixed()
public java.util.Map findLastByResource(AuthzSubject subj, Resource r, boolean includeDescendants, boolean fixed)
public Alert findLastByDefinition(java.lang.Integer id)
PermissionException
public Alert findLastFixedByDefinition(AlertDefinition def)
PermissionException
public java.lang.Number getAlertCount()
public int[] getAlertCount(AppdefEntityID[] ids)
public void fireAlert(AlertConditionsSatisfiedZEvent event)
AlertConditionSatisfiedZEvent
that indicate that an alert should be created
To minimize StaleStateExceptions, this method should only be called once in one transaction.
public PageList findAllAlerts()
public PageList findAlerts(AuthzSubject subj, AppdefEntityID id, PageControl pc) throws PermissionException
PermissionException
public PageList findAlerts(AuthzSubject subj, AppdefEntityID id, long begin, long end, PageControl pc) throws PermissionException
PermissionException
public java.util.List findAlerts(java.lang.Integer subj, int priority, long timeRange, long endTime, boolean inEsc, boolean notFixed, java.lang.Integer groupId, PageInfo pageInfo) throws PermissionException
PermissionException
public java.util.List findAlerts(java.lang.Integer subj, int priority, long timeRange, long endTime, boolean inEsc, boolean notFixed, java.lang.Integer groupId, java.lang.Integer alertDefId, PageInfo pageInfo) throws PermissionException
List
of Alert
s
PermissionException
public java.util.List findAlerts(AuthzSubject subj, int count, int priority, long timeRange, long endTime, java.util.List includes) throws PermissionException
timeRange
- the amount of milliseconds prior to current that the alerts
will be contained in. e.g. the beginning of the time range
will be (current - timeRante)page
- TODOincludes
- List
of AppdefEntityID
s to filter,
may be null for all.
PermissionException
public java.util.List findEscalatables(AuthzSubject subj, int count, int priority, long timeRange, long endTime, java.util.List includes) throws PermissionException
PermissionException
findAlerts(AuthzSubject, int, int, long, long, List)
public int getUnfixedCount(java.lang.Integer subj, long timeRange, long endTime, java.lang.Integer groupId) throws PermissionException
PermissionException
public java.lang.String getShortReason(Alert alert)
public java.lang.String getLongReason(Alert alert)
public void handleSubjectRemoval(AuthzSubject subject)
public static org.hyperic.hq.events.shared.AlertManagerLocal getOne()
public void ejbCreate() throws javax.ejb.CreateException
javax.ejb.CreateException
public void ejbRemove()
ejbRemove
in interface javax.ejb.SessionBean
public void ejbActivate()
ejbActivate
in interface javax.ejb.SessionBean
public void ejbPassivate()
ejbPassivate
in interface javax.ejb.SessionBean
public void setSessionContext(javax.ejb.SessionContext ctx)
setSessionContext
in interface javax.ejb.SessionBean
|
Hyperic HQ Plugin API v. 4.4.0.2 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |