Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright 2014-2014 The Kuali Foundation Licensed under the Educational Community License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.opensource.org/licenses/ecl2.php Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
 
 package org.kuali.common.core.ssh;
 
 import static com.google.common.base.Optional.absent;
 
 
 
 @JsonDeserialize(builder = KeyPair.Builder.class)
 public final class KeyPair {
 
 	private final String name;
 	private final String publicKey;
 	private final String privateKey;
 	private final Optional<Stringfingerprint;
 
 	private KeyPair(Builder builder) {
 		this. = builder.name;
 		this. = builder.publicKey;
 		this. = builder.privateKey;
 		this. = builder.fingerprint;
 	}
 
 	public static Builder builder(String name) {
 		return new Builder(name);
 	}
 
 	public static class Builder extends ValidatingBuilder<KeyPair> {
 
 		private final String name;
 		private String publicKey;
 		private String privateKey;
 		private Optional<Stringfingerprint = absent();
 
 		public Builder(String name) {
 			this. = name;
 		}
 
 		public Builder withPublicKey(String publicKey) {
 			this. = publicKey;
 			return this;
 		}
 
 		public Builder withPrivateKey(String privateKey) {
 			this. = privateKey;
 			return this;
 		}
 
 		public Builder withFingerprint(String fingerprint) {
 			return withFingerprint(Optional.of(fingerprint));
 		}
 
 		public Builder withFingerprint(Optional<Stringfingerprint) {
 			this. = fingerprint;
 			return this;
 		}
 
 		public KeyPair build() {
 			return validate(new KeyPair(this));
 		}
 
 		public String getPublicKey() {
 			return ;
 		}
 
 		public void setPublicKey(String publicKey) {
 			this. = publicKey;
 		}
 
 		public String getPrivateKey() {
 			return ;
 		}
 
 		public void setPrivateKey(String privateKey) {
 			this. = privateKey;
 		}
 
 		public Optional<StringgetFingerprint() {
			return ;
		}
		public void setFingerprint(Optional<Stringfingerprint) {
			this. = fingerprint;
		}
		public String getName() {
			return ;
		}
	}
	public String getName() {
		return ;
	}
	public String getPublicKey() {
		return ;
	}
	public String getPrivateKey() {
		return ;
	}
		return ;
	}
New to GrepCode? Check out our FAQ X