![JAR search and dependency download from the Maven repository](/logo.png)
net.officefloor.woof.model.objects.WoofSupplierModel Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of officeweb_configuration Show documentation
Show all versions of officeweb_configuration Show documentation
Configuration for WoOF (Web on OfficeFloor)
/*
*
*/
package net.officefloor.woof.model.objects;
import java.util.List;
import java.util.LinkedList;
import javax.annotation.Generated;
import net.officefloor.model.AbstractModel;
import net.officefloor.model.ConnectionModel;
import net.officefloor.model.ItemModel;
import net.officefloor.model.RemoveConnectionsAction;
@Generated("net.officefloor.model.generate.ModelGenerator")
public class WoofSupplierModel extends AbstractModel implements ItemModel, WoofObjectSourceModel {
public static enum WoofSupplierEvent {
CHANGE_SUPPLIER_SOURCE_CLASS_NAME, ADD_PROPERTY_SOURCE, REMOVE_PROPERTY_SOURCE
}
/**
* Default constructor.
*/
public WoofSupplierModel() {
}
/**
* Convenience constructor for new non-linked instance.
*
* @param supplierSourceClassName Supplier source class name.
*/
public WoofSupplierModel(
String supplierSourceClassName
) {
this.supplierSourceClassName = supplierSourceClassName;
}
/**
* Convenience constructor for new non-linked instance allowing XY initialising.
*
* @param supplierSourceClassName Supplier source class name.
* @param x Horizontal location.
* @param y Vertical location.
*/
public WoofSupplierModel(
String supplierSourceClassName
, int x
, int y
) {
this.supplierSourceClassName = supplierSourceClassName;
this.setX(x);
this.setY(y);
}
/**
* Convenience constructor.
*
* @param supplierSourceClassName Supplier source class name.
* @param propertySource Property source.
*/
public WoofSupplierModel(
String supplierSourceClassName
, PropertySourceModel[] propertySource
) {
this.supplierSourceClassName = supplierSourceClassName;
if (propertySource != null) {
for (PropertySourceModel model : propertySource) {
this.propertySource.add(model);
}
}
}
/**
* Convenience constructor allowing XY initialising.
*
* @param supplierSourceClassName Supplier source class name.
* @param propertySource Property source.
* @param x Horizontal location.
* @param y Vertical location.
*/
public WoofSupplierModel(
String supplierSourceClassName
, PropertySourceModel[] propertySource
, int x
, int y
) {
this.supplierSourceClassName = supplierSourceClassName;
if (propertySource != null) {
for (PropertySourceModel model : propertySource) {
this.propertySource.add(model);
}
}
this.setX(x);
this.setY(y);
}
/**
* Supplier source class name.
*/
private String supplierSourceClassName;
/**
* @return Supplier source class name.
*/
public String getSupplierSourceClassName() {
return this.supplierSourceClassName;
}
/**
* @param supplierSourceClassName Supplier source class name.
*/
public void setSupplierSourceClassName(String supplierSourceClassName) {
String oldValue = this.supplierSourceClassName;
this.supplierSourceClassName = supplierSourceClassName;
this.changeField(oldValue, this.supplierSourceClassName, WoofSupplierEvent.CHANGE_SUPPLIER_SOURCE_CLASS_NAME);
}
/**
* Property source.
*/
private List propertySource = new LinkedList();
/**
* @return Property source.
*/
public List getPropertySources() {
return this.propertySource;
}
/**
* @param propertySource Property source.
*/
public void addPropertySource(PropertySourceModel propertySource) {
this.addItemToList(propertySource, this.propertySource, WoofSupplierEvent.ADD_PROPERTY_SOURCE);
}
/**
* @param propertySource Property source.
*/
public void removePropertySource(PropertySourceModel propertySource) {
this.removeItemFromList(propertySource, this.propertySource, WoofSupplierEvent.REMOVE_PROPERTY_SOURCE);
}
/**
* Remove Connections.
*
* @return {@link RemoveConnectionsAction} to remove the {@link ConnectionModel} instances.
*/
public RemoveConnectionsAction removeConnections() {
RemoveConnectionsAction _action = new RemoveConnectionsAction(this);
return _action;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy