ARImport


Important

You can continue to use C APIs to customize your application, but C APIs are not enhanced to support new capabilities provided by Java APIs and REST APIs.

Description

Imports the indicated structure definitions to the specified server. Use this function to copy structure definitions from one AR System server to another (see ARExport).

Privileges

AR System administrator.

Synopsis

#include "ar.h"
#include "arerrno.h"
#include "arextern.h"
#include "arstruct.h"

int ARImport(
  ARControlStruct *control,
  ARStructItemList *structItems,
  char *importBuf,
  unsigned int importOption,
  char *objectModificationLogLabel,
  ARStatusList *status)

Input arguments

control

The control record for the operation. It contains information about the user requesting the operation, where that operation is to be performed, and which session is used to perform it. The user and server fields are required.

The runtime group specified in the control record does not affect import operations. Instead, that function uses the overlay group specified in the object property list in the imported object definition file. For information about runtime groups and the overlay group setting, see ARSetSessionConfiguration.

structItems

A list of zero or more structure items to be imported (identified by type and name).

Specify NULL for this parameter to import all structures in the import buffer.

Important

You must specify AR_STRUCT_ITEM_SCHEMA to import a form. The three partial form types defined in ar.h (AR_STRUCT_ITEM_SCHEMA_DEFN, AR_STRUCT_ITEM_SCHEMA_VIEW, and AR_STRUCT_ITEM_SCHEMA_MAIL) do not contain complete form definitions and are used only for caching purposes.

Important

When you import an overlay that has inherited properties, those properties are inherited from the copy of the origin object that is on the server. If you import the origin object with the overlay, then the overlay will inherit properties from the imported object. If not, then the overlay will inherit properties from the object already on the server.

importBuf

A buffer that contains the definition text for the items specified for the structItems parameter. This buffer can contain other structure definitions, but the system imports only the specified items.

importOption

A value that indicates whether to replace objects being imported if they already exist and how to replace them. There are two sets of import options. Always set one of the basic options to indicate whether to replace objects. Set zero or more advanced options to further configure how ARImport handles inconsistencies between the objects on the server and the object definitions in the import buffer.

Basic options:


Advanced options (add the values to enable more than one option):

objectModificationLogLabel

The version control label that the API function must apply to the object. If the label name does not exist on the server, the function creates it.

Ripple actions

Rename and Delete operations typically change multiple objects in addition to their primary target object. The Rename and Delete function must apply the version control label to all the objects that it affects.

Multiple API calls for a single user action

Some user actions trigger a sequence of API calls. In such situation, the last API call in the sequence applies the version control label to the object. Thus, clients that create forms (like Developer Studio ) should provide the label only to the last call.

For example: When a form is created, a client might issue the following calls:

  • ARCreateSchema
  • ARCreateMultipleFields
  • ARSetVUI
  • ARSetVUI
  • ARSetSchema

In this case, the objectModificationLogLabel value should be passed only to the last call, ARSetSchema, even though the user provides the label during the ARCreateSchema operation.

Operations on label-related forms

Version control labels cannot be applied to the following forms:

  • AR System Version Control: Label
  • AR System Version Control: Labeled Object
  • AR System Version Control: Object Modification Log

Return values

status

A list of zero or more notes, warnings, or errors generated from a call to this function. For a description of all possible values, see Error-checking.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*