@DomainNode(topLevelQueryName = "components", searchQueryName = "searchComponents")
@Authorization(name = "READ", allowFromRelated = ["versions"])
@Authorization(name = "RELATE_FROM_COMPONENT", allow = [Rule(beanRef = "relatedToNodePermissionRule", options = ["ADMIN"])])
@Authorization(name = "ADD_TO_PROJECTS", allow = [Rule(beanRef = "relatedToNodePermissionRule", options = ["ADMIN"])])
class Component(name: String, description: String, repositoryURL: URI?, val templatedFields: MutableMap<String, String>) : Trackable, MutableTemplatedNode, NodeWithPermissions<ComponentPermission>

Entity which represents a software component, e.g. a library, a microservice, or a deployment platform, .... The type of software component is defined by the template. Can have issues, labels and artefacts as this is a Trackable. Defines InterfaceSpecifications, but visible/invisible InterfaceSpecificationVersions depend on the ComponentVersion. Can be affected by Issues. READ is granted via an associated ComponentPermission or if READ is granted on any Project including any ComponentVersion in `versions` of this Component.

Constructors

Link copied to clipboard
constructor(name: String, description: String, repositoryURL: URI?, templatedFields: MutableMap<String, String>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
@NodeRelationship(type = "AFFECTS", direction = Direction.INCOMING)
@FilterProperty
val affectingIssues: LazyLoadingDelegate<Issue, NodeSetPropertyDelegate.NodeSetProperty>

The issues which affect this entity

Link copied to clipboard
@NodeRelationship(type = "ARTEFACT", direction = Direction.OUTGOING)
@FilterProperty
val artefacts: LazyLoadingDelegate<Artefact, NodeSetPropertyDelegate.NodeSetProperty>

Artefacts of this trackable, typically some kind of file.

Link copied to clipboard
@FilterProperty
@SearchProperty
open override var description: String

The description of this entity.

Link copied to clipboard
internal var fieldCache: MutableMap<String, Any?>
Link copied to clipboard
val graphQLId: ID

The unique id of this node

Link copied to clipboard
@Id
@GeneratedValue(generatorRef = "nodeIdGenerator")
internal var id: String?
Link copied to clipboard
@NodeRelationship(type = "COMPONENT", direction = Direction.INCOMING)
@FilterProperty
val interfaceSpecifications: LazyLoadingDelegate<InterfaceSpecification, NodeSetPropertyDelegate.NodeSetProperty>

List of interfaces this component specifies. Note that visible/invisible InterfaceSpecifications are defined by a specific version of this component

Link copied to clipboard
Link copied to clipboard
internal var isSaved: Boolean
Link copied to clipboard
@NodeRelationship(type = "ISSUE", direction = Direction.OUTGOING)
@FilterProperty
val issues: LazyLoadingDelegate<Issue, NodeSetPropertyDelegate.NodeSetProperty>

The set of Issues which are part of this Trackable. An Issue has to be part of a Trackable to use the Labels and Artefacts defined by the Trackable.

Link copied to clipboard
@NodeRelationship(type = "LABEL", direction = Direction.OUTGOING)
@FilterProperty
val labels: LazyLoadingDelegate<Label, NodeSetPropertyDelegate.NodeSetProperty>

The set of Labels which can be added to issues of this trackable.

Link copied to clipboard
@ConvertWith(converter = LazyLoadingContextConverter::class)
internal var lazyLoadingContext: LazyLoadingContext?
Link copied to clipboard
@FilterProperty
@OrderProperty
@SearchProperty
open override var name: String

The name of this entity.

Link copied to clipboard
@Version
private var nodeVersion: Long

Version used for optimistic locking

Link copied to clipboard
internal var orderFields: MutableMap<String, Any?>?
Link copied to clipboard
@NodeRelationship(type = "NODE", direction = Direction.INCOMING)
@FilterProperty
open override val permissions: LazyLoadingDelegate<ComponentPermission, NodeSetPropertyDelegate.NodeSetProperty>

Permissions associated with the NodeWithPermissions

Link copied to clipboard
@NodeRelationship(type = "PINNED_ON", direction = Direction.INCOMING)
@FilterProperty
val pinnedIssues: LazyLoadingDelegate<Issue, NodeSetPropertyDelegate.NodeSetProperty>

Issues which are pinned to this trackable, subset of `issues`.

Link copied to clipboard
internal val propertyLookup: MutableMap<String, PropertyDelegate<*>>
Link copied to clipboard
Link copied to clipboard
@FilterProperty
var repositoryURL: URI?

If existing, the URL of the repository (e.g. a GitHub repository).

Link copied to clipboard
@NodeRelationship(type = "SYNCS_TO", direction = Direction.OUTGOING)
@FilterProperty
val syncsTo: LazyLoadingDelegate<IMSProject, NodeSetPropertyDelegate.NodeSetProperty>

IMSProjects this Trackable is synced to and from.

Link copied to clipboard
@NodeRelationship(type = "USED_IN", direction = Direction.INCOMING)
@FilterProperty
@OrderProperty
open override val template: LazyLoadingDelegate<ComponentTemplate, NodePropertyDelegate.NodeProperty>

Template associated with the TemplatedNode

Link copied to clipboard

The values for all templated fields. The schema is defined by the Template of this node

Link copied to clipboard
@NodeRelationship(type = "VERSION", direction = Direction.OUTGOING)
@FilterProperty
val versions: LazyLoadingDelegate<ComponentVersion, NodeSetPropertyDelegate.NodeSetProperty>

Versions of this components.

Functions

Link copied to clipboard
operator override fun equals(other: Any?): Boolean
Link copied to clipboard
internal suspend fun getFromGraphQL(@Autowired nodeQueryParser: NodeQueryParser, dataFetchingEnvironment: DataFetchingEnvironment): Any?
Link copied to clipboard
internal fun <T : PropertyDelegate<*>> getProperty(property: KProperty1<*, *>): T
Link copied to clipboard

Dummy function to avoid GraphQL kotlin optimization weirdness

Link copied to clipboard
override fun hashCode(): Int
Link copied to clipboard
internal suspend fun <T : Node?> loadNodesOfRelationship(property: KProperty1<*, *>, loader: LazyLoadingSubqueryGenerator<T>.() -> Unit?)
Link copied to clipboard
protected fun <T : Node?> NodeProperty(): PropertyDelegateProvider<Node, NodePropertyDelegate<T>>
Link copied to clipboard
protected fun <T : Node> NodeSetProperty(): PropertyDelegateProvider<Node, NodeSetPropertyDelegate<T>>
Link copied to clipboard
internal fun registerQueryResult(entry: NodeQueryEntry<*>, queryResult: Any?)
Link copied to clipboard
open fun templatedField(name: String, @Autowired objectMapper: ObjectMapper): JsonNode?

Value of a field defined by the template. Error if such a field is not defined.

Link copied to clipboard
open fun templatedFields(names: List<String>?, prefixMatching: Boolean?, @Autowired objectMapper: ObjectMapper): List<JSONField>

All templatedFields If `names` is provided, only those matching the name. If `prefixMatching` is true, matching is done by prefix, otherwise by full name.

Link copied to clipboard
open override fun toString(): String