This section contains the design document for a sample UCX component.
This is the design of a Sample component to demonstrate the development of UCX components.
This component allows you to get information about the company and employees of the company. Following NSP script illustrates the use of the component
<% Set Camp = CreateObject(“UCX:COMPANY”) Response.write Comp.Name Set Amps = Comp.Employees Set Emp = Emps.item(5) ’Display the details of 5th employee Response.write Emp Response.write Emp.id ’Display all employees For each Emp in Emps Response.write Emp.name Next %>
text goes here
This is the top-level object. This stores the information about company and allows to access employees of the company.
The following are the department related constants.
ENGG - 1
HR - 2
ADMIN - 3
Allows to manage and reference Employee objects.
|
Method Name |
Parameter |
Return Value |
|---|---|---|
|
Item (Variant Index) This is the Default method for collections. |
Index - The specified index of the employee object which is to be retrieved. |
EMPLOYEE. Returns the Employee object if the specified employee is in the collection else returns NULL. |
|
HasMoreElements () |
None. |
Boolean. Returns TRUE if there are any more elements in the collection else returns FALSE. |
|
Next () |
None. |
EMPLOYEE. Returns the next Employee object from the collection else returns NULL. |
|
Reset () |
None. |
Void. |
NOTE:: HasMoreElements, Next and Reset method are implemented because FOREACHNEXT function internally uses these methods.
text goes here
Name of the NLM: COMPANY.nlm
This NLM registers following UCX classes:
UCX:Company
UCX:Employees
UCX:Employee
This section includes any generic information such as error messages related to the component.