Hyperic HQ Plugin API v. 4.4.0.2

org.hyperic.hq.events.server.session
Class SessionBase

java.lang.Object
  extended by org.hyperic.hq.events.server.session.SessionBase
Direct Known Subclasses:
AlertDefinitionManagerEJBImpl, AlertManagerEJBImpl, EventLogManagerEJBImpl, HeartBeatServiceEJBImpl

public abstract class SessionBase
extends java.lang.Object

Session class superclass, which provides generic utility functions


Field Summary
protected static java.lang.String DATASOURCE
          the events database name
protected  org.apache.commons.logging.Log log
           
protected static int SEQUENCE_INTERVAL
          the interval between sequence ID's
 
Constructor Summary
SessionBase()
           
 
Method Summary
static void canCreateAlertDefinition(AuthzSubject user, AppdefEntityID entityId)
           
static void canCreateEscalation(java.lang.Integer subjectId)
           
static void canCreateResourceTypeAlertDefinitionTemplate(AuthzSubject user)
           
static void canDeleteAlertDefinition(AuthzSubject user, AppdefEntityID entityId)
           
static void canDeleteResourceTypeAlertDefinitionTemplate(AuthzSubject user)
           
static void canFixAcknowledgeAlerts(AuthzSubject who, AlertDefinitionInterface adi)
           
static void canFixAcknowledgeAlerts(AuthzSubject user, AppdefEntityID entityId)
          Check for manage alerts permission for a given resource By manage, we mean the ability to fix/acknowledge alerts & pause escalations...
static void canModifyAlertDefinition(AuthzSubject user, AppdefEntityID entityId)
           
static void canModifyEscalation(java.lang.Integer subjectId)
           
static void canModifyResourceTypeAlertDefinitionTemplate(AuthzSubject user)
           
static void canRemoveEscalation(java.lang.Integer subjectId)
           
static void canViewAlertDefinition(AuthzSubject user, AppdefEntityID entityId)
           
static void canViewEscalation(java.lang.Integer subjectId)
           
static void canViewResourceTypeAlertDefinitionTemplate(AuthzSubject user)
           
protected  java.lang.String describeCondition(AlertCondition cond, Measurement dm)
           
protected  Resource findResource(AppdefEntityID id)
           
static AppdefEntityID getAppdefEntityID(AlertDefinitionInterface adi)
           
protected  javax.naming.InitialContext getInitialContext()
           
protected  java.lang.Long getNextId(java.lang.String seq)
          Get the next ID from the database sequence
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected org.apache.commons.logging.Log log

DATASOURCE

protected static final java.lang.String DATASOURCE
the events database name

See Also:
Constant Field Values

SEQUENCE_INTERVAL

protected static final int SEQUENCE_INTERVAL
the interval between sequence ID's

See Also:
Constant Field Values
Constructor Detail

SessionBase

public SessionBase()
Method Detail

getInitialContext

protected javax.naming.InitialContext getInitialContext()
                                                 throws javax.naming.NamingException
Throws:
javax.naming.NamingException

getNextId

protected java.lang.Long getNextId(java.lang.String seq)
                            throws javax.ejb.CreateException
Get the next ID from the database sequence

Returns:
the next ID in the database sequence
Throws:
javax.ejb.CreateException - if the IDGenerator fails to generate a new ID

getAppdefEntityID

public static AppdefEntityID getAppdefEntityID(AlertDefinitionInterface adi)

findResource

protected Resource findResource(AppdefEntityID id)

canViewResourceTypeAlertDefinitionTemplate

public static void canViewResourceTypeAlertDefinitionTemplate(AuthzSubject user)
                                                       throws PermissionException
Throws:
PermissionException

canModifyResourceTypeAlertDefinitionTemplate

public static void canModifyResourceTypeAlertDefinitionTemplate(AuthzSubject user)
                                                         throws PermissionException
Throws:
PermissionException

canCreateResourceTypeAlertDefinitionTemplate

public static void canCreateResourceTypeAlertDefinitionTemplate(AuthzSubject user)
                                                         throws PermissionException
Throws:
PermissionException

canDeleteResourceTypeAlertDefinitionTemplate

public static void canDeleteResourceTypeAlertDefinitionTemplate(AuthzSubject user)
                                                         throws PermissionException
Throws:
PermissionException

canViewAlertDefinition

public static void canViewAlertDefinition(AuthzSubject user,
                                          AppdefEntityID entityId)
                                   throws PermissionException
Throws:
PermissionException

canModifyAlertDefinition

public static void canModifyAlertDefinition(AuthzSubject user,
                                            AppdefEntityID entityId)
                                     throws PermissionException
Throws:
PermissionException

canCreateAlertDefinition

public static void canCreateAlertDefinition(AuthzSubject user,
                                            AppdefEntityID entityId)
                                     throws PermissionException
Throws:
PermissionException

canDeleteAlertDefinition

public static void canDeleteAlertDefinition(AuthzSubject user,
                                            AppdefEntityID entityId)
                                     throws PermissionException
Throws:
PermissionException

canFixAcknowledgeAlerts

public static void canFixAcknowledgeAlerts(AuthzSubject who,
                                           AlertDefinitionInterface adi)
                                    throws PermissionException
Throws:
PermissionException

canFixAcknowledgeAlerts

public static void canFixAcknowledgeAlerts(AuthzSubject user,
                                           AppdefEntityID entityId)
                                    throws PermissionException
Check for manage alerts permission for a given resource By manage, we mean the ability to fix/acknowledge alerts & pause escalations...

Throws:
PermissionException

describeCondition

protected java.lang.String describeCondition(AlertCondition cond,
                                             Measurement dm)

canCreateEscalation

public static void canCreateEscalation(java.lang.Integer subjectId)
                                throws PermissionException
Throws:
PermissionException

canViewEscalation

public static void canViewEscalation(java.lang.Integer subjectId)
                              throws PermissionException
Throws:
PermissionException

canModifyEscalation

public static void canModifyEscalation(java.lang.Integer subjectId)
                                throws PermissionException
Throws:
PermissionException

canRemoveEscalation

public static void canRemoveEscalation(java.lang.Integer subjectId)
                                throws PermissionException
Throws:
PermissionException

Hyperic HQ Plugin API v. 4.4.0.2

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