org.jenkins.plugins.audit2db.internal
Class DbAuditPublisherDescriptorImpl
java.lang.Object
hudson.model.Descriptor<T>
hudson.tasks.BuildStepDescriptor<hudson.tasks.Publisher>
org.jenkins.plugins.audit2db.internal.DbAuditPublisherDescriptorImpl
- All Implemented Interfaces:
- hudson.model.Saveable, DbAuditPublisherDescriptor
public class DbAuditPublisherDescriptorImpl
- extends hudson.tasks.BuildStepDescriptor<hudson.tasks.Publisher>
- implements DbAuditPublisherDescriptor
- Author:
- Marco Scata
Nested classes/interfaces inherited from class hudson.model.Descriptor |
hudson.model.Descriptor.FormException, hudson.model.Descriptor.PropertyType, hudson.model.Descriptor.Self |
Fields inherited from class hudson.model.Descriptor |
clazz |
Fields inherited from interface hudson.model.Saveable |
NOOP |
Methods inherited from class hudson.tasks.BuildStepDescriptor |
filter |
Methods inherited from class hudson.model.Descriptor |
addHelpFileRedirect, calcAutoCompleteSettings, calcFillSettings, configure, doHelp, find, find, getCheckUrl, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, 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 |
DbAuditPublisherDescriptorImpl
public DbAuditPublisherDescriptorImpl()
DbAuditPublisherDescriptorImpl
public DbAuditPublisherDescriptorImpl(Class<? extends DbAuditPublisherImpl> clazz)
getUseJndi
public boolean getUseJndi()
- Specified by:
getUseJndi
in interface DbAuditPublisherDescriptor
- Returns:
true
if using a JNDI datasource, or false
for JDBC.- See Also:
DbAuditPublisherDescriptor.getUseJndi()
setUseJndi
public void setUseJndi(boolean useJndi)
- Specified by:
setUseJndi
in interface DbAuditPublisherDescriptor
- Parameters:
useJndi
- set to true
to use a JNDI datasource, or false
for JDBC.- See Also:
DbAuditPublisherDescriptor.setUseJndi(boolean)
getJndiName
public String getJndiName()
- Specified by:
getJndiName
in interface DbAuditPublisherDescriptor
- Returns:
- the name of the JNDI datasource.
- See Also:
DbAuditPublisherDescriptor.getJndiName()
setJndiName
public void setJndiName(String jndiName)
- Specified by:
setJndiName
in interface DbAuditPublisherDescriptor
- Parameters:
jndiName
- true
if using a JNDI datasource, or false
for JDBC.- See Also:
DbAuditPublisherDescriptor.setJndiName(java.lang.String)
getJdbcDriver
public String getJdbcDriver()
- Specified by:
getJdbcDriver
in interface DbAuditPublisherDescriptor
- Returns:
- the name of the JDBC driver class.
- See Also:
DbAuditPublisherDescriptor.getJdbcDriver()
setJdbcDriver
public void setJdbcDriver(String jdbcDriver)
- Specified by:
setJdbcDriver
in interface DbAuditPublisherDescriptor
- Parameters:
jdbcDriver
- the name of the JDBC driver class.- See Also:
DbAuditPublisherDescriptor.setJdbcDriver(java.lang.String)
getJdbcUrl
public String getJdbcUrl()
- Specified by:
getJdbcUrl
in interface DbAuditPublisherDescriptor
- Returns:
- the JDBC URL.
- See Also:
DbAuditPublisherDescriptor.getJdbcUrl()
setJdbcUrl
public void setJdbcUrl(String jdbcUrl)
- Specified by:
setJdbcUrl
in interface DbAuditPublisherDescriptor
- Parameters:
jdbcUrl
- the JDBC URL.- See Also:
DbAuditPublisherDescriptor.setJdbcUrl(java.lang.String)
getJndiUser
public String getJndiUser()
- Specified by:
getJndiUser
in interface DbAuditPublisherDescriptor
- Returns:
- the user for the JNDI datasource.
- See Also:
DbAuditPublisherDescriptor.getJndiUser()
setJndiUser
public void setJndiUser(String username)
- Specified by:
setJndiUser
in interface DbAuditPublisherDescriptor
- Parameters:
username
- the user for the JNDI datasource.- See Also:
DbAuditPublisherDescriptor.setJndiUser(java.lang.String)
setJndiPassword
public void setJndiPassword(String password)
- Specified by:
setJndiPassword
in interface DbAuditPublisherDescriptor
- Parameters:
password
- the password for the JNDI datasource.- See Also:
DbAuditPublisherDescriptor.setJndiPassword(java.lang.String)
getJdbcUser
public String getJdbcUser()
- Specified by:
getJdbcUser
in interface DbAuditPublisherDescriptor
- Returns:
- the user for the JDBC datasource.
- See Also:
DbAuditPublisherDescriptor.getJdbcUser()
setJdbcUser
public void setJdbcUser(String username)
- Specified by:
setJdbcUser
in interface DbAuditPublisherDescriptor
- Parameters:
username
- the user for the JDBC datasource.- See Also:
DbAuditPublisherDescriptor.setJdbcUser(java.lang.String)
getJdbcPassword
public String getJdbcPassword()
- Specified by:
getJdbcPassword
in interface DbAuditPublisherDescriptor
- Returns:
- the password for the specified user.
- See Also:
DbAuditPublisherDescriptor.getJdbcPassword()
setJdbcPassword
public void setJdbcPassword(String password)
- Specified by:
setJdbcPassword
in interface DbAuditPublisherDescriptor
- Parameters:
password
- the password for the JDBC datasource.- See Also:
DbAuditPublisherDescriptor.setJdbcPassword(java.lang.String)
configure
public boolean configure(org.kohsuke.stapler.StaplerRequest req,
net.sf.json.JSONObject json)
throws hudson.model.Descriptor.FormException
- Overrides:
configure
in class hudson.model.Descriptor<hudson.tasks.Publisher>
- Throws:
hudson.model.Descriptor.FormException
getId
public String getId()
- Overrides:
getId
in class hudson.model.Descriptor<hudson.tasks.Publisher>
isApplicable
public boolean isApplicable(Class<? extends hudson.model.AbstractProject> jobType)
- Specified by:
isApplicable
in class hudson.tasks.BuildStepDescriptor<hudson.tasks.Publisher>
getDisplayName
public String getDisplayName()
- Specified by:
getDisplayName
in class hudson.model.Descriptor<hudson.tasks.Publisher>
doTestJdbcConnection
public hudson.util.FormValidation doTestJdbcConnection(@QueryParameter(value="audit2db.jdbcDriver")
String jdbcDriver,
@QueryParameter(value="audit2db.jdbcUrl")
String jdbcUrl,
@QueryParameter(value="audit2db.jdbcUser")
String username,
@QueryParameter(value="audit2db.jdbcPassword")
String password)
throws IOException,
javax.servlet.ServletException
- Description copied from interface:
DbAuditPublisherDescriptor
- Checks the JDBC connection.
- Specified by:
doTestJdbcConnection
in interface DbAuditPublisherDescriptor
- Parameters:
jdbcDriver
- the JDBC driver class.jdbcUrl
- the JDBC URL.username
- the JDBC user.password
- the JDBC password.
- Returns:
- the validation result.
- Throws:
IOException
- if a problem occurs while connecting to the datasource.
javax.servlet.ServletException
- if a problem occurs while processing the request.- See Also:
org.jenkins.plugins.audit2db.internal.DbAuditPublisherDescriptor#doTestJdbcConnection(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
doGenerateDdl
public hudson.util.FormValidation doGenerateDdl(@QueryParameter(value="audit2db.jdbcDriver")
String jdbcDriver,
@QueryParameter(value="audit2db.jdbcUrl")
String jdbcUrl,
@QueryParameter(value="audit2db.jdbcUser")
String username,
@QueryParameter(value="audit2db.jdbcPassword")
String password)
throws IOException,
javax.servlet.ServletException
- Description copied from interface:
DbAuditPublisherDescriptor
- Generates the DDL.
- Specified by:
doGenerateDdl
in interface DbAuditPublisherDescriptor
- Parameters:
jdbcDriver
- the JDBC driver class.jdbcUrl
- the JDBC URL.username
- the JDBC user.password
- the JDBC password.
- Returns:
- the validation result.
- Throws:
IOException
- if a problem occurs while connecting to the datasource.
javax.servlet.ServletException
- if a problem occurs while processing the request.
Copyright © 2004-2013. All Rights Reserved.