This chapter discusses:
Component interface architecture.
Component interface concepts, such as names and properties.
Component interface definition in PeopleSoft Application Designer.
A component interface enables exposure of a PeopleSoft component (a set of pages grouped together for a business purpose) for synchronous access from another application (such as PeopleCode, Java, C/C++, COM, or XML). Component interfaces can be viewed as "black boxes" that encapsulate PeopleSoft data and business processes, and hide the details of the underlying page and data. Component interfaces can be used to integrate one PeopleSoft application with another PeopleSoft application or with external systems. Component interfaces execute the business logic built into the component and as a result, they provide a higher level of data validation than a simple SQL insert.
A component interface maps to one, and only one, PeopleSoft component. However, you can create multiple component interfaces on top of the same component. You create component interfaces in PeopleSoft Application Designer. Record fields on the PeopleSoft component are mapped to the keys and properties of the component interface. Methods are used to find, create, modify or delete data.
The component interface architecture comprises three fundamental elements—components, component interfaces, and the component interface API.
Every component interface has the following main attributes:
Name
Keys (get keys, create keys, and find keys)
Properties and collections (fields and records)
Methods
Note. In most cases, component interfaces behave like their associated components meaning that PeopleCode events typically trigger in the same order as the component. However, several runtime exceptions relate to component interfaces and PeopleCode processing and search dialog box processing.
See Also
PeopleCode and the Component Processor
This section discusses the name, keys, properties, collections, and methods of component interfaces.
Each component interface requires a unique name that is specified when the component interface is created. The calling programs use the name of the component interface to access properties and methods.
Keys are special properties containing values that retrieve an instance (get keys) or a list of instances (find keys) of the component interface. When you create a new component interface, get and find keys are created based on the search record definition for the underlying component. However, you can add, remove, or change keys in PeopleSoft Application Designer. Create keys get created for components that have the Add action enabled.
Properties provide access to both component data and component interface settings. Component interfaces include two types of properties: standard and user-defined.
Standard properties are assigned automatically when a component interface is created.
Standard properties can be set to true or false. These properties are not displayed in the PeopleSoft Application Designer. Examples of standard properties include InteractiveMode, GetHistoryItems, and EditHistoryItems.
User-defined properties map to record fields on the PeopleSoft component and are displayed in the PeopleSoft Application Designer.
A property can correspond to a field or a scroll (collection). You have control over which user-defined properties are included on the component interface.
Note. Every PeopleSoft Application Designer definition—including the component interface—has a definition properties dialog box in which you make design-time settings for the definition. Those properties should not be confused with the runtime properties that are discussed here.
A component interface collection is a special type of property that corresponds to a scroll. It contains fields and subordinate scrolls as defined in its underlying component. By default, each collection uses the name of the primary record for the underlying scroll.
A method is a function that performs a specific task on a component interface at runtime. As with component interface properties, there are two main types of methods: standard and user-defined. For example, you can use methods to save or create a new purchase order. Runtime access to each method is determined by the security that you have for that specific method.
Standard methods are those that are available for all component interfaces.
The Find, Get, Save, and Cancel methods are automatically generated by PeopleSoft Application Designer when a new component interface is created. The Create method gets created for components that have the Add action enabled. In the component interface designer, standard methods are highlighted in gray.
User-defined methods are created in PeopleSoft Application Designer to provide added functionality to the component interface.
These methods are functions that are made accessible through the component interface. Each function maps to a user-defined method. In the component interface designer, user-defined methods are highlighted in blue.
You create, modify, and review your component interface definition by using PeopleSoft Application Designer. You open the component interface definition just as you would any other definition, such as a page or record.
When working with a component interface definition in PeopleSoft Application Designer, you see the component view on the left and the component interface view on the right.
This screen shot shows the component and component interface view in PeopleSoft Application Designer.
Component and component interface views
The component view shows records and scrolls in the component, using a tree representation. The structure is the same as the one you see on the structure tab of a component in PeopleSoft Application Designer. Drag the fields and collections that you want exposed to the component interface view.
The component interface view shows the exposed keys, properties, and methods, using a tree representation. When you open a component interface, properties are displayed in the order in which they appear in the component view.
The tree nodes in both the component view and the component interface view have different icons. Some icons are used in both the component view and the component interface view with slightly different meanings. The following tables explain the meaning of each icon and column in the component interface view.
Component Interface View Icons
Following is a list of the component interface view icons:
|
Component interface. |
|
|
|
|
|
|
|
Group of properties or methods. |
|
|
|
|
|
|
Property that is a required field for the underlying record. |
|
Item in a component interface that is no longer in sync with the underlying component. For example, if a field on which a property depends is deleted from the component, this icon appears. |
Component Interface View Columns
The following terms describe the columns in the component interface view.
Note. In the component interface view, properties appear in the same order as they appear in the component and are not sorted alphabetically.