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:
-
userId
StringID of user that will be a contributor on the node
-
permission
StringUser permission level. One of "read", "write", or "admin". Default: "write".
-
isBibliographic
BooleanWhether user will be included in citations for the node. "default: true"
-
sendEmail
BooleanWhether 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:
-
targetNodeId
StringID 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:
-
institutionId
StringID 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:
-
contributor
ObjectContributor 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:
-
linkedNode
ObjectlinkedNode 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:
-
institution
ObjectInstitution 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:
-
contributor
Contributorrelationship on the node.
-
permissions
Stringdesired permissions.
-
bibliographic
Booleandesired 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:
-
contributors
Contributor[]Contributor relationships on the node.
-
permissionsChanges
ObjectDictionary mapping contributor ids to desired permissions.
-
bibliographicChanges
ObjectDictionary mapping contributor ids to desired bibliographic statuses
Returns:
Returns a promise that resolves to the updated node with edited contributor relationships.