package us.kbase.auth2.lib;

public class AuthConfigSet<T extends ExternalConfig> {

	//TODO TEST
	//TODO JAVADOC
	
	private AuthConfig cfg;
	private T extcfg;
	
	public AuthConfigSet(final AuthConfig cfg, final T extcfg) {
		if (cfg == null) {
			throw new NullPointerException("cfg");
		}
		if (extcfg == null) {
			throw new NullPointerException("extcfg");
		}
		this.cfg = cfg;
		this.extcfg = extcfg;
	}

	public AuthConfig getCfg() {
		return cfg;
	}

	public T getExtcfg() {
		return extcfg;
	}

	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("AuthConfigSet [cfg=");
		builder.append(cfg);
		builder.append(", extcfg=");
		builder.append(extcfg);
		builder.append("]");
		return builder.toString();
	}
}

@@ -22,16 +22,337 @@
 2.lib;%0A%0A
+/** A configuration set for the authentication instance. Contains the configuration of the%0A * authentication instance and a user-definable external configuration that is stored as key-value%0A * configuration values in the authentication storage.%0A * @author gaprice@lbl.gov%0A *%0A * @param %3CT%3E the external configuration.%0A */%0A
 public c
@@ -416,24 +416,8 @@
 EST%0A
-%09//TODO JAVADOC%0A
 %09%0A%09p
@@ -460,16 +460,158 @@
 tcfg;%0A%09%0A
+%09/** Create a configuration set.%0A%09 * @param cfg the authentication instance configuration.%0A%09 * @param extcfg the external configuration.%0A%09 */%0A
 %09public 
@@ -855,54 +855,248 @@
 %7D%0A%0A%09
-public AuthConfig getCfg() %7B%0A%09%09return cfg;%0A%09%7D%0A
+/** Get the authentication instance configuration.%0A%09 * @return the authentication instance configuration.%0A%09 */%0A%09public AuthConfig getCfg() %7B%0A%09%09return cfg;%0A%09%7D%0A%0A%09/** Get the external configuration.%0A%09 * @return the external configuration.%0A%09 */
 %0A%09pu

Add javadoc for authconfigset