Class OwnershipDescriptionHelper
java.lang.Object
com.synopsys.arc.jenkins.plugins.ownership.util.OwnershipDescriptionHelper
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
public class OwnershipDescriptionHelper
extends Object
Provides handlers for ownership description.
- Since:
- 0.4 - Public API class, TODO - Class API is restricted, use OwnershipDescription instead
- Author:
- Oleg Nenashev
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringGets e-mails of secondary owners (including primary owner).static StringGets a comma-separated list of primary and secondary owners.static StringDeprecated.static Stringstatic StringgetOwnerID(OwnershipDescription descr) static StringGets e-mail of the primary owner.static StringGets id of the primary owner.getSecondaryOwnerEmails(OwnershipDescription descr, boolean includeOwner) Gets e-mails of secondary owners (including owner if required).getSecondaryOwnerIds(OwnershipDescription descr, boolean includeOwner) Gets a comma-separated list of co-owners.
-
Method Details
-
getOwnerID
Gets ID of the primary owner.- Parameters:
descr- Ownership description- Returns:
- userId of the primary owner. The result will be "unknown" if the user is not specified.
-
getPrimaryOwnerId
Gets id of the primary owner.- Parameters:
descr- Ownership description- Returns:
- userId of the primary owner. The result will be "unknown" if the user is not specified.
-
getOwnerEmail
Deprecated.Gets owner's e-mail.- Parameters:
descr- Ownership description- Returns:
- Owner's e-mail or empty string if it is not available
-
getPrimaryOwnerEmail
Gets e-mail of the primary owner.- Parameters:
descr- Ownership description- Returns:
- Owner's e-mail or empty string if it is not available
- Since:
- 0.9
-
getSecondaryOwnerIds
@Nonnull public static Set<String> getSecondaryOwnerIds(@Nonnull OwnershipDescription descr, boolean includeOwner) Gets a comma-separated list of co-owners.- Parameters:
descr- Ownership descriptionincludeOwner- Include owner to the list- Returns:
- Set of co-owner user IDs
- Since:
- 0.9
-
getCoOwnerIDs
Deprecated.Gets a comma-separated list of co-owners. Owner will be also considered as co-owner.- Parameters:
descr- Ownership description- Returns:
- List of co-owner user IDs
-
getAllOwnerIdsString
Gets a comma-separated list of primary and secondary owners.- Parameters:
descr- Ownership description- Returns:
- String containing comma-separated list of owner user IDs
- Since:
- 0.9
-
getSecondaryOwnerEmails
public static Set<String> getSecondaryOwnerEmails(@Nonnull OwnershipDescription descr, boolean includeOwner) Gets e-mails of secondary owners (including owner if required).- Parameters:
descr- Ownership descriptionincludeOwner- Include owner to the list- Returns:
- Set of secondary owner emails
- Since:
- 0.9
-
getAllOwnerEmailsString
Gets e-mails of secondary owners (including primary owner).- Parameters:
descr- Ownership description- Returns:
- Comma-separated list of secondary owner e-mails (may be empty)
- Since:
- 0.9
-
getAllOwnerIdsString(com.synopsys.arc.jenkins.plugins.ownership.OwnershipDescription)