org.opennms.netmgt.model.events
Class EventBuilder

java.lang.Object
  extended by org.opennms.netmgt.model.events.EventBuilder

public class EventBuilder
extends Object

EventBuilder class.

Version:
$Id: $
Author:
ranger

Constructor Summary
EventBuilder(Event event)
          Constructor for EventBuilder.
EventBuilder(Event event, Date date)
          Constructor for EventBuilder.
EventBuilder(Event event, String source)
          Constructor for EventBuilder.
EventBuilder(String uei, String source)
          Constructor for EventBuilder.
EventBuilder(String uei, String source, Date date)
          Constructor for EventBuilder.
 
Method Summary
 EventBuilder addParam(String parmName, char ch)
          addParam
 EventBuilder addParam(String parmName, Collection<String> vals)
          addParam
 EventBuilder addParam(String parmName, int val)
          addParam
 EventBuilder addParam(String parmName, long val)
          addParam
 EventBuilder addParam(String parmName, String val)
          addParam
 EventBuilder addParms(Parms parms)
          addParms
 Event getEvent()
          getEvent
 EventBuilder setAlarmData(AlarmData alarmData)
          setAlarmData
 EventBuilder setCreationTime(Date date)
          setCreationTime
 EventBuilder setDescription(String descr)
          setDescription
 EventBuilder setEnterpriseId(String enterprise)
          setEnterpriseId
 void setField(String name, String val)
          setField
 EventBuilder setGeneric(int generic)
          setGeneric
 EventBuilder setHost(String hostname)
          setHost
 EventBuilder setInterface(String ipAddress)
          setInterface
 EventBuilder setIpInterface(OnmsIpInterface iface)
          setIpInterface
 EventBuilder setLogDest(String dest)
          setLogDest
 EventBuilder setLogMessage(String content)
          setLogMessage
 EventBuilder setMonitoredService(OnmsMonitoredService monitoredService)
          setMonitoredService
 EventBuilder setNode(OnmsNode node)
          setNode
 EventBuilder setNodeid(int nodeid)
          setNodeid
 EventBuilder setParam(String parmName, String val)
          setParam
 EventBuilder setService(String serviceName)
          setService
 EventBuilder setSeverity(String severity)
          setSeverity
 EventBuilder setSnmpHost(String snmpHost)
          setSnmpHost
 EventBuilder setSnmpVersion(String version)
          setSnmpVersion
 EventBuilder setSource(String source)
          setSource
 EventBuilder setSpecific(int specific)
          setSpecific
 EventBuilder setTime(Date date)
          setTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventBuilder

public EventBuilder(String uei,
                    String source)

Constructor for EventBuilder.

Parameters:
uei - a String object.
source - a String object.

EventBuilder

public EventBuilder(String uei,
                    String source,
                    Date date)

Constructor for EventBuilder.

Parameters:
uei - a String object.
source - a String object.
date - a Date object.

EventBuilder

public EventBuilder(Event event)

Constructor for EventBuilder.

Parameters:
event - a Event object.

EventBuilder

public EventBuilder(Event event,
                    String source)

Constructor for EventBuilder.

Parameters:
event - a Event object.
source - a String object.

EventBuilder

public EventBuilder(Event event,
                    Date date)

Constructor for EventBuilder.

Parameters:
event - a Event object.
date - a Date object.
Method Detail

getEvent

public Event getEvent()

getEvent

Returns:
a Event object.

setTime

public EventBuilder setTime(Date date)

setTime

Parameters:
date - a Date object.
Returns:
a EventBuilder object.

setCreationTime

public EventBuilder setCreationTime(Date date)

setCreationTime

Parameters:
date - a Date object.
Returns:
a EventBuilder object.

setSource

public EventBuilder setSource(String source)

setSource

Parameters:
source - a String object.
Returns:
a EventBuilder object.

setSeverity

public EventBuilder setSeverity(String severity)

setSeverity

Parameters:
severity - a String object.
Returns:
a EventBuilder object.

setNodeid

public EventBuilder setNodeid(int nodeid)

setNodeid

Parameters:
nodeid - a int.
Returns:
a EventBuilder object.

setHost

public EventBuilder setHost(String hostname)

setHost

Parameters:
hostname - a String object.
Returns:
a EventBuilder object.

setInterface

public EventBuilder setInterface(String ipAddress)

setInterface

Parameters:
ipAddress - a String object.
Returns:
a EventBuilder object.

setService

public EventBuilder setService(String serviceName)

setService

Parameters:
serviceName - a String object.
Returns:
a EventBuilder object.

addParam

public EventBuilder addParam(String parmName,
                             String val)

addParam

Parameters:
parmName - a String object.
val - a String object.
Returns:
a EventBuilder object.

setParam

public EventBuilder setParam(String parmName,
                             String val)

setParam

Parameters:
parmName - a String object.
val - a String object.
Returns:
a EventBuilder object.

addParam

public EventBuilder addParam(String parmName,
                             long val)

addParam

Parameters:
parmName - a String object.
val - a long.
Returns:
a EventBuilder object.

addParam

public EventBuilder addParam(String parmName,
                             int val)

addParam

Parameters:
parmName - a String object.
val - a int.
Returns:
a EventBuilder object.

addParam

public EventBuilder addParam(String parmName,
                             char ch)

addParam

Parameters:
parmName - a String object.
ch - a char.
Returns:
a EventBuilder object.

addParam

public EventBuilder addParam(String parmName,
                             Collection<String> vals)

addParam

Parameters:
parmName - a String object.
vals - a Collection object.
Returns:
a EventBuilder object.

setAlarmData

public EventBuilder setAlarmData(AlarmData alarmData)

setAlarmData

Parameters:
alarmData - a AlarmData object.
Returns:
a EventBuilder object.

setNode

public EventBuilder setNode(OnmsNode node)

setNode

Parameters:
node - a OnmsNode object.
Returns:
a EventBuilder object.

setIpInterface

public EventBuilder setIpInterface(OnmsIpInterface iface)

setIpInterface

Parameters:
iface - a OnmsIpInterface object.
Returns:
a EventBuilder object.

setMonitoredService

public EventBuilder setMonitoredService(OnmsMonitoredService monitoredService)

setMonitoredService

Parameters:
monitoredService - a OnmsMonitoredService object.
Returns:
a EventBuilder object.

setSnmpVersion

public EventBuilder setSnmpVersion(String version)

setSnmpVersion

Parameters:
version - a String object.
Returns:
a EventBuilder object.

setEnterpriseId

public EventBuilder setEnterpriseId(String enterprise)

setEnterpriseId

Parameters:
enterprise - a String object.
Returns:
a EventBuilder object.

setGeneric

public EventBuilder setGeneric(int generic)

setGeneric

Parameters:
generic - a int.
Returns:
a EventBuilder object.

setSpecific

public EventBuilder setSpecific(int specific)

setSpecific

Parameters:
specific - a int.
Returns:
a EventBuilder object.

setSnmpHost

public EventBuilder setSnmpHost(String snmpHost)

setSnmpHost

Parameters:
snmpHost - a String object.
Returns:
a EventBuilder object.

setField

public void setField(String name,
                     String val)

setField

Parameters:
name - a String object.
val - a String object.

setLogDest

public EventBuilder setLogDest(String dest)

setLogDest

Parameters:
dest - a String object.
Returns:
a EventBuilder object.

setLogMessage

public EventBuilder setLogMessage(String content)

setLogMessage

Parameters:
content - a String object.
Returns:
a EventBuilder object.

setDescription

public EventBuilder setDescription(String descr)

setDescription

Parameters:
descr - a String object.
Returns:
a EventBuilder object.

addParms

public EventBuilder addParms(Parms parms)

addParms

Parameters:
parms - a Parms object.
Returns:
a EventBuilder object.


Copyright © 2011. All Rights Reserved.