Service for ComponentVersions. Provides functions to create, update and delete
Parameters
the associated repository used for CRUD functionality
used to get InterfaceSpecificationVersions by id
used to save/delete any node
used to get Components by id
used to update templatedFields
Constructors
Properties
Injected, used for the checkPermission function
Injected, used to get a user based on a GropiusAuthorizationContext
Functions
Adds a InterfaceSpecificationVersion to a ComponentVersion as visible/invisible Checks the authorization status Requires that the InterfaceSpecificationVersion is part of the same Component as the ComponentVersion
Checks if the user defined by authorizationContext is a global admin
Checks if the permission is granted on node If checkPermission on the permission.context is false, no permission is evaluated Does not handle the case that the user is an admin
Creates a new ComponentVersion based on the provided input Checks the authorization status
Creates a new ComponentVersion based on the provided input on component Does not check the authorization status, does not save the created nodes Validates the input
Deletes a ComponentVersion by id Checks the authorization status
Evaluates if the permission is granted on node If checkPermission on the permission.context is false, no permission is evaluated Does not handle the case that the user is an admin
Gets a GropiusUser based on the userId from the authorizationContext
Removes a InterfaceSpecificationVersion from a ComponentVersion as visible/invisible Checks the authorization status Requires that the InterfaceSpecificationVersion is part of the same Component as the ComponentVersion
Updates a ComponentVersion based on the provided input Checks the authorization status
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