@Service
class IntraComponentDependencySpecificationService(repository: IntraComponentDependencySpecificationRepository, val componentVersionRepository: ComponentVersionRepository, val interfaceRepository: InterfaceRepository, val interfacePartRepository: InterfacePartRepository, val intraComponentDependencyParticipantRepository: IntraComponentDependencyParticipantRepository, val intraComponentDependencySpecificationTypeRepository: IntraComponentDependencySpecificationTypeRepository) : NamedNodeService<IntraComponentDependencySpecification, IntraComponentDependencySpecificationRepository>

Service for IntraComponentDependencySpecifications. Provides functions to create, update and delete

Parameters

repository

the associated repository used for CRUD functionality

componentVersionRepository

used to get ComponentVersions by id

interfaceRepository

used to get Interfaces by id

interfacePartRepository

used to get InterfaceParts by id

intraComponentDependencyParticipantRepository
intraComponentDependencySpecificationTypeRepository

Constructors

constructor(repository: IntraComponentDependencySpecificationRepository, componentVersionRepository: ComponentVersionRepository, interfaceRepository: InterfaceRepository, interfacePartRepository: InterfacePartRepository, intraComponentDependencyParticipantRepository: IntraComponentDependencyParticipantRepository, intraComponentDependencySpecificationTypeRepository: IntraComponentDependencySpecificationTypeRepository)

Properties

Functions

Link copied to clipboard
suspend fun checkIsAdmin(authorizationContext: GropiusAuthorizationContext, errorMessage: String)

Checks if the user defined by authorizationContext is a global admin

Link copied to clipboard
suspend fun checkPermission(node: Node, permission: Permission, errorMessage: String)

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

Link copied to clipboard

Creates a IntraComponentDependencyParticipant based on the provided input Does not check the authorization status Does not save the created IntraComponentDependencyParticipant

Deletes a IntraComponentDependencySpecification by id Checks the authorization status

Link copied to clipboard
suspend fun evaluatePermission(node: Node, permission: Permission): Boolean

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

Link copied to clipboard
suspend fun getUser(authorizationContext: GropiusAuthorizationContext): GropiusUser

Gets a GropiusUser based on the userId from the authorizationContext

Link copied to clipboard
private suspend fun removeParticipants(participants: NodeSetPropertyDelegate.NodeSetProperty, toRemove: Collection<ID>, propertyName: String)

Removes IntraComponentDependencyParticipant from either incoming or outgoing participants Validates that all participants to remove are actually in part of the property

Updates the incoming and outgoing participants of intraComponentDependencySpecification based on input Does not check the authorization status

Link copied to clipboard

Updates node based on input Updates name and description