All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.wildfly.swarm.config.elytron.AggregateRealm Maven / Gradle / Ivy

The newest version!
package org.wildfly.swarm.config.elytron;

import org.wildfly.swarm.config.runtime.AttributeDocumentation;
import org.wildfly.swarm.config.runtime.ResourceDocumentation;
import org.wildfly.swarm.config.runtime.SingletonResource;
import org.wildfly.swarm.config.runtime.Address;
import org.wildfly.swarm.config.runtime.ResourceType;
import java.beans.PropertyChangeSupport;
import java.beans.PropertyChangeListener;
import org.wildfly.swarm.config.runtime.ModelNodeBinding;

/**
 * A realm definition that is an aggregation of two realms, one for the
 * authentication steps and one for loading the identity for the authorization
 * steps.
 */
@Address("/subsystem=elytron/aggregate-realm=*")
@ResourceType("aggregate-realm")
public class AggregateRealm>
		implements
			org.wildfly.swarm.config.runtime.Keyed {

	private String key;
	private PropertyChangeSupport pcs;
	@AttributeDocumentation("Reference to the security realm to use for authentication steps (obtaining or validating credentials).")
	private String authenticationRealm;
	@AttributeDocumentation("Reference to the security realm to use for loading the identity for authorization steps (loading of the identity).")
	private String authorizationRealm;

	public AggregateRealm(java.lang.String key) {
		super();
		this.key = key;
	}

	public String getKey() {
		return this.key;
	}

	/**
	 * Adds a property change listener
	 */
	public void addPropertyChangeListener(PropertyChangeListener listener) {
		if (null == this.pcs)
			this.pcs = new PropertyChangeSupport(this);
		this.pcs.addPropertyChangeListener(listener);
	}

	/**
	 * Removes a property change listener
	 */
	public void removePropertyChangeListener(
			java.beans.PropertyChangeListener listener) {
		if (this.pcs != null)
			this.pcs.removePropertyChangeListener(listener);
	}

	/**
	 * Reference to the security realm to use for authentication steps
	 * (obtaining or validating credentials).
	 */
	@ModelNodeBinding(detypedName = "authentication-realm")
	public String authenticationRealm() {
		return this.authenticationRealm;
	}

	/**
	 * Reference to the security realm to use for authentication steps
	 * (obtaining or validating credentials).
	 */
	@SuppressWarnings("unchecked")
	public T authenticationRealm(java.lang.String value) {
		Object oldValue = this.authenticationRealm;
		this.authenticationRealm = value;
		if (this.pcs != null)
			this.pcs.firePropertyChange("authenticationRealm", oldValue, value);
		return (T) this;
	}

	/**
	 * Reference to the security realm to use for loading the identity for
	 * authorization steps (loading of the identity).
	 */
	@ModelNodeBinding(detypedName = "authorization-realm")
	public String authorizationRealm() {
		return this.authorizationRealm;
	}

	/**
	 * Reference to the security realm to use for loading the identity for
	 * authorization steps (loading of the identity).
	 */
	@SuppressWarnings("unchecked")
	public T authorizationRealm(java.lang.String value) {
		Object oldValue = this.authorizationRealm;
		this.authorizationRealm = value;
		if (this.pcs != null)
			this.pcs.firePropertyChange("authorizationRealm", oldValue, value);
		return (T) this;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy