NodeActionsMixin Class
Controller mixin that implements common actions performed on nodes.
Item Index
Methods
Properties
Methods
_affiliateNode
-
node -
institution
Helper method that affiliates an institution with a node.
Returns:
Returns a promise that resolves to the updated node with the newly created institution relationship
addChild
-
title -
description -
category
Add a child (component) to a node.
Parameters:
Returns:
Returns a promise that resolves to the newly created child node.
addContributor
-
userId -
permission -
isBibliographic -
sendEmail
Add a contributor to a node
Parameters:
-
userIdStringID of user that will be a contributor on the node
-
permissionStringUser permission level. One of "read", "write", or "admin". Default: "write".
-
isBibliographicBooleanWhether user will be included in citations for the node. "default: true"
-
sendEmailBooleanWhether user will receive an email when added. "default: true"
Returns:
Returns a promise that resolves to the newly created contributor object.
addContributors
-
contributors -
sendEmail
Bulk add contributors to a node
Parameters:
Returns:
Returns a promise that resolves to an array of added contributors
addNodeLink
-
targetNodeId
Adds a relationship to another node, called a linkedNode.
Parameters:
-
targetNodeIdStringID of the node for which you wish to create a link
Returns:
Returns a promise that resolves to the newly updated node
affiliateNode
-
institutionId
Affiliate a node with an institution
Parameters:
-
institutionIdStringID of the institutution to be affiliated
Returns:
Returns a promise that resolves to the updated node with the newly affiliated institution relationship
deleteNode
()
Promise
Delete a node
Returns:
Returns a promise that resolves after the deletion of the node.
removeContributor
-
contributor
Remove a contributor from a node
Parameters:
-
contributorObjectContributor relationship that will be removed from node
Returns:
Returns a promise that will resolve upon contributor deletion. User itself will not be removed.
removeNodeLink
-
linkedNode
Removes the linkedNode relationship to another node. Does not remove the linked node itself.
Parameters:
-
linkedNodeObjectlinkedNode relationship to be destroyed.
Returns:
Returns a promise that resolves to the newly updated node
reorderContributors
-
contributor -
newIndex -
contributors
Reorder contributors on a node, and manually updates store.
Parameters:
Returns:
Returns a promise that resolves to the updated contributor.
unaffiliateNode
-
institution
Unaffiliate a node with an institution
Parameters:
-
institutionObjectInstitution relationship to be removed from node
Returns:
Returns a promise that resolves to the updated node with the affiliated institution relationship removed.
updateContributor
-
contributor -
permissions -
bibliographic
Update contributors of a node. Makes a bulk request to the APIv2.
Parameters:
-
contributorContributorrelationship on the node.
-
permissionsStringdesired permissions.
-
bibliographicBooleandesired bibliographic statuses
Returns:
Returns a promise that resolves to the updated node with edited contributor relationships.
updateContributors
-
contributors -
permissionsChanges -
bibliographicChanges
Update contributors of a node. Makes a bulk request to the APIv2.
Parameters:
-
contributorsContributor[]Contributor relationships on the node.
-
permissionsChangesObjectDictionary mapping contributor ids to desired permissions.
-
bibliographicChangesObjectDictionary mapping contributor ids to desired bibliographic statuses
Returns:
Returns a promise that resolves to the updated node with edited contributor relationships.
