com.atlassian.jira.event.type
Class EventType

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

@PublicApi
public class EventType
extends Object

This class describes the type of event.


Field Summary
static String EVENT_TYPE
           
static Long ISSUE_ASSIGNED_ID
           
static Long ISSUE_CLOSED_ID
           
static Long ISSUE_COMMENT_DELETED_ID
           
static Long ISSUE_COMMENT_EDITED_ID
           
static Long ISSUE_COMMENTED_ID
           
static Long ISSUE_CREATED_ID
           
static Long ISSUE_DELETED_ID
           
static Long ISSUE_GENERICEVENT_ID
           
static Long ISSUE_MOVED_ID
           
static Long ISSUE_REOPENED_ID
           
static Long ISSUE_RESOLVED_ID
           
static Long ISSUE_UPDATED_ID
           
static Long ISSUE_WORKLOG_DELETED_ID
           
static Long ISSUE_WORKLOG_UPDATED_ID
           
static Long ISSUE_WORKLOGGED_ID
           
static Long ISSUE_WORKSTARTED_ID
           
static Long ISSUE_WORKSTOPPED_ID
           
static String JIRA_SYSTEM_EVENT_TYPE
           
 
Constructor Summary
EventType(org.ofbiz.core.entity.GenericValue eventTypeGV)
          Create an Event Type.
EventType(Long id, String name, String description, Long templateId)
          Create an Event Type.
EventType(String name, String description, Long templateId)
          Create an Event Type.
 
Method Summary
 String getDescKey()
           
 String getDescription()
           
 Long getId()
           
 String getName()
           
 String getNameKey()
           
 Long getTemplateId()
          Retrieve the default template id associated with this event type.
 String getTranslatedDesc(com.atlassian.crowd.embedded.api.User remoteUser)
          Allows i18n keys to be specified in the properties file to allow translation of the event type description.
 String getTranslatedName(com.atlassian.crowd.embedded.api.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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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

JIRA_SYSTEM_EVENT_TYPE

public static final String JIRA_SYSTEM_EVENT_TYPE
See Also:
Constant Field Values

EVENT_TYPE

public static final String EVENT_TYPE
See Also:
Constant Field Values
Constructor Detail

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:

Parameters:
eventTypeGV - generic value
Method Detail

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(com.atlassian.crowd.embedded.api.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

getTranslatedDesc

public String getTranslatedDesc(com.atlassian.crowd.embedded.api.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


Copyright © 2002-2014 Atlassian. All Rights Reserved.