private suspend fun updateInterfaceSpecificationOnComponentVersion(authorizationContext: GropiusAuthorizationContext, componentVersion: ComponentVersion, interfaceSpecificationId: ID, updateFunction: suspend (Component, InterfaceSpecificationVersion) -> Any)
Helper function for addInterfaceSpecificationToComponentVersion and removeInterfaceSpecificationFromComponentVersion Validates the user has ADMIN permission on the ComponentVersion Validates that the ComponentVersion is part of the same Component as the InterfaceSpecificationVersion Creates a ComponentGraphUpdater and calls updateFunction with it Saves the updatedNodes and deletes the deletedNodes
Parameters
authorizationContext
used to check for the required permission
componentVersion
the ComponentVersion to update
interfaceSpecificationId
the id of the InterfaceSpecificationVersion to pass to updateFunction
updateFunction
called with the InterfaceSpecificationVersion