hudson.plugins.collabnet.auth
Class CNAuthorizationStrategy.DescriptorImpl

java.lang.Object
  extended by hudson.model.Descriptor<hudson.security.AuthorizationStrategy>
      extended by hudson.plugins.collabnet.auth.CNAuthorizationStrategy.DescriptorImpl
All Implemented Interfaces:
hudson.model.Saveable
Enclosing class:
CNAuthorizationStrategy

public static final class CNAuthorizationStrategy.DescriptorImpl
extends hudson.model.Descriptor<hudson.security.AuthorizationStrategy>

The CNAuthorizationStrategy Descriptor class.


Nested Class Summary
 
Nested classes/interfaces inherited from class hudson.model.Descriptor
hudson.model.Descriptor.FormException, hudson.model.Descriptor.PropertyType
 
Field Summary
static java.lang.String GOOD_VERSION
           
 
Fields inherited from class hudson.model.Descriptor
clazz
 
Method Summary
 void doGroupCheck(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
          Check that the groups are valid.
 void doUserCheck(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
          Check that the users are valid.
 void doVersionCheck(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
          Check whether the "incorrect version" msg should be displayed, and returns what the currently configured version is, in a json.
static java.lang.String getCollabNetUrl()
           
 java.lang.String getDisplayName()
           
 java.lang.String getHelpFile()
           
static java.lang.String getHelpUrl()
           
static CNVersion getVersion(java.lang.String url)
           
static boolean isGoodCNVersion(java.lang.String url)
           
 CNAuthorizationStrategy newInstance(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject formData)
           
 
Methods inherited from class hudson.model.Descriptor
configure, configure, configure, convert, doHelp, find, find, getCheckUrl, getConfigPage, getGlobalConfigPage, getHelpFile, getJsonSafeClassName, getPropertyType, getViewPage, isInstance, load, newInstance, newInstancesFromHeteroList, save, toArray, toList, toMap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GOOD_VERSION

public static java.lang.String GOOD_VERSION
Method Detail

getDisplayName

public java.lang.String getDisplayName()
Specified by:
getDisplayName in class hudson.model.Descriptor<hudson.security.AuthorizationStrategy>
Returns:
string to display for configuration screen.

getHelpUrl

public static java.lang.String getHelpUrl()
Returns:
the path to the help files.

getHelpFile

public java.lang.String getHelpFile()
Overrides:
getHelpFile in class hudson.model.Descriptor<hudson.security.AuthorizationStrategy>
Returns:
the path to the help file.

newInstance

public CNAuthorizationStrategy newInstance(org.kohsuke.stapler.StaplerRequest req,
                                           net.sf.json.JSONObject formData)
                                    throws hudson.model.Descriptor.FormException
Overrides:
newInstance in class hudson.model.Descriptor<hudson.security.AuthorizationStrategy>
Parameters:
req - config page parameters.
Returns:
new CNAuthorizationStrategy object, instantiated from the configuration form vars.
Throws:
FormException
hudson.model.Descriptor.FormException

getCollabNetUrl

public static java.lang.String getCollabNetUrl()
Returns:
the currently saved configured CollabNet url

getVersion

public static CNVersion getVersion(java.lang.String url)
Parameters:
url - for the CollabNet server.
Returns:
the CollabNet version number.

isGoodCNVersion

public static boolean isGoodCNVersion(java.lang.String url)
Returns:
true if the CollabNet version is late enough (5.2+) that using this AuthorizationStrategy is effective.

doVersionCheck

public void doVersionCheck(org.kohsuke.stapler.StaplerRequest req,
                           org.kohsuke.stapler.StaplerResponse rsp)
                    throws java.io.IOException
Check whether the "incorrect version" msg should be displayed, and returns what the currently configured version is, in a json.

Throws:
java.io.IOException

doUserCheck

public void doUserCheck(org.kohsuke.stapler.StaplerRequest req,
                        org.kohsuke.stapler.StaplerResponse rsp)
                 throws java.io.IOException,
                        javax.servlet.ServletException
Check that the users are valid.

Throws:
java.io.IOException
javax.servlet.ServletException

doGroupCheck

public void doGroupCheck(org.kohsuke.stapler.StaplerRequest req,
                         org.kohsuke.stapler.StaplerResponse rsp)
                  throws java.io.IOException,
                         javax.servlet.ServletException
Check that the groups are valid.

Throws:
java.io.IOException
javax.servlet.ServletException


Copyright © 2009. All Rights Reserved.