be.personify.iam.model.vault.ProvisioningUnit Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of personify-model Show documentation
Show all versions of personify-model Show documentation
a possible model for personify
package be.personify.iam.model.vault;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.ElementCollection;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.MapKeyColumn;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import be.personify.iam.model.ConceptType;
import be.personify.iam.model.util.Concept;
import be.personify.util.generator.MetaInfo;
@Entity
@MetaInfo( group="vault", frontendGroup="Entitlement", name="ProvisioningUnit", description="A unit that provides provisioning logic to entitlements",
showInMenu=true, iconClass="quidditch", sortOrderInGroup=2,
number=15,
workflowEnabled=true,
isConcept = true,
afterCreateGoToLink = "entitlement",
afterDeleteGoToLink = "entitlement"
)
public class ProvisioningUnit extends Concept implements Serializable{
private static final long serialVersionUID = 6030259462514243560L;
public ProvisioningUnit() {
this.conceptType = ConceptType.ProvisioningUnit;
}
@MetaInfo( searchable=false, showInSearchResultGrid=false, name="name", description = "the name of the provisioning unit", required = true)
public String name;
//the link to the targetsystem
@MetaInfo( searchable=true, showInSearchResultGrid=true, name="targetSystemName", description = "the name of the targetsystem_", required = true)
private String targetSystemName;
@OneToOne
@MetaInfo( searchable=true, showInSearchResultGrid=true, name="entitlement", description = "the entitlement of the provisioningunit : see entitlement_", required = true)
private Entitlement entitlement;
@MetaInfo( searchable=false, showInSearchResultGrid=true,
name="executionOrder",
customRenderer = "integer_dropdown|values:1-20|default:1",
description = "the executionOrder of the provisioningunit in the provisioning chain")
private int executionOrder;
@OneToMany( cascade = CascadeType.ALL)
@MetaInfo( name="transformers", description="The transformers linked to this entitlement. See transformer", addable = true, viewable = true )
private List transformers;
@MetaInfo(name="configuration", description = "the configuration of the provisioning unit", searchable=false, showInSearchResultGrid=false)
@ElementCollection(fetch = FetchType.EAGER )
@JoinTable(name="provisioning_unit_configuration", joinColumns=@JoinColumn(name="id"))
@MapKeyColumn (name="configuration_id")
@Column(name="value")
private Map configuration;
public List getTransformers() {
return transformers;
}
public void setTransformers(List transformers) {
this.transformers = transformers;
}
public String getTargetSystemName() {
return targetSystemName;
}
public void setTargetSystemName(String targetSystemName) {
this.targetSystemName = targetSystemName;
}
public Entitlement getEntitlement() {
return entitlement;
}
public void setEntitlement(Entitlement entitlement) {
this.entitlement = entitlement;
}
public int getExecutionOrder() {
return executionOrder;
}
public void setExecutionOrder(int executionOrder) {
this.executionOrder = executionOrder;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Map getConfiguration() {
return configuration;
}
public void setConfiguration(Map configuration) {
this.configuration = configuration;
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result + ((configuration == null) ? 0 : configuration.hashCode());
result = prime * result + ((entitlement == null) ? 0 : entitlement.hashCode());
result = prime * result + executionOrder;
result = prime * result + ((name == null) ? 0 : name.hashCode());
result = prime * result + ((targetSystemName == null) ? 0 : targetSystemName.hashCode());
result = prime * result + ((transformers == null) ? 0 : transformers.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
ProvisioningUnit other = (ProvisioningUnit) obj;
if (configuration == null) {
if (other.configuration != null)
return false;
} else if (!configuration.equals(other.configuration))
return false;
if (entitlement == null) {
if (other.entitlement != null)
return false;
} else if (!entitlement.equals(other.entitlement))
return false;
if (executionOrder != other.executionOrder)
return false;
if (name == null) {
if (other.name != null)
return false;
} else if (!name.equals(other.name))
return false;
if (targetSystemName == null) {
if (other.targetSystemName != null)
return false;
} else if (!targetSystemName.equals(other.targetSystemName))
return false;
if (transformers == null) {
if (other.transformers != null)
return false;
} else if (!transformers.equals(other.transformers))
return false;
return true;
}
}