ExportQuestion

ExportQuestion

ExportQuestion is a question added to ExportSettings. Whoever imports the settings answers the question, and DART copies their response to the appropriate object.

Constructor

new ExportQuestion(opts)

Creates a new ExportQuestion

Parameters:
Name Type Description
opts object

Object containing properties to set.

Properties
Name Type Description
prompt string

The text of the question.

objType string

The type of object to which DART should copy the user's response. (Localized versions of "App Setting", "BagIt Profile", "Remote Repository" or "Storage Service").

objId string

The id of the object to which DART should copy the response.

field string

The name of the field to which DART should copy the response.

Source:

Methods

(static) listNameFor() → {string}

Returns the list name (property name) for the specified type. For example, listNameFor('AppSetting') returns 'appSettings', which is the name of the property on this object that lists AppSettings selected for export.

Source:

copyResponseToObject()

This copies the user's response to a field of some existing setting (AppSetting, BagItProfile, RemoteRepository or StorageService) and saves the updated setting.

Source:

getTargetClass()

Returns the class to which this question pertains. The returned class will be one of AppSetting, BagItProfile, RemoteRepository, StorageService or null. If null, something is wrong with the question.

Source:

tryToGetValue() → {string}

Try to get the existing value for the object/field this question refers to, so we can pre-populate the answer.

Source: