Skip to end of banner
Go to start of banner

Create a Controlled Selection Access Entity

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 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:

  1. Implement ICRMDOControlledSelectableEntity interface and its two methods: 
    1. getOrganisationalUnits()
    2. setOrganisationalUnits(Set<CRMDOControlSelectOrganisationalUnit> organisationalUnits)
  2. Define organisationalUnits set.
CUSTOMCRMDORentalType
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

a. Definition File

Data entry page definition file must include a component with a single drilldown element having tabAllowedUnits as its <tabid>. tabAllowedUnits is the tabid of the generic component that will be used in this case.

type.xml
...
<main>
	...
	<component>
		<id>cmpAllowedOrganisationalUnitsDrilldown</id>
		<name>key_allowed_organisational_units</name>
		<elements>
			<drilldown>
				<id>ddAllowedOrganisationalUnits</id>
				<tabid>tabAllowedUnits</tabid>
			</drilldown>
		</elements>
	</component>
	...
</main>
...

b. Layout File

Data entry page layout file must include

  1. The component defined in data entry definition page including the allowed organisational units drilldown element.
  2. The allowed organisational units tab definition in the details section, which is implemented as a generic component.
typelayout.xml
<page>
	...
	<sections>
		...
		<section>
			<id>secAllowedProducts</id>
			<name>key_allowed_products</name>
			<disable>false</disable>
			<left>
				<components>
					<component><id>cmpAllowedProductsDrilldown</id></component>
				</components>
			</left>
		</section>
		...
	</sections>
	<details>
		<tabs>
			<tab>
				<id>file:networkmanagement/allowedOrgUnits.xml</id>
				<disable>true</disable>
				<preload>true</preload>
				<showheader>false</showheader>
				<components>
					<component><id>cmpSelect</id></component>
					<component><id>cmpCommunity</id></component>
					<component><id>cmpGroup</id></component>
					<component><id>cmpUnit</id></component>
				</components>
			</tab>
			...
		</tabs>
	</details>
</page>
  • No labels