Package org.apache.sling.discovery.commons.providers

# Class EventHelper

java.lang.Object
org.apache.sling.discovery.commons.providers.EventHelper

public class EventHelper extends Object
Contains static factory methods for creating TopologyEvents with BaseTopologyView as well as some TopologyEvent related helper methods

## Constructor Summary

Constructors
Constructor
Description
`EventHelper()`

## Method Summary

Modifier and Type
Method
Description
`static org.apache.sling.discovery.TopologyEvent`
`newChangedEvent(BaseTopologyView oldView, BaseTopologyView newView)`
Simple factory method for creating a TOPOLOGY_CHANGED event with the given old and new views
`static org.apache.sling.discovery.TopologyEvent`
`newChangingEvent(BaseTopologyView oldView)`
Simple factory method for creating a TOPOLOGY_CHANGING event with the given oldView
`static org.apache.sling.discovery.TopologyEvent`
`newInitEvent(BaseTopologyView newView)`
Simple factory method for creating a TOPOLOGY_INIT event with the given newView
`static org.apache.sling.discovery.TopologyEvent`
`newPropertiesChangedEvent(BaseTopologyView oldView, BaseTopologyView newView)`
`static String`
`toShortString(org.apache.sling.discovery.TopologyEvent event)`
Returns a shorter toString than the default TopologyEvent.toString() which can be rather large and unusable in log files

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### EventHelper

public EventHelper()

## Method Details

### newInitEvent

public static org.apache.sling.discovery.TopologyEvent newInitEvent(BaseTopologyView newView)
Simple factory method for creating a TOPOLOGY_INIT event with the given newView

### newChangingEvent

public static org.apache.sling.discovery.TopologyEvent newChangingEvent(BaseTopologyView oldView)
Simple factory method for creating a TOPOLOGY_CHANGING event with the given oldView

### newChangedEvent

public static org.apache.sling.discovery.TopologyEvent newChangedEvent(BaseTopologyView oldView, BaseTopologyView newView)
Simple factory method for creating a TOPOLOGY_CHANGED event with the given old and new views

### newPropertiesChangedEvent

public static org.apache.sling.discovery.TopologyEvent newPropertiesChangedEvent(BaseTopologyView oldView, BaseTopologyView newView)

### toShortString

public static String toShortString(org.apache.sling.discovery.TopologyEvent event)
Returns a shorter toString than the default TopologyEvent.toString() which can be rather large and unusable in log files