Class ComputerOwnerHelper
java.lang.Object
com.synopsys.arc.jenkins.plugins.ownership.util.AbstractOwnershipHelper<Computer>
com.synopsys.arc.jenkins.plugins.ownership.nodes.ComputerOwnerHelper
- All Implemented Interfaces:
IOwnershipHelper<Computer>
Provides ownership helper for
Computer.
The class implements a wrapper of NodeOwnerHelper.- Author:
- Oleg Nenashev
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ComputerOwnerHelpergetItemDisplayName(Computer item) Gets a short classifier.getItemTypeName(Computer item) Gets a type of the item to be displayed.getItemURL(Computer item) Gets a relative URL to the item.Gets ownership description of the requested item.getOwnershipInfo(Computer item) Gets ownership info of the requested item.getPossibleOwners(Computer computer) Get list of users, who can be item's owner.Gets permission required to manage ownership for the item.booleanhasLocallyDefinedOwnership(Computer computer) Check if the objeck has locally defined ownership info.static voidsetOwnership(Computer computer, OwnershipDescription descr) Methods inherited from class com.synopsys.arc.jenkins.plugins.ownership.util.AbstractOwnershipHelper
filterPossibleOwners, getDisplayName, getOwner, getOwnerEmail, getOwnerLongString, hasItemSpecificPermission, isDisplayOwnershipSummaryBox, isOwnerExists
-
Constructor Details
-
ComputerOwnerHelper
public ComputerOwnerHelper()
-
-
Method Details
-
getInstance
-
getOwnershipDescription
Description copied from interface:IOwnershipHelperGets ownership description of the requested item.- Parameters:
item- Item to be described- Returns:
- Ownership description. The method returns a
OwnershipDescription.DISABLED_DESCR
-
getOwnershipInfo
Description copied from class:AbstractOwnershipHelperGets ownership info of the requested item.- Specified by:
getOwnershipInfoin classAbstractOwnershipHelper<Computer>- Parameters:
item- Item to be described- Returns:
- Ownership description. The method returns a
OwnershipDescription.DISABLED_DESCR
-
getPossibleOwners
Description copied from interface:IOwnershipHelperGet list of users, who can be item's owner.- Specified by:
getPossibleOwnersin interfaceIOwnershipHelper<Computer>- Overrides:
getPossibleOwnersin classAbstractOwnershipHelper<Computer>- Parameters:
computer- Item to be described- Returns:
- List of users, who can be item's owner (always non-null).
By default, the method returns an empty list in
AbstractOwnershipHelper.
-
setOwnership
public static void setOwnership(@Nonnull Computer computer, @CheckForNull OwnershipDescription descr) throws IOException - Throws:
IOException
-
getRequiredPermission
Description copied from class:AbstractOwnershipHelperGets permission required to manage ownership for the item.Jenkins.ADMINISTERby default if not overridden.- Overrides:
getRequiredPermissionin classAbstractOwnershipHelper<Computer>- Returns:
- Permission which is needed to change ownership.
-
hasLocallyDefinedOwnership
Description copied from class:AbstractOwnershipHelperCheck if the objeck has locally defined ownership info.- Overrides:
hasLocallyDefinedOwnershipin classAbstractOwnershipHelper<Computer>- Parameters:
computer- Item- Returns:
trueif the object has ownership defined locally.falsewill be returned otherwise, even if ownership is inherited.
-
getItemTypeName
Description copied from interface:IOwnershipHelperGets a type of the item to be displayed.- Parameters:
item-- Returns:
- Display name of the item type
-
getItemDisplayName
Description copied from interface:IOwnershipHelperGets a short classifier. Usage example: e-mail headers- Parameters:
item-- Returns:
- Short description of the object
-
getItemURL
Description copied from interface:IOwnershipHelperGets a relative URL to the item.- Parameters:
item-- Returns:
- Relative URL or null if it is not available
-