<abstract> new (require("nmodule/export/rc/ExportDestinationType"))()
Methods
-
checkValid()
-
Throws:
-
if this destination is not valid in the current environment
- Type
- Error
-
-
getDestinationConfig(transformOp)
-
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.Parameters:
Name Type Description transformOpmodule: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)
-
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.Parameters:
Name Type Description configbaja.Component The destination config component as edited by the user
Returns:
the context object
- Type
- object | Promise.<object>
-
<abstract> getDisplayName()
-
Returns:
display name for the destination
- Type
- string
-
prepare(transformOp, cx)
-
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.Parameters:
Name Type Description transformOpmodule:nmodule/export/rc/TransformOperation the transform operation
cxobject the export context
Returns:
return or resolve
trueto indicate
that the transform should proceed. Returnfalseto 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)
-
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().Parameters:
Name Type Description transformOpmodule:nmodule/export/rc/TransformOperation the transform operation
cxobject the export context
Returns:
- Type
- Promise | *