Package com.thepluginpeople.jemhod.api
Interface IDirectiveSetLinkManager
public interface IDirectiveSetLinkManager
This bean can be used to create Directive Set Link in templates. A Direct Set links allow user to perform an action in Jira by clicking a link. For example Approve.
-
Method Summary
Modifier and TypeMethodDescriptioncreateDirectiveSetLink
(String directiveSetLinkGroupId, Number directiveSetId, Number profileId, String issueKey, String catchEmailAddress, String userEmailAddress) Creates a authenticated link to the directive set.generateGroupIdForEvent
(com.fasterxml.jackson.databind.JsonNode context) getDirectiveSetName
(Number directiveSetId) Returns the name of the directive set or null if there is no directive set with the given id.
-
Method Details
-
generateRandomGroupId
String generateRandomGroupId()- Returns:
- a random directive set link group id that can be used to isolate links from different buttons or recipients.
-
generateGroupIdForEvent
- Parameters:
context
- the $context of the event.- Returns:
- generates a directive set link group id from the event's. This group allows you to associate links from the same event to multiple emails and recipients, one click on any of the emails' links will expire other users's links.
-
getDirectiveSetName
Returns the name of the directive set or null if there is no directive set with the given id. Useful to be used as the link's text.- Parameters:
directiveSetId
- the directive set id of one of your configured directive set. If directive set doesn't exist the name will be null and a warning will be shown in the report.- Returns:
- the name of the link or null if it doesn't exist.
-
createDirectiveSetLink
String createDirectiveSetLink(String directiveSetLinkGroupId, Number directiveSetId, Number profileId, String issueKey, String catchEmailAddress, String userEmailAddress) Creates a authenticated link to the directive set. The link can be used in anchors link inside the template. If the user clicks the link, it will fire the action defined in Directive Set.- Parameters:
directiveSetLinkGroupId
- the directive set group link id, generally the one generated with generateRandomGroupId or generateGroupIdForEvent methods.directiveSetId
- the directive set id of one of your configured directive set. If the directive set doesn't exist the link will be null and a warning will be shown in the report.profileId
- the profile id of one of your configured profiles. If the profile doesn't exist the link will be null and a warning will be shown in the report.issueKey
- the issue key of the issue where the action will be performed. Generally the current event, $context.issue.key.textValue()catchEmailAddress
- an email address that matches one of the profile's catch email address. If the email address doesn't match any, the link will be null and a warning will be shown in the report.userEmailAddress
- the email address of user that will perform the action, generally the current recipient $jemhUtils.getRecipient()- Returns:
- the https link or null if the link could not be generated.
-