org.jenkinsci.plugins.relution
Class GlobalConfigurationImpl

java.lang.Object
  extended by hudson.model.Descriptor<jenkins.model.GlobalConfiguration>
      extended by jenkins.model.GlobalConfiguration
          extended by org.jenkinsci.plugins.relution.GlobalConfigurationImpl
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Describable<jenkins.model.GlobalConfiguration>, hudson.model.Saveable

@Extension
public class GlobalConfigurationImpl
extends jenkins.model.GlobalConfiguration


Nested Class Summary
 
Nested classes/interfaces inherited from class hudson.model.Descriptor
hudson.model.Descriptor.FormException, hudson.model.Descriptor.PropertyType, hudson.model.Descriptor.Self
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
 
Fields inherited from class hudson.model.Descriptor
clazz
 
Fields inherited from interface hudson.model.Saveable
NOOP
 
Constructor Summary
GlobalConfigurationImpl()
          executed during startup of the Plugin and instantiate different GlobalConfiguration-Objects.
GlobalConfigurationImpl(String apiEndpoint, String apiUsername, String apiPassword, String apiOrganization, String apiReleaseStatus, String proxyHost, int proxyPort)
          These constructor will be executed every time when the save/submit button will be triggered in the Jenkins.
 
Method Summary
 boolean configure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject formData)
          These method is responsible for the save the entered values in the GlobalConfigurationFields.
 hudson.util.FormValidation doCheckApiEndpoint(String value)
          Performs on-the-fly validation of the form field 'name'.
 hudson.util.FormValidation doCheckApplicationFile(hudson.model.AbstractProject project, String value)
          Performs on-the-fly validation of the form field 'applicationFile'.
 hudson.util.FormValidation doCheckApplicationUUID(String value)
          Performs on-the-fly validation of the form field 'applicationUUID'.
 hudson.util.ListBoxModel doFillApiReleaseStatusItems()
          List of the Statuses to an App.
 hudson.util.FormValidation doTestConnection(String endpoint, String username, String organization, String password)
          Validates the given Credentials are right
 String getApiEndpoint()
           
 String getApiOrganization()
           
 String getApiPassword()
           
 String getApiReleaseStatus()
           
 String getApiUsername()
           
 String getDisplayName()
          This human readable name is used in the configuration screen.
 List<GlobalConfigurationImpl> getInstances()
           
 Map getLoginCredentials()
           
 String getProxyHost()
           
 int getProxyPort()
           
 boolean isApplicable(Class<? extends hudson.model.AbstractProject> aClass)
          Returns true if this GlobalConfiguration type is applicable to the given project.
 void setApiEndpoint(String apiEndpoint)
           
 void setApiOrganization(String apiOrganization)
           
 void setApiPassword(String apiPassword)
           
 void setApiReleaseStatus(String apiReleaseStatus)
           
 void setApiUsername(String apiUsername)
           
 void setInstances(List<GlobalConfigurationImpl> instances)
           
 void setProxyHost(String proxyHost)
           
 void setProxyPort(int proxyPort)
           
 
Methods inherited from class jenkins.model.GlobalConfiguration
all, getCategory, getDescriptor, getGlobalConfigPage
 
Methods inherited from class hudson.model.Descriptor
addHelpFileRedirect, calcAutoCompleteSettings, calcFillSettings, configure, doHelp, find, find, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GlobalConfigurationImpl

public GlobalConfigurationImpl()
executed during startup of the Plugin and instantiate different GlobalConfiguration-Objects.


GlobalConfigurationImpl

@DataBoundConstructor
public GlobalConfigurationImpl(String apiEndpoint,
                                                    String apiUsername,
                                                    String apiPassword,
                                                    String apiOrganization,
                                                    String apiReleaseStatus,
                                                    String proxyHost,
                                                    int proxyPort)
These constructor will be executed every time when the save/submit button will be triggered in the Jenkins.

Parameters:
apiEndpoint - URL to which the app should communicate
apiUsername - User which should be logged in.
apiPassword - Password for the given User.
apiOrganization - Organization for the given User.
apiReleaseStatus - ReleaseStatus to the given App
proxyHost -
proxyPort -
Method Detail

doCheckApiEndpoint

public hudson.util.FormValidation doCheckApiEndpoint(@QueryParameter
                                                     String value)
                                              throws IOException,
                                                     javax.servlet.ServletException
Performs on-the-fly validation of the form field 'name'.

Parameters:
value - This parameter receives the value that the user has typed.
Returns:
Indicates the outcome of the validation. This is sent to the browser.
Throws:
IOException
javax.servlet.ServletException

doCheckApplicationFile

public hudson.util.FormValidation doCheckApplicationFile(@AncestorInPath
                                                         hudson.model.AbstractProject project,
                                                         @QueryParameter
                                                         String value)
                                                  throws IOException,
                                                         javax.servlet.ServletException
Performs on-the-fly validation of the form field 'applicationFile'.

Parameters:
value - This parameter receives the value that the user has typed.
Returns:
Indicates the outcome of the validation. This is sent to the browser.
Throws:
IOException
javax.servlet.ServletException

doCheckApplicationUUID

public hudson.util.FormValidation doCheckApplicationUUID(@QueryParameter
                                                         String value)
Performs on-the-fly validation of the form field 'applicationUUID'.

Parameters:
value - This parameter receives the value that the user has typed.
Returns:
Indicates the outcome of the validation. This is sent to the browser.

doFillApiReleaseStatusItems

public hudson.util.ListBoxModel doFillApiReleaseStatusItems()
List of the Statuses to an App.

Returns:
List with the statuses an app could have.

isApplicable

public boolean isApplicable(Class<? extends hudson.model.AbstractProject> aClass)
Returns true if this GlobalConfiguration type is applicable to the given project.


getDisplayName

public String getDisplayName()
This human readable name is used in the configuration screen.

Overrides:
getDisplayName in class jenkins.model.GlobalConfiguration

getInstances

public List<GlobalConfigurationImpl> getInstances()
Returns:
List of all saved fields entered in the GlobalConfigurationscreen in Jenkins.

setInstances

public void setInstances(List<GlobalConfigurationImpl> instances)
Parameters:
sets - an new instances added in the GlobalConfigurationscreen.

configure

public boolean configure(org.kohsuke.stapler.StaplerRequest req,
                         net.sf.json.JSONObject formData)
                  throws hudson.model.Descriptor.FormException
These method is responsible for the save the entered values in the GlobalConfigurationFields.

Overrides:
configure in class hudson.model.Descriptor<jenkins.model.GlobalConfiguration>
Parameters:
req - Request that should be send.
formData - Represents all fields parsed into an JSONObject.
Returns:
return value of the extended GlobalConfiguration Class.
Throws:
hudson.model.Descriptor.FormException

doTestConnection

public hudson.util.FormValidation doTestConnection(@QueryParameter(value="apiEndpoint")
                                                   String endpoint,
                                                   @QueryParameter(value="apiUsername")
                                                   String username,
                                                   @QueryParameter(value="apiOrganization")
                                                   String organization,
                                                   @QueryParameter(value="apiPassword")
                                                   String password)
                                            throws IOException,
                                                   javax.servlet.ServletException
Validates the given Credentials are right

Parameters:
endpoint - URL to connect to
username - User to connect to the specified URL
organization - Organization for the given User
password - Password for the given User
Returns:
Prints an dedicated statement to the User
Throws:
IOException
javax.servlet.ServletException

getApiEndpoint

public String getApiEndpoint()
Returns:
URL to which your app will connect.

setApiEndpoint

public void setApiEndpoint(String apiEndpoint)
Parameters:
apiEndpointURL - Communication endpoint to set.

getApiUsername

public String getApiUsername()
Returns:
Username used to login to relution.

setApiUsername

public void setApiUsername(String apiUsername)
Parameters:
apiUsername - Sets entry of the textfield apiUsername.

getApiPassword

public String getApiPassword()
Returns:
Password relates to the Username.

setApiPassword

public void setApiPassword(String apiPassword)
Parameters:
apiPassword - Sets entry of the textfield apiPassword.

getApiOrganization

public String getApiOrganization()
Returns:
Organization relates to the Username.

setApiOrganization

public void setApiOrganization(String apiOrganization)
Parameters:
apiOrganization - Sets entry of the textfield apiOrganization.

getProxyHost

public String getProxyHost()
Returns:
ProxyHost necessary for remote debugging

setProxyHost

public void setProxyHost(String proxyHost)
Parameters:
proxyHost - Sets entry of the textfield proxyHost.

getProxyPort

public int getProxyPort()
Returns:
ProxyPort necessary for remote debugging.

setProxyPort

public void setProxyPort(int proxyPort)
Parameters:
proxyPort - Sets entry of the textfield proxyPort.

getLoginCredentials

public Map getLoginCredentials()
Returns:
Map with the entered login-Credentials.

setApiReleaseStatus

public void setApiReleaseStatus(String apiReleaseStatus)
Parameters:
apiReleaseStatus - Sets entry of the textfield apiReleaseStatus.

getApiReleaseStatus

public String getApiReleaseStatus()
Returns:
actual entered ReleaseStatus.


Copyright © 2004-2013. All Rights Reserved.