Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,186 @@ class TemplateMutations : Mutation {
return templateService.createRelationTemplate(dfe.gropiusAuthorizationContext, input)
}

@GraphQLDescription("Updates an ArtefactTemplate, requires CAN_CREATE_TEMPLATES")
@AutoPayloadType("The updated ArtefactTemplate")
suspend fun updateArtefactTemplate(
@GraphQLDescription("Defines which ArtefactTemplate to update and how to update it")
input: UpdateArtefactTemplateInput,
dfe: DataFetchingEnvironment,
@GraphQLIgnore
@Autowired
templateService: ArtefactTemplateService
): ArtefactTemplate {
return templateService.updateArtefactTemplate(dfe.gropiusAuthorizationContext, input)
}

@GraphQLDescription("Updates a ComponentTemplate, requires CAN_CREATE_TEMPLATES")
@AutoPayloadType("The updated ComponentTemplate")
suspend fun updateComponentTemplate(
@GraphQLDescription("Defines which ComponentTemplate to update and how to update it")
input: UpdateComponentTemplateInput,
dfe: DataFetchingEnvironment,
@GraphQLIgnore
@Autowired
templateService: ComponentTemplateService
): ComponentTemplate {
return templateService.updateComponentTemplate(dfe.gropiusAuthorizationContext, input)
}

@GraphQLDescription("Updates an InterfaceSpecificationTemplate, requires CAN_CREATE_TEMPLATES")
@AutoPayloadType("The updated InterfaceSpecificationTemplate")
suspend fun updateInterfaceSpecificationTemplate(
@GraphQLDescription("Defines which InterfaceSpecificationTemplate to update and how to update it")
input: UpdateInterfaceSpecificationTemplateInput,
dfe: DataFetchingEnvironment,
@GraphQLIgnore
@Autowired
templateService: InterfaceSpecificationTemplateService
): InterfaceSpecificationTemplate {
return templateService.updateInterfaceSpecificationTemplate(dfe.gropiusAuthorizationContext, input)
}

@GraphQLDescription("Updates an IssueTemplate, requires CAN_CREATE_TEMPLATES")
@AutoPayloadType("The updated IssueTemplate")
suspend fun updateIssueTemplate(
@GraphQLDescription("Defines which IssueTemplate to update and how to update it")
input: UpdateIssueTemplateInput,
dfe: DataFetchingEnvironment,
@GraphQLIgnore
@Autowired
templateService: IssueTemplateService
): IssueTemplate {
return templateService.updateIssueTemplate(dfe.gropiusAuthorizationContext, input)
}

@GraphQLDescription("Updates a RelationTemplate, requires CAN_CREATE_TEMPLATES")
@AutoPayloadType("The updated RelationTemplate")
suspend fun updateRelationTemplate(
@GraphQLDescription("Defines which RelationTemplate to update and how to update it")
input: UpdateRelationTemplateInput,
dfe: DataFetchingEnvironment,
@GraphQLIgnore
@Autowired
templateService: RelationTemplateService
): RelationTemplate {
return templateService.updateRelationTemplate(dfe.gropiusAuthorizationContext, input)
}

@GraphQLDescription("Updates a ComponentVersionTemplate, requires CAN_CREATE_TEMPLATES")
@AutoPayloadType("The updated ComponentVersionTemplate")
suspend fun updateComponentVersionTemplate(
@GraphQLDescription("Defines which ComponentVersionTemplate to update and how to update it")
input: UpdateComponentVersionTemplateInput,
dfe: DataFetchingEnvironment,
@GraphQLIgnore
@Autowired
templateService: ComponentVersionTemplateService
): ComponentVersionTemplate {
return templateService.updateComponentVersionTemplate(dfe.gropiusAuthorizationContext, input)
}

@GraphQLDescription("Updates an InterfaceSpecificationVersionTemplate, requires CAN_CREATE_TEMPLATES")
@AutoPayloadType("The updated InterfaceSpecificationVersionTemplate")
suspend fun updateInterfaceSpecificationVersionTemplate(
@GraphQLDescription("Defines which InterfaceSpecificationVersionTemplate to update and how to update it")
input: UpdateInterfaceSpecificationVersionTemplateInput,
dfe: DataFetchingEnvironment,
@GraphQLIgnore
@Autowired
templateService: InterfaceSpecificationVersionTemplateService
): InterfaceSpecificationVersionTemplate {
return templateService.updateInterfaceSpecificationVersionTemplate(dfe.gropiusAuthorizationContext, input)
}

@GraphQLDescription("Updates an InterfacePartTemplate, requires CAN_CREATE_TEMPLATES")
@AutoPayloadType("The updated InterfacePartTemplate")
suspend fun updateInterfacePartTemplate(
@GraphQLDescription("Defines which InterfacePartTemplate to update and how to update it")
input: UpdateInterfacePartTemplateInput,
dfe: DataFetchingEnvironment,
@GraphQLIgnore
@Autowired
templateService: InterfacePartTemplateService
): InterfacePartTemplate {
return templateService.updateInterfacePartTemplate(dfe.gropiusAuthorizationContext, input)
}

@GraphQLDescription("Updates an IssueType, requires CAN_CREATE_TEMPLATES")
@AutoPayloadType("The updated IssueType")
suspend fun updateIssueType(
@GraphQLDescription("Defines which IssueType to update and how to update it")
input: UpdateIssueTypeInput,
dfe: DataFetchingEnvironment,
@GraphQLIgnore
@Autowired
issueTypeService: IssueTypeService
): IssueType {
return issueTypeService.updateIssueType(dfe.gropiusAuthorizationContext, input)
}

@GraphQLDescription("Updates an IssueState, requires CAN_CREATE_TEMPLATES")
@AutoPayloadType("The updated IssueState")
suspend fun updateIssueState(
@GraphQLDescription("Defines which IssueState to update and how to update it")
input: UpdateIssueStateInput,
dfe: DataFetchingEnvironment,
@GraphQLIgnore
@Autowired
issueStateService: IssueStateService
): IssueState {
return issueStateService.updateIssueState(dfe.gropiusAuthorizationContext, input)
}

@GraphQLDescription("Updates an IssuePriority, requires CAN_CREATE_TEMPLATES")
@AutoPayloadType("The updated IssuePriority")
suspend fun updateIssuePriority(
@GraphQLDescription("Defines which IssuePriority to update and how to update it")
input: UpdateIssuePriorityInput,
dfe: DataFetchingEnvironment,
@GraphQLIgnore
@Autowired
issuePriorityService: IssuePriorityService
): IssuePriority {
return issuePriorityService.updateIssuePriority(dfe.gropiusAuthorizationContext, input)
}

@GraphQLDescription("Updates an AssignmentType, requires CAN_CREATE_TEMPLATES")
@AutoPayloadType("The updated AssignmentType")
suspend fun updateAssignmentType(
@GraphQLDescription("Defines which AssignmentType to update and how to update it")
input: UpdateAssignmentTypeInput,
dfe: DataFetchingEnvironment,
@GraphQLIgnore
@Autowired
assignmentTypeService: AssignmentTypeService
): AssignmentType {
return assignmentTypeService.updateAssignmentType(dfe.gropiusAuthorizationContext, input)
}

@GraphQLDescription("Updates an IssueRelationType, requires CAN_CREATE_TEMPLATES")
@AutoPayloadType("The updated IssueRelationType")
suspend fun updateIssueRelationType(
@GraphQLDescription("Defines which IssueRelationType to update and how to update it")
input: UpdateIssueRelationTypeInput,
dfe: DataFetchingEnvironment,
@GraphQLIgnore
@Autowired
issueRelationTypeService: IssueRelationTypeService
): IssueRelationType {
return issueRelationTypeService.updateIssueRelationType(dfe.gropiusAuthorizationContext, input)
}

@GraphQLDescription("Updates an IntraComponentDependencySpecificationType, requires CAN_CREATE_TEMPLATES")
@AutoPayloadType("The updated IntraComponentDependencySpecificationType")
suspend fun updateIntraComponentDependencySpecificationType(
@GraphQLDescription("Defines which IntraComponentDependencySpecificationType to update and how to update it")
input: UpdateIntraComponentDependencySpecificationTypeInput,
dfe: DataFetchingEnvironment,
@GraphQLIgnore
@Autowired
intraComponentDependencySpecificationTypeService: IntraComponentDependencySpecificationTypeService
): IntraComponentDependencySpecificationType {
return intraComponentDependencySpecificationTypeService.updateIntraComponentDependencySpecificationType(dfe.gropiusAuthorizationContext, input)
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package gropius.dto.input.template

import com.expediagroup.graphql.generator.annotations.GraphQLDescription
import gropius.dto.input.common.UpdateNamedNodeInput

@GraphQLDescription("Input for the updateArtefactTemplate mutation")
class UpdateArtefactTemplateInput : UpdateNamedNodeInput()
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package gropius.dto.input.template

import com.expediagroup.graphql.generator.annotations.GraphQLDescription
import gropius.dto.input.common.UpdateNamedNodeInput

@GraphQLDescription("Input for the updateAssignmentType mutation")
class UpdateAssignmentTypeInput : UpdateNamedNodeInput()
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package gropius.dto.input.template

import com.expediagroup.graphql.generator.annotations.GraphQLDescription
import com.expediagroup.graphql.generator.execution.OptionalInput
import gropius.dto.input.common.UpdateNamedNodeInput
import gropius.model.template.style.ShapeType
import kotlin.properties.Delegates

@GraphQLDescription("Input for the updateComponentTemplate mutation")
class UpdateComponentTemplateInput(
@GraphQLDescription("The corner radius of the shape, ignored for circle/ellipse")
val shapeRadius: OptionalInput<Double?>,
@GraphQLDescription("The type of the shape")
val shapeType: OptionalInput<ShapeType>
) : UpdateNamedNodeInput()
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package gropius.dto.input.template

import com.expediagroup.graphql.generator.annotations.GraphQLDescription
import gropius.dto.input.common.UpdateNamedNodeInput

@GraphQLDescription("Input for the updateComponentVersionTemplate mutation")
class UpdateComponentVersionTemplateInput : UpdateNamedNodeInput()
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package gropius.dto.input.template

import com.expediagroup.graphql.generator.annotations.GraphQLDescription
import gropius.dto.input.common.UpdateNamedNodeInput

@GraphQLDescription("Input for the updateInterfacePartTemplate mutation")
class UpdateInterfacePartTemplateInput : UpdateNamedNodeInput()
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package gropius.dto.input.template

import com.expediagroup.graphql.generator.annotations.GraphQLDescription
import com.expediagroup.graphql.generator.execution.OptionalInput
import gropius.dto.input.common.UpdateNamedNodeInput
import gropius.model.template.style.ShapeType
import kotlin.properties.Delegates

@GraphQLDescription("Input for the updateInterfaceSpecificationTemplate mutation")
class UpdateInterfaceSpecificationTemplateInput(
@GraphQLDescription("The corner radius of the shape, ignored for circle/ellipse")
val shapeRadius: OptionalInput<Double?>,
@GraphQLDescription("The type of the shape")
val shapeType: OptionalInput<ShapeType>
) : UpdateNamedNodeInput()
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package gropius.dto.input.template

import com.expediagroup.graphql.generator.annotations.GraphQLDescription
import gropius.dto.input.common.UpdateNamedNodeInput

@GraphQLDescription("Input for the updateInterfaceSpecificationVersionTemplate mutation")
class UpdateInterfaceSpecificationVersionTemplateInput : UpdateNamedNodeInput()
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package gropius.dto.input.template

import com.expediagroup.graphql.generator.annotations.GraphQLDescription
import gropius.dto.input.common.UpdateNamedNodeInput

@GraphQLDescription("Input for the updateIntraComponentDependencySpecificationType mutation")
class UpdateIntraComponentDependencySpecificationTypeInput : UpdateNamedNodeInput()
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package gropius.dto.input.template

import com.expediagroup.graphql.generator.annotations.GraphQLDescription
import com.expediagroup.graphql.generator.execution.OptionalInput
import gropius.dto.input.common.UpdateNamedNodeInput
import kotlin.properties.Delegates

@GraphQLDescription("Input for the updateIssuePriority mutation")
class UpdateIssuePriorityInput(
@GraphQLDescription("The value of the IssuePriority, used to compare/order different IssuePriorities")
val value: OptionalInput<Double>
) : UpdateNamedNodeInput()
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package gropius.dto.input.template

import com.expediagroup.graphql.generator.annotations.GraphQLDescription
import com.expediagroup.graphql.generator.execution.OptionalInput
import gropius.dto.input.common.UpdateNamedNodeInput
import kotlin.properties.Delegates

@GraphQLDescription("Input for the updateIssueRelationType mutation")
class UpdateIssueRelationTypeInput(
@GraphQLDescription("The name of the relation from the inverse (incoming) perspective")
val inverseName: OptionalInput<String>
) : UpdateNamedNodeInput()
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package gropius.dto.input.template

import com.expediagroup.graphql.generator.annotations.GraphQLDescription
import gropius.dto.input.common.UpdateNamedNodeInput

@GraphQLDescription("Input for the updateIssueState mutation")
class UpdateIssueStateInput : UpdateNamedNodeInput()
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package gropius.dto.input.template

import com.expediagroup.graphql.generator.annotations.GraphQLDescription
import gropius.dto.input.common.UpdateNamedNodeInput

@GraphQLDescription("Input for the updateIssueTemplate mutation")
class UpdateIssueTemplateInput : UpdateNamedNodeInput()
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package gropius.dto.input.template

import com.expediagroup.graphql.generator.annotations.GraphQLDescription
import com.expediagroup.graphql.generator.execution.OptionalInput
import gropius.dto.input.common.UpdateNamedNodeInput
import kotlin.properties.Delegates

@GraphQLDescription("Input for the updateIssueType mutation")
class UpdateIssueTypeInput(
@GraphQLDescription("A path that is used as the icon for issues")
val iconPath: OptionalInput<String>
) : UpdateNamedNodeInput()
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package gropius.dto.input.template

import com.expediagroup.graphql.generator.annotations.GraphQLDescription
import com.expediagroup.graphql.generator.execution.OptionalInput
import gropius.dto.input.common.UpdateNamedNodeInput
import gropius.model.template.style.MarkerType
import kotlin.properties.Delegates

@GraphQLDescription("Input for the updateRelationTemplate mutation")
class UpdateRelationTemplateInput(
@GraphQLDescription("The type of the marker at the end of the relation")
val markerType: OptionalInput<MarkerType>
) : UpdateNamedNodeInput()
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class IssuePriority(
@property:GraphQLDescription("The value of the IssuePriority, used to compare/order different IssuePriorities.")
@FilterProperty
@OrderProperty
val value: Double
var value: Double
) : NamedNode(name, description) {

companion object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class IssueRelationType(
@property:GraphQLDescription("The name of the relation from the inverse (incoming) perspective")
@FilterProperty
@OrderProperty
val inverseName: String
var inverseName: String
) : NamedNode(name, description) {

companion object {
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/kotlin/gropius/model/template/IssueType.kt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class IssueType(
name: String,
description: String,
@GraphQLDescription("A path that is used as the icon for issues. Used with a 0 0 100 100 viewBox. No stroke, only fill.")
val iconPath: String
var iconPath: String
) : NamedNode(name, description) {

companion object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ abstract class RelationPartnerTemplate<T, S : RelationPartnerTemplate<T, S>>(
templateFieldSpecifications: MutableMap<String, String>,
isDeprecated: Boolean,
@GraphQLDescription("The corner radius of the shape, ignored for circle/ellipse.")
val shapeRadius: Double?,
var shapeRadius: Double?,
@GraphQLDescription("The type of the shape.")
val shapeType: ShapeType,
var shapeType: ShapeType,
) : Template<T, S>(name, description, templateFieldSpecifications, isDeprecated) where T : Node, T : TemplatedNode {

companion object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class RelationTemplate(
templateFieldSpecifications: MutableMap<String, String>,
isDeprecated: Boolean,
@GraphQLDescription("The type of the marker at the end of the relation.")
val markerType: MarkerType,
var markerType: MarkerType,
) : Template<Relation, RelationTemplate>(name, description, templateFieldSpecifications, isDeprecated) {

companion object {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package gropius.repository.template

import gropius.model.template.ComponentVersionTemplate
import gropius.repository.GropiusRepository
import org.springframework.stereotype.Repository

/**
* Repository for [ComponentVersionTemplate]
*/
@Repository
interface ComponentVersionTemplateRepository : GropiusRepository<ComponentVersionTemplate, String>
Loading
Loading