Class RoleStrategyConfig
- java.lang.Object
-
- hudson.model.ManagementLink
-
- com.michelin.cio.hudson.plugins.rolestrategy.RoleStrategyConfig
-
- All Implemented Interfaces:
ExtensionPoint
,Action
,ModelObject
@Extension public class RoleStrategyConfig extends ManagementLink
Add the role management link to the Manage Hudson page.- Author:
- Thomas Maurel
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class hudson.model.ManagementLink
ManagementLink.Category
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
-
Fields inherited from class hudson.model.ManagementLink
LIST
-
-
Constructor Summary
Constructors Constructor Description RoleStrategyConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doAssignSubmit(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
Called on role's assignment form submission.void
doRolesSubmit(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
Called on roles management form submission.void
doTemplatesSubmit(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
Called on roles generator form submission.String
getAssignRolesName()
Text displayed for the roles assignment panel.String
getCategoryName()
String
getDescription()
The description of the link.String
getDisplayName()
Text displayed in the Manage Hudson panel.RoleType
getGlobalRoleType()
String
getIconFileName()
Provides the icon for the Manage Hudson page link.String
getManageRolesName()
Text displayed for the roles management panel.RoleType
getProjectRoleType()
Permission
getRequiredPermission()
ExtensionList<RoleMacroExtension>
getRoleMacroExtensions()
RoleType
getSlaveRoleType()
AuthorizationStrategy
getStrategy()
Retrieve theRoleBasedAuthorizationStrategy
object from the Hudson instance.String
getUrlName()
URL name for the strategy management.-
Methods inherited from class hudson.model.ManagementLink
all, getBadge, getCategory, getRequiresConfirmation, getRequiresPOST
-
-
-
-
Method Detail
-
getIconFileName
public String getIconFileName()
Provides the icon for the Manage Hudson page link.- Specified by:
getIconFileName
in interfaceAction
- Specified by:
getIconFileName
in classManagementLink
- Returns:
- Path to the icon, or
null
if not enabled
-
getRequiredPermission
@NonNull public Permission getRequiredPermission()
- Overrides:
getRequiredPermission
in classManagementLink
-
getUrlName
public String getUrlName()
URL name for the strategy management.- Specified by:
getUrlName
in interfaceAction
- Specified by:
getUrlName
in classManagementLink
- Returns:
- Path to the strategy admin panel
-
getCategoryName
@NonNull public String getCategoryName()
- Overrides:
getCategoryName
in classManagementLink
-
getDisplayName
public String getDisplayName()
Text displayed in the Manage Hudson panel.- Returns:
- Link text in the Admin panel
-
getAssignRolesName
public String getAssignRolesName()
Text displayed for the roles assignment panel.- Returns:
- Title of the Role assignment panel
-
getManageRolesName
public String getManageRolesName()
Text displayed for the roles management panel.- Returns:
- Title of the Role management panel
-
getDescription
public String getDescription()
The description of the link.- Overrides:
getDescription
in classManagementLink
- Returns:
- The description of the link
-
getStrategy
@CheckForNull public AuthorizationStrategy getStrategy()
Retrieve theRoleBasedAuthorizationStrategy
object from the Hudson instance.Used by the views to build matrix.
- Returns:
- The
RoleBasedAuthorizationStrategy
object.null
if the strategy is not used.
-
doRolesSubmit
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public void doRolesSubmit(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException
Called on roles management form submission.- Throws:
IOException
javax.servlet.ServletException
-
doTemplatesSubmit
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public void doTemplatesSubmit(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException
Called on roles generator form submission.- Throws:
IOException
javax.servlet.ServletException
-
doAssignSubmit
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public void doAssignSubmit(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException
Called on role's assignment form submission.- Throws:
IOException
javax.servlet.ServletException
-
getRoleMacroExtensions
public ExtensionList<RoleMacroExtension> getRoleMacroExtensions()
-
getGlobalRoleType
public final RoleType getGlobalRoleType()
-
getProjectRoleType
public final RoleType getProjectRoleType()
-
getSlaveRoleType
public final RoleType getSlaveRoleType()
-
-