JobPackagingController

JobPackagingController

The JobPackaingController presents the page that allows users to define how a Job's files should be packaged.

Constructor

new JobPackagingController(params)

Parameters:
Name Type Description
params URLSearchParams

The URL search params parsed from the URL used to reach this page. This should contain at least the Job Id.

Properties
Name Type Description
id string

The id of the Job being worked on. Job.id is a UUID string.

Source:

Methods

_parseJobPackagingForm()

This parses form input from the user and assigns the values to the Job's PackageOperation.

Source:

_renderPackagingForm()

This renders the form that allows users to choose how this job's files should be packaged.

Source:

_updatePackaging(withValidation)

This saves changes to the Job's PackageOperation, optionally validating those changes first. If the withValidation parameter is true and the changes are not valid, this will not save the changes.

Parameters:
Name Type Description
withValidation boolean

If this is true, this method will validate the user's changes before trying to save them, and it will not save invalid changes. If false, this saves the users changes without validating them.

Source:

back()

This handles the click on the Back button, sending the user back to the Job files page.

Source:

next()

This handles the Next button click, sending the user forward to the Job metadata page if the the Job includes a bagging step. If the Job does not include bagging, this sends the user ahead to the Job upload page.

Source:

onFormatChange()

This function shows or hides a list of BagIt profiles, based on whether this job includes a bagging step. For jobs that include bagging, the user must speficy a BagIt profile.

Source:

onPackageNameKeyUp()

Returns a function that sets the output path to a sane value when the user changes the package name. The bag will be written to this output path.

Source:

onProfileChange()

This function loads a BagIt profile when the user selects one from the list.

Source:

onSerializationChange()

This fires when the serialization select list option changes. It sets the file extension of the output path to match the selected serialization option.

Source:

postRenderCallback()

The postRenderCallback attaches event handlers to elements that this controller has just rendered.

Source:

show()

This displays a form where users can choose how this Job's files should be packaged.

Source:

updateSerializationOptions()

This updates the options in the serialization list based on the allowed serialization values in the selected BagIt profile.

Source: