Constructor
(abstract) new (require("nmodule/export/rc/ExportDestinationType"))()
- Source:
Methods
checkValid()
- Source:
Throws:
-
if this destination is not valid in the current environment
- Type
- Error
getDestinationConfig(transformOp) → {baja.Component|Promise.<(baja.Component|undefined)>|undefined}
- Description:
When invoking a transform operation using the Export Dialog, options can
be provided by the user to configure how to send the transformed data to
its destination.If this destination should provide user-configurable options, override
this function to provide them in the form of aComponent. This
Componentwill be shown to the user in a Property Sheet for
configuration.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
transformOp |
module:nmodule/export/rc/TransformOperation | The transform operation this destination type is a target for |
Returns:
The destination config object.
- Type
- baja.Component | Promise.<(baja.Component|undefined)> | undefined
getDestinationContextObject(config) → {object|Promise.<object>}
- Description:
When the user invokes the transform, the
Componentas edited by the
user will need to be converted to a context object to be used in the
transform()method. This function provides a hook to perform extra
processing during that conversion.By default, will return a simple mapping of the
Component's slot names
to their values.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
config |
baja.Component | The destination config component as edited by the user |
Returns:
the context object
- Type
- object | Promise.<object>
(abstract) getDisplayName() → {string}
- Source:
Returns:
display name for the destination
- Type
- string
prepare(transformOp, cx) → {Promise.<boolean>|boolean}
- Description:
Perform any necessary preparation before the actual transform. This is a
hook for things like user prompts ("do you want to overwrite this file?",
etc). By default, simply returns true.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
transformOp |
module:nmodule/export/rc/TransformOperation | the transform operation |
cx |
object | the export context |
Returns:
return or resolve true to indicate
that the transform should proceed. Return false to indicate that the
transform was canceled (either by the user, or conditions simply do not
support this transform/destination). Throw or reject only in case of an
unexpected error condition.
- Type
- Promise.<boolean> | boolean
(abstract) transform(transformOp, cx) → {Promise|*}
- Description:
Perform the entire transformation operation: execute the transform
to obtain the transformed data, and send that data to this destination.Important note: this method should not require any user interaction.
It should only be data-in to data-out. Any user prompts should be
completed inprepare().
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
transformOp |
module:nmodule/export/rc/TransformOperation | the transform operation |
cx |
object | the export context |
Returns:
- Type
- Promise | *