EscalationManagerEJBImpl (Hyperic HQ Plugin API)
Keywords: org.hyperic.hq.escalation.server.session.EscalationManagerEJBImpl class

Overview | Package | Class | Tree | Deprecated | Index | Help
| 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

## org.hyperic.hq.escalation.server.session
Class EscalationManagerEJBImpl

    java.lang.Object
      org.hyperic.hq.escalation.server.session.EscalationManagerEJBImpl

All Implemented Interfaces:
  java.io.Serializable, javax.ejb.EnterpriseBean, javax.ejb.SessionBean

    public class EscalationManagerEJBImpl

extends java.lang.Object
implements javax.ejb.SessionBean

See Also:
  Serialized Form

Constructor Summary
`EscalationManagerEJBImpl()`

Method Summary
`boolean` | `acknowledgeAlert(AuthzSubject subject, EscalationAlertType type, java.lang.Integer alertId, java.lang.String moreInfo, long pause)` Acknowledge an alert, potentially sending out notifications.
`void` | `addAction(Escalation e, ActionConfigInterface cfg, long waitTime)` Add an action to the end of an escalation chain.
`Escalation` | `createEscalation(java.lang.String name, java.lang.String description, boolean pauseAllowed, long maxWaitTime, boolean notifyAll, boolean repeat)` Create a new escalation chain
`void` | `deleteAllEscalationStates(java.lang.Integer[] stateIds)` This method is only for internal use by the `EscalationRuntime`.
`void` | `deleteEscalation(AuthzSubject subject, Escalation e)` Delete an escalation chain.
`void` | `ejbActivate()`
`void` | `ejbCreate()`
`void` | `ejbPassivate()`
`void` | `ejbRemove()`
`void` | `endEscalation(PerformsEscalations def)` End an escalation.
`void` | `executeState(java.lang.Integer stateId)` This method is only for internal use by the `EscalationRuntime`.
`java.util.Collection` | `findAll(AuthzSubject subject)`
`Escalation` | `findByDefId(EscalationAlertType type, java.lang.Integer defId)` Find an escalation based on the type and ID of the definition.
`Escalation` | `findById(AuthzSubject subject, java.lang.Integer id)`
`Escalation` | `findById(java.lang.Integer id)`
`Escalation` | `findByName(AuthzSubject subject, java.lang.String name)`
`Escalation` | `findByName(java.lang.String name)`
`EscalationState` | `findEscalationState(PerformsEscalations def)`
`void` | `fixAlert(AuthzSubject subject, EscalationAlertType type, java.lang.Integer alertId, java.lang.String moreInfo)` Fix an alert, potentially sending out notifications.
`void` | `fixAlert(AuthzSubject subject, EscalationAlertType type, java.lang.Integer alertId, java.lang.String moreInfo, boolean suppressNotification)` Fix an alert, potentially sending out notifications.
`boolean` | `fixAlert(AuthzSubject subject, PerformsEscalations def, java.lang.String moreInfo)` Fix an alert for a an escalation if there is one currently running.
`java.lang.Number` | `getActiveEscalationCount()` Get the # of active escalations within HQ inventory
`java.util.List` | `getActiveEscalations(int maxEscalations)`
`Escalatable` | `getEscalatable(EscalationState s)`
`java.lang.Number` | `getEscalationCount()` Get the # of escalations within HQ inventory
`java.lang.String` | `getLastFix(PerformsEscalations def)`
`static org.hyperic.hq.escalation.shared.EscalationManagerLocal` | `getOne()`
`void` | `handleSubjectRemoval(AuthzSubject subject)` Called when subject is removed and therefore have to null out the acknowledgedBy field
`boolean` | `isAlertAcknowledgeable(java.lang.Integer alertId, PerformsEscalations def)` See if an alert is acknowledgeable
`void` | `removeAction(Escalation e, java.lang.Integer actId)` Remove an action from an escalation chain.
`void` | `setEscalation(EscalationAlertType type, java.lang.Integer defId, Escalation escalation)` Set the escalation for a given alert definition and type
`void` | `setSessionContext(javax.ejb.SessionContext ctx)`
`boolean` | `startEscalation(PerformsEscalations def, EscalatableCreator creator)` Start an escalation.
`void` | `startup()`
`void` | `updateEscalation(AuthzSubject subject, Escalation esc, java.lang.String name, java.lang.String description, boolean pauseAllowed, long maxWaitTime, boolean notifyAll, boolean repeat)` Update an escalation chain
`void` | `updateEscalationOrder(Escalation esc, java.util.List actions)` Re-order the actions for an escalation.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### EscalationManagerEJBImpl

    public EscalationManagerEJBImpl()

Method Detail

### createEscalation

    public Escalation createEscalation(java.lang.String name,
                                       java.lang.String description,
                                       boolean pauseAllowed,
                                       long maxWaitTime,
                                       boolean notifyAll,
                                       boolean repeat)
                                throws DuplicateObjectException

  Create a new escalation chain

  Throws:
    `DuplicateObjectException`
  See Also:
    `for information on fields`

### findEscalationState

    public EscalationState findEscalationState(PerformsEscalations def)

### updateEscalation

    public void updateEscalation(AuthzSubject subject,
                                 Escalation esc,
                                 java.lang.String name,
                                 java.lang.String description,
                                 boolean pauseAllowed,
                                 long maxWaitTime,
                                 boolean notifyAll,
                                 boolean repeat)
                          throws DuplicateObjectException,
                                 PermissionException

  Update an escalation chain

  Throws:
    `DuplicateObjectException`
    `PermissionException`
  See Also:
    `for information on fields`

### addAction

    public void addAction(Escalation e,
                          ActionConfigInterface cfg,
                          long waitTime)

  Add an action to the end of an escalation chain. Any escalations currently in progress using this chain will be canceled.

### removeAction

    public void removeAction(Escalation e,
                             java.lang.Integer actId)

  Remove an action from an escalation chain. Any escalations currently in progress using this chain will be canceled.

### deleteEscalation

    public void deleteEscalation(AuthzSubject subject,
                                 Escalation e)
                          throws PermissionException,
                                 ApplicationException

  Delete an escalation chain. This method will throw an exception if the escalation chain is in use. TODO: Probably want to allow for the fact that people DO want to delete while states exist.

  Throws:
    `PermissionException`
    `ApplicationException`

### findById

    public Escalation findById(java.lang.Integer id)

### findById

    public Escalation findById(AuthzSubject subject,
                               java.lang.Integer id)
                        throws PermissionException

  Throws:
    `PermissionException`

### findAll

    public java.util.Collection findAll(AuthzSubject subject)
                                 throws PermissionException

  Throws:
    `PermissionException`

### findByName

    public Escalation findByName(AuthzSubject subject,
                                 java.lang.String name)
                          throws PermissionException

  Throws:
    `PermissionException`

### findByName

    public Escalation findByName(java.lang.String name)

### startEscalation

    public boolean startEscalation(PerformsEscalations def,
                                   EscalatableCreator creator)

  Start an escalation. If the entity performing escalations does not have an assigned escalation or if the escalation has already been started, then this method call will be a no-op.

  Parameters:
    `def` - The entity performing escalations.
    `creator` - Object which will create an `Escalatable` object if invoking this method actually starts an escalation.
  Returns:
    `true` if the escalation is started; `false` if not because either there is no escalation assigned to the entity or the escalation is already in progress.

### getEscalatable

    public Escalatable getEscalatable(EscalationState s)

### endEscalation

    public void endEscalation(PerformsEscalations def)

  End an escalation. This will remove all state for the escalation tied to a specific definition.

### deleteAllEscalationStates

    public void deleteAllEscalationStates(java.lang.Integer[] stateIds)

  This method is only for internal use by the `EscalationRuntime`. This method deletes in batch the given escalation states.

  Parameters:
    `stateIds` - The Ids for the escalation states to delete.

### executeState

    public void executeState(java.lang.Integer stateId)

  This method is only for internal use by the `EscalationRuntime`. It ensures that we have a session setup prior to executing any actions. This method executes the action pointed at by the state, determines the next stage of the escalation and (optionally) ends it, thus unscheduling any further executions.

### findByDefId

    public Escalation findByDefId(EscalationAlertType type,
                                  java.lang.Integer defId)

  Find an escalation based on the type and ID of the definition.

  Returns:
    null if the definition defined by the ID does not have any escalation associated with it

### setEscalation

    public void setEscalation(EscalationAlertType type,
                              java.lang.Integer defId,
                              Escalation escalation)

  Set the escalation for a given alert definition and type

### acknowledgeAlert

    public boolean acknowledgeAlert(AuthzSubject subject,
                                    EscalationAlertType type,
                                    java.lang.Integer alertId,
                                    java.lang.String moreInfo,
                                    long pause)
                             throws PermissionException

  Acknowledge an alert, potentially sending out notifications.

  Parameters:
    `subject` - Person who acknowledged the alert
    `pause` - TODO
  Throws:
    `PermissionException`

### isAlertAcknowledgeable

    public boolean isAlertAcknowledgeable(java.lang.Integer alertId,
                                          PerformsEscalations def)

  See if an alert is acknowledgeable

  Returns:
    true if the alert is currently acknowledgeable

### fixAlert

    public boolean fixAlert(AuthzSubject subject,
                            PerformsEscalations def,
                            java.lang.String moreInfo)
                     throws PermissionException

  Fix an alert for a an escalation if there is one currently running.

  Returns:
    true if there was an alert to be fixed.
  Throws:
    `PermissionException`

### fixAlert

    public void fixAlert(AuthzSubject subject,
                         EscalationAlertType type,
                         java.lang.Integer alertId,
                         java.lang.String moreInfo)
                  throws PermissionException

  Fix an alert, potentially sending out notifications. The state of the escalation will be terminated and the alert will be marked fixed.

  Parameters:
    `subject` - Person who fixed the alert
  Throws:
    `PermissionException`

### fixAlert

    public void fixAlert(AuthzSubject subject,
                         EscalationAlertType type,
                         java.lang.Integer alertId,
                         java.lang.String moreInfo,
                         boolean suppressNotification)
                  throws PermissionException

  Fix an alert, potentially sending out notifications. The state of the escalation will be terminated and the alert will be marked fixed.

  Parameters:
    `subject` - Person who fixed the alert
  Throws:
    `PermissionException`

### updateEscalationOrder

    public void updateEscalationOrder(Escalation esc,
                                      java.util.List actions)

  Re-order the actions for an escalation. If there are any states associated with the escalation, they will be cleared.

  Parameters:
    `actions` - a list of `EscalationAction`s (already contained within the escalation) specifying the new order.

### getActiveEscalationCount

    public java.lang.Number getActiveEscalationCount()

  Get the # of active escalations within HQ inventory

### getEscalationCount

    public java.lang.Number getEscalationCount()

  Get the # of escalations within HQ inventory

### getActiveEscalations

    public java.util.List getActiveEscalations(int maxEscalations)

### getLastFix

    public java.lang.String getLastFix(PerformsEscalations def)

### handleSubjectRemoval

    public void handleSubjectRemoval(AuthzSubject subject)

  Called when subject is removed and therefore have to null out the acknowledgedBy field

### startup

    public void startup()

### getOne

    public static org.hyperic.hq.escalation.shared.EscalationManagerLocal getOne()

### 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`

Overview | Package | Class | Tree | Deprecated | Index | Help
| 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

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