com.michelin.cio.hudson.plugins.rolestrategy
Class RoleStrategyConfig

java.lang.Object
  extended by hudson.model.ManagementLink
      extended by com.michelin.cio.hudson.plugins.rolestrategy.RoleStrategyConfig
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Action, hudson.model.ModelObject

@Extension
public class RoleStrategyConfig
extends hudson.model.ManagementLink

Add the role management link to the Manage Hudson page.

Author:
Thomas Maurel

Nested Class Summary
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
 
Fields inherited from class hudson.model.ManagementLink
LIST
 
Constructor Summary
RoleStrategyConfig()
           
 
Method Summary
 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.
 java.lang.String getAssignRolesName()
          Text displayed for the roles assignment panel.
 java.lang.String getDescription()
          The description of the link.
 java.lang.String getDisplayName()
          Text displayed in the Manage Hudson panel.
 java.lang.String getIconFileName()
          Provides the icon for the Manage Hudson page link
 hudson.security.AuthorizationStrategy getStrategy()
          Retrieve the RoleBasedAuthorizationStrategy object from the Hudson instance.
 java.lang.String getUrlName()
          URL name for the strategy management.
 
Methods inherited from class hudson.model.ManagementLink
all
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RoleStrategyConfig

public RoleStrategyConfig()
Method Detail

getIconFileName

public java.lang.String getIconFileName()
Provides the icon for the Manage Hudson page link

Specified by:
getIconFileName in interface hudson.model.Action
Specified by:
getIconFileName in class hudson.model.ManagementLink
Returns:
Path to the icon

getUrlName

public java.lang.String getUrlName()
URL name for the strategy management.

Specified by:
getUrlName in interface hudson.model.Action
Specified by:
getUrlName in class hudson.model.ManagementLink
Returns:
Path to the strategy admin panel

getDisplayName

public java.lang.String getDisplayName()
Text displayed in the Manage Hudson panel.

Returns:
Link text in the Admin panel

getAssignRolesName

public java.lang.String getAssignRolesName()
Text displayed for the roles assignment panel.

Returns:
Title of the Role assignment panel

getDescription

public java.lang.String getDescription()
The description of the link.

Overrides:
getDescription in class hudson.model.ManagementLink
Returns:
The description of the link

getStrategy

public hudson.security.AuthorizationStrategy getStrategy()
Retrieve the RoleBasedAuthorizationStrategy object from the Hudson instance.

Used by the views to build matrix.

Returns:
The RoleBasedAuthorizationStrategy object

doRolesSubmit

public void doRolesSubmit(org.kohsuke.stapler.StaplerRequest req,
                          org.kohsuke.stapler.StaplerResponse rsp)
                   throws java.io.IOException,
                          java.io.UnsupportedEncodingException,
                          javax.servlet.ServletException,
                          hudson.model.Descriptor.FormException
Called on roles management form submission.

Throws:
java.io.IOException
java.io.UnsupportedEncodingException
javax.servlet.ServletException
hudson.model.Descriptor.FormException

doAssignSubmit

public void doAssignSubmit(org.kohsuke.stapler.StaplerRequest req,
                           org.kohsuke.stapler.StaplerResponse rsp)
                    throws java.io.IOException,
                           java.io.UnsupportedEncodingException,
                           javax.servlet.ServletException,
                           hudson.model.Descriptor.FormException
Called on role's assignment form submission.

Throws:
java.io.IOException
java.io.UnsupportedEncodingException
javax.servlet.ServletException
hudson.model.Descriptor.FormException


Copyright © 2010. All Rights Reserved.