Understanding Component Interfaces

This chapter provides an overview of component interfaces and discusses:

Click to jump to parent topicUnderstanding Component Interfaces

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 application with another 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 for the same component. You create component interfaces in PeopleSoft Application Designer. Record fields on the component are mapped to the keys and properties of the component interface. Methods are used to find, create, modify, or delete data.

Click to jump to parent topicComponent Interface Architecture

The component interface architecture comprises three fundamental elements—components, component interfaces, and the component interface API.

Every component interface has the following main attributes:

Note. In most cases, component interfaces act 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

Click to jump to parent topicComponent Interface Attributes

This section discusses the name, keys, properties, collections, and methods of component interfaces.

Click to jump to top of pageClick to jump to parent topicName

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.

Click to jump to top of pageClick to jump to parent topicKeys

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 are created for components that have the Add action enabled.

Click to jump to top of pageClick to jump to parent topicProperties

Properties provide access to both component data and component interface settings. Component interfaces include two types of properties: standard and user-defined.

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.

Click to jump to top of pageClick to jump to parent topicCollections

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.

Click to jump to top of pageClick to jump to parent topicMethods

A method is a function that performs a specific task on a component interface at runtime. As with component interface properties, two main types of methods are available: 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.

Click to jump to parent topicComponent Interface Definitions and Views

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 example shows the component and component interface view in PeopleSoft Application Designer.

Component and component interface views in PeopleSoft Application Designer

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

This table lists the component interface view icons:

Component interface.

 

Group of keys.

Property that is a key field from the underlying record.

Alternate search key.

Group of properties or methods.

Collection.

Property or user-defined method.

Standard method.

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.

Name

Name of a specific element of a component interface (such as the name of a property or method). The default name for field properties is the field name. The default name for collections is the primary record name.

Record

Name of the underlying record on which a specific element is based. If the underlying record name changes, the component interface continues to point to the appropriate record.

Field

Name of the field to which a component interface property points. Like the record name, the underlying field name can change, and the component interface continues to point to the appropriate field.

Read Only

Y in this column indicates that a specific property has been marked read-only.

Comment

Identifies comments that exist in the Edit Property dialog box for the selected key, property, or collection.

Note. In the component interface view, properties appear in the same order as they appear in the component and are not sorted alphabetically.