Class BaseNotificationPayload
java.lang.Object
flexagon.ff.common.core.pojos.BasePOJO
flexagon.fd.model2.notification.payload.BaseNotificationPayload
- All Implemented Interfaces:
NotificationPayload,Serializable
- Direct Known Subclasses:
BaseHumanTaskPayload,PipelineNotificationStepPayload,PipelineStepExecFailedPayload,ProjectWorkflowRequestPayload
Abstract class from which all Notification Payloads inherit.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected NotificationEventTypeEnumprotected List<EmailAttachment>Fields inherited from interface flexagon.fd.model2.notification.payload.NotificationPayload
DATE_FORMAT -
Constructor Summary
ConstructorsConstructorDescriptionBaseNotificationPayload(NotificationEventTypeEnum pNotificationEventTypeEnum) Creates an instance of the payload. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAttachment(byte[] pAttachmentData, String pAttachmentName, String pContentType) Adds an email attachment with the given name and content type for byte array type data to the Template.voidaddAttachment(Serializable pAttachmentData) Adds an email attachment with a generated name for any Serlizable type data to the TemplatevoidaddAttachment(Serializable pAttachmentData, String pAttachmentName) Adds an email attachment with the given name for any Serlizable type data to the TemplatevoidaddAttachment(Serializable pAttachmentData, String pAttachmentName, String pContentType) Adds an email attachment with the given name and content type for any Serlizable type data to the Templateprotected voidaddRecipientsByCommittersIfEligible(List<NotifScmCommit> pNotifScmCommits, String pStatus, String pAttributeGroupName) protected voidaddRecipientsByGroupId(Long pGroupId) protected voidaddRecipientsByGroupIdIfEligible(Long pGroupId, String pUserAttributeName, String pAttributeGroupName) This methods select active users for a group who has their attribute selectedprotected voidaddRecipientsByGroupNameIfEligible(String pGroupName, String pUserAttributeName, String pAttributeGroupName) This methods select active users for a group who has their attribute selectedprotected voidaddRecipientsByPipelineRoleMember(List<Long> pPipelineRoleIdList, Long pRelDefinitionId) protected voidaddRecipientsByPipelineRoleUserOrEmailMember(Long pPipelineRoleId, Long pRelDefinitionId, String pMemberType) protected voidaddRecipientsBySubscriptions(Long pEnvironmentId, String pRequestStatus, Long pFolderId, String pAttributeGroupName) protected voidaddRecipientsByUserIdIfEligible(Long pUserId, String pUserAttributeName, String pAttributeGroupName) protected voidaddRecipientsByUserNameIfEligible(String pUserName, String pUserAttributeName, String pAttributeGroupName) protected voidaddRecipientsForPipelineStepExecFailure(Long pRelDefinitionId, OnErrorType pOnError, Long pPipelineDefinitionId, Long pPipelineStageExecId) protected PipelineRoleScriptResultevaluatePipelineRoleScript(Long pRelDefinitionId, Long pPipelineDefinitionId, Long pPipelineStageExecId, String pScript) protected LonggetApprovalGateRoleByGateId(Long pPipelineGateId) Returns the URI of the approval tasks page.Returns a list of email attachments pertaining to the event which has occurred.protected NotifFoldergetFolderWithHierarchy(Long pFolderId) Returns the URI of the human tasks page.protected List<InputField>getInputFieldsForStep(PipelineExecutionUnitTypes pType, Serializable pData) protected LonggetManualStepRoleByStepId(Long pPipelineStageStepId) protected Stringprotected Stringprotected PipelineStageExecutionSnapshotQueryResultRowgetPipelineStageExecutionSnapshotQueryResultRow(Long pPipelineStageExecId) protected StringgetUserFullName(String pUserName) booleanWhether the payload has attachments to be delivered with the notification.protected booleanisGroupMemberOfPipelineRole(Long pRelDefinitionId, Long pGroupId, List<Long> pPipelineRoleIds) booleanReturns whether plugin log attachments should be included in notification.booleanReturns whether notes and notes attachments should be included in notification.protected voidpopulatePipelineAttachmentsAndNotes(Long pGateOrStepId, String pObjectType) voidsendLogAttachments(boolean pSendLogAttachments) Sets whether plugin logs should be attached to the notification.voidshowNotesAndSendAttachments(boolean pShowNotesAndSendAttachments) Sets whether notes and notes attachments should be included in notification.Returns a warning message if Base Server URL is not configured in System Settings.protected List<NotifScmCommit>toNotifScmCommits(List<ScmCommitDataObject> pScmCommitDataObjects) toString()Returns custom String representation implemented by walking complete object structure.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface flexagon.fd.model2.notification.payload.NotificationPayload
addRecipients, getId, isImportant
-
Field Details
-
mNotificationEventTypeEnum
-
mPipelineNotes
-
mPipelineAttachments
-
-
Constructor Details
-
BaseNotificationPayload
Creates an instance of the payload.- Parameters:
pNotificationEventTypeEnum- The event type for the payload
-
-
Method Details
-
getRecipients
- Specified by:
getRecipientsin interfaceNotificationPayload
-
addRecipientsByCommittersIfEligible
protected void addRecipientsByCommittersIfEligible(List<NotifScmCommit> pNotifScmCommits, String pStatus, String pAttributeGroupName) throws SQLException - Throws:
SQLException
-
addRecipientsForPipelineStepExecFailure
protected void addRecipientsForPipelineStepExecFailure(Long pRelDefinitionId, OnErrorType pOnError, Long pPipelineDefinitionId, Long pPipelineStageExecId) throws SQLException - Throws:
SQLException
-
evaluatePipelineRoleScript
protected PipelineRoleScriptResult evaluatePipelineRoleScript(Long pRelDefinitionId, Long pPipelineDefinitionId, Long pPipelineStageExecId, String pScript) throws SQLException - Throws:
SQLException
-
addRecipientsByPipelineRoleMember
protected void addRecipientsByPipelineRoleMember(List<Long> pPipelineRoleIdList, Long pRelDefinitionId) throws SQLException - Throws:
SQLException
-
addRecipientsByPipelineRoleUserOrEmailMember
protected void addRecipientsByPipelineRoleUserOrEmailMember(Long pPipelineRoleId, Long pRelDefinitionId, String pMemberType) throws SQLException - Throws:
SQLException
-
addRecipientsByUserNameIfEligible
protected void addRecipientsByUserNameIfEligible(String pUserName, String pUserAttributeName, String pAttributeGroupName) throws SQLException - Throws:
SQLException
-
addRecipientsByUserIdIfEligible
protected void addRecipientsByUserIdIfEligible(Long pUserId, String pUserAttributeName, String pAttributeGroupName) throws SQLException - Throws:
SQLException
-
addRecipientsByGroupNameIfEligible
protected void addRecipientsByGroupNameIfEligible(String pGroupName, String pUserAttributeName, String pAttributeGroupName) This methods select active users for a group who has their attribute selected- Parameters:
pGroupName-pUserAttributeName-
-
addRecipientsByGroupIdIfEligible
protected void addRecipientsByGroupIdIfEligible(Long pGroupId, String pUserAttributeName, String pAttributeGroupName) This methods select active users for a group who has their attribute selected- Parameters:
pGroupId-pUserAttributeName-
-
addRecipientsByGroupId
-
isGroupMemberOfPipelineRole
protected boolean isGroupMemberOfPipelineRole(Long pRelDefinitionId, Long pGroupId, List<Long> pPipelineRoleIds) throws SQLException - Throws:
SQLException
-
getApprovalGateRoleByGateId
- Throws:
SQLException
-
getManualStepRoleByStepId
- Throws:
SQLException
-
addRecipientsBySubscriptions
protected void addRecipientsBySubscriptions(Long pEnvironmentId, String pRequestStatus, Long pFolderId, String pAttributeGroupName) throws SQLException - Throws:
SQLException
-
getApprovalTaskUrlPath
Returns the URI of the approval tasks page.- Returns:
- The URI of the approval tasks page.
-
getHumanTaskUrlPath
Returns the URI of the human tasks page.- Returns:
- The URI of the human tasks page.
-
sendLogAttachments
public void sendLogAttachments(boolean pSendLogAttachments) Sets whether plugin logs should be attached to the notification.- Parameters:
pSendLogAttachments- Whether plugin logs should be attached to the notification.
-
getFolderWithHierarchy
-
getUserFullName
-
showTextForMissingUrlSetup
Returns a warning message if Base Server URL is not configured in System Settings.- Returns:
- A warning message if Base Server URL is not configured in System Settings.
-
getHumanTaskIdentityUuid
- Specified by:
getHumanTaskIdentityUuidin interfaceNotificationPayload
-
isSendLogAttachments
public boolean isSendLogAttachments()Returns whether plugin log attachments should be included in notification.- Returns:
- Whether plugin log attachments should be included in notification.
-
showNotesAndSendAttachments
public void showNotesAndSendAttachments(boolean pShowNotesAndSendAttachments) Sets whether notes and notes attachments should be included in notification.- Parameters:
pShowNotesAndSendAttachments- Whether notes and notes attachments should be included in notification.
-
isShowNotesAndSendAttachments
public boolean isShowNotesAndSendAttachments()Returns whether notes and notes attachments should be included in notification.- Returns:
- Whether notes and notes attachments should be included in notification.
-
hasAttachments
public boolean hasAttachments()Description copied from interface:NotificationPayloadWhether the payload has attachments to be delivered with the notification.- Specified by:
hasAttachmentsin interfaceNotificationPayload- Returns:
- Whether the payload has attachments to be delivered with the notification.
-
addAttachment
Adds an email attachment with the given name for any Serlizable type data to the Template- Parameters:
pAttachmentName- The name of the attachment.pAttachmentData- The attachment data.
-
addAttachment
Adds an email attachment with a generated name for any Serlizable type data to the Template- Parameters:
pAttachmentData- The attachment data.
-
addAttachment
public void addAttachment(Serializable pAttachmentData, String pAttachmentName, String pContentType) Adds an email attachment with the given name and content type for any Serlizable type data to the Template- Parameters:
pAttachmentData- The attachment data.pAttachmentName- The attachment name.pContentType- The attachment content type.
-
addAttachment
Adds an email attachment with the given name and content type for byte array type data to the Template.- Parameters:
pAttachmentData- The attachment data.pAttachmentName- The attachment name.pContentType- The attachment content type.
-
getAttachments
Description copied from interface:NotificationPayloadReturns a list of email attachments pertaining to the event which has occurred.- Specified by:
getAttachmentsin interfaceNotificationPayload- Returns:
- A list of email attachements.
- Throws:
SQLException
-
toString
Description copied from class:BasePOJOReturns custom String representation implemented by walking complete object structure. -
populatePipelineAttachmentsAndNotes
protected void populatePipelineAttachmentsAndNotes(Long pGateOrStepId, String pObjectType) throws SQLException - Throws:
SQLException
-
getPipelineStageExecutionSnapshotQueryResultRow
protected PipelineStageExecutionSnapshotQueryResultRow getPipelineStageExecutionSnapshotQueryResultRow(Long pPipelineStageExecId) throws SQLException - Throws:
SQLException
-
toNotifScmCommits
-
getPipelineRoleScriptForGate
-
getPipelineRoleScriptForStep
-
getInputFieldsForStep
protected List<InputField> getInputFieldsForStep(PipelineExecutionUnitTypes pType, Serializable pData)
-