You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
Version 1
Next »
This section describes how a controlled selection access entity can be created
What does this section cover?
Create a Controlled Selection Access Entity
In order for an entity to be available to Controlled Selection Access Mechanism, it has to meet the following conditions:
1. Data Object
The entity's DO class must:
- Implement ICRMDOControlledSelectableEntity interface and its two methods:
- getOrganisationalUnits()
- setOrganisationalUnits(Set<CRMDOControlSelectOrganisationalUnit> organisationalUnits)
- Define organisationalUnits set.
public class CUSTOMCRMDORentalType extends CRMDO implements ICRMDOControlledSelectableEntity {
private Date effectiveDate;
private Date expirationDate;
private Set<CUSTOMCRMDORentalTypeProduct> allowedProducts;
private Set<CRMDOControlSelectOrganisationalUnit> organisationalUnits;
public Date getEffectiveDate() {
return effectiveDate;
}
public void setEffectiveDate(Date effectiveDate) {
setChange("effectiveDate", this.effectiveDate, effectiveDate);
this.effectiveDate = effectiveDate;
}
public Date getExpirationDate() {
return expirationDate;
}
public void setExpirationDate(Date expirationDate) {
setChange("expirationDate", this.expirationDate, expirationDate);
this.expirationDate = expirationDate;
}
public Set<CUSTOMCRMDORentalTypeProduct> getAllowedProducts() {
return allowedProducts;
}
public void setAllowedProducts(Set<CUSTOMCRMDORentalTypeProduct> allowedProducts) {
setChange("allowedProducts", this.allowedProducts, allowedProducts);
this.allowedProducts = allowedProducts;
}
@Override
public Set<CRMDOControlSelectOrganisationalUnit> getOrganisationalUnits() {
return organisationalUnits;
}
@Override
public void setOrganisationalUnits(Set<CRMDOControlSelectOrganisationalUnit> organisationalUnits) {
setChange("organisationalUnits", this.organisationalUnits, organisationalUnits);
this.organisationalUnits = organisationalUnits;
}
}
2. Data Entry Page
In entities metadata file:
- <csrexcluded> tag's value must be set to false. Keep in mind that <csrexcluded> default value is false, so in such cases, it can be omitted.
- <typeentityid>, <statusentityid> and <stateentityid> tags must be defined whenever a type, status and/or state entity exist.
In fields metadata file, <csrexcluded> tag's value must be set to false for the fields that you want to be available for monitoring. Keep in mind that <csrexcluded> default value is false, so in such cases, it can be omitted.
In modules metadata file, define all the processes, common and additional, and printouts you want to be available for conditional security restriction under any feature of your entity's module.