@DomainNode
@Authorization(name = "READ", allowFromRelated = ["trackable"])
@Authorization(name = "MANAGE_ARTEFACTS", allowFromRelated = ["trackable"])
class Artefact(createdAt: OffsetDateTime, lastModifiedAt: OffsetDateTime, val templatedFields: MutableMap<String, String>, var file: URI, var from: Int?, var to: Int?, var version: String?) : AuditedNode, MutableTemplatedNode

An Artefact referencing a file defined via a URL. Can optionally specify a line range (from - to), and a version. Is part of exactly one Trackable. Can be referenced by Comments and Issues. Artefacts are synced to all IMSProjects of the Trackable they are part of. READ is granted if READ is granted on `trackable`.

Constructors

Link copied to clipboard
constructor(createdAt: OffsetDateTime, lastModifiedAt: OffsetDateTime, templatedFields: MutableMap<String, String>, file: URI, from: Int?, to: Int?, version: String?)

Properties

Link copied to clipboard
@FilterProperty
@OrderProperty
val createdAt: OffsetDateTime

The DateTime this entity was created at.

Link copied to clipboard
@NodeRelationship(type = "CREATED_BY", direction = Direction.OUTGOING)
@FilterProperty
val createdBy: LazyLoadingDelegate<User, NodePropertyDelegate.NodeProperty>

The User who created this entity.

Link copied to clipboard
internal var fieldCache: MutableMap<String, Any?>
Link copied to clipboard
@FilterProperty
@OrderProperty
var file: URI

A URL to the file this Artefact references

Link copied to clipboard
@FilterProperty
@OrderProperty
var from: Int?

If present, the first line of the file this Artefact references, inclusive

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
Link copied to clipboard
internal var isSaved: Boolean
Link copied to clipboard
@NodeRelationship(type = "ARTEFACT", direction = Direction.INCOMING)
@FilterProperty
val issues: LazyLoadingDelegate<Issue, NodeSetPropertyDelegate.NodeSetProperty>

Issues which currently have this Artefact.

Link copied to clipboard
@FilterProperty
@OrderProperty
var lastModifiedAt: OffsetDateTime

The DateTime this entity was last modified at.

Link copied to clipboard
@NodeRelationship(type = "LAST_MODIFIED_BY", direction = Direction.OUTGOING)
@FilterProperty
val lastModifiedBy: LazyLoadingDelegate<User, NodePropertyDelegate.NodeProperty>

The User who last modified this entity.

Link copied to clipboard
@ConvertWith(converter = LazyLoadingContextConverter::class)
internal var lazyLoadingContext: LazyLoadingContext?
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
internal val propertyLookup: MutableMap<String, PropertyDelegate<*>>
Link copied to clipboard
Link copied to clipboard
@NodeRelationship(type = "REFERENCED_ARTEFACT", direction = Direction.INCOMING)
@FilterProperty
val referencingComments: LazyLoadingDelegate<IssueComment, NodeSetPropertyDelegate.NodeSetProperty>

IssueComments which currently reference this Artefact.

Link copied to clipboard
@NodeRelationship(type = "USED_IN", direction = Direction.INCOMING)
@FilterProperty
open override val template: LazyLoadingDelegate<ArtefactTemplate, 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
@FilterProperty
@OrderProperty
var to: Int?

If present, the last line of the file this Artefact references, inclusive

Link copied to clipboard
@NodeRelationship(type = "ARTEFACT", direction = Direction.INCOMING)
@FilterProperty
val trackable: LazyLoadingDelegate<Trackable, NodePropertyDelegate.NodeProperty>

The Trackable this Artefact is part of.

Link copied to clipboard
@FilterProperty
@OrderProperty
var version: String?

If present, the current version of this Artefact

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