@PublicApi public class

EventType

extends Object
java.lang.Object
   ↳ com.atlassian.jira.event.type.EventType

@PublicApi

This class is designed for plugins to consume (call its methods).

Clients of @PublicApi can expect that programs compiled against a given version will remain binary compatible with later versions of the @PublicApi as per each product's API policy as long as the client does not implement/extend @PublicApi interfaces or classes (refer to each product's API policy for the exact guarantee---usually binary compatibility is guaranteed at least across minor versions).

Note: since @PublicApi interfaces and classes are not designed to be implemented or extended by clients, we may perform certain types of binary-incompatible changes to these classes and interfaces, but these will not affect well-behaved clients that do not extend/implement these types (in general, only classes and interfaces annotated with @PublicSpi are safe to extend/implement).

Class Overview

This class describes the type of event.

Summary

Constants
String EVENT_TYPE
String JIRA_SYSTEM_EVENT_TYPE
Fields
public static final Long ISSUE_ASSIGNED_ID
public static final Long ISSUE_CLOSED_ID
public static final Long ISSUE_COMMENTED_ID
public static final Long ISSUE_COMMENT_DELETED_ID
public static final Long ISSUE_COMMENT_EDITED_ID
public static final Long ISSUE_CREATED_ID
public static final Long ISSUE_DELETED_ID
public static final Long ISSUE_GENERICEVENT_ID
public static final Long ISSUE_MOVED_ID
public static final Long ISSUE_REOPENED_ID
public static final Long ISSUE_RESOLVED_ID
public static final Long ISSUE_UPDATED_ID
public static final Long ISSUE_WORKLOGGED_ID
public static final Long ISSUE_WORKLOG_DELETED_ID
public static final Long ISSUE_WORKLOG_UPDATED_ID
public static final Long ISSUE_WORKSTARTED_ID
public static final Long ISSUE_WORKSTOPPED_ID
Public Constructors
EventType(String name, String description, Long templateId)
Create an Event Type.
EventType(Long id, String name, String description, Long templateId)
Create an Event Type.
EventType(GenericValue eventTypeGV)
Create an Event Type.
Public Methods
String getDescKey()
String getDescription()
Long getId()
String getName()
String getNameKey()
Long getTemplateId()
Retrieve the default template id associated with this event type.
String getTranslatedDesc(User remoteUser)
Allows i18n keys to be specified in the properties file to allow translation of the event type description.
String getTranslatedName(User remoteUser)
Allows i18n keys to be specified in the properties file to allow translation of the event type name.
String getType()
boolean isSystemEventType()
void setTemplateId(Long templateId)
Set the default template id to be associated with this event type.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final String EVENT_TYPE

Constant Value: "EventType"

public static final String JIRA_SYSTEM_EVENT_TYPE

Constant Value: "jira.system.event.type"

Fields

public static final Long ISSUE_ASSIGNED_ID

public static final Long ISSUE_CLOSED_ID

public static final Long ISSUE_COMMENTED_ID

public static final Long ISSUE_COMMENT_DELETED_ID

public static final Long ISSUE_COMMENT_EDITED_ID

public static final Long ISSUE_CREATED_ID

public static final Long ISSUE_DELETED_ID

public static final Long ISSUE_GENERICEVENT_ID

public static final Long ISSUE_MOVED_ID

public static final Long ISSUE_REOPENED_ID

public static final Long ISSUE_RESOLVED_ID

public static final Long ISSUE_UPDATED_ID

public static final Long ISSUE_WORKLOGGED_ID

public static final Long ISSUE_WORKLOG_DELETED_ID

public static final Long ISSUE_WORKLOG_UPDATED_ID

public static final Long ISSUE_WORKSTARTED_ID

public static final Long ISSUE_WORKSTOPPED_ID

Public Constructors

public EventType (String name, String description, Long templateId)

Create an Event Type.

Parameters
name name of this event type
description description of this event type
templateId the default template for his event type

public EventType (Long id, String name, String description, Long templateId)

Create an Event Type.

Parameters
id id of this event type
name name of this event type
description description of this event type
templateId the default template for his event type

public EventType (GenericValue eventTypeGV)

Create an Event Type. The given generic value needs to have the following attributes set:

  • id (Long)
  • name (String)
  • description (String)
  • type (String)
  • templateId (Long)

Parameters
eventTypeGV generic value

Public Methods

public String getDescKey ()

public String getDescription ()

public Long getId ()

public String getName ()

public String getNameKey ()

public Long getTemplateId ()

Retrieve the default template id associated with this event type.
If the event type is not associated with a default template, return the event type id as the template id. In this case, the event type id should match with a suitable template for this event.
Refer to email-template-id-mappings.xml and upgrade-system-event-types.xml.

Returns
  • the default template id associated with this event type. The event type id is returned if no template id has been selected.

public String getTranslatedDesc (User remoteUser)

Allows i18n keys to be specified in the properties file to allow translation of the event type description.

Parameters
remoteUser current user
Returns
  • String an i18n description or the original event type description

public String getTranslatedName (User remoteUser)

Allows i18n keys to be specified in the properties file to allow translation of the event type name.

Parameters
remoteUser current user
Returns
  • String a i18n name or the original event type name

public String getType ()

public boolean isSystemEventType ()

public void setTemplateId (Long templateId)

Set the default template id to be associated with this event type.

Parameters
templateId template id