Sun Java System Portal Server 7 Developer's Guide

Submitting a Request

When this input is processed by rdmgr, it will result in the attributes of the RD shown being updated to the database and indexed. The rdmgr utility supports other types of requests too.


Example 27–1 rdmgr Submit


// submit header fields
String SUBMIT_CSID = "submit-csid";
String SUBMIT_TYPE = "submit-type";
String SUBMIT_OPER = "submit-operation";
String SUBMIT_VIEW = "submit-view";
String SUBMIT_DB = "submit-database";
String SUBMIT_MESSAGE = "message";
String SUBMIT_ERROR = "error";
// submit operations
String SUBMIT_RETRIEVE = "retrieve";
String SUBMIT_INSERT = "insert";
String SUBMIT_DELETE = "delete";
String SUBMIT_UPDATE = "update";
// submit types
String SUBMIT_PERSISTENT = "persistent";
String SUBMIT_NONPERSISTENT = "nonpersistent";
String SUBMIT_MERGED = "merged";

Submit Operations

The submit operations are as follows:

retrieve

Retrieves the requested fields (the submit view) for the requested RDs. In this case the data is a list of RDs that can be specified by their URLs only. The server will return the requested fields for these RDs.

insert

The server adds or replaces the RDs supplied to the database.

delete

The server deletes the RDs. As with retrieve, it is sufficient to list the RDs by URL alone, it is not necessary to supply values for the fields of the RDs.

update

The server modifies the RDs in the database by merging any existing fields with the fields supplied in the data. If an attribute view list is supplied, only those attributes will be updated. If a view is not supplied, all of the given input attributes will be updated for each RD.

Submit Types

The submit types are as follow:

persistent

The operation is applied to the persistent part of each RD in the database. When an RD is retrieved from the database, or indexed, any persistent fields take precedence over non persistent fields. This allows you to manually edit the fields of an RD without having to worry that your edits will be lost the next time the RD is submitted by the robot, for example.

non-persistent

This is the default type. Data is normally added as non-persistent data. Note that RDs are only indexed and searchable if they have a non-empty non-persistent component.

merged

This is the default for retrieval. When data is retrieved, the persistent and non-persistent fields are merged together, with the persistent fields taking precedence over the non-persistent fields. You can view this as the persistent fields ”covering’ the non-persistent fields. You can also retrieve just the ”persistent’ fields, or just the ”non persistent’ fields.