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

org.wildfly.swarm.config.Ee Maven / Gradle / Ivy

package org.wildfly.swarm.config;

import org.wildfly.config.runtime.Implicit;
import org.wildfly.config.runtime.ResourceType;
import org.wildfly.config.runtime.ModelNodeBinding;
import java.util.List;
import java.util.Map;
import org.wildfly.config.runtime.Subresource;
import org.wildfly.swarm.config.ee.ManagedThreadFactory;
import org.wildfly.swarm.config.ee.ContextService;
import org.wildfly.swarm.config.ee.ManagedExecutorService;
import org.wildfly.swarm.config.ee.ManagedScheduledExecutorService;
import org.wildfly.swarm.config.ee.DefaultBindingsService;
/**
 * The configuration of the EE subsystem.
 */
@ResourceType("subsystem")
@Implicit
public class Ee {

	private String key;
	private Boolean annotationPropertyReplacement;
	private Boolean earSubdeploymentsIsolated;
	private List globalModules;
	private Boolean jbossDescriptorPropertyReplacement;
	private Boolean specDescriptorPropertyReplacement;
	private EeResources subresources = new EeResources();
	private DefaultBindingsService defaultBindingsService;

	public Ee() {
		this.key = "ee";
	}

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

	/**
	 * Flag indicating whether Java EE annotations will have property replacements applied
	 */
	@ModelNodeBinding(detypedName = "annotation-property-replacement")
	public Boolean annotationPropertyReplacement() {
		return this.annotationPropertyReplacement;
	}

	/**
	 * Flag indicating whether Java EE annotations will have property replacements applied
	 */
	@SuppressWarnings("unchecked")
	public T annotationPropertyReplacement(Boolean value) {
		this.annotationPropertyReplacement = value;
		return (T) this;
	}

	/**
	 * Flag indicating whether each of the subdeployments within a .ear can access classes belonging to another subdeployment within the same .ear. A value of false means the subdeployments can see classes belonging to other subdeployments within the .ear.
	 */
	@ModelNodeBinding(detypedName = "ear-subdeployments-isolated")
	public Boolean earSubdeploymentsIsolated() {
		return this.earSubdeploymentsIsolated;
	}

	/**
	 * Flag indicating whether each of the subdeployments within a .ear can access classes belonging to another subdeployment within the same .ear. A value of false means the subdeployments can see classes belonging to other subdeployments within the .ear.
	 */
	@SuppressWarnings("unchecked")
	public T earSubdeploymentsIsolated(Boolean value) {
		this.earSubdeploymentsIsolated = value;
		return (T) this;
	}

	/**
	 * A list of modules that should be made available to all deployments.
	 */
	@ModelNodeBinding(detypedName = "global-modules")
	public List globalModules() {
		return this.globalModules;
	}

	/**
	 * A list of modules that should be made available to all deployments.
	 */
	@SuppressWarnings("unchecked")
	public T globalModules(List value) {
		this.globalModules = value;
		return (T) this;
	}

	/**
	 * Flag indicating whether JBoss specific deployment descriptors will have property replacements applied
	 */
	@ModelNodeBinding(detypedName = "jboss-descriptor-property-replacement")
	public Boolean jbossDescriptorPropertyReplacement() {
		return this.jbossDescriptorPropertyReplacement;
	}

	/**
	 * Flag indicating whether JBoss specific deployment descriptors will have property replacements applied
	 */
	@SuppressWarnings("unchecked")
	public T jbossDescriptorPropertyReplacement(Boolean value) {
		this.jbossDescriptorPropertyReplacement = value;
		return (T) this;
	}

	/**
	 * Flag indicating whether descriptors defined by the Java EE specification will have property replacements applied
	 */
	@ModelNodeBinding(detypedName = "spec-descriptor-property-replacement")
	public Boolean specDescriptorPropertyReplacement() {
		return this.specDescriptorPropertyReplacement;
	}

	/**
	 * Flag indicating whether descriptors defined by the Java EE specification will have property replacements applied
	 */
	@SuppressWarnings("unchecked")
	public T specDescriptorPropertyReplacement(Boolean value) {
		this.specDescriptorPropertyReplacement = value;
		return (T) this;
	}

	public EeResources subresources() {
		return this.subresources;
	}

	/**
	 * Add all org.wildfly.swarm.config.ee.ManagedThreadFactory objects to this subresource
	 * @return this
	 * @param value List of org.wildfly.swarm.config.ee.ManagedThreadFactory objects.
	 */
	@SuppressWarnings("unchecked")
	public T managedThreadFactorys(
			List value) {
		this.subresources.managedThreadFactorys.addAll(value);
		return (T) this;
	}

	/**
	 * Add the org.wildfly.swarm.config.ee.ManagedThreadFactory object to the list of subresources
	 * @param value The org.wildfly.swarm.config.ee.ManagedThreadFactory to add
	 * @return this
	 */
	@SuppressWarnings("unchecked")
	public T managedThreadFactory(ManagedThreadFactory value) {
		this.subresources.managedThreadFactorys.add(value);
		return (T) this;
	}

	/**
	 * Add all org.wildfly.swarm.config.ee.ContextService objects to this subresource
	 * @return this
	 * @param value List of org.wildfly.swarm.config.ee.ContextService objects.
	 */
	@SuppressWarnings("unchecked")
	public T contextServices(
			List value) {
		this.subresources.contextServices.addAll(value);
		return (T) this;
	}

	/**
	 * Add the org.wildfly.swarm.config.ee.ContextService object to the list of subresources
	 * @param value The org.wildfly.swarm.config.ee.ContextService to add
	 * @return this
	 */
	@SuppressWarnings("unchecked")
	public T contextService(ContextService value) {
		this.subresources.contextServices.add(value);
		return (T) this;
	}

	/**
	 * Add all org.wildfly.swarm.config.ee.ManagedExecutorService objects to this subresource
	 * @return this
	 * @param value List of org.wildfly.swarm.config.ee.ManagedExecutorService objects.
	 */
	@SuppressWarnings("unchecked")
	public T managedExecutorServices(
			List value) {
		this.subresources.managedExecutorServices.addAll(value);
		return (T) this;
	}

	/**
	 * Add the org.wildfly.swarm.config.ee.ManagedExecutorService object to the list of subresources
	 * @param value The org.wildfly.swarm.config.ee.ManagedExecutorService to add
	 * @return this
	 */
	@SuppressWarnings("unchecked")
	public T managedExecutorService(ManagedExecutorService value) {
		this.subresources.managedExecutorServices.add(value);
		return (T) this;
	}

	/**
	 * Add all org.wildfly.swarm.config.ee.ManagedScheduledExecutorService objects to this subresource
	 * @return this
	 * @param value List of org.wildfly.swarm.config.ee.ManagedScheduledExecutorService objects.
	 */
	@SuppressWarnings("unchecked")
	public T managedScheduledExecutorServices(
			List value) {
		this.subresources.managedScheduledExecutorServices.addAll(value);
		return (T) this;
	}

	/**
	 * Add the org.wildfly.swarm.config.ee.ManagedScheduledExecutorService object to the list of subresources
	 * @param value The org.wildfly.swarm.config.ee.ManagedScheduledExecutorService to add
	 * @return this
	 */
	@SuppressWarnings("unchecked")
	public T managedScheduledExecutorService(
			ManagedScheduledExecutorService value) {
		this.subresources.managedScheduledExecutorServices.add(value);
		return (T) this;
	}

	/**
	 * Child mutators for Ee
	 */
	public class EeResources {
		/**
		 * A managed thread factory
		 */
		private List managedThreadFactorys = new java.util.ArrayList<>();
		/**
		 * A context service
		 */
		private List contextServices = new java.util.ArrayList<>();
		/**
		 * A managed executor service
		 */
		private List managedExecutorServices = new java.util.ArrayList<>();
		/**
		 * A managed scheduled executor service
		 */
		private List managedScheduledExecutorServices = new java.util.ArrayList<>();

		/**
		 * Get the list of org.wildfly.swarm.config.ee.ManagedThreadFactory resources
		 * @return the list of resources
		 */
		@Subresource
		public List managedThreadFactorys() {
			return this.managedThreadFactorys;
		}

		/**
		 * Get the list of org.wildfly.swarm.config.ee.ContextService resources
		 * @return the list of resources
		 */
		@Subresource
		public List contextServices() {
			return this.contextServices;
		}

		/**
		 * Get the list of org.wildfly.swarm.config.ee.ManagedExecutorService resources
		 * @return the list of resources
		 */
		@Subresource
		public List managedExecutorServices() {
			return this.managedExecutorServices;
		}

		/**
		 * Get the list of org.wildfly.swarm.config.ee.ManagedScheduledExecutorService resources
		 * @return the list of resources
		 */
		@Subresource
		public List managedScheduledExecutorServices() {
			return this.managedScheduledExecutorServices;
		}
	}

	/**
	 * The JNDI names for the default EE bindings
	 */
	@Subresource
	public DefaultBindingsService defaultBindingsService() {
		return this.defaultBindingsService;
	}

	/**
	 * The JNDI names for the default EE bindings
	 */
	@SuppressWarnings("unchecked")
	public T defaultBindingsService(DefaultBindingsService value) {
		this.defaultBindingsService = value;
		return (T) this;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy