public abstract class AbstractNotifBaseRequest extends BasePOJO implements NotificationPayload
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
mAttributeGroupName |
protected NotificationEventTypeEnum |
mNotificationEventTypeEnum |
protected NotificationMediumEnum |
mNotificationMediumEnum |
protected java.util.List<EmailAttachment> |
mPipelineAttachments |
protected java.util.List<java.lang.String> |
mPipelineNotes |
DATE_FORMAT
Constructor and Description |
---|
AbstractNotifBaseRequest(java.lang.String pAttributeGroupName,
NotificationMediumEnum pMediumEnum,
NotificationEventTypeEnum pNotificationEventTypeEnum)
Creates an instance of the payload.
|
Modifier and Type | Method and Description |
---|---|
void |
addAttachment(byte[] pAttachmentData,
java.lang.String pAttachmentName,
java.lang.String pContentType)
Adds an email attachment with the given name and content type for byte array type data to the Template.
|
void |
addAttachment(java.io.Serializable pAttachmentData)
Adds an email attachment with a generated name for any Serlizable type data to the Template
|
void |
addAttachment(java.io.Serializable pAttachmentData,
java.lang.String pAttachmentName)
Adds an email attachment with the given name for any Serlizable type data to the Template
|
void |
addAttachment(java.io.Serializable pAttachmentData,
java.lang.String pAttachmentName,
java.lang.String pContentType)
Adds an email attachment with the given name and content type for any Serlizable type data to the Template
|
protected void |
addRecipientsByCommittersIfEligible(java.util.List<SCMSourceRevisionData> pSourceLogChanges,
java.lang.String pStatus) |
protected void |
addRecipientsByGroupId(java.lang.Long pGroupId) |
protected void |
addRecipientsByGroupNameIfEligible(java.lang.String pGroupName,
java.lang.String pUserAttributeName)
This methods select active users for a group who has their attribute selected
|
protected void |
addRecipientsByPipelineRoleMember(java.util.List<java.lang.Long> pPipelineRoleIdList,
java.lang.Long pRelDefinitionId) |
protected void |
addRecipientsByPipelineRoleUserOrEmailMember(java.lang.Long pPipelineRoleId,
java.lang.Long pRelDefinitionId) |
protected void |
addRecipientsBySubscriptions(java.lang.Long pEnvironmentId,
java.lang.String pRequestStatus,
java.util.List<java.lang.Long> pFolderIdList) |
protected void |
addRecipientsByUserNameIfEligible(java.lang.String pUserName,
java.lang.String pUserAttributeName) |
protected void |
addRecipientsForPiplelineGate(java.lang.Long pPipelineGateId,
java.lang.Long pRelDefinitionId) |
protected void |
addRecipientsForPiplelineStepExecution(java.lang.Long pRelDefinitionId,
OnErrorType pOnError) |
protected java.lang.Long |
getApprovalGateRoleByGateId(java.lang.Long pPipelineGateId) |
java.lang.String |
getApprovalTaskUrlPath()
Returns the URI of the approval tasks page.
|
java.util.List<EmailAttachment> |
getAttachments()
Returns a list of email attachments pertaining to the event which has occurred.
|
protected NotifFolder |
getFolderWithHierarchy(java.lang.Long pFolderId) |
java.lang.String |
getHumanTaskIdentityUuid() |
java.lang.String |
getHumanTaskUrlPath()
Returns the URI of the human tasks page.
|
protected java.lang.Long |
getManualStepRoleByStepId(java.lang.Long pPipelineStageStepId) |
protected PipelineStageExecutionSnapshotQueryResultRow |
getPipelineStageExecutionSnapshotQueryResultRow(java.lang.Long pPipelineStageExecId) |
java.util.List<NotificationRecipient> |
getRecipients() |
protected java.lang.String |
getUserFullName(java.lang.String pUserName) |
boolean |
hasAttachments()
Whether the payload has attachments to be delivered with the notification.
|
protected boolean |
isGroupMemberOfPipelineRole(java.lang.Long pRelDefinitionId,
java.lang.Long pGroupId,
java.lang.Long pPipelineRoleId) |
boolean |
isSendLogAttachments()
Returns whether plugin log attachments should be included in notification.
|
boolean |
isShowNotesAndSendAttachments()
Returns whether notes and notes attachments should be included in notification.
|
protected void |
populatePipelineAttachmentsAndNotes(java.lang.Long pParentId,
PipelineAttachmentParentTypeEnum pParentType) |
void |
sendLogAttachments(boolean pSendLogAttachments)
Sets whether plugin logs should be attached to the notification.
|
void |
showNotesAndSendAttachments(boolean pShowNotesAndSendAttachments)
Sets whether notes and notes attachments should be included in notification.
|
java.lang.String |
showTextForMissingUrlSetup()
Returns a warning message if Base Server URL is not configured in System Settings.
|
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addRecipients, getId
protected java.lang.String mAttributeGroupName
protected NotificationMediumEnum mNotificationMediumEnum
protected NotificationEventTypeEnum mNotificationEventTypeEnum
protected java.util.List<java.lang.String> mPipelineNotes
protected java.util.List<EmailAttachment> mPipelineAttachments
public AbstractNotifBaseRequest(java.lang.String pAttributeGroupName, NotificationMediumEnum pMediumEnum, NotificationEventTypeEnum pNotificationEventTypeEnum)
pAttributeGroupName
- Name of the attribute containing the medium settingspMediumEnum
- The medium type for the payloadpNotificationEventTypeEnum
- The event type for the payloadpublic java.util.List<NotificationRecipient> getRecipients()
getRecipients
in interface NotificationPayload
protected void addRecipientsByCommittersIfEligible(java.util.List<SCMSourceRevisionData> pSourceLogChanges, java.lang.String pStatus) throws java.sql.SQLException
java.sql.SQLException
protected void addRecipientsForPiplelineGate(java.lang.Long pPipelineGateId, java.lang.Long pRelDefinitionId) throws java.sql.SQLException
java.sql.SQLException
protected void addRecipientsForPiplelineStepExecution(java.lang.Long pRelDefinitionId, OnErrorType pOnError) throws java.sql.SQLException
java.sql.SQLException
protected void addRecipientsByPipelineRoleMember(java.util.List<java.lang.Long> pPipelineRoleIdList, java.lang.Long pRelDefinitionId) throws java.sql.SQLException
java.sql.SQLException
protected void addRecipientsByPipelineRoleUserOrEmailMember(java.lang.Long pPipelineRoleId, java.lang.Long pRelDefinitionId) throws java.sql.SQLException
java.sql.SQLException
protected void addRecipientsByUserNameIfEligible(java.lang.String pUserName, java.lang.String pUserAttributeName) throws java.sql.SQLException
java.sql.SQLException
protected void addRecipientsByGroupNameIfEligible(java.lang.String pGroupName, java.lang.String pUserAttributeName)
pGroupName
- pUserAttributeName
- protected void addRecipientsByGroupId(java.lang.Long pGroupId)
protected boolean isGroupMemberOfPipelineRole(java.lang.Long pRelDefinitionId, java.lang.Long pGroupId, java.lang.Long pPipelineRoleId) throws java.sql.SQLException
java.sql.SQLException
protected java.lang.Long getApprovalGateRoleByGateId(java.lang.Long pPipelineGateId) throws java.sql.SQLException
java.sql.SQLException
protected java.lang.Long getManualStepRoleByStepId(java.lang.Long pPipelineStageStepId) throws java.sql.SQLException
java.sql.SQLException
protected void addRecipientsBySubscriptions(java.lang.Long pEnvironmentId, java.lang.String pRequestStatus, java.util.List<java.lang.Long> pFolderIdList) throws java.sql.SQLException
java.sql.SQLException
public java.lang.String getApprovalTaskUrlPath()
public java.lang.String getHumanTaskUrlPath()
public void sendLogAttachments(boolean pSendLogAttachments)
pSendLogAttachments
- Whether plugin logs should be attached to the notification.protected NotifFolder getFolderWithHierarchy(java.lang.Long pFolderId)
protected java.lang.String getUserFullName(java.lang.String pUserName)
public java.lang.String showTextForMissingUrlSetup()
public java.lang.String getHumanTaskIdentityUuid()
getHumanTaskIdentityUuid
in interface NotificationPayload
public boolean isSendLogAttachments()
public void showNotesAndSendAttachments(boolean pShowNotesAndSendAttachments)
pShowNotesAndSendAttachments
- Whether notes and notes attachments should be included in notification.public boolean isShowNotesAndSendAttachments()
public boolean hasAttachments()
NotificationPayload
hasAttachments
in interface NotificationPayload
public void addAttachment(java.io.Serializable pAttachmentData, java.lang.String pAttachmentName)
pAttachmentName
- The name of the attachment.pAttachmentData
- The attachment data.public void addAttachment(java.io.Serializable pAttachmentData)
pAttachmentData
- The attachment data.public void addAttachment(java.io.Serializable pAttachmentData, java.lang.String pAttachmentName, java.lang.String pContentType)
pAttachmentData
- The attachment data.pAttachmentName
- The attachment name.pContentType
- The attachment content type.public void addAttachment(byte[] pAttachmentData, java.lang.String pAttachmentName, java.lang.String pContentType)
pAttachmentData
- The attachment data.pAttachmentName
- The attachment name.pContentType
- The attachment content type.public java.util.List<EmailAttachment> getAttachments() throws java.sql.SQLException
NotificationPayload
getAttachments
in interface NotificationPayload
java.sql.SQLException
public java.lang.String toString()
protected void populatePipelineAttachmentsAndNotes(java.lang.Long pParentId, PipelineAttachmentParentTypeEnum pParentType) throws java.sql.SQLException
java.sql.SQLException
protected PipelineStageExecutionSnapshotQueryResultRow getPipelineStageExecutionSnapshotQueryResultRow(java.lang.Long pPipelineStageExecId) throws java.sql.SQLException
java.sql.SQLException