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

io.probedock.maven.plugin.glassfish.model.ResourceAdapter Maven / Gradle / Ivy

package io.probedock.maven.plugin.glassfish.model;

import java.util.Set;
import org.apache.maven.plugins.annotations.Parameter;

/**
 * Configuration for a resource adapter.
 * 
 * @author Valentin Delaye [email protected]
 */
public class ResourceAdapter {
	
	/**
	 * The deploy configuration for the resource adapter
	 */
	@Parameter(required = true)
	private DeployConfiguration deployConfig;
	
	/**
	 * A set of additional properties to configure
	 */
	@Parameter
	private Set properties;

	public Set getProperties() {
		return properties;
	}

	public void setProperties(Set properties) {
		this.properties = properties;
	}
	
	public boolean hasProperties() {
		return this.properties != null && !this.properties.isEmpty();
	}
	
	public DeployConfiguration getDeployConfig() {
		return deployConfig;
	}

	public void setDeployConfig(DeployConfiguration deployConfig) {
		this.deployConfig = deployConfig;
	}

	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		String props = null;
		if(properties != null) {
			for (Property p : properties) {
				builder.append(p).append(", ");
			}
			props = builder.toString().replaceAll(", $", "");
		}
		return 
			"deployConfig=" + deployConfig + ", " +
			"properties=" + props;
	}
	
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy