i

Please enable JavaScript to view this site.

Documentation 8.7

The model class contains the properties with its getters and setters, while the service class contains the operation to be performed with the model.

Model Class Content

 

A user's model contains:

 

Model constructor.

Getters and setters of its attributes.

 

Getters to get the organizational unit attributes

 

The model class of a case contains a set of getters for the organizational unit attributes.

 

 

Operation

Description

Parameters

getDisplayName()

Gets the descriptive name of the organizational unit.


getName()

Gets the name of the organizational unit.


getManager()

Gets the manager user of the organizational unit.


getSuperiorOrganizationalUnit()

Gets the superior organizational unit of the organizational unit.


getDescription()

Gets the description of the organizational unit.


getEmail()

Gets the email of the organizational unit.


getCalendar()

Gets the calendar of the organizational unit.


getManagerCanReadPrivateData()

Returns true if the organizational unit manager has permission to read private data, false otherwise.


getManagerCanUpdatePrivateData()

 

 

Returns true if the organizational unit manager has permission to update private data, false otherwise.


getManagerCanDeletePrivateData()

 

 

Returns true if the organizational unit manager has permission to delete private data, false otherwise.


getUserCanReadPrivateData()

Returns true if the organizational unit users have permission to read private data, false otherwise.


getUserCanUpdatePrivateData()

Returns true if the organizational unit users have permission to update private data, false otherwise.


getUserCanDeletePrivateData()

Returns true if the organizational unit users have permission to delete private data, false otherwise.


Service Class Content

 

The service allows the following operations to be performed:

 

 

Operation

Description

Parameter

read(orgUnit)

Reads an instance.

User OrgUnit: Code of the organizational unit to read

Example of Use

 

The Deyel organizational unit object is used. It contains the use of the “OrganizationalUnit” model class and the “OrganizationalUnitService” service class.

 

1.Service creation

 

This service is created only once in the rule and is reused in different operations.

 

 

OrganizationalUnitService organizationalUnitService = new OrganizationalUnitService(getApiClient());

 

 

 

2.Reading of the organizational unit

 

This example retrieves the manager property value of an organizational unit identified with the "000000008' code, using the read method (organizationalUnit) of the "OrganizationalUnitService" service class. The manager property value is obtained through the corresponding getter of the "OrganizationalUnit" model class.

 

 

OrganizationalUnit organizationalUnit = new OrganizationalUnit();

organizationalUnit.setOrganizationalUnit("0000000008");

OrganizationalUnit xOrganizationalUnitReaded = organizationalUnitService.read(organizationalUnit); log("Manager: " + organizationalUnitReaded.getManager());

 

 

Send us your comments
Share on X Share on Linkedin Send by Email Print