Class EventType

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

@PublicApi public class EventType extends Object
This class describes the type of event.
  • Field Details

    • ISSUE_CREATED_ID

      public static final Long ISSUE_CREATED_ID
    • ISSUE_UPDATED_ID

      public static final Long ISSUE_UPDATED_ID
    • ISSUE_ASSIGNED_ID

      public static final Long ISSUE_ASSIGNED_ID
    • ISSUE_RESOLVED_ID

      public static final Long ISSUE_RESOLVED_ID
    • ISSUE_CLOSED_ID

      public static final Long ISSUE_CLOSED_ID
    • ISSUE_COMMENTED_ID

      public static final Long ISSUE_COMMENTED_ID
    • ISSUE_REOPENED_ID

      public static final Long ISSUE_REOPENED_ID
    • ISSUE_DELETED_ID

      public static final Long ISSUE_DELETED_ID
    • ISSUE_MOVED_ID

      public static final Long ISSUE_MOVED_ID
    • ISSUE_WORKLOGGED_ID

      public static final Long ISSUE_WORKLOGGED_ID
    • ISSUE_WORKSTARTED_ID

      public static final Long ISSUE_WORKSTARTED_ID
    • ISSUE_WORKSTOPPED_ID

      public static final Long ISSUE_WORKSTOPPED_ID
    • ISSUE_GENERICEVENT_ID

      public static final Long ISSUE_GENERICEVENT_ID
    • ISSUE_COMMENT_EDITED_ID

      public static final Long ISSUE_COMMENT_EDITED_ID
    • ISSUE_WORKLOG_UPDATED_ID

      public static final Long ISSUE_WORKLOG_UPDATED_ID
    • ISSUE_WORKLOG_DELETED_ID

      public static final Long ISSUE_WORKLOG_DELETED_ID
    • ISSUE_COMMENT_DELETED_ID

      public static final Long ISSUE_COMMENT_DELETED_ID
    • ISSUE_ARCHIVED_ID

      public static final Long ISSUE_ARCHIVED_ID
    • ISSUE_RESTORED_ID

      public static final Long ISSUE_RESTORED_ID
    • JIRA_SYSTEM_EVENT_TYPE

      public static final String JIRA_SYSTEM_EVENT_TYPE
      See Also:
    • EVENT_TYPE

      public static final String EVENT_TYPE
      See Also:
  • Constructor Details

    • EventType

      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
    • EventType

      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
    • EventType

      public EventType(org.ofbiz.core.entity.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
  • Method Details

    • getId

      public Long getId()
    • getName

      public String getName()
    • getDescription

      public String getDescription()
    • getType

      public String getType()
    • getTemplateId

      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.
    • setTemplateId

      public void setTemplateId(Long templateId)
      Set the default template id to be associated with this event type.
      Parameters:
      templateId - template id
    • isSystemEventType

      public boolean isSystemEventType()
    • getNameKey

      public String getNameKey()
    • getDescKey

      public String getDescKey()
    • getTranslatedName

      public String getTranslatedName(ApplicationUser 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
      See Also:
    • translateName

      public String translateName(ApplicationUser 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
      Since:
      6.4
    • getTranslatedDesc

      public String getTranslatedDesc(ApplicationUser 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
      See Also:
    • translateDesc

      public String translateDesc(ApplicationUser 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
    • toString

      public String toString()
      Overrides:
      toString in class Object