package com.adaptc.mws.plugins;

/**
 * Convenience interface for working with plugin events.  This may be implemented by an enum and used in combination
 * with the {@link IPluginEventService} to easily create events.
 * @author bsaville
 */
public interface IPluginEvent {
	/**
	 * The i18n message code to use for the event, which may optionally take arguments.
	 * @return The i18n message code for the message describing the event.
	 */
	public String getMessageCode();

	/**
	 * The severity of the event.
	 * @return The severity of the event.
	 */
	public IPluginEventService.Severity getSeverity();

	/**
	 * The escalation level of the event.
	 * @return The escalation level of the event.
	 */
	public IPluginEventService.EscalationLevel getEscalationLevel();

	/**
	 * Represents the unique (per plugin component) code for a single event which does not include the severity,
	 * escalation level, component code, or any other piece of the code.
	 * @return The unique (per plugin component) event code
	 */
	public int getEventCode();

	/**
	 * The type of the event, may be null.
	 * @return The type of the event or null if none.
	 */
	public String getEventType();
}

@@ -268,16 +268,170 @@
 Event %7B%0A
+%09/**%0A%09 * The delimiter to use when generating an origin or origin suffix.%0A%09 * @see #getOriginSuffix()%0A%09 */%0A%09public static String ORIGIN_DELIMITER = %22/%22;%0A%0A
 %09/**%0A%09 *
@@ -1326,11 +1326,767 @@
 tType();
+%0A%0A%09/**%0A%09 * If non-null, this string is appended to the end of the origin generated by the plugin framework.  For example,%0A%09 * if creating an event for a plugin type named %22MyExample%22 and an id of %22myExample1%22, the plugin framework will%0A%09 * generate an origin of %22MWS/plugins/MyExample/myExample1%22.  If the string returned from this method were%0A%09 * %22MyEventsEnum/EVENT1%22 (representing the enum name and the enum value name), the full origin used in creating%0A%09 * the event with the IPluginEventService would be %22MWS/plugins/MyExample/myExample1/MyEventsEnum/EVENT1%22.  If the%0A%09 * leading slash is included, it will be trimmed.%0A%09 * @return The suffix of the origin to use when creating an event%0A%09 * @see #ORIGIN_DELIMITER%0A%09 */%0A%09public String getOriginSuffix();
 %0A%7D%0A

Add origin suffix to plugin events