Skip to content

Commit

Permalink
- Removed Docopt from repo and added maven dependency
Browse files Browse the repository at this point in the history
- Put Docopt configuration in properties file
  • Loading branch information
kterry committed Mar 30, 2015
1 parent f5e21ce commit b715b21
Show file tree
Hide file tree
Showing 22 changed files with 924 additions and 3,256 deletions.
15 changes: 3 additions & 12 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -204,19 +204,10 @@
<version>1.6.4</version>
</dependency>

<!-- Dependencies of Docopt (included in the project because isn't in maven
repository) -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.0.0</version>
<scope>test</scope>
<groupId>com.offbytwo</groupId>
<artifactId>docopt</artifactId>
<version>0.6.0.20150202</version>
</dependency>

<!-- This dependency must be excluded in shade jars -->
Expand Down
170 changes: 85 additions & 85 deletions src/main/java/es/unican/meteo/esgf/common/ESGFCredentials.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,99 +14,99 @@
*/
public class ESGFCredentials {

/** Temporal user certificate. */
private X509Certificate x509userCertificate;
/** User RSA private key. */
private PrivateKey privateKey;
/** Server certificates. */
private Collection<X509Certificate> x509ServerCertificates;
/** Temporal user certificate. */
private X509Certificate x509userCertificate;
/** User RSA private key. */
private PrivateKey privateKey;
/** Server certificates. */
private Collection<X509Certificate> x509ServerCertificates;

/**
* Constructor
*
* @param x509userCertificate
* user x509 certificate
* @param privateKey
* user RSA private key
* @param x509ServerCertificates
* server certificates
*/
public ESGFCredentials(X509Certificate x509userCertificate,
PrivateKey privateKey,
Collection<X509Certificate> x509ServerCertificates) {
this.x509userCertificate = x509userCertificate;
this.privateKey = privateKey;
this.x509ServerCertificates = x509ServerCertificates;
}
/**
* Constructor
*
* @param x509userCertificate
* user x509 certificate
* @param privateKey
* user RSA private key
* @param x509ServerCertificates
* server certificates
*/
public ESGFCredentials(X509Certificate x509userCertificate,
PrivateKey privateKey,
Collection<X509Certificate> x509ServerCertificates) {
this.x509userCertificate = x509userCertificate;
this.privateKey = privateKey;
this.x509ServerCertificates = x509ServerCertificates;
}

/**
* Gets the x509 user certificate.
*
* @return the x509 user certificate
*/
public X509Certificate getX509userCertificate() {
return x509userCertificate;
}
/**
* Gets the x509 user certificate.
*
* @return the x509 user certificate
*/
public X509Certificate getX509userCertificate() {
return x509userCertificate;
}

/**
* Gets the RSA private key.
*
* @return the privateKey
*/
public PrivateKey getPrivateKey() {
return privateKey;
}
/**
* Gets the RSA private key.
*
* @return the privateKey
*/
public PrivateKey getPrivateKey() {
return privateKey;
}

/**
* Gets the server certificates.
*
* @return
*/
public Collection<X509Certificate> getX509ServerCertificates() {
return x509ServerCertificates;
}
/**
* Gets the server certificates.
*
* @return
*/
public Collection<X509Certificate> getX509ServerCertificates() {
return x509ServerCertificates;
}

/**
* Sets the x509 user certificate.
*
* @param x509userCertificate
* the x509 user certificate to set
*/
public void setX509userCertificate(X509Certificate x509userCertificate) {
this.x509userCertificate = x509userCertificate;
}
/**
* Sets the x509 user certificate.
*
* @param x509userCertificate
* the x509 user certificate to set
*/
public void setX509userCertificate(X509Certificate x509userCertificate) {
this.x509userCertificate = x509userCertificate;
}

/**
* Sets the user RSA private key.
*
* @param privateKey
*/
public void setPrivateKey(PrivateKey privateKey) {
this.privateKey = privateKey;
}
/**
* Sets the user RSA private key.
*
* @param privateKey
*/
public void setPrivateKey(PrivateKey privateKey) {
this.privateKey = privateKey;
}

/**
* Sets the x509 server certificates
*
* @param x509ServerCertificates
*/
public void setX509CasCertificates(
Collection<X509Certificate> x509ServerCertificates) {
this.x509ServerCertificates = x509ServerCertificates;
}
/**
* Sets the x509 server certificates
*
* @param x509ServerCertificates
*/
public void setX509CasCertificates(
Collection<X509Certificate> x509ServerCertificates) {
this.x509ServerCertificates = x509ServerCertificates;
}

/**
* Get a collection with the user certificates and other certificates if
* exists
*
* @return
*/
public Collection<X509Certificate> getAllx509Certificates() {
/**
* Get a collection with the user certificates and other certificates if
* exists
*
* @return
*/
public Collection<X509Certificate> getAllx509Certificates() {

Collection<X509Certificate> certificates = new LinkedList<X509Certificate>();
certificates.add(x509userCertificate);
certificates.addAll(x509ServerCertificates);
Collection<X509Certificate> certificates = new LinkedList<X509Certificate>();
certificates.add(x509userCertificate);
certificates.addAll(x509ServerCertificates);

return certificates;
}
return certificates;
}
}
Loading

0 comments on commit b715b21

Please sign in to comment.