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
  • Constructor Details

    • RoleStrategyConfig

      public RoleStrategyConfig()
  • Method Details

    • getIconFileName

      public String getIconFileName()
      Provides the icon for the Manage Hudson page link.
      Specified by:
      getIconFileName in interface Action
      Specified by:
      getIconFileName in class ManagementLink
      Returns:
      Path to the icon, or null if not enabled
    • getRequiredPermission

      @NonNull public Permission getRequiredPermission()
      Overrides:
      getRequiredPermission in class ManagementLink
    • getUrlName

      public String getUrlName()
      URL name for the strategy management.
      Specified by:
      getUrlName in interface Action
      Specified by:
      getUrlName in class ManagementLink
      Returns:
      Path to the strategy admin panel
    • getCategoryName

      @NonNull public String getCategoryName()
      Overrides:
      getCategoryName in class ManagementLink
    • 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 class ManagementLink
      Returns:
      The description of the link
    • getStrategy

      @CheckForNull public AuthorizationStrategy getStrategy()
      Retrieve the RoleBasedAuthorizationStrategy 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()