org.wildfly.swarm.config.Jca 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 org.wildfly.config.runtime.Subresource;
import org.wildfly.swarm.config.jca.DistributedWorkmanager;
import org.wildfly.swarm.config.jca.Workmanager;
import org.wildfly.swarm.config.jca.BootstrapContext;
import org.wildfly.swarm.config.jca.CachedConnectionManager;
import org.wildfly.swarm.config.jca.BeanValidation;
import org.wildfly.swarm.config.jca.Tracer;
import org.wildfly.swarm.config.jca.ArchiveValidation;
/**
* The Java EE Connector Architecture (JCA) subsystem providing general configuration for resource adapters
*/
@ResourceType("subsystem")
@Implicit
public class Jca {
private String key;
private JcaResources subresources = new JcaResources();
private CachedConnectionManager cachedConnectionManager;
private BeanValidation beanValidation;
private Tracer tracer;
private ArchiveValidation archiveValidation;
public Jca() {
this.key = "jca";
}
public String getKey() {
return this.key;
}
public JcaResources subresources() {
return this.subresources;
}
/**
* Add all org.wildfly.swarm.config.jca.DistributedWorkmanager objects to this subresource
* @return this
* @param value List of org.wildfly.swarm.config.jca.DistributedWorkmanager objects.
*/
@SuppressWarnings("unchecked")
public T distributedWorkmanagers(
List value) {
this.subresources.distributedWorkmanagers.addAll(value);
return (T) this;
}
/**
* Add the org.wildfly.swarm.config.jca.DistributedWorkmanager object to the list of subresources
* @param value The org.wildfly.swarm.config.jca.DistributedWorkmanager to add
* @return this
*/
@SuppressWarnings("unchecked")
public T distributedWorkmanager(DistributedWorkmanager value) {
this.subresources.distributedWorkmanagers.add(value);
return (T) this;
}
/**
* Add all org.wildfly.swarm.config.jca.Workmanager objects to this subresource
* @return this
* @param value List of org.wildfly.swarm.config.jca.Workmanager objects.
*/
@SuppressWarnings("unchecked")
public T workmanagers(List value) {
this.subresources.workmanagers.addAll(value);
return (T) this;
}
/**
* Add the org.wildfly.swarm.config.jca.Workmanager object to the list of subresources
* @param value The org.wildfly.swarm.config.jca.Workmanager to add
* @return this
*/
@SuppressWarnings("unchecked")
public T workmanager(Workmanager value) {
this.subresources.workmanagers.add(value);
return (T) this;
}
/**
* Add all org.wildfly.swarm.config.jca.BootstrapContext objects to this subresource
* @return this
* @param value List of org.wildfly.swarm.config.jca.BootstrapContext objects.
*/
@SuppressWarnings("unchecked")
public T bootstrapContexts(
List value) {
this.subresources.bootstrapContexts.addAll(value);
return (T) this;
}
/**
* Add the org.wildfly.swarm.config.jca.BootstrapContext object to the list of subresources
* @param value The org.wildfly.swarm.config.jca.BootstrapContext to add
* @return this
*/
@SuppressWarnings("unchecked")
public T bootstrapContext(BootstrapContext value) {
this.subresources.bootstrapContexts.add(value);
return (T) this;
}
/**
* Child mutators for Jca
*/
public class JcaResources {
/**
* DistributedWorkManager for resource adapters
*/
private List distributedWorkmanagers = new java.util.ArrayList<>();
/**
* WorkManager for resource adapters
*/
private List workmanagers = new java.util.ArrayList<>();
/**
* Bootstrap context for resource adapters
*/
private List bootstrapContexts = new java.util.ArrayList<>();
/**
* Get the list of org.wildfly.swarm.config.jca.DistributedWorkmanager resources
* @return the list of resources
*/
@Subresource
public List distributedWorkmanagers() {
return this.distributedWorkmanagers;
}
/**
* Get the list of org.wildfly.swarm.config.jca.Workmanager resources
* @return the list of resources
*/
@Subresource
public List workmanagers() {
return this.workmanagers;
}
/**
* Get the list of org.wildfly.swarm.config.jca.BootstrapContext resources
* @return the list of resources
*/
@Subresource
public List bootstrapContexts() {
return this.bootstrapContexts;
}
}
/**
* Cached connection manager for resource adapters
*/
@Subresource
public CachedConnectionManager cachedConnectionManager() {
return this.cachedConnectionManager;
}
/**
* Cached connection manager for resource adapters
*/
@SuppressWarnings("unchecked")
public T cachedConnectionManager(CachedConnectionManager value) {
this.cachedConnectionManager = value;
return (T) this;
}
/**
* Bean validation (JSR-303) for resource adapters
*/
@Subresource
public BeanValidation beanValidation() {
return this.beanValidation;
}
/**
* Bean validation (JSR-303) for resource adapters
*/
@SuppressWarnings("unchecked")
public T beanValidation(BeanValidation value) {
this.beanValidation = value;
return (T) this;
}
/**
* Tracer for resource adapters
*/
@Subresource
public Tracer tracer() {
return this.tracer;
}
/**
* Tracer for resource adapters
*/
@SuppressWarnings("unchecked")
public T tracer(Tracer value) {
this.tracer = value;
return (T) this;
}
/**
* Archive validation for resource adapters
*/
@Subresource
public ArchiveValidation archiveValidation() {
return this.archiveValidation;
}
/**
* Archive validation for resource adapters
*/
@SuppressWarnings("unchecked")
public T archiveValidation(ArchiveValidation value) {
this.archiveValidation = value;
return (T) this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy