|
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.AlertDefinitionManagerEJBImpl
public class AlertDefinitionManagerEJBImpl
Stores Events to and deletes Events from storage
Field Summary |
---|
Fields inherited from class org.hyperic.hq.events.server.session.SessionBase |
---|
DATASOURCE, SEQUENCE_INTERVAL |
Constructor Summary | |
---|---|
AlertDefinitionManagerEJBImpl()
|
Method Summary | |
---|---|
void |
cleanupAlertDefs(java.util.List alertDefIds)
|
AlertDefinitionValue |
createAlertDefinition(AlertDefinitionValue a)
Create a new alert definition |
AlertDefinitionValue |
createAlertDefinition(AuthzSubject subj,
AlertDefinitionValue a)
Create a new alert definition |
void |
deleteAlertDefinitions(AuthzSubject subj,
java.lang.Integer[] ids)
Remove alert definitions |
void |
disassociateResource(Resource r)
Set Resource to null on entity's alert definitions |
void |
ejbActivate()
|
void |
ejbCreate()
|
void |
ejbPassivate()
|
void |
ejbPostCreate()
|
void |
ejbRemove()
|
AlertDefinition |
findAlertDefinitionById(java.lang.Integer id)
|
PageList |
findAlertDefinitionChildren(java.lang.Integer id)
Get list of children alert definition for a parent alert definition |
java.util.SortedMap |
findAlertDefinitionNames(AppdefEntityID id,
java.lang.Integer parentId)
Get list of alert definition names for a resource |
java.util.SortedMap |
findAlertDefinitionNames(AuthzSubject subj,
AppdefEntityID id,
java.lang.Integer parentId)
Get list of alert definition names for a resource |
java.util.List |
findAlertDefinitions(AuthzSubject subj,
AlertSeverity minSeverity,
java.lang.Boolean enabled,
boolean excludeTypeBased,
PageInfo pInfo)
Find alert definitions passing the criteria. |
java.util.List |
findAlertDefinitions(AuthzSubject subject,
AppdefEntityID id)
Get list of alert definition POJOs for a resource |
PageList |
findAlertDefinitions(AuthzSubject subj,
AppdefEntityID id,
PageControl pc)
|
PageList |
findAlertDefinitions(AuthzSubject subj,
AppdefEntityTypeID aetid,
PageControl pc)
Get list of alert conditions for a resource or resource type |
java.util.List |
findAlertDefinitions(AuthzSubject subject,
Resource prototype)
Get list of alert definitions for a resource type. |
PageList |
findAllAlertDefinitions(AuthzSubject subj)
Get list of all alert conditions |
java.lang.Integer |
findChildAlertDefinitionId(AppdefEntityID aeid,
java.lang.Integer pid,
boolean allowStale)
Get the resource-specific alert definition ID by parent ID, allowing for the query to return a stale copy of the alert definition (for efficiency reasons). |
java.util.List |
findRelatedAlertDefinitions(AuthzSubject subj,
Resource res)
Get a list of all alert definitions for the resource and its descendents |
java.util.List |
findTypeBasedDefinitions(AuthzSubject subj,
java.lang.Boolean enabled,
PageInfo pInfo)
Get the list of type-based alert definitions. |
int |
getActiveCount()
|
java.util.List |
getAllDeletedAlertDefs()
Prefetches all collections associated with each alertDef that is deleted and has a null resourceId into ehcache. |
AlertDefinitionValue |
getById(AuthzSubject subj,
java.lang.Integer id)
Find an alert definition and return a value object |
AlertDefinition |
getByIdAndCheck(AuthzSubject subj,
java.lang.Integer id)
Find an alert definition |
AlertDefinition |
getByIdNoCheck(java.lang.Integer id)
Find an alert definition and return a basic value. |
AlertConditionValue[] |
getConditionsById(java.lang.Integer id)
Get an alert definition's conditions |
java.lang.String |
getNameById(java.lang.Integer id)
Get an alert definition's name |
static org.hyperic.hq.events.shared.AlertDefinitionManagerLocal |
getOne()
|
java.util.Collection |
getUsing(Escalation e)
Returns the AlertDefinition s using the passed escalation. |
boolean |
isAlertDefined(AppdefEntityID id,
java.lang.Integer parentId)
Get list of alert conditions for a resource or resource type |
boolean |
isEnabled(java.lang.Integer id)
Return array of two values: enabled and act on trigger ID |
boolean |
isResourceTypeAlertDefinition(java.lang.Integer id)
Check if an alert definition is a resource type alert definition. |
void |
setEscalation(AuthzSubject subj,
java.lang.Integer defId,
java.lang.Integer escId)
Set the escalation on the alert definition |
void |
setSessionContext(javax.ejb.SessionContext ctx)
|
void |
startup()
|
AlertDefinitionValue |
updateAlertDefinition(AlertDefinitionValue adval)
Update an alert definition |
void |
updateAlertDefinitionActiveStatus(AuthzSubject subj,
AlertDefinition def,
boolean activate)
Activate/deactivate an alert definition. |
void |
updateAlertDefinitionBasic(AuthzSubject subj,
java.lang.Integer id,
java.lang.String name,
java.lang.String desc,
int priority,
boolean activate)
Update just the basics |
boolean |
updateAlertDefinitionInternalEnable(AuthzSubject subj,
AlertDefinition def,
boolean enable)
Enable/Disable an alert definition. |
boolean |
updateAlertDefinitionInternalEnable(AuthzSubject subj,
java.lang.Integer defId,
boolean enable)
Enable/Disable an alert definition. |
boolean |
updateAlertDefinitionInternalEnable(AuthzSubject subj,
java.util.List ids,
boolean enable)
Enable/Disable an alert definition. |
void |
updateAlertDefinitionsActiveStatus(AuthzSubject subj,
java.lang.Integer[] ids,
boolean activate)
Activate/deactivate an alert definitions. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AlertDefinitionManagerEJBImpl()
Method Detail |
---|
public AlertDefinitionValue createAlertDefinition(AuthzSubject subj, AlertDefinitionValue a) throws AlertDefinitionCreateException, PermissionException
AlertDefinitionCreateException
PermissionException
public AlertDefinitionValue createAlertDefinition(AlertDefinitionValue a)
public void updateAlertDefinitionBasic(AuthzSubject subj, java.lang.Integer id, java.lang.String name, java.lang.String desc, int priority, boolean activate) throws PermissionException
PermissionException
public AlertDefinitionValue updateAlertDefinition(AlertDefinitionValue adval) throws AlertConditionCreateException, ActionCreateException, javax.ejb.RemoveException
AlertConditionCreateException
ActionCreateException
javax.ejb.RemoveException
public void updateAlertDefinitionsActiveStatus(AuthzSubject subj, java.lang.Integer[] ids, boolean activate) throws PermissionException
PermissionException
public void updateAlertDefinitionActiveStatus(AuthzSubject subj, AlertDefinition def, boolean activate) throws PermissionException
PermissionException
public boolean updateAlertDefinitionInternalEnable(AuthzSubject subj, AlertDefinition def, boolean enable) throws PermissionException
true
if the enable/disable succeeded.
PermissionException
public boolean updateAlertDefinitionInternalEnable(AuthzSubject subj, java.lang.Integer defId, boolean enable) throws javax.ejb.FinderException, PermissionException
true
if the enable/disable succeeded.
javax.ejb.FinderException
PermissionException
public boolean updateAlertDefinitionInternalEnable(AuthzSubject subj, java.util.List ids, boolean enable) throws PermissionException
true
if the enable/disable succeeded.
PermissionException
public void setEscalation(AuthzSubject subj, java.lang.Integer defId, java.lang.Integer escId) throws PermissionException
PermissionException
public java.util.Collection getUsing(Escalation e)
AlertDefinition
s using the passed escalation.
public void deleteAlertDefinitions(AuthzSubject subj, java.lang.Integer[] ids) throws javax.ejb.RemoveException, PermissionException
javax.ejb.RemoveException
PermissionException
public void disassociateResource(Resource r)
public java.util.List getAllDeletedAlertDefs()
List
of Integer
of AlertDefintion
idspublic void cleanupAlertDefs(java.util.List alertDefIds)
alertDefIds
- List
of Integer
of alertDefIdspublic AlertDefinitionValue getById(AuthzSubject subj, java.lang.Integer id) throws PermissionException
PermissionException
- if user does not have permission to manage
alertspublic AlertDefinition getByIdAndCheck(AuthzSubject subj, java.lang.Integer id) throws PermissionException
PermissionException
- if user does not have permission to manage
alertspublic AlertDefinition getByIdNoCheck(java.lang.Integer id)
id
- The alert def Id.public boolean isResourceTypeAlertDefinition(java.lang.Integer id)
id
- The alert def Id.
true
if the alert definition is a resource type
alert definition.
javax.ejb.FinderException
public AlertDefinition findAlertDefinitionById(java.lang.Integer id)
public java.lang.String getNameById(java.lang.Integer id) throws javax.ejb.FinderException
javax.ejb.FinderException
public AlertConditionValue[] getConditionsById(java.lang.Integer id) throws javax.ejb.FinderException
javax.ejb.FinderException
public boolean isAlertDefined(AppdefEntityID id, java.lang.Integer parentId)
public PageList findAllAlertDefinitions(AuthzSubject subj)
AlertDefinitionValue
objectspublic java.lang.Integer findChildAlertDefinitionId(AppdefEntityID aeid, java.lang.Integer pid, boolean allowStale)
aeid
- The resource.pid
- The ID of the resource type alert definition (parent ID).allowStale
- true
to allow stale copies of an alert
definition in the query results; false
to
never allow stale copies, potentially always forcing a
sync with the database.
null
if no alert definition
is found for the resource.public java.util.List findAlertDefinitions(AuthzSubject subj, AlertSeverity minSeverity, java.lang.Boolean enabled, boolean excludeTypeBased, PageInfo pInfo)
minSeverity
- Specifies the minimum severity that the defs should
be set forenabled
- If non-null, specifies the nature of the returned
definitions (i.e. only return enabled or disabled
defs)excludeTypeBased
- If true, exclude any alert definitions
associated with a type-based def.pInfo
- Paging information. The sort field must be a
value from AlertDefSortField
public java.util.List findTypeBasedDefinitions(AuthzSubject subj, java.lang.Boolean enabled, PageInfo pInfo) throws PermissionException
enabled
- If non-null, specifies the nature of the returned defs.pInfo
- Paging information. The sort field must be a value from
AlertDefSortField
PermissionException
public java.util.List findAlertDefinitions(AuthzSubject subject, AppdefEntityID id) throws PermissionException
PermissionException
- if user cannot manage alerts for resourcepublic PageList findAlertDefinitions(AuthzSubject subj, AppdefEntityID id, PageControl pc) throws PermissionException
PermissionException
public java.util.List findAlertDefinitions(AuthzSubject subject, Resource prototype) throws PermissionException
PermissionException
public PageList findAlertDefinitions(AuthzSubject subj, AppdefEntityTypeID aetid, PageControl pc) throws PermissionException
PermissionException
public java.util.List findRelatedAlertDefinitions(AuthzSubject subj, Resource res)
subj
- the callerres
- the root resource
public PageList findAlertDefinitionChildren(java.lang.Integer id)
public java.util.SortedMap findAlertDefinitionNames(AuthzSubject subj, AppdefEntityID id, java.lang.Integer parentId) throws PermissionException
PermissionException
public java.util.SortedMap findAlertDefinitionNames(AppdefEntityID id, java.lang.Integer parentId)
public boolean isEnabled(java.lang.Integer id)
public int getActiveCount()
public void startup()
public static org.hyperic.hq.events.shared.AlertDefinitionManagerLocal getOne()
public void ejbCreate() throws javax.ejb.CreateException
javax.ejb.CreateException
public void ejbPostCreate()
public void ejbActivate()
ejbActivate
in interface javax.ejb.SessionBean
public void ejbPassivate()
ejbPassivate
in interface javax.ejb.SessionBean
public void ejbRemove()
ejbRemove
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 |