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
|
Methods
_parseJobPackagingForm()
This parses form input from the user and assigns the values to the Job's PackageOperation.
_renderPackagingForm()
This renders the form that allows users to choose how this job's files should be packaged.
_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. |
back()
This handles the click on the Back button, sending the user back to the Job files page.
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.
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.
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.
onProfileChange()
This function loads a BagIt profile when the user selects one from the list.
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.
postRenderCallback()
The postRenderCallback attaches event handlers to elements that this controller has just rendered.
show()
This displays a form where users can choose how this Job's files should be packaged.
updateSerializationOptions()
This updates the options in the serialization list based on the allowed serialization values in the selected BagIt profile.