hudson.plugins.collabnet.auth
Class CNAuthorizationStrategy.DescriptorImpl
java.lang.Object
hudson.model.Descriptor<hudson.security.AuthorizationStrategy>
hudson.plugins.collabnet.auth.CNAuthorizationStrategy.DescriptorImpl
- All Implemented Interfaces:
- hudson.model.Saveable
- Enclosing class:
- CNAuthorizationStrategy
@Extension
public static final class CNAuthorizationStrategy.DescriptorImpl
- extends hudson.model.Descriptor<hudson.security.AuthorizationStrategy>
The CNAuthorizationStrategy Descriptor class.
| Nested classes/interfaces inherited from class hudson.model.Descriptor |
hudson.model.Descriptor.FormException, hudson.model.Descriptor.PropertyType |
| Fields inherited from class hudson.model.Descriptor |
clazz |
| Fields inherited from interface hudson.model.Saveable |
NOOP |
|
Method Summary |
hudson.util.FormValidation |
doGroupCheck(java.lang.String groups,
java.lang.String users)
Check that the groups are valid. |
hudson.util.FormValidation |
doUserCheck(java.lang.String value)
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, isSubTypeOf, 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 |
GOOD_VERSION
public static java.lang.String GOOD_VERSION
CNAuthorizationStrategy.DescriptorImpl
public CNAuthorizationStrategy.DescriptorImpl()
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 hudson.util.FormValidation doUserCheck(@QueryParameter
java.lang.String value)
- Check that the users are valid.
doGroupCheck
public hudson.util.FormValidation doGroupCheck(@QueryParameter
java.lang.String groups,
@QueryParameter
java.lang.String users)
- Check that the groups are valid.
Copyright © 2010. All Rights Reserved.