org.rhq.core.domain.event
Class Event

java.lang.Object
  extended by org.rhq.core.domain.event.Event
All Implemented Interfaces:
Serializable

public class Event
extends Object
implements Serializable

A transpired event, pertaining to a particular Resource.

See Also:
Serialized Form

Field Summary
static String DELETE_BY_RESOURCES
           
static int DETAIL_MAX_LENGTH
           
static String FIND_EVENTS_FOR_RESOURCE_ID_AND_TIME
           
static String FIND_EVENTS_FOR_RESOURCE_ID_AND_TIME_SEVERITY
           
static String FIND_EVENTS_FOR_RESOURCES_AND_TIME
           
static String GET_DETAILS_FOR_EVENT_IDS
           
static String TABLE_NAME
           
 
Constructor Summary
protected Event()
           
  Event(String type, String sourceLocation, Date timestamp, EventSeverity severity, String detail)
           
 
Method Summary
 boolean equals(Object obj)
           
 Date getAckTime()
          Returns the time this Event was acknowledged.
 String getAckUser()
          Returns the user who acknowledged this Event.
 String getDetail()
           
 String getDetailExcerpt()
           
 int getId()
          NOTE: This method is not intended to be called by plugins or the Plugin Container.
 EventSeverity getSeverity()
           
 EventSource getSource()
          NOTE: This method is not intended to be called by plugins or the Plugin Container.
 String getSourceLocation()
           
 Date getTimestamp()
           
 String getType()
           
 int hashCode()
           
 void setAckTime(Date ackTime)
          Sets the time this Event was acknowledged.
 void setAckUser(String ackUser)
          Sets the user who acknowledged this Event.
 void setDetailExcerpt(String detailExcerpt)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

TABLE_NAME

public static final String TABLE_NAME
See Also:
Constant Field Values

DETAIL_MAX_LENGTH

public static final int DETAIL_MAX_LENGTH
See Also:
Constant Field Values

DELETE_BY_RESOURCES

public static final String DELETE_BY_RESOURCES
See Also:
Constant Field Values

FIND_EVENTS_FOR_RESOURCES_AND_TIME

public static final String FIND_EVENTS_FOR_RESOURCES_AND_TIME
See Also:
Constant Field Values

FIND_EVENTS_FOR_RESOURCE_ID_AND_TIME

public static final String FIND_EVENTS_FOR_RESOURCE_ID_AND_TIME
See Also:
Constant Field Values

FIND_EVENTS_FOR_RESOURCE_ID_AND_TIME_SEVERITY

public static final String FIND_EVENTS_FOR_RESOURCE_ID_AND_TIME_SEVERITY
See Also:
Constant Field Values

GET_DETAILS_FOR_EVENT_IDS

public static final String GET_DETAILS_FOR_EVENT_IDS
See Also:
Constant Field Values
Constructor Detail

Event

protected Event()

Event

public Event(@NotNull
             String type,
             @NotNull
             String sourceLocation,
             @NotNull
             Date timestamp,
             @NotNull
             EventSeverity severity,
             @NotNull
             String detail)
Parameters:
type - the name of the EventDefinition that defines this event's type
timestamp - the date/time this event occurred
severity - the severity of this event
detail - the details of this event
Method Detail

getId

public int getId()
NOTE: This method is not intended to be called by plugins or the Plugin Container.


getSource

@Nullable
public EventSource getSource()
NOTE: This method is not intended to be called by plugins or the Plugin Container.


getType

@Nullable
public String getType()

getSourceLocation

@Nullable
public String getSourceLocation()

getTimestamp

@NotNull
public Date getTimestamp()

getSeverity

@NotNull
public EventSeverity getSeverity()

getDetail

@NotNull
public String getDetail()

setAckTime

public void setAckTime(@Nullable
                       Date ackTime)
Sets the time this Event was acknowledged. Set to null to indicate the Event has not been acknowledged. NOTE: This method is not intended to be called by plugins or the Plugin Container.

Parameters:
ackTime - the time this Event was acknowledged

getAckTime

@Nullable
public Date getAckTime()
Returns the time this Event was acknowledged. Returns null to indicate the Event has not been acknowledged. NOTE: This method is not intended to be called by plugins or the Plugin Container.

Returns:
the time this Event was acknowledged, or null if the Event has not been acknowledged

setAckUser

public void setAckUser(@Nullable
                       String ackUser)
Sets the user who acknowledged this Event. Set to null to indicate the Event has not been acknowledged. NOTE: This method is not intended to be called by plugins or the Plugin Container.

Parameters:
ackUser - the user who acknowledged this Event

getAckUser

@Nullable
public String getAckUser()
Returns the user who acknowledged this Event. Set to null to indicate the Event has not been acknowledged. NOTE: This method is not intended to be called by plugins or the Plugin Container.

Returns:
the user who acknowledged this Event, or null if the Event has not been acknowledged

getDetailExcerpt

public String getDetailExcerpt()

setDetailExcerpt

public void setDetailExcerpt(String detailExcerpt)

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2008 RHQ Project Advisory Board (Red Hat, Inc. and Hyperic, Inc.). All Rights Reserved.