Class BuildableJobMacro
- java.lang.Object
-
- com.synopsys.arc.jenkins.plugins.rolestrategy.RoleMacroExtension
-
- com.synopsys.arc.jenkins.plugins.rolestrategy.macros.BuildableJobMacro
-
- All Implemented Interfaces:
IMacroExtension
,ExtensionPoint
@Extension public class BuildableJobMacro extends RoleMacroExtension
Applies permissions to buildable jobs only.- Since:
- 2.1.0
- Author:
- Oleg Nenashev
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description BuildableJobMacro()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getDescription()
Returns description of the macro (including parameters).String
getName()
Get name of the appropriate macro.boolean
hasPermission(PermissionEntry sid, Permission p, RoleType type, AccessControlled item, Macro macro)
Check if user belongs to specified Macro.boolean
IsApplicable(RoleType roleType)
Check if the macro extension is applicable to specified role type.-
Methods inherited from class com.synopsys.arc.jenkins.plugins.rolestrategy.RoleMacroExtension
all, getMacro, getMacroExtension
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.synopsys.arc.jenkins.plugins.rolestrategy.IMacroExtension
hasPermission
-
-
-
-
Method Detail
-
getName
public String getName()
Description copied from interface:IMacroExtension
Get name of the appropriate macro.- Returns:
- Name of the macro
-
IsApplicable
public boolean IsApplicable(RoleType roleType)
Description copied from interface:IMacroExtension
Check if the macro extension is applicable to specified role type.- Parameters:
roleType
- Type to be checked- Returns:
true
if the macro is applicable to the specified role type
-
hasPermission
public boolean hasPermission(PermissionEntry sid, Permission p, RoleType type, AccessControlled item, Macro macro)
Description copied from interface:IMacroExtension
Check if user belongs to specified Macro.- Parameters:
sid
- SID to be checkedp
- Permissiontype
- Type of the role to be checkeditem
- Itemmacro
- Macro with parameters- Returns:
- True if user satisfies macro's requirements
-
getDescription
public String getDescription()
Description copied from interface:IMacroExtension
Returns description of the macro (including parameters).- Returns:
- Description of the macro
-
-